I actually wrote this script to make my friend mad because he hates when I use variable arrays such as the one this script uses.
use the alias /aop to turn the script on and off. it is channel specific. if you don't want someone to be oped, Right click on their nick in the nicklist, there will be a menu there called "auto-oper"
This is multi-server so don't worry about that :)
; written in it's entirety by Savage
; contact me with the mIRC command on the next line
; /server -m irc.netgamers.org -j #savage
; thanks to these people for suggestions: Yogibear, melwil
; cont'd: napa182, Jethro_, Known
; enjoy :)
on @*:JOIN:#: {
if %aop. [ $+ [ $chan ] $+ . $+ [ $network ] ] == 1 {
if $address($nick,2) isin %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] { HALT }
mode $chan +o $nick
} }
alias AOP {
if %aop. [ $+ [ $chan ] $+ . $+ [ $network ] ] != 1 { if ($address($nick,2) isin %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ]) { HALT }
set %aop. [ $+ [ $chan ] $+ . $+ [ $network ] ] 1 | echo Auto-Op for $chan is ON
}
else {
unset %aop. [ $+ [ $chan ] $+ . $+ [ $network ] ] | echo Auto-Op for $chan is OFF
} }
menu Nicklist {
Auto-oper
.no-op { if %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] == $null { echo -a $$1 has been added to the no-op list for # | set %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] $address($$1,2) }
elseif ($address($$1,2) isin %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ]) { echo -a $$1 has already been added to the no-op list for # | HALT }
else { echo -a $$1 has been added to the no-op list for # | set %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] $address($$1,2) }
}
.op {
if $address($$1,2) isin %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] {
echo -a $$1 has been removed from the no-op list for #
set %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] $remtok(%noop. [ $+ [ $chan ] $+ . $+ [ $network ] ],$address($$1,2),0,32)
if %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] == $null { unset %noop. [ $+ [ $chan ] $+ . $+ [ $network ] ] } }
else { echo -a $$1 wasn't in the no-op list for # } }
}
Known, I just put the first bracket after the initial variable "name" so it was easier for me to find them. :)
and why aren't you in my chan anymore? god... :P
sunslayer, my newer script, which is an extreme expansion of this, is found here: http://www.hawkee.com/snippet/8124/
Savege_CL, $wildsite returns a user's address in the form of !@host, which is interchangeable with $address($nick,2). The only difference is one is shorter and the other longer. For MSL, I tend to look for shorter way instead of going the extra mile to have a big script with lengthy coding that ultimately results the same outcome.