90 h "VOTE" msg | not $ B.null msg = handleCmd ["VOTE", upperCase msg] |
90 h "VOTE" msg | not $ B.null msg = handleCmd ["VOTE", upperCase msg] |
91 h "FORCE" msg | not $ B.null msg = handleCmd ["VOTE", upperCase msg, "FORCE"] |
91 h "FORCE" msg | not $ B.null msg = handleCmd ["VOTE", upperCase msg, "FORCE"] |
92 h "MAXTEAMS" n | not $ B.null n = handleCmd ["MAXTEAMS", n] |
92 h "MAXTEAMS" n | not $ B.null n = handleCmd ["MAXTEAMS", n] |
93 h "INFO" n | not $ B.null n = handleCmd ["INFO", n] |
93 h "INFO" n | not $ B.null n = handleCmd ["INFO", n] |
94 h "RESTART_SERVER" "YES" = handleCmd ["RESTART_SERVER"] |
94 h "RESTART_SERVER" "YES" = handleCmd ["RESTART_SERVER"] |
|
95 h "REGISTERED_ONLY" _ = do |
|
96 cl <- thisClient |
|
97 return [ModifyServerInfo(\s -> s{isRegisteredUsersOnly = not $ isRegisteredUsersOnly s}) |
|
98 , AnswerClients [sendChan cl] ["CHAT", "[server]", "'Registered only' state toggled"] |
|
99 ] |
95 h c p = return [Warning $ B.concat ["Unknown cmd: /", c, " ", p]] |
100 h c p = return [Warning $ B.concat ["Unknown cmd: /", c, " ", p]] |
96 |
101 |
97 extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b) |
102 extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b) |
98 |
103 |
99 handleCmd_loggedin ["INFO", asknick] = do |
104 handleCmd_loggedin ["INFO", asknick] = do |