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