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.

Cannot work :(

Old posts that have not been replied to for several years.
Locked
S
Stafford

Post by Stafford »

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.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Instead of

if {(a) || (b) == 0}

try

if {!(a) && !(b)}
S
Stafford

Post by Stafford »

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...
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

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 »

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.
Locked