It probably is.keung wrote: ...
From what I see on this page (is this the complete set of flags?), the flag i would be available.
To conform to that, when I do it, I use an UPPER CASE flag.There are also 26 user-defined channel flags (A-Z).
That would trigger for global owners and also those with channel flag "i"..chattr user +i #examplechannel
And then
bind pub "n|i" !ownercommand some_proc_for_channelowners_only
Would this suffice? Also, how could I make sure that the bind only triggers for users that has that specific flag, and not trigger for any global flag?
keung wrote:Oh, I forgot for a second that flags were case sensitive and that A-Z could be used as well. Knowing this makes it a whole lot easier!
What global flags?With the bind -|I, wouldn't that mean that anyone who is added to the bot with global flags could run the command?
umm.... that's the purpose of flags in the bind... so you don't have to do that.Come to think of it, it shouldn't really matter, I could just do an if statement to exclude anyone who doesn't have the +I flag from executing the command.
Do some experimenting.But, yes, you got what I meant. .chattr user +I #channel is in essence what I want to do. I was just a little unsure that it would really be that easy!
keung wrote:Say that I have
bind -|I "!something" do_something
Doesn't the - imply that anyone can run the command, despite not having the +I flag on the channel? Or does that tell the eggdrop that only users with the flag can run the command?
willyw wrote: Do some experimenting.
Carefully, to be sure you get the results you want.
Code: Select all
# May 2, 2012
# http://forum.egghelp.org/viewtopic.php?p=99315#99315
bind pub -|I "!something" do_something
proc do_something {nick uhost handle chan text} {
putserv "privmsg $chan :Bind triggered the proc"
}
The - is a placeholder, to tell the interpreter to check for negative flags. But you've given it no flags to -. So basically, all that does is nothing. "-|+o" == "|+o" == "+|+o". Basically you have "GLOBAL|CHANNEL" in regard to flags. If I want to check if someone is owner of the bot itself "n|-" or "n|" or "n|+" would do that. If I want to check if someone is owner of an irc channel "-|n" or "|n" or "+|n" would do that.keung wrote:Say that I have
bind -|I "!something" do_something
Doesn't the - imply that anyone can run the command, despite not having the +I flag on the channel? Or does that tell the eggdrop that only users with the flag can run the command?