Does anyone here know a code that will make my script kick a host, that kicks a host on a higher level then them. Like say I have a host on my level 2 access, and he/she kicks a host on my level 3 or 4. A brown host kicks another brown host, or a gold host kicks another gold host, my script will unban them, if there was a ban set, and it will remove the kicker from the user level they are on, and de-op them.
This is what I have so far.
on *:kick:*:{
if ($level($ial($knick,1)) == level3) {
set %kickedhost $knick
set %badhost $nick
access $comchan($nick,1) delete deny %kickedhost
if ($read(text/nicksandadresses.txt,w,* $+ %kickedhost $+ *)) {
access $comchan($nick,1) delete deny $gettok($read(text/nicksandadresses.txt, $readn),1,150)
}
msg $comchan($nick,1) unbanned %kickedhost
.ruser level2 *! $+ $$ial(%badhost $+ *,1).addr
mode # -o %badhost
msg $comchan($nick,1) You have been a bad host.. I removed you from my host list , %badhost :)
unset %badhost
unset %kickedhost
}
}
on *:JOIN:*:{
if (!$read(text/nicksandadresses.txt,w,* $+ $address($nick,1) $+ *)) {
write text/nicksandadresses.txt $address($nick,1) $+ $chr(150) $+ $nick
}
}
But that will not remove the ban if there is one set, and no matter what level you are on, even if you are on a higher level, it will still kick you.