Actually tell the client that login failed when it does.

This prevents it sitting there on the "connecting..." screen for minutes
and instead throws error 61020. If anyone has an idea how to actually
set the error code the DS/Wii displays, that would be interesting!
This commit is contained in:
Admiral H. Curtiss 2015-04-28 18:15:08 +02:00
parent 49ca674063
commit 0d7ba68a3b

View File

@ -300,7 +300,17 @@ class PlayerSession(LineReceiver):
# self.statstring = profile['stat']
# self.locstring = profile['loc']
else:
self.log(logging.WARNING, "Invalid password")
self.log(logging.INFO, "Invalid password or banned user")
msg = gs_query.create_gamespy_message([
('__cmd__', "error"),
('__cmd_val__', ""),
('err', '256'),
('fatal', ''),
('errmsg', 'Login failed.'),
('id', data_parsed['id']),
])
self.log(logging.DEBUG, "SENDING: %s" % msg)
self.transport.write(bytes(msg))
def perform_logout(self, data_parsed):
self.log(logging.INFO, "Session %s has logged off" % (data_parsed['sesskey']))