Opened 8 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 wraitii)

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.

http://trac.wildfiregames.com/raw-attachment/ticket/3548/wanna%20hoox.jpg

Attachments (1)

wanna hoox.jpg (126.5 KB ) - added by elexis 8 years ago.
Notice three dead games of that user being listed for the lifespan of WfgBot.

Download all attachments as: .zip

Change History (6)

by elexis, 8 years ago

Attachment: wanna hoox.jpg added

Notice three dead games of that user being listed for the lifespan of WfgBot.

comment:1 by elexis, 8 years ago

Description: modified (diff)

comment:2 by elexis, 8 years ago

Priority: Should HaveMust Have
Summary: Lobby bot (XPartaMupp) - remove games after a timeoutLobby bot (XPartaMupp) - remove dead games

The game should already be removed when the player leaves, according to the code:

  def muc_offline(self, presence):
    """
    Process presence stanza from a chat room.
    """
    # Clean up after a player leaves
    if presence['muc']['nick'] != self.nick:
      # Delete any games they were hosting.
      for JID in self.gameList.getAllGames():
        if JID == str(presence['muc']['jid']):
          self.gameList.removeGame(JID)
          self.sendGameList()
          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'])]
Last edited 8 years ago by elexis (previous) (diff)

comment:3 by elexis, 7 years ago

Is still the case as of alpha 20 when banning a user (alpha 20 lobby with r18609 applied).

comment:4 by wraitii, 3 years ago

Description: modified (diff)
Milestone: BacklogAlpha 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 wraitii, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.