Originally Posted by aZnLupin
help me, i need alias to unban all banmask on channel banlist.

/clearbans #channel

I created the code for you and I hope it helps. I tested it on 2 networks with different $modespl and I think it's working wink

Code
alias clearbans {
  if ($me isop $1) {
    if ($chan($1).ibl == $false) {
      .enable #banlist
      mode $1 +b
      return
    }
    var %x = 1 , %y = $ibl($1,0), %n
    while (%x <= %y) {
      var %n = $addtok(%n,$ibl($1,%x),32)
      inc %x
    }
    while ($numtok(%n,32)) {
      mode $1 - $+ $str(b,$numtok($gettok(%n,1- $+ $modespl,32),32)) $gettok(%n,1- $+ $modespl,32)
      var %n = $deltok(%n,1- $+ $modespl,32)
    }
  }
}
#banlist off
raw 367:*:{ haltdef }
raw 368:*:{
  haltdef
  .disable #banlist
  clearbans $2
}
#banlist end

Last edited by TECO; 26/01/20 11:26 PM.

TECO
irc.PTirc.org (Co-Admin)