This script will add a menu control to the nicklist. It will add the option +q if the user is not owner and -q if he is and so on.
It also saves the modes q and a to an ini, you can use the ini for other options too.
/*
Nicklist control by Larry
http://larrybolt.ind-web.com/index2.php?page=script&action=view&id=6
*/
menu nicklist {
Control
.$iif($readini(modes.ini, $chan, $1) == owner, -q, +q):$iif($readini(modes.ini, $chan, $1) == owner, mode $chan -q $1, mode $chan +q $1)
.$iif($readini(modes.ini, $chan, $1) == protect, -a, +a):$iif($readini(modes.ini, $chan, $1) == protect, mode $chan -a $1, mode $chan +a $1)
.$iif($1 isop $chan, -o, +o):$iif($1 isop $chan, mode $chan -o $1, mode $chan +o $1)
.$iif($1 ishop $chan, -h, +h):$iif($1 ishop $chan, mode $chan -h $1, mode $chan +h $1)
.$iif($1 isvoice $chan, -v, +v):$iif($1 isvoice $chan, mode $chan -v $1, mode $chan +v $1)
}
raw 388:*: writeini modes.ini $2 $3 protect
raw 386:*: writeini modes.ini $2 $3 owner
on *:rawmode:*: {
if ($1 === +q) writeini modes.ini $chan $2 owner
elseif ($1 === -q) writeini modes.ini $chan $2 reg
elseif ($1 === +a) writeini modes.ini $chan $2 protect
elseif ($1 === -a) writeini modes.ini $chan $2 reg
}
on *:join:*: {
if ($nick == $me) {
remini modes.ini $chan
mode $chan a
mode $chan q
}
}