From b1689284be1f76bc5a68881310d0bcd78d024ab2 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Thu, 16 May 2024 19:59:06 +0200 Subject: [PATCH] Send IQ response for gamereport requests XMPP demands a response for every IQ get/set stanza. This wasn't the case for gamereport requests yet, so this commit adds it. While Pyrogenesis neither expects nor handles these responses, it doesn't result in any problems either. --- xpartamupp/echelon.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xpartamupp/echelon.py b/xpartamupp/echelon.py index 3362fe5..72c3a91 100755 --- a/xpartamupp/echelon.py +++ b/xpartamupp/echelon.py @@ -678,10 +678,15 @@ def _iq_game_report_handler(self, iq): if not iq['from'].resource.startswith('0ad'): return + iq_r = iq.reply() + try: self.report_manager.add_report(iq['from'], iq['gamereport']['game']) except Exception: logger.exception("Failed to update game statistics for %s", iq['from'].bare) + iq_r["error"]["condition"] = "internal-server-error" + + iq_r.send() rating_messages = self.leaderboard.get_rating_messages() if rating_messages: