equal
deleted
inserted
replaced
299 let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId |
299 let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId |
300 return |
300 return |
301 [KickRoomClient kickId | master && isJust maybeClientId && (kickId /= thisClientId) && sameRoom] |
301 [KickRoomClient kickId | master && isJust maybeClientId && (kickId /= thisClientId) && sameRoom] |
302 |
302 |
303 |
303 |
|
304 handleCmd_inRoom ["DELEGATE", newAdmin] = do |
|
305 (thisClientId, rnc) <- ask |
|
306 maybeClientId <- clientByNick newAdmin |
|
307 master <- liftM isMaster thisClient |
|
308 let newAdminId = fromJust maybeClientId |
|
309 let sameRoom = clientRoom rnc thisClientId == clientRoom rnc newAdminId |
|
310 return |
|
311 [ChangeMaster (Just newAdminId) | master && isJust maybeClientId && (newAdminId /= thisClientId) && sameRoom] |
|
312 |
|
313 |
304 handleCmd_inRoom ["TEAMCHAT", msg] = do |
314 handleCmd_inRoom ["TEAMCHAT", msg] = do |
305 cl <- thisClient |
315 cl <- thisClient |
306 chans <- roomSameClanChans |
316 chans <- roomSameClanChans |
307 return [AnswerClients chans ["EM", engineMsg cl]] |
317 return [AnswerClients chans ["EM", engineMsg cl]] |
308 where |
318 where |