I'm curious as to why a part of a word game script won't work. Some of the commands work, but the !word command typed into the channel by users doesn't start the word game.
Here is the parts I'm having trouble with:
Code: Select all
bind pub - !word pub_wordCode: Select all
proc pub_word {nick uhost handle channel args} {
global wscorefile wlistfile words word_list_count answer winuse \
chan letone lettwo letters specuser glonoff
if {$glonoff == 0} {
putserv "PRIVMSG $channel :Sorry, wordgame is turned off, try again later"
return
}
set chn [string tolower $channel]
if {$word_list_count == 0} {
if {![validuser $specuser]} {
set channels [channels]
adduser $specuser specuser!special@word.special.org
foreach chann $channels {
setuser $specuser XTRA wcount.$chann 0
}
}
set word_list_count [getuser $specuser XTRA wcount.$chn]
if {$word_list_count == ""} {
setuser $specuser XTRA wcount.$chn 0
set $word_list_count 0
}
set words ""
set fd [open $wlistfile r]
while {![eof $fd]} {
lappend words [gets $fd]
}
close $fdThanks!