IRCClouD BanMask Corrector Simo 1 hour ago
i wrote this small script for dalnet as i found many set inneffiecient bans on irccloud users this code will correct that provided your bot is opped in the channel :

Code

on *:ban:#:{ 
  if ($nick(#,$me,@)) { 
    var %ixz = 1 , %nicksx 
    while ($ialchan($banmask,$chan,%ixz).nick)  {
      var %match = $v1 
      if (%match != $me && $regex($banmask,/(irccloud)/i)) { var %nicksx = $addtok(%nicksx,%match,32)  }
      inc %ixz 
    }
    if ($numtok(%nicksx,32) == 1) {
      mode $chan +b-b $+(*!,$gettok($gettok($replace($address(%nicksx,1),!*uid,!*id,!*sid,!*id),1,64),2,33),@*) $banmask
    }
  }
}

 

on *:KICK:# { 
  if ($nick(#,$me,@)) { 
    if ($regex($address($knick,2),/(irccloud)/i)) {
      if ($+(*!,$gettok($gettok($replace($address($knick,1),!*uid,!*id,!*sid,!*id),1,64),2,33),@*) !isban $chan ) {   mode $chan +b $+(*!,$gettok($gettok($replace($address($knick,1),!*uid,!*id,!*sid,!*id),1,64),2,33),@*) }
    }
  }
}


0 1 Read More