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.

Simple script to react dependant on flags.

Old posts that have not been replied to for several years.
Locked
M
MoonUnit

Post by MoonUnit »

I'm playing around and trying to learn more TCL, but what I want to learn how to do right now is define a script in an existing file (bar-n-grill.tcl) so that custom commands respond differently depending on if the user that uses a command has a +o flag or not.

The next thing I need to know is how to get the bot to preform server level actions (Ie., a trigger used by an op would kick/ban a nick, but a non-op, or non +o person would just get kicked for trying it).

I'm kind of slow, but I am trying to learn. :razz:

Any help would be appreciated.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Bind to "-", so that all users can use it. Then in the procedure, use matchattr and an if statement to react depending on flags. (read about matchattr in tcl-commands.doc, and "if" in the tcl manual)
Locked