- commit
- 9ac7ea45544d9cbcf535328af474e8d91cf2588f
- parent
- 90d07b628df72bcc607842c54be4513d49cc4315
- Author
- radow <masteroftheriddles@googlemail.com>
- Date
- 2014-10-05 18:15
Register User on initial request
Diffstat
| M | laneya/server.py | 4 | ++++ |
1 files changed, 4 insertions, 0 deletions
diff --git a/laneya/server.py b/laneya/server.py
@@ -10,6 +10,9 @@ import protocol 10 10 11 11 class ServerProtocol(protocol.ServerProtocol): 12 12 def requestReceived(self, user, action, **kwargs): # TODO -1 13 if user not in self.factory.users: -1 14 self.factory.users[user] = {} -1 15 13 16 if action == 'echo': 14 17 return kwargs 15 18 elif action == 'move': @@ -24,6 +27,7 @@ class ServerProtocol(protocol.ServerProtocol): 24 27 class Server(protocol.ServerProtocolFactory): 25 28 def __init__(self): 26 29 protocol.ServerProtocolFactory.__init__(self, ServerProtocol) -1 30 self.users = {} 27 31 28 32 # TODO: should be set per user 29 33 self.direction = 'stop'