Kick Revenge & Ban Protect

Platform:  mIRC
Published  Jun 30, 2009
Updated  Jun 30, 2009
Will kick people who kicks, deops or bans you with help of ChanServ services bot, Requires ****Serv Services and Auto-OP access. on 1:DEOP:#:if ($opnick == $me) && ($nick != $me) { chanserv op # $me | chanserv deop # $nick | set %nick2kick $nick }
on 1:OP:#:if (%nick2kick != $me) && (%nick2kick ison #) && ($opnick == $me) { kick # %nick2kick Dont Touch Me, Banned! | mode # +b $address($nick,2) | unset %nick2kick }
on 1:KICK:#:if ($knick == $me) && ($nick != $me) { set %nick2kick $nick | chanserv invite # | .timerREJOIN $+ # 0 10 .RAW JOIN # }
on 1:JOIN:#:if ($nick == $me) && ($istimer(REJOIN $+ #)) .timerREJOIN $+ # off
on 1:BAN:#:{
if ($address($me,1) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,2) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,3) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,4) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,5) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,6) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,7) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,8) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,9) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,10) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,11) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,12) iswm $banmask) && ($me !isop #) { set %nick2kick $nick | chanserv unban # $me | chanserv op # $me | halt }
elseif ($address($me,1) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,2) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,3) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,4) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,5) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,6) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,7) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,8) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,9) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,10) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,11) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
elseif ($address($me,12) iswm $banmask) && ($me isop #) { mode # -bov+b $banmask $nick $nick $address($nick,2) | kick # $nick Dont Ban Me, Banned! | halt }
}

Comments

Sign in to comment.
Tannn3r   -  Aug 10, 2010
I will try it once it is tested and functional.
 Respond  
gooshie   -  Jan 30, 2010
Within those elseif statements there is no need for the | halt
If you do if ($banmask iswm $address($me,5)) you can have alot less lines.
The way you have them reversed you are essentially just doing an is equal to match.
The whole on ban event could be done as follows:

Code
 
 Respond  
SeventhReign   -  Jan 30, 2010
Why would you set it to Ban the user if they OP you? That makes absolutely no sense.
 Respond  
Aucun50   -  Jun 30, 2009
Snippet needs to be tested and functional.
 Respond  
independentt   -  Jun 30, 2009
above code untested feel free to comment bugs
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.