So today has been a debugging day for myself it seems. I help run a couple channels on IRC. Or really, the bots that I manage run it. On the bots, I have a couple of scripts running that help to make the channel management easier. All scripts are written in tcl. These scripts help manage FAQs, key word triggering, and managing ops, voiced users, etc.
Now anyone who is on IRC knows that there are many types of bots that can be and are used to help manage channels. These bots that are currently being used (and running these scripts) are eggdrops. The one script in question is for managing oped users, voiced users, and the actions that they can perform.
The way eggdrops work (if you don't know) is you can set flags for users. For example, if a user is an operator, you can give them the +o flag (attribute). If a user is voiced, you can give them the +v flag. One basic check that the script should be performing, is that opped users should be able to kick voiced users from a room, but not the other way around.
I'll give you one guess as to what I'm trying to debug.
So, since voiced users do somehow have the ability I'm trying to figure out why. I've also narrowed down that it seems to only be happening in this one specific channel, and I think I just discovered why.
When you set flags for the user in the bot, you can set them on two different levels. You can set a flag (like +o) on a per channel level (where the flag is only for that channel) or on a global level. So what's happening, is the script is doing a check on the user's (who is being kicked) flags. It also compares those flags to the flags of the "kickee".
In this channel specifically, I've set the flags for the operators at the channel level, not the global level, and I think that is why this issue is happening. When the script does the check on the flags, it is doing a check on the global flags for the user being kicked, not at the channel level. Since the opped users in here have their flags set at the channel level, not global level, the script isn't seeing the "o" flag. It then thinks it is not set, and then kicks and bans the user from the specified channel.
So, right now, it looks like my (hopefully temporary) work around is that I have to set the flags at the global level for the ops so that they do not get kicked. In the meantime, I have to try to figure out how to make the script also check on the channel level.
Here is the script that I am working on at the moment. If anyone happens to be great with tcl, or even better, a guru with eggdrop scripting, take a look at it and let me know if you know how to make it do a channel check.
Saturday, January 30, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment