unban all bans(clear bans)

By XpLoiTeR on Jan 21, 2006

just write /unbanall to clear bans on the chan or /unbanall only to clear the bans on the active chan.

alias unbanall { 
  set %chan  $iif($1,$1,$active)
  .timer 0 2 unbanallx
}
alias unbanallx {
  mode  %chan +b
  if ($ibl(%chan,0)) {
    if (%chan ischan)  {
      if ($me isop %chan) || ($me ishop %chan) {
        ;mode %chan +b
        var %x $ibl(%chan,0)
        var %y 0
        while (%y <= %x) {
          var %banlist = $(%banlist,$ibl(%chan,%y))
          inc %y
        }
        mode %chan $+(-,$str(b,$ibl(%chan,0))) %banlist
      }
      else { echo -a ur not op in %chan }
    }
    else { echo -a ur not on %chan }
  } 
}

Comments

Sign in to comment.
Lindrian   -  Jul 21, 2007

set %chan $iif(!$1 && $active ischan,$active,$1)

I would use that instead..

 Respond  
Anti   -  Jul 21, 2007

Well done it\'s very useful at time\'s if i could rate i\'d give a 6.5 :)

 Respond  
Bouncer   -  May 15, 2007

Not bad but it only cleared the first four bans on a channel. If there were more than four I had to type the command again. If there were more than eight I had to type it three times...etc. Maybe it is because I am on chatspace though, and all it allows is four commands to be carried out at once, unless you can find a way around it. Otherwise worked just like it should.

 Respond  
KrYpTiK   -  Feb 27, 2006

or depending on the server your on /chanserv clear #channel bans

 Respond  
Corne   -  Jan 21, 2006

You dont need a timer to remove all bans from a channel. Btw, did you see what happens when there is no ban in the banlist and the timer is still on ?

 Respond  
XpLoiTeR   -  Jan 21, 2006

lol thx

 Respond  
Raichu   -  Jan 21, 2006

now these are starting to look like usefull snippets. congrats

 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.