Remove handling from LogOut messages that are no longer sent by client but by the server

This commit is contained in:
Tissevert 2019-12-24 00:35:45 +01:00
parent 2518aedab1
commit 4a535caccc

View file

@ -11,7 +11,7 @@ import qualified Messaging (
broadcast, get, notifyPlayers, relay, send, sendTo broadcast, get, notifyPlayers, relay, send, sendTo
) )
import qualified Player (T(..)) import qualified Player (T(..))
import qualified Server (logIn, logOut, register, room, update) import qualified Server (logIn, register, room, update)
import qualified Session (Status, T(..), setPlayer) import qualified Session (Status, T(..), setPlayer)
receive :: Message.FromClient -> Session.Status -> App.T () receive :: Message.FromClient -> Session.Status -> App.T ()
@ -38,9 +38,11 @@ receive (Message.Tadaima {Message.myID, Message.name}) Nothing = do
receive (Message.Tadaima {}) (Just _) = sendError "You're already logged in" receive (Message.Tadaima {}) (Just _) = sendError "You're already logged in"
{-
receive logOut@Message.LogOut (Just _) = do receive logOut@Message.LogOut (Just _) = do
asks App.sessionID >>= App.update . Server.logOut asks App.sessionID >>= App.update . Server.logOut
Messaging.relay logOut Messaging.broadcast Messaging.relay logOut Messaging.broadcast
-}
receive invitation@(Message.Invitation {Message.to}) (Just _) = receive invitation@(Message.Invitation {Message.to}) (Just _) =
Messaging.relay invitation (Messaging.sendTo [to]) Messaging.relay invitation (Messaging.sendTo [to])