ConstantVirus1 Posted July 31, 2004 Report Share Posted July 31, 2004 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. Link to comment Share on other sites More sharing options...
Ziggy Posted July 31, 2004 Report Share Posted July 31, 2004 try access $comchan($nick,1) delete deny %kickedhost $+ *!*@* or, store the person's hostname somehow and try access $comchan($nick,1) delete deny *!*@* $+ %kickedhostname most scripts ban based on hostname, and therefore deleting the deny based on nickname won't work. the logic is this (at least, this is how the logic works on ignitionServer): Assume that the nick of the kicked host was Ziggy. This means that the full mask would be Ziggy!*@*. When this host was banned, the host that kickbanned the user banned their hostname. Let's assume Ziggy's hostname was a virtual host of ziggy.creator.of.ignitionserver. The access entry is set for *!*@ziggy.creator.of.ignitionserver. When ignitionServer scans the list of access entries, it cannot match Ziggy!*@* with *!*@ziggy.creator.of.ignitionserver, because Ziggy!*@* can match any hostname. It would be a bug if Ziggy!*@* matched that hostname, because Ziggy!*@* is looking for any mask with Ziggy as the nickname, not any mask with any nickname (which is what would happen if it matched the hostname). Vincula also uses similar logic, which is actually the correct logic. Hopefully that explains it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now