--- a/gameServer/Votes.hs Sat Aug 25 19:07:17 2018 +0200
+++ b/gameServer/Votes.hs Sat Aug 25 19:23:19 2018 +0200
@@ -43,16 +43,16 @@
case voting rm of
Nothing ->
- return [AnswerClients [sendChan cl] ["CHAT", "[server]", loc "There's no voting going on."]]
+ return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "There's no voting going on."]]
Just voting ->
if (not forced) && (uid `L.notElem` entitledToVote voting) then
return []
else if (not forced) && (uid `L.elem` map fst (votes voting)) then
- return [AnswerClients [sendChan cl] ["CHAT", "[server]", loc "You already have voted."]]
+ return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "You already have voted."]]
else if forced && (not $ isAdministrator cl) then
return []
else
- ((:) (AnswerClients [sendChan cl] ["CHAT", "[server]", loc "Your vote has been counted."]))
+ ((:) (AnswerClients [sendChan cl] ["CHAT", nickServer, loc "Your vote has been counted."]))
<$> (actOnVoting $ voting{votes = (uid, vote):votes voting})
where
@@ -74,7 +74,7 @@
closeVoting = do
chans <- roomClientsChans
return [
- AnswerClients chans ["CHAT", "[server]", loc "Voting closed."]
+ AnswerClients chans ["CHAT", nickServer, loc "Voting closed."]
, ModifyRoom (\r -> r{voting = Nothing})
]
@@ -101,7 +101,7 @@
chans <- roomClientsChans
return $
[ModifyRoom $ \r -> r{params = p, mapParams = mp}
- , AnswerClients chans ["CHAT", "[server]", location]
+ , AnswerClients chans ["CHAT", nickServer, location]
, SendUpdateOnThisRoom
, LoadGhost location]
act (VotePause) = do
@@ -109,7 +109,7 @@
chans <- roomClientsChans
let modifyGameInfo f room = room{gameInfo = fmap f $ gameInfo room}
return [ModifyRoom (modifyGameInfo $ \g -> g{isPaused = not $ isPaused g}),
- AnswerClients chans ["CHAT", "[server]", loc "Pause toggled."],
+ AnswerClients chans ["CHAT", nickServer, loc "Pause toggled."],
AnswerClients chans ["EM", toEngineMsg "I"]]
act (VoteNewSeed) =
return [SetRandomSeed]
@@ -144,7 +144,7 @@
else
return [
ModifyRoom (\r -> r{voting = Just (newVoting vt){entitledToVote = uids}})
- , AnswerClients chans ["CHAT", "[server]", B.concat [loc "New voting started", ": ", voteInfo vt]]
+ , AnswerClients chans ["CHAT", nickServer, B.concat [loc "New voting started", ": ", voteInfo vt]]
, ReactCmd ["VOTE", "YES"]
]
@@ -163,7 +163,7 @@
modifyRoom rnc (\r -> r{voting = if voteTTL rv == 0 then Nothing else Just rv{voteTTL = voteTTL rv - 1}}) ri
if voteTTL rv == 0 then do
chans <- liftM (map sendChan) $ roomClientsM rnc ri
- return [AnswerClients chans ["CHAT", "[server]", loc "Voting expired."]]
+ return [AnswerClients chans ["CHAT", nickServer, loc "Voting expired."]]
else
return []
Nothing -> return []