I am using a modified version of trivia.tcl and it currently needs someone to type a command to start the game. The channel it runs in has a lot of trivia addicts and i would like it to auto start when the bot runs.
The bot is running on a cron so it is rare that this is needed, however as i'm learning tcl as i play, it would be nice to add this modification to the code.
below is the code that traps the command if it is typed in the channel. Could anyone help me add something that will either call this procedure or start the game when the bot either restarts due to a server issue or restarts due to someone accessing the command via the partyline.
Thanks in advance
#starts the game if it isn't running.
proc tgstart {nick host hand chan text} {
global tgplaying tgstreak tgchan tgerrremindtime tgerrremindtimer tgmissed
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==0} {
tggamemsg "[tgcolstart]Trivia game started by $nick!"
tgnextq
set tgplaying 1
set tgstreak 0
set tgmissed 0
set tgerrremindtimer [timer $tgerrremindtime tgerrremind]
}
}
}