Commit 973ed304 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Server: leaveTable and removeTable: fix args

parent c25d73d2
......@@ -301,7 +301,7 @@ class MJServer:
"""table ids with user, except table 'without'"""
return [x.tableid for x in self.tables.values() if user in x.users]
def leaveTable(self, user, tableid, message=None, *args):
def leaveTable(self, user, tableid, message, *args):
"""user leaves table. If no human user is left on a new table, remove it"""
if tableid in self.tables:
table = self.tables[tableid]
......@@ -326,7 +326,7 @@ class MJServer:
"""try to start the game"""
return self._lookupTable(tableid).readyForGameStart(user)
def removeTable(self, table, reason, message=None, *args):
def removeTable(self, table, reason, message, *args):
"""remove a table"""
assert reason in ('silent', 'tableRemoved', 'gameOver', 'abort')
# HumanClient implements methods remote_tableRemoved etc.
......@@ -113,7 +113,7 @@ class User(pb.Avatar, StrMixin):
def perspective_leaveTable(self, tableid):
"""perspective_* methods are to be called remotely"""
return self.server.leaveTable(self, tableid)
return self.server.leaveTable(self, tableid, None)
def perspective_newTable(
self, ruleset, playOpen, autoPlay, wantedGame: str, tableId=None):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment