alias /check { if ($lines(players.txt) == 1) { /msg $chan $read(players.txt, s, *) } } on *:TEXT:!comp *:#:{ if (%comp. [ $+ [ $chan ] ] == $null) { if ($2 == $null) { set %comp. [ $+ [ $chan ] ] noword | msg $chan Game initiated by $nick $+ , no whoever can stay quiet the longest wins this game. } if ($2 != $null) { set %comp. [ $+ [ $chan ] ] | set % [ $+ [ $+(word,.,$chan) ] ] $2 | msg $chan Game initiated by $nick $+ , Now whoever doesn't say % [ $+ [ $+(word,.,$chan) ] ] the longest wins. } } elseif (%comp. [ $+ [ $chan ] ] != $null) { if ($2 == $null) { msg $chan This game is already active. } if ($2 != $null) { msg $chan This game is already active. } } } on *:TEXT:!join:#:{ if ((%comp. [ $+ [ $chan ] ] != $null) && (%player. [ $+ [ $+($chan,.,$nick) ] ] == $null)) { /set %player. [ $+ [ $+($chan,.,$nick) ] ] $nick | /write players.txt $nick $nick | /notice $nick You joined the game. } if ((%comp. [ $+ [ $chan ] ] != $null) && (%player. [ $+ [ $+($chan,.,$nick) ] ] != $null)) { /notice $nick your already playing. } if (%comp. [ $+ [ $chan ] ] == $null) { halt } } on *:TEXT:% [ $+ [ $+(word,.,$chan) ] ]:#: { write -ds $+ $nick players.txt notice $nick You lost. check } on *:TEXT:**:#:{ if ((%comp. [ $+ [ $chan ] ] == no) && (%player. [ $+ [ $+($chan,.,$nick) ] ] != $null)) { /write -ds $+ $nick players.txt | notice $nick You lost. | check } if ((%comp. [ $+ [ $chan ] ] == no) && (%player. [ $+ [ $+($chan,.,$nick) ] ] == $null)) { halt } if (%comp. [ $+ [ $chan ] ] != no) { halt } }