diff -r 279168729cc3 -r e84d42a4311c gameServer/Actions.hs --- a/gameServer/Actions.hs Wed May 22 00:12:15 2013 +0400 +++ b/gameServer/Actions.hs Wed May 22 00:49:37 2013 +0400 @@ -20,6 +20,7 @@ import Control.Exception import System.Process import Network.Socket +import System.Random ----------------------------- #if defined(OFFICIAL_SERVER) import OfficialServer.GameReplayStore @@ -615,6 +616,12 @@ processAction $ Warning versionsStats +processAction (Random chans items) = do + let i = if null items then ["heads", "tails"] else items + n <- io $ randomRIO (0, length i - 1) + processAction $ AnswerClients chans ["CHAT", "[random]", i !! n] + + #if defined(OFFICIAL_SERVER) processAction SaveReplay = do ri <- clientRoomA