thx for your idea. i put the request in there as well.
the reason why i didn't do that earlier was, that it the user there aren't really active. so, i'm still open for suggestions.^^
proc moxquiz_ask {nick host handle channel arg} {
global qlist quizstate botnick banner bannerspace
global tipno tiplist
global userqnumber usergame userqlist
global timeasked qnumber theq
global qnum_thisgame
global userlist timerankreset
global quizconf
variable anum 0
variable txt
## only accept chatter on quizchannel
if {![mx_str_ieq $channel $quizconf(quizchannel)]} {
return
}
switch -exact $quizstate {
"paused" {
mxirc_notc $nick [mc "Game is paused."]
return 1
}
"stopped" {
mxirc_notc $nick [mc "Game is stopped."]
return 1
}
}
## record that $nick spoke (prevents desert detection from stopping,
## when an user joins and starts the game with !ask)
if {![mx_str_ieq $nick $botnick]} {
mx_getcreate_userentry $nick $host
}
.
.
.
if {[mx_str_ieq $best $nick] && $bestscore > $lastbestscore} {
array set aa $userlist($best)
# tell the end is near
if {$bestscore >= $quizconf(winscore)} {
set price "."
if {$quizconf(prices) == "yes"} {
set price " [lindex $prices [rand [llength $prices]]]"
}
mxirc_say $channel [mc "%s%s reaches %d points and wins%s"
putserv "TOPIC $chan :[mc "%s%s" $nick]"
"[bannerspace] [botcolor txt]" $nick $quizconf(winscore) $price]
set now [unixtime]
if {[mx_str_ieq [maskhost $host] $lastwinner]} {
incr lastwinnercount
if {$lastwinnercount >= $quizconf(lastwinner_max_games)
&& $quizconf(lastwinner_restriction) == "yes"} {
mxirc_say $channel [mc "%s: since you won %d games in a row, you will be ignored for the next game." $nick $quizconf(lastwinner_max_games)]
}
} else {
1) Read the tcl-commands.doc that comes with eggdrop about 'bind' and particularly about the 'join' bind (which uses different parameters than 'pub' so you'd have to make another new proc to handle the 'bind join' anyway)
2) Do you *really* want the game to be started every time a person joins? that will make the game restart *every* time someone joins, which would be highly annoying to those already in the game..
3) Why not just use a script to announce in notice to the user when they join, about how to start the game with the public command?
1) i looked up the command and found out that it is stackable, thx
2) no, i didn't know that this comamnd would resart the game every time someone joins. i simply want to start a game when none is running. right now i have another bot that puts an "!ask" into the channel every time someone joins. but this bot is only on when i am on and annoys already playing users.
3) my channel is joined by many people who haven't played the quiz before and noone reads the onjoin notice
/edit:
seriously: when joining my channel on startup, one gets enough messages form the gamesurge server and the moxuiz - bot. another notice by me including the !ask - command wouldn't be read.