equal
deleted
inserted
replaced
418 processAction CheckRegistered = do |
418 processAction CheckRegistered = do |
419 (Just ci) <- gets clientIndex |
419 (Just ci) <- gets clientIndex |
420 n <- client's nick |
420 n <- client's nick |
421 h <- client's host |
421 h <- client's host |
422 p <- client's clientProto |
422 p <- client's clientProto |
|
423 checker <- client's isChecker |
423 uid <- client's clUID |
424 uid <- client's clUID |
424 haveSameNick <- liftM (not . null . tail . filter (\c -> caseInsensitiveCompare (nick c) n)) allClientsS |
425 -- allow multiple checker logins |
425 if haveSameNick then |
426 haveSameNick <- liftM (not . null . tail . filter (\c -> (not $ isChecker c) && caseInsensitiveCompare (nick c) n)) allClientsS |
|
427 if haveSameNick && (not checker) then |
426 if p < 38 then |
428 if p < 38 then |
427 processAction $ ByeClient "Nickname is already in use" |
429 processAction $ ByeClient "Nickname is already in use" |
428 else |
430 else |
429 processAction $ NoticeMessage NickAlreadyInUse |
431 processAction $ NoticeMessage NickAlreadyInUse |
430 else |
432 else |
634 |
636 |
635 #if defined(OFFICIAL_SERVER) |
637 #if defined(OFFICIAL_SERVER) |
636 processAction SaveReplay = do |
638 processAction SaveReplay = do |
637 ri <- clientRoomA |
639 ri <- clientRoomA |
638 rnc <- gets roomsClients |
640 rnc <- gets roomsClients |
|
641 |
639 io $ do |
642 io $ do |
640 r <- room'sM rnc id ri |
643 r <- room'sM rnc id ri |
641 saveReplay r |
644 saveReplay r |
642 #else |
645 #else |
643 processAction SaveReplay = return () |
646 processAction SaveReplay = return () |