Remove handling from LogOut messages that are no longer sent by client but by the server
This commit is contained in:
parent
2518aedab1
commit
4a535caccc
1 changed files with 3 additions and 1 deletions
|
@ -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])
|
||||||
|
|
Loading…
Reference in a new issue