From 4a535cacccdb709df15566a3548d35e27496d5a1 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Tue, 24 Dec 2019 00:35:45 +0100 Subject: [PATCH] Remove handling from LogOut messages that are no longer sent by client but by the server --- src/Automaton.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Automaton.hs b/src/Automaton.hs index 2c4740a..da1fa4d 100644 --- a/src/Automaton.hs +++ b/src/Automaton.hs @@ -11,7 +11,7 @@ import qualified Messaging ( broadcast, get, notifyPlayers, relay, send, sendTo ) 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) 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 logOut@Message.LogOut (Just _) = do asks App.sessionID >>= App.update . Server.logOut Messaging.relay logOut Messaging.broadcast +-} receive invitation@(Message.Invitation {Message.to}) (Just _) = Messaging.relay invitation (Messaging.sendTo [to])