unbanme 2

By BusyElf on Feb 01, 2011

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 $+ ! }
  }
}

Comments

Sign in to comment.
MaSOuD   -  Feb 07, 2011

I can't see any update in ON BAN event... timers are still in an incorrect syntax.

 Respond  
BusyElf   -  Feb 06, 2011

Updated, thanks for the help guys :-)

 Respond  
Jethro   -  Feb 04, 2011

you would be better off using banmask 5 not 2Or

$ial($me)
 Respond  
napa182   -  Feb 04, 2011

very odd bracket placements. also it would be a good idea to name ur timers.
and on this...

if ($banmask iswm $address($me,2))

you would be better off using banmask 5 not 2

 Respond  
BusyElf   -  Feb 04, 2011

Ok Points noted and code changed accordingly. However the brackets outside the .timer 1 3 didn't work for me, so have returned to original code in that part.

 Respond  
berend   -  Feb 04, 2011

if ((%revenge.on.unban == 1) && (%rev == 1)) { timer 1 3 notice $nick Don't try to ban me $nick $+ ! :-P }

and i geuss that would be better :P

 Respond  
berend   -  Feb 04, 2011

if ((%revenge.on.unban == 1) && (%rev == 1)) .timer 1 3 { /notice $nick Don't try to ban me $nick $+ ! :-P }

^

I guess that wont work, so MaSOuD is right..

 Respond  
MaSOuD   -  Feb 03, 2011

@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.

 Respond  
scorps   -  Feb 03, 2011

Now THAT i like. Someone who stands up to the ones who only dribble crap, not help out

 Respond  
BusyElf   -  Feb 03, 2011

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!

 Respond  
MaSOuD   -  Feb 02, 2011

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.

 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.