151 BanClient banNick : handleCmd_lobby clID clients rooms ["KICK", banNick] |
151 BanClient banNick : handleCmd_lobby clID clients rooms ["KICK", banNick] |
152 where |
152 where |
153 client = clients IntMap.! clID |
153 client = clients IntMap.! clID |
154 |
154 |
155 |
155 |
156 handleCmd_lobby clID clients rooms ["SET_SERVER_MESSAGE", "NEW", newMessage] = |
156 |
|
157 handleCmd_lobby clID clients rooms ["SET_SERVER_VAR", "MOTD_NEW", newMessage] = |
157 [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator client] |
158 [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator client] |
158 where |
159 where |
159 client = clients IntMap.! clID |
160 client = clients IntMap.! clID |
160 |
161 |
161 handleCmd_lobby clID clients rooms ["SET_SERVER_MESSAGE", "OLD", newMessage] = |
162 handleCmd_lobby clID clients rooms ["SET_SERVER_VAR", "MOTD_OLD", newMessage] = |
162 [ModifyServerInfo (\si -> si{serverMessageForOldVersions = newMessage}) | isAdministrator client] |
163 [ModifyServerInfo (\si -> si{serverMessageForOldVersions = newMessage}) | isAdministrator client] |
163 where |
164 where |
164 client = clients IntMap.! clID |
165 client = clients IntMap.! clID |
165 |
166 |
166 handleCmd_lobby clID clients rooms ["SET_RELEASE_PROTOCOL_NUMBER", protoNum] = |
167 handleCmd_lobby clID clients rooms ["SET_SERVER_VAR", "LATEST_PROTO", protoNum] = |
167 [ModifyServerInfo (\si -> si{latestReleaseVersion = fromJust readNum}) | isAdministrator client && isJust readNum] |
168 [ModifyServerInfo (\si -> si{latestReleaseVersion = fromJust readNum}) | isAdministrator client && isJust readNum] |
168 where |
169 where |
169 client = clients IntMap.! clID |
170 client = clients IntMap.! clID |
170 readNum = maybeRead protoNum :: Maybe Word16 |
171 readNum = maybeRead protoNum :: Maybe Word16 |
|
172 |
|
173 handleCmd_lobby clID clients rooms ["GET_SERVER_VAR"] = |
|
174 [SendServerVars | isAdministrator client] |
|
175 where |
|
176 client = clients IntMap.! clID |
|
177 |
171 |
178 |
172 handleCmd_lobby clID clients rooms ["CLEAR_ACCOUNTS_CACHE"] = |
179 handleCmd_lobby clID clients rooms ["CLEAR_ACCOUNTS_CACHE"] = |
173 [ClearAccountsCache | isAdministrator client] |
180 [ClearAccountsCache | isAdministrator client] |
174 where |
181 where |
175 client = clients IntMap.! clID |
182 client = clients IntMap.! clID |