# HG changeset patch # User Wuzzy # Date 1538656602 -7200 # Node ID 07b3dacd00f82472f5332c88f27ae9dfa3f8c3c2 # Parent 5d58fce48b1d3a5f3af37b67b57fb567db3eb83c gameServer: Always report command name if getting an incorrect command diff -r 5d58fce48b1d -r 07b3dacd00f8 gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Thu Oct 04 14:18:38 2018 +0200 +++ b/gameServer/HWProtoLobbyState.hs Thu Oct 04 14:36:42 2018 +0200 @@ -226,4 +226,4 @@ handleCmd_lobby ["STATS"] = serverAdminOnly $ return [Stats] -handleCmd_lobby _ = return [ProtocolError "Incorrect command (state: in lobby)"] +handleCmd_lobby (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: in lobby)"] diff -r 5d58fce48b1d -r 07b3dacd00f8 gameServer/HWProtoNEState.hs --- a/gameServer/HWProtoNEState.hs Thu Oct 04 14:18:38 2018 +0200 +++ b/gameServer/HWProtoNEState.hs Thu Oct 04 14:36:42 2018 +0200 @@ -101,4 +101,4 @@ parsedProto = readInt_ protoNum #endif -handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"] +handleCmd_NotEntered (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: not entered)"]