From 0d7ba68a3b43974bf433ba00cab0a47a0645df2e Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Tue, 28 Apr 2015 18:15:08 +0200 Subject: [PATCH] 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! --- gamespy_profile_server.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gamespy_profile_server.py b/gamespy_profile_server.py index 1913034..b6dd2b6 100644 --- a/gamespy_profile_server.py +++ b/gamespy_profile_server.py @@ -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']))