engines.server module¶
Provides access to the base Server interfaces.
- class engines.server.ConnectionlessPacketHandler¶
Bases:
instance
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class engines.server.MapLoadType¶
Bases:
enum
- Background = _globals.MapLoadType.Background¶
- LoadGame = _globals.MapLoadType.LoadGame¶
- NewGame = _globals.MapLoadType.NewGame¶
- Transition = _globals.MapLoadType.Transition¶
- names = {'Background': _globals.MapLoadType.Background, 'LoadGame': _globals.MapLoadType.LoadGame, 'NewGame': _globals.MapLoadType.NewGame, 'Transition': _globals.MapLoadType.Transition}¶
- values = {0: _globals.MapLoadType.NewGame, 1: _globals.MapLoadType.LoadGame, 2: _globals.MapLoadType.Transition, 3: _globals.MapLoadType.Background}¶
- class engines.server.QueryCvarStatus¶
Bases:
enum
- INVALID = _engines._server.QueryCvarStatus.INVALID¶
- NOT_FOUND = _engines._server.QueryCvarStatus.NOT_FOUND¶
- PROTECTED = _engines._server.QueryCvarStatus.PROTECTED¶
- SUCCESS = _engines._server.QueryCvarStatus.SUCCESS¶
- names = {'INVALID': _engines._server.QueryCvarStatus.INVALID, 'NOT_FOUND': _engines._server.QueryCvarStatus.NOT_FOUND, 'PROTECTED': _engines._server.QueryCvarStatus.PROTECTED, 'SUCCESS': _engines._server.QueryCvarStatus.SUCCESS}¶
- values = {0: _engines._server.QueryCvarStatus.SUCCESS, 1: _engines._server.QueryCvarStatus.NOT_FOUND, 2: _engines._server.QueryCvarStatus.INVALID, 3: _engines._server.QueryCvarStatus.PROTECTED}¶
- class engines.server.Server¶
Bases:
ConnectionlessPacketHandler
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- broadcast_message((Server)arg1, (_net_channel.NetMessage)arg2, (bool)arg3, (bool)arg4) None ¶
broadcast_message( (Server)arg1, (_net_channel.NetMessage)arg2, (_filters._recipients.BaseRecipientFilter)arg3) -> None
- get_client((Server)arg1, (_engines._sound.Channel)arg2) _players.Client : ¶
Return the interface to a client.
- Return type:
- get_player_info((Server)arg1, (_engines._sound.Channel)arg2, (object)arg3) bool : ¶
- Return type:
- engines.server.execute_server_command()¶
Execute a server command immediately.
Additional arguments can be passed.
- Parameters:
command (str) – Command to execute.
*args –
Additional arguments that should be passed to the command.
- Raises:
TypeError – Raised if keyword arguments have been passed.
ValueError – Raised if the server command was not found or if the command couldn’t be tokenized.
- engines.server.insert_command_string((str)arg1) None : ¶
Same like
queue_command_string()
, but inserts the command at the beginning of the server command queue.
- engines.server.insert_server_command()¶
Same as
queue_server_command()
, but inserts the command at the beginning of the server command queue.- Raises:
ValueError – Raised if the server command was not found.
- engines.server.queue_command_string((str)arg1) None : ¶
Adds a string to the end of the server command queue. It’s the same like typing something into the server console.
- engines.server.queue_server_command()¶
Same as
execute_server_command()
, but does not execute the server command immediately. Instead it is added to the server command queue. Thus, it can be executed with a little delay.- Raises:
ValueError – Raised if the server command was not found.