add ability to disable forfeits
This commit is contained in:
@@ -46,6 +46,9 @@ class Context:
|
||||
self.lookup_name_to_id = {}
|
||||
self.lookup_id_to_name = {}
|
||||
|
||||
self.disable_client_forfeit = False
|
||||
|
||||
|
||||
async def send_msgs(websocket, msgs):
|
||||
if not websocket or not websocket.open or websocket.closed:
|
||||
return
|
||||
@@ -281,6 +284,9 @@ async def process_client_cmd(ctx : Context, client : Client, cmd, args):
|
||||
if args.startswith('!players'):
|
||||
notify_all(ctx, get_connected_players_string(ctx))
|
||||
if args.startswith('!forfeit'):
|
||||
if ctx.disable_client_forfeit:
|
||||
notify_client(client, 'Forfeit is currently disabled server-side.')
|
||||
return
|
||||
forfeit_player(ctx, client.team, client.slot)
|
||||
if args.startswith('!countdown'):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user