equal
deleted
inserted
replaced
41 rm <- thisRoom |
41 rm <- thisRoom |
42 uid <- liftM clUID thisClient |
42 uid <- liftM clUID thisClient |
43 |
43 |
44 case voting rm of |
44 case voting rm of |
45 Nothing -> |
45 Nothing -> |
46 return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "There's no voting going on."]] |
46 return [Warning $ loc "There's no voting going on."] |
47 Just voting -> |
47 Just voting -> |
48 if (not forced) && (uid `L.notElem` entitledToVote voting) then |
48 if (not forced) && (uid `L.notElem` entitledToVote voting) then |
49 return [] |
49 return [] |
50 else if (not forced) && (uid `L.elem` map fst (votes voting)) then |
50 else if (not forced) && (uid `L.elem` map fst (votes voting)) then |
51 return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "You already have voted."]] |
51 return [Warning $ loc "You already have voted."] |
52 else if forced && (not $ isAdministrator cl) then |
52 else if forced && (not $ isAdministrator cl) then |
53 return [] |
53 return [] |
54 else |
54 else |
55 ((:) (AnswerClients [sendChan cl] ["CHAT", nickServer, loc "Your vote has been counted."])) |
55 ((:) (AnswerClients [sendChan cl] ["CHAT", nickServer, loc "Your vote has been counted."])) |
56 <$> (actOnVoting $ voting{votes = (uid, vote):votes voting}) |
56 <$> (actOnVoting $ voting{votes = (uid, vote):votes voting}) |