gameServer/Votes.hs
changeset 10880 bf64f1bef1cc
parent 10879 9bedbd36de49
child 10881 941b5ab9e5a6
--- a/gameServer/Votes.hs	Tue Mar 31 22:37:04 2015 +0300
+++ b/gameServer/Votes.hs	Tue Mar 31 22:50:12 2015 +0300
@@ -26,6 +26,7 @@
 import qualified Data.List as L
 import qualified Data.Map as Map
 import Data.Maybe
+import Control.Applicative
 -------------------
 import Utils
 import CoreTypes
@@ -48,7 +49,8 @@
             else if uid `L.elem` map fst (votes voting) then
                 return [AnswerClients [sendChan cl] ["CHAT", "[server]", loc "You already have voted"]]
             else
-                actOnVoting $ voting{votes = (uid, vote):votes voting}
+                ((:) (AnswerClients [sendChan cl] ["CHAT", "[server]", loc "Your vote counted"]))
+                <$> (actOnVoting $ voting{votes = (uid, vote):votes voting})
 
     where
     actOnVoting :: Voting -> Reader (ClientIndex, IRnC) [Action]