I'm a total amateur at this, and need help on format of a small TCL. I would appreciate knowing if this is correct syntax, or if not, where I have gone astray...
I want to check on join, if a user is:
a> is marked an op
b> but has not set a pass
c> I know I'm going to send the message twice, the notice is a backup if the user has a pm blocked (as so many do)
===
bind join - * checkpass
proc checkpass { nick host handle chan } {
if {[matchattr $handle |o $chan] && ([passwdok $handle ""] == 1)} {
putserv "NOTICE $nick :You need to set a password with the bot to activate ops, type: /msg bot pass password_you_want"
putserv "PRIVMSG $nick :You need to set a password with the bot to activate ops, type: /msg bot pass password_you_want"
}
}
===
It looks ok to me. you have the right syntax for passwdok too.
passwdok <handle> <pass>
Description: checks the password given against the user's password. Check against the password "" (a blank string) or "-" to find out if a user has no password set.
Returns: 1 if the password matches for that user; 0 otherwise
bind join - * checkpass
proc checkpass { nick host handle chan } {
if {[matchattr $handle |o $chan] && ([passwdok $handle ""] == 1)} {
putserv "NOTICE $nick :You need to set a password with the bot to activate ops, type: /msg bot pass password_you_want"
putserv "PRIVMSG $nick :You need to set a password with the bot to activate ops, type: /msg bot pass password_you_want"
}
}
Nice one, now just try it
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
You could always setup a test bot and try it on there first
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born