All pastes #91168 Raw Edit

Stuff

public text v1 · immutable
#91168 ·published 2006-07-18 10:33 UTC
rendered paste body
on 400:TEXT:@adoff:#:{ set %antiad adoff | notice $nick Anti-Ad is now deactivated }
on 400:TEXT:@adon:#:{ set %antiad adon | notice $nick Anti-Ad is now activated }
on 400:TEXT:@adaccess*:#:{
  if ($2 == 0) { notice $nick Invalid Level | halt }
  if ($2 > 499) { notice $nick Invalid Level | halt }
  if (!$2) { notice $nick Current Access Level: %adaccess | halt }
  set %adaccess $2 | notice $nick Access Level changed to $2 }
 }
on *:TEXT:*#*:#:{
  if (%antiad == adon) {
    cs $chan access $nick
    set $+(%,$nick,.ad) $chan
  }
}
on ^*:NOTICE:*:?:{
  if ($nick == ChanServ) && ($($+(%,$1,.ad),2) != $null) && (%antiad == adon) {
   haltdef
    var %chan = $($+(%,$1,.ad),2)
    unset $+(%,$1,.ad)
    if (has access isin $1-) {
      var %access = $strip($5)
      if (%access < %adaccess) {
        cs %chan tb $1 1h Advertisement Detected: 1 hour ban
      }
    }
    elseif (has access !isin $1-) {
      cs %chan tb $1 1h Advertisement Detected: 1 hour ban
    }
  }
}
alias miz {
  if ($isid) {
    return $left($1-,$calc($len($1-) - 1))
  }
}