Th Original idea was by CadetAndrew but I have added Revenge levels for different results. I haven't tested level 4 as yet so that may need alteration at a later date. Use /unbanme to see status. or /unbanme +revenge to set level.
The script is self explanatory as to what each level does, so read it through.
;Original script by CadetAndrew
;changes by BusyElf
;addded levels of revenge
;IRCop level 4 revenge untested.
alias unbanme {
if ($1 == on) { set %unbanme 1 | echo 2 -a * Unbanme script successfully enabled. | if (%revenge.on.unban == 1) echo 2 -a * with revenge level %rev set. }
elseif ($1 == off) { unset %unbanme | echo 4 -a * Unbanme script successfully disabled. }
if ($1 == $null) {
if ((%unbanme == 1) && (%revenge.on.unban == 1) && (%rev == 1)) { echo 9 -a * The unbanme script is enabled with warn revenge. }
if ((%unbanme == 1) && (%revenge.on.unban == 1) && (%rev == 2)) { echo 9 -a * The unbanme script is enabled with kick revenge. }
if ((%unbanme == 1) && (%revenge.on.unban == 1) && (%rev == 3)) { echo 9 -a * The unbanme script is enabled with kick/ban revenge. }
if ((%unbanme == 1) && (%revenge.on.unban == 1) && (%rev == 4)) { echo 9 -a * The unbanme script is enabled with kick/ban/deowner revenge.IRCops only }
if ((%unbanme != 1) && (%revenge.on.unban == 1)) { echo 4 -a * The unbanme script is disabled, but revenge is still set at level %rev $+ . }
if ((%unbanme != 1) && (%revenge.on.unban == $null)) { echo 12 -a * The unbanme script is fully disabled. }
}
if ($1 == +revenge) {
:check
set %rev $?="input a number 1,2,3 or 4 for the type of Revenge"
if ((%rev < 1) || (%rev > 4) || (%rev == $null)) goto check
set %revenge.on.unban 1 | echo 9 -a * Successfully added revenge to the unbanme script at level %rev $+ .
}
elseif ($1 == -revenge) { unset %revenge.on.unban | unset %rev | echo 4 -a * Successfully took away revenge from the unbanme script. }
}
on *:BAN:#: {
if ($banmask iswm $address($me,5)) && (%unbanme == 1) {
/msg chanserv unban $chan $me
/join $chan
.timerh 1 3 { /mode # +hov $me $me $me }
.timero 1 4 { /mode $chan -ovh $nick $nick $nick }
.timern 1 4 { /msg $chan That wasn't very nice $nick! }
}
if ($banmask iswm $address($me,5)) && (%unbanme == 1) {
if ((%revenge.on.unban == 1) && (%rev == 1)) .timern1 1 4 { /notice $nick Don't try to ban me $nick $+ ! :-P }
if ((%revenge.on.unban == 1) && (%rev == 2)) .timern2 1 4 { /kick $chan $nick Don't try to ban me again $nick $+ ! }
if ((%revenge.on.unban == 1) && (%rev == 3)) .timern3 1 4 { /ban -ku60 %chan $nick Don't ever try to ban me $nick $+ ! }
if ((%revenge.on.unban == 1) && (%rev == 4)) .timern4 1 4 { /mode $chan -qovh $nick $nick $nick $nick | /ban -ku120 %chan $nick Don't EVER try to ban me $nick $+ ! }
}
}
@BusyElf: You're wrong. Why? Because:
If you don't know how to write something OR you want to ask about something and let the rest of people help you THIS IS NOT THE RIGHT PLACE for that. You have to post a topic on forums and ask it there.
Don't be stupid, i didn't flame you and i won't do that. I'm helping people on certain IRC networks, and i know how should i make my steps. But the problem is, you don't even know where you should put the begin-blocks. That's why i said "Learn first, and the share it with other." or at least bother yourself and ask from people to help you.
@scrops: Oh god, help this people to grow up.
If you need to ask 'wtf is this?' why are you flaming me, MaSOuD?
Also the code works regardless of what it looks like.
Constructive criticism is welcomed, but dumbass comments like this should be left off the message board.
I am still relatively new to IRC coding so any helpfull comments are welcomed. Useless drivelish criticism is not helpful to anyone!
wtf is this?
if ((%revenge.on.unban == 1) && (%rev == 1)) .timer 1 3 { /notice $nick Don't try to ban me $nick $+ ! :-P }
Also this one:
if ($1 == +revenge) {
:check
{ set %rev $?="input a number 1,2,3 or 4 for the type of Revenge"
if ((%rev < 1) || (%rev > 4) || (%rev == $null)) { goto check }
{ set %revenge.on.unban 1 | echo 9 -a * Successfully added revenge to the unbanme script at level %rev $+ . }
}
}
Do you know what {} does?
If you don't know how to modify any script/addon/snippet learn first, and then share it with people.