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.

need help with flags

Old posts that have not been replied to for several years.
Locked
j
jenwolf

Post by jenwolf »

I'm sorry if this is in the wrong forum, I'm not sure if it applies here or in the Tcl one...

I've got some Tcl scripts (that others wrote since I'm really new to Tcl) that I'm trying to get to work with my bot, but I'm having problems with flags. For some binds, if I set them to - (everyone) the procedure that's called will work, in other cases it won't. But in every case, if there are any other flags set, it won't work period. I've made sure that global and channel flags are set in the bot, and .whois <user> confirms it, but just can't get these scripts to work properly.

The shell I run my bot on has version 8.0 of Tcl and is running freebsd. Just to be sure it wasn't some problem there, I started another bot from my machine here where I have Tcl 8.3.2 and linux...but it's still having the same problems.

Does anyone have any ideas why I'm having this problem with the flags and the scripts? I've read all the documentation I could get my hands on, but I guess I'm still pretty green to this eggdrop stuff :smile:. Any help would be appreciated, thanks.

User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Give an short example of a bind where the flags dosen't work and someone will give you an answer.
j
jenwolf

Post by jenwolf »

Ok, but should I take it to the Tcl forum?
j
jenwolf

Post by jenwolf »

I guess I just wanted to make sure that I understand how the flags work. I've set them using .chattr user +/-flag channel. I did .whois user and I can see that the user has both +o globally and for the channel...so, for a bind that looks like this:

bind msg o|o command proc

the user with the flags set should be able to /msg the bot with that command and get back what the procedure is supposed to return, right? and other users who the bot doesn't recognize or who don't have those flags should get nothing, right?

If so, then I can't figure out what is wrong because the user with the +o flags doesn't get anything out of it with it set like that, but if i set the bind like so:

bind msg - command proc

it works fine.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

you sure that the bot actually recognises them as that user (ie, does their hostmask match whats in their userrecord)?
j
jenwolf

Post by jenwolf »

ack, no! I would never have thought of that either, thank you!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As for the bind example.
bind msg o|o command proc
This will trigger if the user flags meets the following conditions.
  • The user has channel +o, the user does not have global +o
  • The user has global +o, the user does not have channel +o
  • The user has both channel and global +o
And as expected, it does not trigger if they have neither.

Here are other ways of doiung the bind
bind msg o command proc
Trigger on global +o but not channel +o
Trigger on global and channel +o
bind msg |o command proc
Trigger on channal +o but not global +o
Trigger on channel and glocal +o
bind msg o&o command proc
Triiger only if user has both channel and global +o.
Locked