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.
Old posts that have not been replied to for several years.
S
Stafford
Post
by Stafford » Sun Dec 16, 2001 6:26 am
Hope someone could help...
I've got this:
if {([matchattr $hand +f]) || ([matchattr $hand +f $chan]) == 0} {
puthelp "PRIVMSG $nick :i cannot do that"
return 0
}
It just couldn't work. It suppose to message the person if the user uses a command which he does not have flags with or is just a normal user with no handle in the bot.
Any ideas would be greatly appreciated.
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Sun Dec 16, 2001 9:43 am
Instead of
if {(a) || (b) == 0}
try
if {!(a) && !(b)}
S
Stafford
Post
by Stafford » Sun Dec 16, 2001 9:47 am
stdragon,
I've tried changing the codes to which you recommended but it doesn't seems to work. There's no respond from the bot. No TCL Error though...
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Dec 16, 2001 12:03 pm
At the moment, the script is ony; checking global flags. Even with the $chan in there, it's still only global flags.
I am gathering, thatthe user must have the +f channel or global flag to use the command?
if so then
if {![matchattr $chan f|f $chan]} {
putserv "BLAH"
return 0
}
S
Stafford
Post
by Stafford » Mon Dec 17, 2001 11:38 pm
Hi ppslim,
Thanks for the help. You're right about the user must have +f flags to use the command. It's working fine now. Thanks.