Code: Select all
bind FILT - ".adduser *" myfilt:adduser
proc myfilt:adduser {idx text} {
if {[string index [set nick [lindex [split $text] 1]] 0] == "!"} {
set nick [string range $nick 1 end]
}
if {[set newhand [lindex [split $text] 2]] == ""} {
set newhand $nick
}
if {[validhand $newhand]} { return $text }
*dcc:adduser [idx2hand $idx] $idx [join [lrange [split $text] 1 end]]
if {[validuser $newhand]} {
puthelp "NOTICE $nick :You have now been added to this bot"
puthelp "NOTICE $nick :You need to set a password, using the following command."
puthelp "NOTICE $nick :/msg $::botnick pass <password>"
puthelp "NOTICE $nick :Replacing <password> with a secure, unique password"
puthelp "NOTICE $nick :After this, you may see the commands available by typing"
puthelp "NOTICE $nick :/msg $::botnick help"
}
return ""
}
is this another case of an old tcl version on my shell? (i've had problems with that before - i spoke to my provider and it should be upgraded soon i hope)Tcl error [myfilt:adduser]: invalid command name "validhand"
Adduser uses a handle. My script has to parse this out, otherwise, it doesn't know if the user has been added or not..+user ppslim ppslim!*ident@host.com
.adduser ppslim slimbot