Unbanme Script

By CadetAndrew on Jan 29, 2010

This is an advanced unbanme script. If someone bans you in a channel, it tells ChanServ to immediately unban you.

Configuration
/unbanme [on|off] -- Will either turn the unbanme script on or off.
/unbanme +revenge -- Will kick the nick that banned you.
/unbanme -revenge -- Turns off the revenge.

If you just type /unbanme it will echo to you if the script is currently enabled or disabled.

This only works if you are banned by nick, not by address. If anyone knows how to have the script catch if you are being banned by address, it would help a lot.

If you have any other questions about my script be sure to ask.

alias unbanme {
  if ($1 == on) { set %unbanme 1 | echo 9 -a * Unbanme script successfully enabled. }
  elseif ($1 == off) { unset %unbanme | echo 4 -a * Unbanme script successfully disabled. }
  if ($1 == $null) {
    if (%unbanme == 1) { echo 9 -a * The unbanme script is enabled. }
    elseif (%unbanme == 1) && (%revenge.on.unban == 1) { echo 9 -a * The unbanme script is enabled with revenge. }
    elseif (%unbanme != 1) { echo 5 -a * The unbanme script is disabled. }
    elseif (%unbanme != 1) && (%revenge.on.unban == 1) { echo 4 -a * The unbanme script is enabled, but the revenge variable is still set. }
  }
  if ($1 == +revenge) { set %revenge.on.unban 1 | echo 9 -a * Successfully added revenge to the unbanme script. }
  elseif ($1 == -revenge) { unset %revenge.on.unban | echo 4 -a * Successfully took away revenge from the unbanme script. }
}

on *:BAN:#: {
  if ($banmask iswm $address($me,5)) && (%unbanme == 1) {
    cs $chan unbanme
    join $chan
  }
  if (%revenge.on.unban == 1) { /kick $chan $bnick Don't try to ban me $bnick $+ ! }
}

Comments

Sign in to comment.
CadetAndrew   -  Jan 29, 2010

Thanks napa! I added that part and the script works perfectly now!

I added a new part to this script called revenge. You can enable it by type /unbanme [+|-]revenge.

 Respond  
gooshie   -  Jan 29, 2010

This checks just as Napa suggested and also if they use extended ban types. You will need to do a little more with the extended type.

on *:BAN:#: {
  if $banmask iswm $address($me,5) || $gettok($banmask,2,58) iswm $v1 {
 Respond  
napa182   -  Jan 29, 2010

use

if ($banmask iswm $address($me,5))
 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.