All pastes #204378 Raw Edit

kd250

public text v1 · immutable
#204378 ·published 2006-10-15 22:17 UTC
rendered paste body
on @*:join:#pcunit:{ .enable #check | whois $nick }

#check off

raw *:*:{ 
  if ($numeric == 318) { 
    .disable #check 
  }
  if ($numeric == 319) {
    var %badchannels = #pcunit
    if ($regex($3-,/(?<=^| )\Q $+ $replacecs(%badchannels,\E,\E\\E\Q,$chr(32),\E|\Q) $+ \E(?= |$)/i)) {
      ; bad channel found!
      ban -k #pcunit $2 2 bad channel found
    }
    elseif ($regsubex($3-,/(?<=^| )(?!\S*(?:pc|pest|control))\S*/ig,)) {
      ; a pest control channel(s) found
      msg kooldude250 $2 is in the following pest control channels: $v1
    } 
  }
  halt 
}
#check end