diff --git a/src/java/com/threerings/parlor/server/TableManager.java b/src/java/com/threerings/parlor/server/TableManager.java index 9c8fe8bd..a85912f9 100644 --- a/src/java/com/threerings/parlor/server/TableManager.java +++ b/src/java/com/threerings/parlor/server/TableManager.java @@ -166,12 +166,7 @@ public class TableManager notePlayerAdded(table, creator); } - // stick the table into the table lobby object - if (shouldPublish(table)) { - _tlobj.addToTables(table); - } - - // also stick it into our tables tables + // stick the table into our tables tables _tables.put(table.tableId, table); // if the table has only one seat, start the game immediately @@ -179,6 +174,9 @@ public class TableManager createGame(table); } + // wire our table into our bits + tableCreated(table); + return table; } @@ -335,6 +333,19 @@ public class TableManager updateTable(table); } + /** + * Puts a newly created table into our internal tables and publishes it to the lobby object. + * Can also be overridden by custom managers that want to react to table creation. + */ + protected void tableCreated (Table table) + throws InvocationException + { + // publish the table in the lobby object if desired + if (shouldPublish(table)) { + _tlobj.addToTables(table); + } + } + /** * Removes the table from all of our internal tables and from its lobby's distributed object. */