auto bans removal on ping Simo 15/01/25 07:15 PM
Greetings,

im trying to write an auto bans removal using ping from server rather then rely on timers to then check enabled channels where i want to auto ban removal to work this is what i have so far:

Code

ON *:PING:{ 
  var %i = 1 | while ($gettok($regsubex($str(x,$chan(0)),/x/g,$chan(\n) $chr(32)),%i,32)) {
    var %chnel =  $v1
    if ($nick(%chnel,$me,~&@%)) {
      check if %chnel is enabled to check for auto bans removal then do mode %chnel 
     and redirect to raw numeric to check ban duration and ban if exceeded ban duration
    }
    inc %i
  }
}


RAW 367:*:{
  if (($calc( $ctime - $5 ) > 7200 ) && (!$istok(%ban_except,$3,32)) {
    if (!%bcount) { set %bcount 0  }
    if (%bcount <= $calc( $modespl - 1 )) { set %blist $3 %blist | inc %bcount }
    if (%bcount > $calc( $modespl - 1 )) {  putmode $2 $+(-,$str(b,%bcount)) $($+(%,blist),2) | unset %bcount | unset %blist }
    halt
  }
}


RAW 368:*:{ if (%bcount) { unset %bcount } | if (%blist) { unset %blist } | halt }

0 33 Read More