Can I add a password ?? KingPlayFair KHR Monday, May 29, 2000

Hi Subspace

I was wondering if it is possiable to have the bot whisp to people who enter the channel to tell then that they have a few seconds to whisp back a password or by banned.

KingPlayFair KHR

 
Re: Can I add a password ?? SubSpace Monday, May 29, 2000

Hi,

> I was wondering if it is possiable to have the bot whisp to people who
> enter the channel to tell then that they have a few seconds to whisp back
> a password or by banned.

If you really needed to.. I've set this up on my own bot and it seems to work fine:

Define an OnJoin greeting for every level you want to use the password authentication for:

execute("requestauth " + getName(), "KingPlayFair")

KingPlayFair is the name of someone with a high enough access level to execute the !requestauth command you need to set up (running in a separate thread):

whisper("Password authentication required, whisper !auth  with 30 seconds", paramWord(1))
var user = getUser(paramWord(1))
user.properties().set("authenticated", false)

sleep(30000)

var authenticated = user.properties().get("authenticated")

if (!authenticated)
{
  talk("/ban " + paramWord(1) + " Password authentication failed!")
}

Lastly, set up a command !auth:

var user = getUser(getName())

if (paramWord(1) == "thepassword")
{
  user.properties().set("authenticated", true)
  send("Access granted")
}
else
  send("Password incorrect")

SubSpace

 
Re: Can I add a password ?? MystCast~khr Monday, May 29, 2000

> Hi, > I was wondering if it is possiable to have the bot whisp to > people who > enter the channel to tell then that they have a few seconds to whisp back > a password or by banned.

> If you really needed to.. I've set this up on my own bot and it seems to > work fine:

> Define an OnJoin greeting for every level you want to use the password > authentication for: execute("requestauth " + getName(), > "KingPlayFair")

> KingPlayFair is the name of someone with a high enough access level to > execute the !requestauth command you need to set up (running in a separate > thread): whisper("Password authentication required, whisper !auth > with 30 seconds", paramWord(1)) var user = getUser(paramWord(1)) > user.properties().set("authenticated", false) sleep(30000) var > authenticated = user.properties().get("authenticated") if > (!authenticated) { talk("/ban " + paramWord(1) + " > Password authentication failed!") }

> Lastly, set up a command !auth: var user = getUser(getName()) if > (paramWord(1) == "thepassword") { > user.properties().set("authenticated", true) send("Access > granted") } else send("Password incorrect")

> SubSpace