# # Stop a game # proc UnoStop {nick uhost hand chan txt} { global UnoOn UnoPaused UnPlayedRounds UnoStartTimer UnoSkipTimer UnoCycleTimer RoundRobin UnoDCCIDX global UnoLastWinner UnoWinsInARow UnoRobot if {(![uno_ischan $chan])||($UnoOn == 0)} {return} catch {killutimer $UnoStartTimer} catch {killtimer $UnoSkipTimer} catch {killutimer $UnoCycleTimer} # remove player dcc list set pcount 0 while {[lindex $RoundRobin $pcount] != ""} { set pnick [lindex $RoundRobin $pcount] if [info exist UnoDCCIDX($pnick)] {unset UnoDCCIDX($pnick)} incr pcount } set UnoOn 0 set UnoPaused 0 set UnPlayedRounds 0 set UnoLastWinner "" set UnoWinsInARow 0 UnoUnbindCmds UnoReset if {$nick != $UnoRobot} { unochanmsg "stopped by $nick" } return }