gameServer/HWProtoInRoomState.hs
changeset 10392 5012e1f9e893
parent 10217 1a1da2342c5b
child 10460 8dcea9087d75
--- a/gameServer/HWProtoInRoomState.hs	Fri Aug 22 00:37:26 2014 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Fri Aug 22 00:57:07 2014 +0400
@@ -30,7 +30,7 @@
             return [
                 ModifyRoom
                     (\r -> r{
-                        gameInfo = Just $ newGameInfo (teams rm) (length $ teams rm) allPlayersRegistered (mapParams rm) (params rm)
+                        gameInfo = Just $ newGameInfo (teams rm) (length $ teams rm) allPlayersRegistered (mapParams rm) (params rm) False
                         }
                     )
                 , AnswerClients chans ["RUN_GAME"]
@@ -374,7 +374,7 @@
 
 handleCmd_inRoom ["CALLVOTE"] = do
     cl <- thisClient
-    return [AnswerClients [sendChan cl] ["CHAT", "[server]", "Available callvote commands: kick <nickname>, map <name>"]]
+    return [AnswerClients [sendChan cl] ["CHAT", "[server]", "Available callvote commands: kick <nickname>, map <name>, pause"]]
 
 handleCmd_inRoom ["CALLVOTE", "KICK"] = do
     cl <- thisClient
@@ -412,6 +412,14 @@
         else
         return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote map: no such map"]]
 
+handleCmd_inRoom ["CALLVOTE", "PAUSE"] = do
+    cl <- thisClient
+    rm <- thisRoom
+
+    if isJust $ gameInfo rm then
+        startVote VotePause    
+        else 
+        return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote pause: no game in progress"]]
 
 handleCmd_inRoom ["VOTE", m] = do
     cl <- thisClient