Use maybeNick from Utils, fixes empty nickname inserted in ROOMS protocol command parameters. Not tested, but builds, and it's Haskell...
authorunc0rr
Wed, 25 Oct 2017 20:38:51 +0200
changeset 12766 0167e337553b
parent 12765 5acf6b91df76
child 12767 5134c07ce32c
Use maybeNick from Utils, fixes empty nickname inserted in ROOMS protocol command parameters. Not tested, but builds, and it's Haskell...
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Tue Oct 24 19:54:38 2017 -0400
+++ b/gameServer/Actions.hs	Wed Oct 25 20:38:51 2017 +0200
@@ -515,7 +515,7 @@
     rnc <- gets roomsClients
     clientNick <- client's nick
     clProto <- client's clientProto
-    isAuthenticated <- liftM isRegistered $ client's id
+    isAuthenticated <- client's isRegistered
     isAdmin <- client's isAdministrator
     isContr <- client's isContributor
     loggedInClients <- liftM (Prelude.filter isVisible) $! allClientsS
@@ -531,8 +531,8 @@
 
     roomsInfoList <- io $ do
         rooms <- roomsM rnc
-        mapM (\r -> (if isNothing $ masterID r then return "" else client'sM rnc nick (fromJust $ masterID r))
-            >>= \cn -> return $ roomInfo clProto cn r)
+        mapM (\r -> (mapM (client'sM rnc id) $ masterID r)
+            >>= \cn -> return $ roomInfo clProto (maybeNick cn) r)
             $ filter (\r -> (roomProto r == clProto)) rooms
 
     mapM_ processAction . concat $ [