Display lobby chat in checker
authorunc0rr
Sun, 09 Aug 2020 14:43:02 +0200
changeset 15736 eee2b3eff91d
parent 15735 caf41f1a410d
child 15737 6832dab555ae
Display lobby chat in checker
gameServer/OfficialServer/checker.hs
--- a/gameServer/OfficialServer/checker.hs	Sat Aug 01 04:19:29 2020 +0300
+++ b/gameServer/OfficialServer/checker.hs	Sun Aug 09 14:43:02 2020 +0200
@@ -54,7 +54,7 @@
     deriving Show
 
 serverAddress = "netserver.hedgewars.org"
-protocolNumber = "55"
+protocolNumber = "59"
 
 getLines :: Handle -> IO [B.ByteString]
 getLines h = g
@@ -175,6 +175,7 @@
         checkReplay home exe prefix chan msgs
         warningM "Check" "Started check"
     onPacket _ ("BYE" : xs) = error $ show xs
+    onPacket _ ("CHAT" : nickname : text) = infoM "Chat" $ ">>> " ++ show nickname ++ ": " ++ show text
     onPacket _ _ = return ()
 
 
@@ -189,6 +190,7 @@
     updateGlobalLogger "Network" (setLevel WARNING)
     updateGlobalLogger "Check" (setLevel DEBUG)
     updateGlobalLogger "Engine" (setLevel DEBUG)
+    updateGlobalLogger "Chat" (setLevel DEBUG)
 
     d <- getHomeDirectory
     Right (login, password) <- runErrorT $ do