This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

a little help...

Old posts that have not been replied to for several years.
Locked
t
tonyokc
Voice
Posts: 11
Joined: Mon May 03, 2004 12:16 am

a little help...

Post by tonyokc »

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"
}
}
===

Thanks for any assistance,
Tony
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

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

Code: Select all

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
t
tonyokc
Voice
Posts: 11
Joined: Mon May 03, 2004 12:16 am

Post by tonyokc »

thanks, was little paranoid to try it before someone else told me i hadn't gone nuts! lol

with over a thousand members, I'd REALLY get yelled at if it was screwed up. they have no mercy!

:D
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

You could always setup a test bot and try it on there first :wink:
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
Locked