gameServer/HWProtoInRoomState.hs
changeset 10058 4ed428389c4e
parent 10057 795f5f918c8c
child 10081 0af84e5cbd4d
--- a/gameServer/HWProtoInRoomState.hs	Thu Jan 23 00:07:27 2014 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Thu Jan 23 01:04:17 2014 +0400
@@ -408,14 +408,18 @@
 handleCmd_inRoom ["CALLVOTE", "KICK", nickname] = do
     (thisClientId, rnc) <- ask
     cl <- thisClient
+    rm <- thisRoom
     maybeClientId <- clientByNick nickname
     let kickId = fromJust maybeClientId
     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId
 
-    if isJust maybeClientId && sameRoom then
-        startVote $ VoteKick nickname
+    if isNothing $ masterID rm then
+        return []
         else
-        return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]]
+        if isJust maybeClientId && sameRoom then
+            startVote $ VoteKick nickname
+            else
+            return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]]
 
 handleCmd_inRoom ["VOTE", m] = do
     cl <- thisClient