gameServer/Actions.hs
changeset 12766 0167e337553b
parent 12119 cdadc1d487f1
child 12869 73ebc894a725
--- 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 $ [