From 63ac62ec8abe30f0d6dd2cfe0ddaab291c36893f Mon Sep 17 00:00:00 2001 From: red-001 Date: Sat, 1 Apr 2017 12:40:56 +0100 Subject: [CSM] Add function and chat command to disconnect from server. (#5487) --- clientmods/preview/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clientmods/preview/init.lua') diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua index c57a62155..07464e927 100644 --- a/clientmods/preview/init.lua +++ b/clientmods/preview/init.lua @@ -127,3 +127,10 @@ core.register_chatcommand("list_players", { core.display_chat_message(dump(core.get_player_names())) end }) + +core.register_chatcommand("disconnect", { + description = "Exit to main menu", + func = function(param) + core.disconnect() + end, +}) -- cgit v1.2.3