equal
deleted
inserted
replaced
137 (ci, _) <- ask |
137 (ci, _) <- ask |
138 cl <- thisClient |
138 cl <- thisClient |
139 kickId <- clientByNick kickNick |
139 kickId <- clientByNick kickNick |
140 return [KickClient $ fromJust kickId | isAdministrator cl && isJust kickId && fromJust kickId /= ci] |
140 return [KickClient $ fromJust kickId | isAdministrator cl && isJust kickId && fromJust kickId /= ci] |
141 |
141 |
142 {- |
142 |
143 handleCmd_lobby clID clients rooms ["BAN", banNick] = |
143 handleCmd_lobby ["BAN", banNick, reason] = do |
144 if not $ isAdministrator client then |
144 (ci, _) <- ask |
145 [] |
145 cl <- thisClient |
146 else |
146 banId <- clientByNick banNick |
147 BanClient banNick : handleCmd_lobby clID clients rooms ["KICK", banNick] |
147 return [BanClient 60 reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci] |
148 where |
|
149 client = clients IntMap.! clID |
|
150 -} |
|
151 |
148 |
152 |
149 |
153 handleCmd_lobby ["SET_SERVER_VAR", "MOTD_NEW", newMessage] = do |
150 handleCmd_lobby ["SET_SERVER_VAR", "MOTD_NEW", newMessage] = do |
154 cl <- thisClient |
151 cl <- thisClient |
155 return [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator cl] |
152 return [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator cl] |