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.

bind pub help

Help for those learning Tcl or writing their own scripts.
Post Reply
e
everythingdaniel
Voice
Posts: 8
Joined: Mon Aug 17, 2009 3:41 pm

bind pub help

Post by everythingdaniel »

Hi everyone, I am just wondering about the "bind pub lo !info topic_learn" method.

Why is it sometimes written like "bind pub lo|lo !info topic_learn"? And others just like "bind pub lo !info topic_learn"? Does the "l" mean anything?


Now, my probel is that I need to get a few scripts that are designed for ops, to work with half ops. I know the problem is in the lines that look like the one I posted above, because if I do "bind pub - !info topic_learn", then it works fine, but for everyone.

So those are the two questions I have.


Thanks!


--DanieL L
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

It would be <Global Flag>|<Channel Flag> If you wanted Global Ops and Half Ops to use the command !info you could use

Code: Select all

bind pub lo|- !info info:pub
If you wanted Channel Halfops and Ops to use the command !info you would use

Code: Select all

bind pub -|lo !info pub:info
:)
The use ov

Code: Select all

bind pub lo !info pub:info
would be the same as Global Flags (the first example)

:arrow: From wot you are saying "how the bind pub -|- !info ..." works but no the others. Its probably more down to the bot not recognizing your ops/halfops :oops:

More Info on bind
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Just to be clear, these are bot user flags and do not refer to the users that are physically op'd or halfop'd on the IRC channel.

In order to restrict usage to IRC channel ops :-

Code: Select all

bind PUB - !command pExecute

proc pExecute {nick uhost hand chan text} {
  if {[isop $nick $chan]} {
    # code here
  }
}
In order to restrict usage to users that are both IRC channel ops AND bot global/channel ops :-

Code: Select all

bind PUB o|o !command pExecute

proc pExecute {nick uhost hand chan text} {
  if {[isop $nick $chan]} {
    # code here
  }
}
If you are confusing the two different types of "ops" or "halfops" then this may be the reason why some scripts appeared not to work whilst others did.
I must have had nothing to do
e
everythingdaniel
Voice
Posts: 8
Joined: Mon Aug 17, 2009 3:41 pm

Post by everythingdaniel »

hmm, lo|lo does not work.


Is it o = ops and l=half ops?

why l? Isnt the mode for half ops h?


Also, I have...

# Some IRC servers are using some non-standard op-like channel prefixes/modes.
# Define them here so the bot can recognize them. Just "@" should be fine for
# most networks. Un-comment the second line for some UnrealIRCds.

set opchars "%@"


Would that be correct? If that is the case, then it sould be thinking %(halfops) is ops and I would just need o|o ?



Thanks for the replies!



--Daniel L
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Read my post above.

You are definitely confusing bot flags (bot global/channel ops and hafops) with IRC channel ops and halfops).
I must have had nothing to do
Post Reply