I wrote this script so you can add someone to a user group by their nickname and be able to make sure they are registered. This way, if the person is gone and someone clones the nick, your text commands won't trigger since the nick isn't logged in.
The user level in this example is 10. You can make this 'admin' or whatever you like. Just make sure you replace every occurrence of '10' with your user group name. Optionally you can remove this and use $user or $level to support more than one group.
alias cc_isreg return $iif($readini(nexus.ini,ccore_reg,$1),1,0)
on 10:join:#:{
if (%join10 [ $+ [ $nick ] ] > 3) return
inc -u5 %join10 [ $+ [ $nick ] ]
whois $nick
}
raw 307:*:{
if (!%join10 [ $+ [ $2 ] ]) return
writeini neXus.ini ccore_reg $2 1
}
on 10:part:#:{
if ($readini(nexus.ini,ccore_reg,$nick)) remini nexus.ini ccore_reg $nick
}
on 10:quit:{
if ($readini(nexus.ini,ccore_reg,$2)) remini nexus.ini ccore_reg $2
}
/*
Example:
menu nicklist {
Add Level 10:auser 10 $$1
}
on 10:text:*:#:{
if (!$cc_isreg($nick)) return
tokenize 32 $regsubex($1-, /^##\*.*\*##/,$null)
if ($1 = .hop) hop #
}
*/