Opened 5 years ago

Closed 5 years ago

#5337 closed defect (wontfix)

XpartaMuPP doesn't send gamelist to all JIDs of a user

Reported by: elexis Owned by:
Priority: Should Have Milestone:
Component: Multiplayer lobby Keywords:
Cc: Patch:

Description

When someone connects to the lobby with a chatclient and then joins with the 0ad client using the same account, the 0ad client will not receive a gamelist. (For that reason moderators have kept using secondary accounts to play games.)

refs #5335

Change History (2)

comment:1 by elexis, 5 years ago

XpartaMuPP triggers neither presence_change nor muc_online events for the affected 0ad client, but presence changes:

Index: XpartaMuPP.py
===================================================================
--- XpartaMuPP.py	(revision 21929)
+++ XpartaMuPP.py	(working copy)
@@ -212,6 +212,7 @@
     self.add_event_handler("session_start", self.start)
     self.add_event_handler("muc::%s::got_online" % self.room, self.muc_online)
     self.add_event_handler("muc::%s::got_offline" % self.room, self.muc_offline)
+    self.add_event_handler("muc::%s::presence" % self.room, self.muc_presence)
     self.add_event_handler("groupchat_message", self.muc_message)
     self.add_event_handler("changed_status", self.presence_change)
 
@@ -228,6 +229,7 @@
     """
     Process presence stanza from a chat room.
     """
+    logging.debug("muc_online '%s' with nick '%s'." %(presence['muc']['jid'], presence['muc']['nick']))
     if self.ratingsBot in self.nicks:
       self.relayRatingListRequest(self.ratingsBot)
     self.relayPlayerOnline(presence['muc']['jid'])
@@ -245,6 +247,7 @@
     """
     Process presence stanza from a chat room.
     """
+    logging.debug("muc_offline '%s' with nick '%s'." %(presence['muc']['jid'], presence['muc']['nick']))
     # Clean up after a player leaves
     if presence['muc']['nick'] != self.nick:
       # Delete any games they were hosting.
@@ -261,6 +264,9 @@
     if presence['muc']['nick'] == self.ratingsBot:
       self.ratingsBotWarned = False
 
+  def muc_presence(self, presence):
+    logging.debug("muc_presence '%s' with nick '%s'." %(presence['muc']['jid'], presence['muc']['nick']))
+
   def muc_message(self, msg):
     """
     Process new messages from the chatroom.
@@ -274,6 +280,7 @@
     """
     Processes presence change
     """
+    logging.debug("presence_change '%s' with nick '%s'." %(presence['muc']['jid'], presence['muc']['nick']))
     prefix = "%s/" % self.room
     nick = str(presence['from']).replace(prefix, "")
     for JID in self.nicks:
@@ -401,8 +408,10 @@
     if to == "":
       for JID in list(self.presences):
         if self.presences[JID] != "available" and self.presences[JID] != "away":
+          logging.debug("Skipping sending gamelist to %s because unavailable", JID)
           continue
         iq['to'] = JID
+        logging.debug("Sending gamelist to %s", JID)
 
         ## Try sending the stanza
         try:

Perhaps #4203 will fix this already?

comment:2 by elexis, 5 years ago

Milestone: Backlog
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.