LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Irssi scripting question (detecting channel/usermodes) (https://www.linuxquestions.org/questions/programming-9/irssi-scripting-question-detecting-channel-usermodes-531067/)

Anonycat 02-21-2007 11:47 AM

Irssi scripting question (detecting channel/usermodes)
 
I'm working on scripting an Irssi bot, and I want some of the functions to be available only to users with +a (&; usually called "superop" or "admin") or +q (~; "owner"). I know "$server->channel_find($target)->nick_find($nick)->{op}" runs a check for +o, but what's the syntax to check for the higher levels?

Alternatively, I can set up a whitelist of all names that are supposed to be on the +aq lists, and check for that name, with an additional check in place that requires the user to be registered (umode +r) so that random users can't simply wait for one of them to quit, change to that name, and go crazy for a minute before their name is automatically changed. But I don't know what to put in the {} to check for that either; I'd presume that the channel_find term would be removed since I'm looking for a umode rather than a chmode.


All times are GMT -5. The time now is 05:20 AM.