def __init__(self, name, port, approved, usingGlacier2, glacier2Host, glacier2Port, client_prx, ip_string, reporter = None, threshold = 300): """ Initialize a main-to-game session. @param name Server's name. @param port Port that the server listens for clients on. @param approved True if the server is 'approved' by this server, otherwise False. @param usingGlacier2 [bool] True if clients must use Glacier2 to connect. @param glacier2Host Host name of the Glacier2 router. @param glacier2Port Port number that the Glacier2 router listens on. @param client_prx Proxy to the client's callback. @param ip_string IP obtained from the current.con.toString() method. @param reporter Debug reporter. Optional. """ Base_Servant.__init__(self, ip_string, Client_Types.THEATRE_CLIENT_TYPE, 0, reporter); self.name = name; self.port = port; self.config = World.get_world().get_config(); self.database = World.get_world().get_database(); self.approved = approved; self.client_prx = MainToGameSession.ClientSessionPrx.uncheckedCast(client_prx.ice_timeout(8000)); self.usingGlacier2 = usingGlacier2; self.glacier2Host = glacier2Host; self.glacier2Port = glacier2Port; self.player_limit = 100; self.forced_limit = False; self.player_list = {}; self.threshold = threshold; self.current_map = ""; self.current_mode = VTankObject.GameMode.DEATHMATCH;
def __init__(self, username, userlevel, ip_string, reporter = None): """ Start a Janitor session. @param username Username of the connected client. @param database_obj Access to the database. @param reporter Optional debug reporter. """ Base_Servant.__init__(self, ip_string, JANITOR_CLIENT_TYPE, userlevel, reporter); self.name = name; self.database = World.get_world().get_database(); self.callback = None;
def __init__(self, name, ip_string, userlevel, reporter = None, threshold = 300): """ Create a new map editor session. @param username The editor's username. @param database_obj SQL Database object. @param reporter Debug reporter. Default is None. @param threshold How long to wait (in seconds) before a client is kicked for inactivity. """ Base_Servant.__init__(self, ip_string, Client_Types.MAPEDITOR_CLIENT_TYPE, userlevel, reporter); self.name = name; self.database = World.get_world().get_database(); self.threshold = threshold;
def __init__(self, username, userlevel, ip_string, reporter = None, threshold = 30): Base_Servant.__init__(self, ip_string, Client_Types.VTANK_CLIENT_TYPE, userlevel, reporter); self.name = username; self.database = World.get_world().get_database(); self.ranks = {}; self.tank_list = {}; self.active_tank = None; self.playing = False; self.threshold = threshold; self.refresh_tank_list();
def __init__(self, name, ip_string, reporter=None, threshold=300): """ Initialize an administrative session. @param name Administrator who opened the session. @param ip_string Obtained from current.con.toString(). @param reporter Debug reporter. Null by default. @param threshold How long to wait before disconnecting an admin in seconds. Default is 300. """ Base_Servant.__init__(self, ip_string, Client_Types.ADMIN_CLIENT_TYPE, UserLevel.ADMINISTRATOR, reporter) self.name = name self.database = World.get_world().get_database() self.threshold = threshold self.callback = None
def __init__(self, name, ip_string, reporter = None, threshold = 300): """ Initialize an administrative session. @param name Administrator who opened the session. @param ip_string Obtained from current.con.toString(). @param reporter Debug reporter. Null by default. @param threshold How long to wait before disconnecting an admin in seconds. Default is 300. """ Base_Servant.__init__(self, ip_string, Client_Types.ADMIN_CLIENT_TYPE, UserLevel.ADMINISTRATOR, reporter); self.name = name; self.database = World.get_world().get_database(); self.threshold = threshold; self.callback = None;
def __init__(self, name, port, approved, usingGlacier2, glacier2Host, glacier2Port, client_prx, ip_string, reporter=None, threshold=300): """ Initialize a main-to-game session. @param name Server's name. @param port Port that the server listens for clients on. @param approved True if the server is 'approved' by this server, otherwise False. @param usingGlacier2 [bool] True if clients must use Glacier2 to connect. @param glacier2Host Host name of the Glacier2 router. @param glacier2Port Port number that the Glacier2 router listens on. @param client_prx Proxy to the client's callback. @param ip_string IP obtained from the current.con.toString() method. @param reporter Debug reporter. Optional. """ Base_Servant.__init__(self, ip_string, Client_Types.THEATRE_CLIENT_TYPE, 0, reporter) self.name = name self.port = port self.config = World.get_world().get_config() self.database = World.get_world().get_database() self.approved = approved self.client_prx = MainToGameSession.ClientSessionPrx.uncheckedCast( client_prx.ice_timeout(8000)) self.usingGlacier2 = usingGlacier2 self.glacier2Host = glacier2Host self.glacier2Port = glacier2Port self.player_limit = 100 self.forced_limit = False self.player_list = {} self.threshold = threshold self.current_map = "" self.current_mode = VTankObject.GameMode.DEATHMATCH
def __init__(self, username, userlevel, ip_string, reporter=None, threshold=30): Base_Servant.__init__(self, ip_string, Client_Types.VTANK_CLIENT_TYPE, userlevel, reporter) self.name = username self.database = World.get_world().get_database() self.ranks = {} self.tank_list = {} self.active_tank = None self.playing = False self.threshold = threshold self.refresh_tank_list()
def __init__(self, name, ip_string, userlevel, reporter=None, threshold=300): """ Create a new map editor session. @param username The editor's username. @param database_obj SQL Database object. @param reporter Debug reporter. Default is None. @param threshold How long to wait (in seconds) before a client is kicked for inactivity. """ Base_Servant.__init__(self, ip_string, Client_Types.MAPEDITOR_CLIENT_TYPE, userlevel, reporter) self.name = name self.database = World.get_world().get_database() self.threshold = threshold
def __str__(self): return Base_Servant.__str__(self)
def __str__(self): return Base_Servant.__str__(self);