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 bind and user flags question

Help for those learning Tcl or writing their own scripts.
Post Reply
o
octatone
Voice
Posts: 3
Joined: Thu Jul 15, 2010 1:26 pm

simple bind and user flags question

Post by octatone »

I could find a list of lettered flags, but I'm editing a script that has flags like the following:

Code: Select all

bind pub -|o !example do_something
bind pub -|- !example2 do_something2
Can someone kindly explain what the "-" flag means and what the "|" is doing here? Is it just a catch all to disable the bind?

Thanks in advance!
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The dash (-) means you don't need any flag at all to match.
The pipe (|) means "OR", and is used to separate the global flags from the channel-specific flags. You could also use the ampersand (&) as "AND" to require both global and channel-specific flags.
NML_375
o
octatone
Voice
Posts: 3
Joined: Thu Jul 15, 2010 1:26 pm

Post by octatone »

which side of the pipe is channel and which side is global? and does one supersede the other?

(i just want to make sure I understand 100% before I go and editing operator commands attached to binds)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

First one maches against the global flags, second against channel-specific flags. If you use the OR-separator, having one of them matching is enough; if you use the AND-operator on the other hand, you'll have to match them all.
NML_375
o
octatone
Voice
Posts: 3
Joined: Thu Jul 15, 2010 1:26 pm

Post by octatone »

Thanks so much for your help :)
Post Reply