All pastes #518037 Raw Edit

Bouncer

public text v1 · immutable
#518037 ·published 2007-05-29 05:58 UTC
rendered paste body
on !*:JOIN:#beerclub:{
  if ($level($wildsite) > 1) halt
  var %x = $read(ques.txt)
  set -u45 %question. [ $+ [ $nick ] ] $gettok(%x,1,58)
  set -u45 %answer. [ $+ [ $nick ] ] $gettok(%x,2,58)
  set -u45 %choice1. [ $+ [ $nick ] ] $gettok(%x,3,58)
  set -u45 %choice2. [ $+ [ $nick ] ] $gettok(%x,4,58)
  set -u45 %choice3. [ $+ [ $nick ] ] $gettok(%x,5,58)
  set -u45 %choice4. [ $+ [ $nick ] ] $gettok(%x,6,58)
  notice $nick 12Answer this question to prove your mettle! YOU HAVE 45 SECONDS!!! RESPOND WITH A NUMBER 1, 2, 3 or 4 in your next line of text!
  notice $nick %question. [ $+ [ $nick ] ]
  notice $nick 1. %choice1. [ $+ [ $nick ] ] 2. %choice2. [ $+ [ $nick ] ] 3. %choice3. [ $+ [ $nick ] ] 4. %choice4. [ $+ [ $nick ] ]
  .timer [ $+ [ $nick ] ] 1 45 cs $chan kb $nick $read(ban.txt)
}

on *:TEXT:*:#beerclub:{
  if ($1 <= 4 && %question. [ $+ [ $nick ] ]) {
    if ($1 != %answer. [ $+ [ $nick ] ]) {
      cs $chan kb $nick $read(ban.txt)
      .timer [ $+ [ $nick ] ] off
      unset %*. [ $+ [ $nick ] ]  
    }
    else {
      msg # Correct Answer: Thank you for verification. Let me take your coat. Have a seat and enjoy. EVERYONE WELCOME $nick TO THE GREATEST CHANNEL IN THE WORLD!
      .timer [ $+ [ $nick ] ] off
      unset %*. [ $+ [ $nick ] ] 
    }
  }