equal
deleted
inserted
replaced
7 import qualified Data.ByteString.Char8 as B |
7 import qualified Data.ByteString.Char8 as B |
8 import Control.Monad |
8 import Control.Monad |
9 import Control.Monad.Reader |
9 import Control.Monad.Reader |
10 -------------------------------------- |
10 -------------------------------------- |
11 import CoreTypes |
11 import CoreTypes |
12 import Actions |
|
13 import Utils |
12 import Utils |
14 import HandlerUtils |
13 import HandlerUtils |
15 import RoomsAndClients |
14 import RoomsAndClients |
16 import EngineInteraction |
15 import EngineInteraction |
17 import Votes |
16 import Votes |
396 startVote $ VoteKick nickname |
395 startVote $ VoteKick nickname |
397 else |
396 else |
398 return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]] |
397 return [AnswerClients [sendChan cl] ["CHAT", "[server]", "callvote kick: no such user"]] |
399 |
398 |
400 |
399 |
|
400 handleCmd_inRoom ["CALLVOTE", "MAP"] = do |
|
401 cl <- thisClient |
|
402 s <- liftM (Map.keys . roomSaves) thisRoom |
|
403 return [AnswerClients [sendChan cl] ["CHAT", "[server]", B.concat ["callvote map: ", B.intercalate ", " s]]] |
|
404 |
|
405 |
401 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do |
406 handleCmd_inRoom ["CALLVOTE", "MAP", roomSave] = do |
402 cl <- thisClient |
407 cl <- thisClient |
403 rm <- thisRoom |
408 rm <- thisRoom |
404 |
409 |
405 if Map.member roomSave $ roomSaves rm then |
410 if Map.member roomSave $ roomSaves rm then |