GameServer: Fix protocol error when receiving CALLVOTE cmd with incorrect mode
authorWuzzy <Wuzzy2@mail.ru>
Fri, 26 Oct 2018 19:56:03 +0200
changeset 13997 863604736cf5
parent 13996 4ae01eabf611
child 13998 ae11b53987db
GameServer: Fix protocol error when receiving CALLVOTE cmd with incorrect mode
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Fri Oct 26 19:40:43 2018 +0200
+++ b/gameServer/HWProtoInRoomState.hs	Fri Oct 26 19:56:03 2018 +0200
@@ -513,10 +513,12 @@
         else 
         return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/callvote pause: No game in progress!"]]
 
+handleCmd_inRoom ["CALLVOTE", "PAUSE", _] = handleCmd_inRoom ["CALLVOTE", "PAUSE"]
 
 handleCmd_inRoom ["CALLVOTE", "NEWSEED"] = do
     startVote VoteNewSeed
 
+handleCmd_inRoom ["CALLVOTE", "NEWSEED", _] = handleCmd_inRoom ["CALLVOTE", "NEWSEED"]
 
 handleCmd_inRoom ["CALLVOTE", "HEDGEHOGS"] = do
     cl <- thisClient
@@ -532,6 +534,8 @@
         else
         return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/callvote hedgehogs: Specify number from 1 to 8."]]
 
+handleCmd_inRoom ["CALLVOTE", _] = handleCmd_inRoom ["CALLVOTE"]
+handleCmd_inRoom ["CALLVOTE", _, _] = handleCmd_inRoom ["CALLVOTE"]
 
 handleCmd_inRoom ("VOTE" : m : p) = do
     cl <- thisClient