Changeset 24 for TriviaEngine/TriviaEngine-sqlite.tcl
- Timestamp:
- 11/01/06 18:56:08 (6 years ago)
- File:
-
- 1 edited
-
TriviaEngine/TriviaEngine-sqlite.tcl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
TriviaEngine/TriviaEngine-sqlite.tcl
r23 r24 83 83 set trivia_flag T 84 84 set trivia_admin S 85 86 #botnet handle of the bmotion bot we're going to play with (set blank to disable) 87 set trivia_bmotion_bot "NoTopic" 85 88 # >>> 89 90 # Send a botnet command to the bmotion bot 91 proc trivia_bmotion_send { command params } { 92 global trivia_bmotion_bot 93 94 if {$trivia_bmotion_bot == ""} { 95 return 0 96 } 97 98 if [islinked $trivia_bmotion_bot] { 99 putbot $trivia_bmotion_bot "trivia $command :$params" 100 putloglev d * "triviaengine: send $command to $trivia_bmotion_bot with params $params" 101 } else { 102 putlog "triviaengine: trying to communicate with bmotion bot $trivia_bmotion_bot but it's not linked" 103 } 104 } 105 86 106 87 107 … … 363 383 364 384 putquick "PRIVMSG $trivia_channel :Congratulations $trivia_c(purple)$nick$trivia_c(off)! The answer was$trivia_c(purple) $answer$trivia_c(off)." 385 386 trivia_bmotion_send "winner" "$nick $answer" 365 387 if {$newuser == 1} { 366 388 putquick "PRIVMSG $trivia_channel :Welcome to our newest player, $trivia_c(purple)$nick$trivia_c(off) :)" … … 879 901 #<<< 880 902 global trivia_q_id trivia_q_cat trivia_q_question trivia_q_answer trivia_q_hint trivia_q_attempts trivia_channel trivia_status trivia_last_qid 881 global trivia_asking_question 903 global trivia_asking_question trivia_delay 882 904 883 905 if {$trivia_status != 1} { … … 912 934 set trivia_asking_question 1 913 935 936 trivia_bmotion_send "start" "$trivia_channel $trivia_delay" 937 914 938 trivia_round 939 915 940 } 916 941 #>>> … … 938 963 #update the hint 939 964 set trivia_q_hint [trivia_make_hint $trivia_q_hint $trivia_q_answer] 965 putlog "hint is $trivia_q_hint" 940 966 941 967 #say our stuff … … 959 985 960 986 incr trivia_q_attempts 987 988 trivia_bmotion_send "hint" [string map {_ .} $trivia_q_hint] 961 989 962 990 set trivia_last_ts [clock seconds] … … 1061 1089 set trivia_asking_question 0 1062 1090 1091 trivia_bmotion_send "winner" "* $trivia_q_answer" 1092 trivia_bmotion_send "stop" "" 1093 1063 1094 set trivia_q_answer [string toupper $trivia_q_answer] 1064 1095 putquick "PRIVMSG $trivia_channel :Time's up! Nobody got it right. The answer was$trivia_c(purple) $trivia_q_answer" … … 1116 1147 trivia_killtimer 1117 1148 1149 trivia_bmotion_send "stop" "" 1150 1118 1151 putserv "PRIVMSG $trivia_channel :Skipping this question by $nick's request." 1119 1152 set trivia_timer [utimer $trivia_delay trivia_start_round] … … 1185 1218 putserv "PRIVMSG $trivia_channel :Trivia game stopped." 1186 1219 set trivia_status 0 1220 trivia_bmotion_send "stop" "" 1187 1221 trivia_killtimer 1188 1222 }
Note: See TracChangeset
for help on using the changeset viewer.
