Opened 9 years ago
Closed 3 years ago
#3548 closed defect (fixed)
Lobby bot (XPartaMupp) - remove dead games
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 25 |
Component: | Multiplayer lobby | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Sometimes games don't become unregistered correctly and thus will be listed in the lobby until the bot is restarted.
We should implement some timeout value, so that they become unlisted if we don't hear from them after some meaningful time (10min?).
Users who know they will be banned use this to show their game in the lobby.
Attachments (1)
Change History (6)
by , 9 years ago
Attachment: | wanna hoox.jpg added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Priority: | Should Have → Must Have |
---|---|
Summary: | Lobby bot (XPartaMupp) - remove games after a timeout → Lobby bot (XPartaMupp) - remove dead games |
According to leper the easiest way to do this is to remove the game when the hosting player leaves the lobby (i.e. being banned). Could be something like that:
Index: source/tools/XpartaMuPP/XpartaMuPP.py =================================================================== --- source/tools/XpartaMuPP/XpartaMuPP.py (revision 17144) +++ source/tools/XpartaMuPP/XpartaMuPP.py (working copy) @@ -577,10 +577,17 @@ class XpartaMuPP(sleekxmpp.ClientXMPP): break # Remove them from the local player list. self.lastLeft = str(presence['muc']['jid']) if str(presence['muc']['jid']) in self.nicks: del self.nicks[str(presence['muc']['jid'])] + # Try removing the game + try: + self.gameList.removeGame(presence['muc']['jid']) + self.sendGameList() + except: + traceback.print_exc() + logging.error("Failed to process game unregistration data") def muc_message(self, msg): """ Process new messages from the chatroom. """
Not tested.
comment:3 by , 8 years ago
Is still the case as of alpha 20 when banning a user (alpha 20 lobby with r18609 applied).
comment:4 by , 3 years ago
Description: | modified (diff) |
---|---|
Milestone: | Backlog → Alpha 25 |
Need clarification but I think we know clear out games when players disconnect, which ought be good enough to GC everything -> this might be fixed
comment:5 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Notice three dead games of that user being listed for the lifespan of WfgBot.