All pastes #451705 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-21 19:21 UTC
rendered paste body
alias floodprot {
  if ($readini(staff.ini,staff,$address($nick,2))) { return }
  var %fname = $($+(flood.,$2,.,$address($1,2)),2)
  hadd -mu8 %fname $calc($hget(%fname,0).item +1) 1
  if ($hget(%fname,0).item > 4) {
    notice $nick 12[14Ignore12]14 Adding you to ignore list for12 5 14minutes. 
    ignore -u300 $1 2 $2
    hfree %fname
    return flooded
    inc %cc [ $+ [ $me ] ]
  }
} 

Alias check {
  var %x = 1
  while (%x <= $hget(0)) {
    if ($hget(%x,0).item == 0) { hfree $hget(%x) }
    inc %x
  }
} 

Alias illegalcheck {
  if ($chr(36) isin $1-) || ($chr(38) isin $1-) {
    notice $nick 12[14Bot Exploit12] 14Attemption at box exploiting prevented.
    halt
  }
}