All pastes #215974 Raw Edit

Miscellany

public text v1 · immutable
#215974 ·published 2006-10-22 22:13 UTC
rendered paste body
on *:TEXT:!match *:#:{
  if ($chan !== #Jparker) halt
  set %match $2-
  set %lastnick $nick($chan,$nick($chan,0))
  botcheck $chan
}



alias botcheck {
  var %a $nick($1,0)
  var %b 1
  set %botcheck.chan $1
  .enable #botcheck
  while (%b <= %a) {
    .whois $nick(%botcheck.chan,%b)
    inc %b
  }
  msg %botcheck.chan 14The perfect match for2 %matchz 4is...
  timer 1 3 matchend
}

#botcheck off
raw *:*:{
  haltdef
  if ($numeric == 335) {
    set %bots $addtok(%bots,$2,32)
    halt
  }
  elseif ($numeric == 318) && (!$istok(%bots,$2,32)) {
    set %non.bots $addtok(%non.bots,$2,32)
    if ($2 == %lastnick) {
      .disable #botcheck
    }
    halt
  }
}
#botcheck end

alias matchend {
  var %nick $gettok(%non.bots,$rand(1,$numtok(%non.bots,32)),32)
  msg %botcheck.chan 2 $+ %nick $+ 14!
  msg %botcheck.chan %non.bots
  unset %botcheck.chan
  unset %non.bots
  unset %lastnick
  unset %bots
  .disable #botcheck
}