# HG changeset patch # User unc0rr # Date 1335115412 -14400 # Node ID 831416764d2dd25960db8303a98fe70c61d57472 # Parent 1cda333286e059c7d2de3ffa6944a661e682b80c Allow LIST command while in room to not annoy old frontends (0.9.17 or less) with warnings diff -r 1cda333286e0 -r 831416764d2d gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sun Apr 22 18:38:34 2012 +0200 +++ b/gameServer/CoreTypes.hs Sun Apr 22 21:23:32 2012 +0400 @@ -192,6 +192,7 @@ data Notice = NickAlreadyInUse | AdminLeft + | WrongPassword deriving Enum data ShutdownException = diff -r 1cda333286e0 -r 831416764d2d gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Apr 22 18:38:34 2012 +0200 +++ b/gameServer/HWProtoInRoomState.hs Sun Apr 22 21:23:32 2012 +0400 @@ -278,6 +278,8 @@ where engineMsg cl = toEngineMsg $ B.concat ["b", nick cl, "(team): ", msg, "\x20\x20"] +handleCmd_inRoom ["LIST"] = return [] -- for old clients (<= 0.9.17) + handleCmd_inRoom (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: in room)"] handleCmd_inRoom [] = return [ProtocolError "Empty command (state: in room)"] diff -r 1cda333286e0 -r 831416764d2d gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sun Apr 22 18:38:34 2012 +0200 +++ b/gameServer/HWProtoLobbyState.hs Sun Apr 22 21:23:32 2012 +0400 @@ -76,7 +76,7 @@ else if isRestrictedJoins jRoom then [Warning "Joining restricted"] else if roomPassword /= password jRoom then - [Warning "Wrong password"] + [NoticeMessage WrongPassword] else [ MoveToRoom jRI,