All pastes #464399 Raw Edit

trivia piece

public text v1 · immutable
#464399 ·published 2007-04-29 14:03 UTC
rendered paste body
; Triggers that will work only in %gamechan
ON *:TEXT:*:%gamechan: {
  ; Starting Trivia
  IF ($1 == %c $+ trivia) && ($istok(%triviachan,$chan,44)) {
    IF (%trivia_status == Enabled) {
      .notice $nick Trivia is already running!
      halt
    }
    IF (%scramble_status == Enabled) {
      .msg $chan $+(%trfc,%trbg,$chr(32),Cannot start Trivia while Scramble is running! )
      halt
    }
    set %triv_chkaccnick $nick
    IF (%trivia_status != Enabled) {
      IF ($triv_privil_check == OK) {
        set %trivia_status Enabled
        .msg %triviachan $+(%trfc,%trbg Starting Trivia at request of %trsc,$nick,%trfc,. )
        set %triv_total_q $lines($readini(ini\trivia.ini,Config,qfile))
        trivia_ask
        halt
      }
      ELSE {
        .msg $chan $+(%trfc,%trbg, To start trivia you need to be,%trsc %triviaprivil %trfc,or have level 100 or more. )
      }            
    }