All pastes #606256 Raw Edit

Something

public text v1 · immutable
·published 2007-07-06 19:04 UTC
rendered paste body
on 1:TEXT:$($!gb*):#nova:{
  if ($nick isop $chan) {
    if ($istok(%gb, $address($2,1), 32)) { msg # ( $+ $2 $+ ) Is allready Globally Blacklisted With Me. | halt }
    set %gb $addtok(%gb, $address($2,1), 32)
    var %a = $comchan($2,0) 
    while (%a) { 
      if ($me isop $comchan($2,%a)) { 
        ban -k $comchan($2,%a) $2 Global Blacklisted. 
      } 
      dec %a 
    }
  }
}

on 1:TEXT:$($!add gb*):#nova:{
  if ($nick isop $chan) {
    if ($istok(%gb, $3, 32)) { msg # ( $+ $3 $+ ) Is allready Globally Blacklisted With Me. | halt }
    set %gb $addtok(%gb, $3, 32)
    msg # Successfully Added ( $+ $3 $+ ) To Global Blacklist. | halt
  }
}

on 1:TEXT:$($!scan gb):#nova:{
  if ($nick isop $chan) {
    msg # Scanning For Globally Blacklisted.
    timergb 1 5 msg # Scan Complete, Total Found %banned | set %banned 0
    .quote WHO $+(:,$chan)
    var %i = $nick($chan,0) 
    while (%i) { 
      if ($istok(%gb,$address($nick($chan,%i),1),32)) { 
        inc %banned
        ban -k $chan $nick($chan,%i) 1 Global Blacklisted 
      } 
      dec %i 
    }
  } 
}


on me:*:JOIN:#nova:.quote WHO $+(:,$chan)
on *:OP:#nova: { 
  if ($opnick == $me) { 
    msg # Scanning For Globally Blacklisted.
    timergb 1 5 msg # Scan Complete, Total Found %banned | set %banned 0
    var %i = $nick($chan,0) 
    while (%i) { 
      if ($istok(%gb,$address($nick($chan,%i),1),32)) { 
        inc %banned
        ban -k $chan $nick($chan,%i) 1 Global Blacklisted 
      } 
      dec %i 
    }
  } 
}
on 1:JOIN:#nova:{
  if ($istok(%gb, $address($nick,1), 32)) {
    ban -k $chan $nick Global Blacklisted.
  } 
}

on 1:TEXT:$($!cleargb):#nova:{
  if ($nick isop $chan) {
    unset %gb
    msg #nova Global Blacklist Clear.
  }
}

on 1:TEXT:$($!global banned):#nova:{
  if ($nick isop $chan) {
    if (!%gb) { msg # Error: Global Blacklist Is Empty. | halt }
    else {
      msg #nova Users Globally Blacklisted: %gb
    }
  }
}
on 1:TEXT:$($!removegb*):#nova:{
  if ($nick isop $chan) {
    if (!$istok(%gb, $2, 32)) { msg # ( $+ $2 $+ ) Is'nt Globally Blacklisted With Me. | halt }
    else {
      set %gb $remtok(%gb, $2, 32)
      msg # ( $+ $2 $+ ) Removed.
    }
  }
}