Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send IQ response for gamereport requests #41

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions xpartamupp/echelon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading