equal
deleted
inserted
replaced
494 handleCmd_inRoom ("VOTE" : m : p) = do |
494 handleCmd_inRoom ("VOTE" : m : p) = do |
495 cl <- thisClient |
495 cl <- thisClient |
496 let b = if m == "YES" then Just True else if m == "NO" then Just False else Nothing |
496 let b = if m == "YES" then Just True else if m == "NO" then Just False else Nothing |
497 if isJust b then |
497 if isJust b then |
498 voted (p == ["FORCE"]) (fromJust b) |
498 voted (p == ["FORCE"]) (fromJust b) |
499 else |
499 else |
500 return [AnswerClients [sendChan cl] ["CHAT", "[server]", "/vote: Please use 'yes' or 'no'."]] |
500 return [AnswerClients [sendChan cl] ["CHAT", "[server]", |
|
501 if (p == ["FORCE"]) then |
|
502 loc "/force: Please use 'yes' or 'no'." |
|
503 else |
|
504 loc "/vote: Please use 'yes' or 'no'." |
|
505 ]] |
501 |
506 |
502 |
507 |
503 handleCmd_inRoom ["SAVE", stateName, location] = serverAdminOnly $ do |
508 handleCmd_inRoom ["SAVE", stateName, location] = serverAdminOnly $ do |
504 return [ModifyRoom $ \r -> r{roomSaves = Map.insert stateName (location, mapParams r, params r) (roomSaves r)}] |
509 return [ModifyRoom $ \r -> r{roomSaves = Map.insert stateName (location, mapParams r, params r) (roomSaves r)}] |
505 |
510 |