# HG changeset patch
# User Wuzzy <Wuzzy2@mail.ru>
# Date 1535225074 -7200
# Node ID feda0d1da62c3b22dca37e9ee8a81ec20bd21b31
# Parent  e6523fe53d1127e9f300696c2c3c7e8fc82569e2
Add error message for /callvote map if no maps are available

diff -r e6523fe53d11 -r feda0d1da62c gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Sat Aug 25 21:12:10 2018 +0200
+++ b/gameServer/HWProtoInRoomState.hs	Sat Aug 25 21:24:34 2018 +0200
@@ -456,9 +456,16 @@
 
 
 handleCmd_inRoom ["CALLVOTE", "MAP"] = do
+    -- Display list of available maps for voting
     cl <- thisClient
     s <- liftM (Map.keys . roomSaves) thisRoom
-    return [AnswerClients [sendChan cl] ["CHAT", nickServer, B.concat ["callvote map: ", B.intercalate ", " s]]]
+    return [AnswerClients [sendChan cl]
+        ["CHAT", nickServer,
+            if (not $ null s) then
+                (B.concat ["/callvote map: ", B.intercalate ", " s])
+            else
+                loc "/callvote map: No maps available."
+        ]]
 
 
 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do