From 2a8842cb7439d7c392fbadeb783b3861f60ddd14 Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 18:30:51 +0100 Subject: [PATCH 01/61] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5266f189..66942ea2 100644 --- a/README.md +++ b/README.md @@ -269,11 +269,13 @@ systems. * Make - `apt install make` * zlib-dev - `apt install zlib1g-dev` -### Recommended +### Development Development make targets also use the following dependencies. -* isort - `apt install isort` -* flake8 - `apt install flake8` +* isort - `pip3 install isort` +* flake8 - `pip3 install flake8` +* pytest - `pip3 install pytest` +* pytest-cov - `pip3 install pytest-cov` ### Windows users You can build the program without make by running `setup.py`. From 2cffa32d0a6f6e4fe435163ebb018bea80938ef7 Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 22:16:23 +0100 Subject: [PATCH 02/61] Delete .coverage --- .coverage | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .coverage diff --git a/.coverage b/.coverage deleted file mode 100644 index e4aee2db..00000000 --- a/.coverage +++ /dev/null @@ -1 +0,0 @@ -!coverage.py: This is a private format, don't read it directly!{"lines":{"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/utils/__init__.py":[1,2,4,5,7,11,13,14,17,25,36,61,65,70,74],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/utils/net.py":[1,2,4,8,15,24,34,44,54,55,56,58,60,65],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/setup.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/magicked_admin.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/settings.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/web_admin/web_admin.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/web_admin/chat.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/web_admin/web_interface.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/web_admin/__init__.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/web_admin/constants.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/utils/time.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/utils/text.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/database/database.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/database/__init__.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/chatbot.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/command_map.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/command_scheduler.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/__init__.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/info_commands.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/argument_parser.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/server_commands.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/command.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/__init__.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/event_commands.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/chatbot/commands/player_commands.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/game.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/player.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/game_tracker.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/__init__.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/motd_updater.py":[],"/media/the_z/data/prog/kf2-magicked-admin/magicked_admin/server/server.py":[]}} \ No newline at end of file From 8e947efa1f1cb2f85a606a94d141d59f9adda9b3 Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 22:17:25 +0100 Subject: [PATCH 03/61] Update .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index bd96c61a..eec38636 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ *.sqlite *.init *.conf +magicked_admin/conf/ + +# Coverage reports +.coverage # Builds bin/ From bf14d755ad8d8267c1b0e8ce3c8c9bb3ffca7d35 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 14:48:35 +0100 Subject: [PATCH 04/61] Create .coveralls.yml --- .coveralls.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 00000000..91600595 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci From dfbc6e4e88ba8ce04aebe517ac06766493d3f57d Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 14:51:53 +0100 Subject: [PATCH 05/61] Update .travis.yml --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f075987e..0b145366 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: python python: - - "3.7" + - "3.7" os: - - linux + - linux install: + - pip install python-coveralls - pip install flake8 - pip install pytest - pip install pytest-cov @@ -13,4 +14,5 @@ install: script: - make test - +after_success: + - coveralls From 07c5f345f3e056965402094cd499774902dfc0f2 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 22 Sep 2019 20:41:38 +0100 Subject: [PATCH 06/61] Move configs to conf folder --- magicked_admin/chatbot/chatbot.py | 2 +- magicked_admin/chatbot/commands/info_commands.py | 2 +- magicked_admin/{ => conf}/marquee/example | 0 magicked_admin/{ => conf}/scripts/example | 0 magicked_admin/database/database.py | 2 +- magicked_admin/server/motd_updater.py | 6 +++--- magicked_admin/settings.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename magicked_admin/{ => conf}/marquee/example (100%) rename magicked_admin/{ => conf}/scripts/example (100%) diff --git a/magicked_admin/chatbot/chatbot.py b/magicked_admin/chatbot/chatbot.py index 61d4aa7d..1fa86870 100644 --- a/magicked_admin/chatbot/chatbot.py +++ b/magicked_admin/chatbot/chatbot.py @@ -28,7 +28,7 @@ def __init__(self, server, greeter_enabled=True, name=None): self.silent = False self.greeter_enabled = True - init_path = find_data_file(server.name + ".init") + init_path = find_data_file("conf/" + server.name + ".init") if path.exists(init_path): self.execute_script(init_path) diff --git a/magicked_admin/chatbot/commands/info_commands.py b/magicked_admin/chatbot/commands/info_commands.py index 0f810f7e..c9702f91 100644 --- a/magicked_admin/chatbot/commands/info_commands.py +++ b/magicked_admin/chatbot/commands/info_commands.py @@ -17,7 +17,7 @@ def __init__(self, server, chatbot): # self.parser.add_argument("iterations") self.parser.add_argument("filename", nargs="*") - self.folder = "marquee" + self.folder = "conf/marquee" self.fps = 10 self.scroll_height = 7 self.marquee = [] diff --git a/magicked_admin/marquee/example b/magicked_admin/conf/marquee/example similarity index 100% rename from magicked_admin/marquee/example rename to magicked_admin/conf/marquee/example diff --git a/magicked_admin/scripts/example b/magicked_admin/conf/scripts/example similarity index 100% rename from magicked_admin/scripts/example rename to magicked_admin/conf/scripts/example diff --git a/magicked_admin/database/database.py b/magicked_admin/database/database.py index 0a289873..0f84384b 100644 --- a/magicked_admin/database/database.py +++ b/magicked_admin/database/database.py @@ -10,7 +10,7 @@ class ServerDatabase: def __init__(self, name): - self.sqlite_db_file = find_data_file(name + ".sqlite") + self.sqlite_db_file = find_data_file("conf/" + name + ".sqlite") if not path.exists(self.sqlite_db_file): self.build_schema() diff --git a/magicked_admin/server/motd_updater.py b/magicked_admin/server/motd_updater.py index 24953a76..13640fd3 100644 --- a/magicked_admin/server/motd_updater.py +++ b/magicked_admin/server/motd_updater.py @@ -10,12 +10,12 @@ class MotdUpdater(threading.Thread): def __init__(self, server, scoreboard_type): self.server = server - self.motd_path = find_data_file(server.name + ".motd") + self.motd_path = find_data_file("conf/" + server.name + ".motd") self.scoreboard_type = scoreboard_type self.time_interval = 5 * 60 - if not path.exists(find_data_file(self.server.name + ".motd")): + if not path.exists(find_data_file(self.motd_path)): warning( "No MOTD file for {} found, pulling from web admin!".format( self.server.name @@ -44,7 +44,7 @@ def run(self): time.sleep(self.time_interval) def load_motd(self): - motd_f = open(find_data_file(self.server.name + ".motd")) + motd_f = open(find_data_file(self.motd_path)) motd = motd_f.read() motd_f.close() return motd diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index 5c159e36..95ac99a3 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -5,7 +5,7 @@ from utils import die, fatal, find_data_file, info from utils.net import resolve_address -CONFIG_PATH = find_data_file("./magicked_admin.conf") +CONFIG_PATH = find_data_file("./conf/magicked_admin.conf") SETTINGS_DEFAULT = { 'server_name': 'server_one', From c90114d844bc7c2f9821a516214e34d2a7909b4a Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 22 Sep 2019 21:18:05 +0100 Subject: [PATCH 07/61] Add option to skip guided setup --- magicked_admin/magicked_admin.py | 12 ++++++++-- magicked_admin/settings.py | 39 ++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/magicked_admin/magicked_admin.py b/magicked_admin/magicked_admin.py index 0e1d38f9..bde2130a 100644 --- a/magicked_admin/magicked_admin.py +++ b/magicked_admin/magicked_admin.py @@ -7,6 +7,7 @@ import os import signal import sys +import argparse from colorama import init @@ -20,12 +21,19 @@ init() -banner() +parser = argparse.ArgumentParser( + description='Killing Floor 2 Magicked Administrator' +) +parser.add_argument('-s', '--skip_setup', action='store_true', + help='Skips the guided setup process') +args = parser.parse_args() -settings = Settings() +banner() +settings = Settings(skip_setup=args.skip_setup) REQUESTS_CA_BUNDLE_PATH = find_data_file("./certifi/cacert.pem") + if hasattr(sys, "frozen"): import certifi.core diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index 95ac99a3..41a47f61 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -5,7 +5,8 @@ from utils import die, fatal, find_data_file, info from utils.net import resolve_address -CONFIG_PATH = find_data_file("./conf/magicked_admin.conf") +CONFIG_PATH = find_data_file("conf/magicked_admin.conf") +CONFIG_PATH_DISPLAY = "conf/magicked_admin.conf" SETTINGS_DEFAULT = { 'server_name': 'server_one', @@ -29,16 +30,25 @@ class Settings: - - def __init__(self): + def __init__(self, skip_setup=False): if not os.path.exists(CONFIG_PATH): info("No configuration was found, first time setup is required!") - print(" Please input your web admin details below.") - config = self.construct_config_interactive() + + if not skip_setup: + config = self.construct_config_interactive() + else: + config = self.construct_config_template() with open(CONFIG_PATH, 'w') as config_file: config.write(config_file) + if skip_setup: + info("Guided setup was skipped, a template has been generated.") + die( + "Setup is not complete yet, please amend '{}' with your " + "server details.".format(CONFIG_PATH_DISPLAY) + ) + try: self.config = configparser.ConfigParser() self.config.read(CONFIG_PATH) @@ -69,6 +79,7 @@ def sections(self): @staticmethod def construct_config_interactive(): + print(" Please input your web admin details below.") new_config = configparser.ConfigParser() new_config.add_section(SETTINGS_DEFAULT['server_name']) @@ -98,6 +109,24 @@ def construct_config_interactive(): return new_config + @staticmethod + def construct_config_template(): + new_config = configparser.ConfigParser() + new_config.add_section(SETTINGS_DEFAULT['server_name']) + + for setting in SETTINGS_DEFAULT: + new_config.set(SETTINGS_DEFAULT['server_name'], setting, + SETTINGS_DEFAULT[setting]) + + new_config.set( + SETTINGS_DEFAULT['server_name'], + 'address', + "http://localhost:8080" + ) + new_config.set(SETTINGS_DEFAULT['server_name'], 'username', "Admin") + new_config.set(SETTINGS_DEFAULT['server_name'], 'password', "123") + return new_config + @staticmethod def validate_config(config): sections = config.sections() From 944f3bd2f77fa445c2be439a76ef4e71be381c50 Mon Sep 17 00:00:00 2001 From: Skylord123 Date: Tue, 24 Sep 2019 02:09:49 +0000 Subject: [PATCH 08/61] Created Dockerfile :) --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a00913e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3 + +COPY magicked_admin /magicked_admin + +RUN pip install colorama termcolor lxml requests + +WORKDIR /magicked_admin + +CMD [ "python", "magicked_admin.py", "-s"] \ No newline at end of file From 38a6e9adedf11d0f2261ff48b928c427df2b043b Mon Sep 17 00:00:00 2001 From: Skylar Sadlier Date: Mon, 23 Sep 2019 20:28:45 -0600 Subject: [PATCH 09/61] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 66942ea2..52d2c472 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,17 @@ Options can be configured in the config file `magicked_admin.conf`. - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf-magicked-admin -v '':'/magicked_admin/conf' th3-z/kf-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! Running from Python sources --------------------------- From e777bec239958797b552ce9b77a100481e91887a Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 20:31:34 +0100 Subject: [PATCH 10/61] Add CLI support --- admin_patches/admin_patches.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/admin_patches/admin_patches.py b/admin_patches/admin_patches.py index 1251fc4e..b50ebdd8 100644 --- a/admin_patches/admin_patches.py +++ b/admin_patches/admin_patches.py @@ -1,12 +1,20 @@ from os import path from tkinter import * from tkinter.filedialog import askdirectory +import argparse from utils import find_data_file, die, info from utils.patcher import validate_files, patch_files PATCHES_PATH = "patches" +parser = argparse.ArgumentParser( + description='Killing Floor 2 Admin Patches' +) +parser.add_argument('-t', '--target', type=str, + help='Specify server location') +args = parser.parse_args() + def test_dir(d): if not d: @@ -27,8 +35,12 @@ def ask_dir(): def run(): - info("Please open your server's install folder in the file dialogue") - server_path = ask_dir() + if args.target: + server_path = args.target + else: + info("Please open your server's install folder in the file dialogue") + server_path = ask_dir() + if not server_path: die("User cancelled installation") if not test_dir(server_path): From 2c8c9499bab26efedb8c14473f95d76011b27579 Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 20:37:04 +0100 Subject: [PATCH 11/61] Fix running with no $DISPLAY --- admin_patches/admin_patches.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/admin_patches/admin_patches.py b/admin_patches/admin_patches.py index b50ebdd8..04d8a663 100644 --- a/admin_patches/admin_patches.py +++ b/admin_patches/admin_patches.py @@ -1,6 +1,4 @@ from os import path -from tkinter import * -from tkinter.filedialog import askdirectory import argparse from utils import find_data_file, die, info @@ -8,12 +6,13 @@ PATCHES_PATH = "patches" -parser = argparse.ArgumentParser( - description='Killing Floor 2 Admin Patches' -) -parser.add_argument('-t', '--target', type=str, - help='Specify server location') +parser = argparse.ArgumentParser(description='Killing Floor 2 Admin Patches') +parser.add_argument('-t', '--target', type=str, help='Specify server location') args = parser.parse_args() +if not args.target: + from tkinter import * + from tkinter.filedialog import askdirectory + Tk().withdraw() def test_dir(d): @@ -34,9 +33,9 @@ def ask_dir(): ) -def run(): - if args.target: - server_path = args.target +def run(target=None): + if args.target or target: + server_path = args.target or target else: info("Please open your server's install folder in the file dialogue") server_path = ask_dir() @@ -65,5 +64,4 @@ def run(): if __name__ == "__main__": - Tk().withdraw() run() From 31b38d22ca0a666646436c18e849919748816ea1 Mon Sep 17 00:00:00 2001 From: the_z Date: Tue, 24 Sep 2019 20:46:09 +0100 Subject: [PATCH 12/61] Add patched flag --- admin_patches/checksums.py | 2 +- admin_patches/patches/header_base.inc.patch | 12 ++++++++++++ magicked_admin/web_admin/web_interface.py | 5 ++--- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 admin_patches/patches/header_base.inc.patch diff --git a/admin_patches/checksums.py b/admin_patches/checksums.py index 10ecdf0c..768e622d 100644 --- a/admin_patches/checksums.py +++ b/admin_patches/checksums.py @@ -2,6 +2,7 @@ ORIG_MD5 = { "gamesummary.inc": "c058a82cc997d82cb6b135aec3d3e398", "current_rules.inc": "fa1f6df26241de95d1e2b67383c2382d", + "header_base.inc": "47c04f5c37a02e14dd848898c9b1445c", # "about.html": "170c37c1a24bc3f5ed7fad5f0cd6988d", # "console.html": "e677bf40becdaf7351ca152bcdb9ab81", # "current_bot_empty.inc": "7010a3c6ce19005916cb8da47b9b6c9f", @@ -58,7 +59,6 @@ # "gamesummary_base.inc": "3319af6efb70753866b2bafce634e258", # "gamesummary.js": "3723867be22e71f8f655b3ac1815c119", # "gamesummary_kfgameinfo_survival.inc": "86f11c0d38193fd39ab6b966a8ade24a", - # "header_base.inc": "47c04f5c37a02e14dd848898c9b1445c", # "header.inc": "562ac9fa12fb6f1dbfc0352bf99ea76a", # "login.html": "08bfb87514ab579bd89e470fc50bd245", # "message_error.inc": "9c3885f94344bf53cf90effa965e255a", diff --git a/admin_patches/patches/header_base.inc.patch b/admin_patches/patches/header_base.inc.patch new file mode 100644 index 00000000..421072e6 --- /dev/null +++ b/admin_patches/patches/header_base.inc.patch @@ -0,0 +1,12 @@ +diff --git a/ServerAdmin/header_base.inc b/ServerAdmin/header_base.inc +index 217a460..9b085bd 100755 +--- a/ServerAdmin/header_base.inc ++++ b/ServerAdmin/header_base.inc +@@ -1,6 +1,7 @@ + + + ++ + Killing Floor 2 WebAdmin - <%page.title%> + + diff --git a/magicked_admin/web_admin/web_interface.py b/magicked_admin/web_admin/web_interface.py index b33bd8d2..0b68dd58 100644 --- a/magicked_admin/web_admin/web_interface.py +++ b/magicked_admin/web_admin/web_interface.py @@ -163,9 +163,8 @@ def __new_session(self): info("Detected KF2-MA install on server.") else: pass - # TODO: Implement webadmin patches - # warning("KF2-MA install not detected on server side! " - # "Consequently, only Survival mode will function fully.") + warning("KF2-MA install not detected on server side! " + "Consequently, only Survival mode will function fully.") return session From c0bca3d8f5eebd88cebe676db93a6f02164e2965 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 17:46:06 +0100 Subject: [PATCH 13/61] Update setup.py --- magicked_admin/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/magicked_admin/setup.py b/magicked_admin/setup.py index 6d1a6b40..1a947777 100644 --- a/magicked_admin/setup.py +++ b/magicked_admin/setup.py @@ -18,9 +18,9 @@ sys.exit() includefiles = [ - (os.path.join(SRC_PATH, 'database/schema.sql'), 'database/schema.sql'), - (os.path.join(SRC_PATH, 'scripts/example'), 'scripts/example'), - (os.path.join(SRC_PATH, 'marquee/example'), 'marquee/example'), + (os.path.join(SRC_PATH, 'covf/database/schema.sql'), 'conf/database/schema.sql'), + (os.path.join(SRC_PATH, 'conf/scripts/example'), 'conf/scripts/example'), + (os.path.join(SRC_PATH, 'conf/marquee/example'), 'conf/marquee/example'), (CERT_PATH, 'certifi/cacert.pem'), ] From e286a11deddc069e17ddfa27468fcb855bfdf62c Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 17:50:39 +0100 Subject: [PATCH 14/61] Typo --- magicked_admin/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/setup.py b/magicked_admin/setup.py index 1a947777..c5b4d9d2 100644 --- a/magicked_admin/setup.py +++ b/magicked_admin/setup.py @@ -18,7 +18,7 @@ sys.exit() includefiles = [ - (os.path.join(SRC_PATH, 'covf/database/schema.sql'), 'conf/database/schema.sql'), + (os.path.join(SRC_PATH, 'conf/database/schema.sql'), 'conf/database/schema.sql'), (os.path.join(SRC_PATH, 'conf/scripts/example'), 'conf/scripts/example'), (os.path.join(SRC_PATH, 'conf/marquee/example'), 'conf/marquee/example'), (CERT_PATH, 'certifi/cacert.pem'), From 86e61b084fdedc5908a730fb04a0d7194df313f1 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 17:56:30 +0100 Subject: [PATCH 15/61] Fix database schema location --- magicked_admin/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/setup.py b/magicked_admin/setup.py index c5b4d9d2..fe3d5a17 100644 --- a/magicked_admin/setup.py +++ b/magicked_admin/setup.py @@ -18,7 +18,7 @@ sys.exit() includefiles = [ - (os.path.join(SRC_PATH, 'conf/database/schema.sql'), 'conf/database/schema.sql'), + (os.path.join(SRC_PATH, 'database/schema.sql'), 'database/schema.sql'), (os.path.join(SRC_PATH, 'conf/scripts/example'), 'conf/scripts/example'), (os.path.join(SRC_PATH, 'conf/marquee/example'), 'conf/marquee/example'), (CERT_PATH, 'certifi/cacert.pem'), From 273e32b78802dc8199281e9bef2672a0d15f5595 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 18:08:30 +0100 Subject: [PATCH 16/61] Setup admin patches build --- admin_patches/icon.ico | Bin 0 -> 32038 bytes admin_patches/setup.py | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 admin_patches/icon.ico diff --git a/admin_patches/icon.ico b/admin_patches/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6f4b87f745d3924dd0990e02ada66b358f552cb8 GIT binary patch literal 32038 zcmeI53Aj(y{{QzeC$kKNQe-TWNGcghn#@y!S!Bo*LS#s#y4(ikiVO)Qjg;mY71d3e z2Zaa;$63$sxld33&;R{e`z(EZJ0qv=eeUn)c~*OW_t|@|&pfTq+C@=HR3Iu8I z(RBr)s5NI*vRAK;?46#G?HC^IbYr8sW|p$PSM*!6Dv>ol z;g6%)iII(N64{-tB75kv$Yx!XVz)MrjO#mw`FGUj`Lp$`;Ib4Aj$za&6WL9*Q|$C| zkv-o%va#nx)?ClFI7#o&oPvF4c%Ek)rN1XU-%a;TKDm&8Z*!fm?;TmiW8?P&!-l@m zZ{hj;DUsc9c4YbV9^O^1Xk_ym=eK8D7PP-z7}?1sBYVAPWS3Nnp9ki|=L_T$j?E$~ zs3UXTbZ%rnG&#;*ZBx|NTp8JqqayokaAc>J&iHwrd#hnSYhNR>!3_oX`H{IH747l% zCGCV_k(DVDS&2fw(g=M{w|-yzy4O8E})CUO3A zDn-`z)X26Bt7Tt}IMue?JJr@t>1(^6UtkB{m~Uxcud~$8U$xifPqe|UPqi~Err3Fv z52v4pe@Y*7OGew)xr42V-nnM@X?9PS6Rl&tW36+;vVL?rv#hnRTf{om%Ha8jZnd z!}I%Yh(2y7p0%nP+4v51ZS%`Z{4*DyR@P<>Xl6IJE@jA8crF~n^U|Yozl@4LhJL)~ zm0LU7`I7A>k}t-&q7$?Tzr(Sqt|5Qupx#kI@A%~1-qCMgUKjoLUZ3bU&a)ePM@7F$ z)CJp-59~};jpiD`&P?&POBWLU3C7@ONiG*5nL69)5(E;j9g+>hzaBYU7tWVf}5 z?3pf+eb6tm7o^j7w$wHKjj^;{WZd`0HHUCqoCpK+&%HFVYNaCSS7cY6mh;i8USu<6 zgRVUzvc*?KcDvwM(l)aBvZ=SUC}6j>%x}EAR@umk$PT=o0SsaOmapLUMC{VFPb zWWHy+%3k(}ylo!dD5lBC#*tmGbKnGq1YRu6Y<}!^z6|s;z=!Ta|F0Sru&VL_z*9=J zTPQxrc6fh?eJ-H;xR){HtaM%!h-HPjGn$`y@k1pGXHE<7c%W5e-!?2^Crfq$T=+5M z`AhlcN$1J$!l z(c{yBk;w*ndFF57S$K?}&T9TbqWx6)%r>XQ?+ni-9+~6AIz{ZqCMCTctWqMffoI12 zg*ND&8>iSp`T;)SSz?Cl=I8mlMcYyG`}p7REHY6+^gZvy6uVz~zx&F9w!2#)dt3g0 zU2pmF5s_VYW{UU6BP4HbLOg%sJ909A5y{7c%_E!LGRBAbc?W)gSmfT;(y6xj&DF1B zdzzK;e1@;?rg%KpJ;nYxAU?kFz$p0a0@M4I5kB}~-cdlzu zbHgjyfg#5$ew6K!KST!5MUH1wh^(maNSr&T^8@n=_;*@SdokUt4+sx$+ddw0g$4XNNz$L4U#jNyUAxTs?D*s@pZEMLu?f z_E*)7Z2NU>EbXRA=4SrGQm41K19x6!Zq>`?UR!JKy$@~I!r|7heq_Z&lbqt;s%m5d zH0Pz&A|Ic5WzM* zANhZ(TQzg@?$P|s6#L&U+y~m8ON(r%?Jb=?x%wy2M{iSybQw#9vG*u#Bm z9yS*1_o6;EY<`bZ>;c6Gf0wPmrert&lRYJSPd#dG^+I!x4pr{3+@9-I%EuhY!fV$= zc8BcqKSx&d@kb%~4E#n`gL}~7?EH_{|NiyG%a6=${zAuR%&q7x9(1ss6H42bA@X(7 zl?tK*J~FdhB*Wo!ef+q&rw7~XBWijb#jj@- zBPGro&a;}of#je2us}^8b?|cyYf{K|zb$#twf#H4u{S53Z*`n``5|f@^s- zJ|8ImuKXi${&X0+ArJiRFBrc{M*gk;s8dif?X7XBPNCXq@;}kySB>B66k`(36R-dK z&UdAaje4bxIlR6R_^azN{K;_Zx1KY{^`vu;Z~FC|oNJCl@7X<4b;CiCss3b%*Rwg_ zslQ*Lxelw*q|4>6z<1xpajlhlYhI1Z6%X`O+(pideYjEfY-3;Lm;GWtPt4n?rfQk` z8?giTOgTTYe!8Dn+t*~%`7ZcB7yMV~co+`4=IKuj0RKX)b*60A(T;|)f8;*I&chlh zzLJf?M%>jZuCG7cMLENzah<5g8HH@XSp}_U{Q@>sc?`IeR?UJqmE3CQ@N}6T6TyeW zWJ$jd!B37wJ~F&_ZB6T%njqAy()*ZZgmKGsojg7gKMXUzk? zRTjVS$H2^c$djm*UN5{7WNBNn{A2__&l2NjmH#L5i}<;c=BD<%vvLu;NqJ}BDenM> zLBea(waQ0(E7#~B-y3iw=Hnd<>V7v!k2=Us!2{sH4y4NxzWgx#O@^QO$or@PQ_Dz% zGqZE*YQ&5$NFR4qKF)5IO(cE}_X8KOQp@}NI<0eQP@BZ=B-SOv{pc~afI2v_?ga5O zz@MG`088T&Vjd#H%pKmF*%3PN%m)|6@MFgl;paK-sUaM(cR!6#y>m!hV?N{fd>QhY zxR}_L`XulRZg7a{pJ0EI>5mP*uxcE8pQvYZB16!qO|{52%OC9){h>4PgL{E|DPER2 z=iR{boNQ+5XvNeT_)&B}nNB>9>|7SkapfjCo$Mz1rO02nNMt}4W->{|pG4}IG z<$cY*TIpCnsl{NIfE^ft^`6%0@-Qye>7WOR@6QbW?BoX@(7T>$JhFq-VwgAaz2Q8j zZ43|jDz(_%)k@mFvr2n=i4JzF6UXgy+9;nX6ZV>0|Xm7fxV z|0coY8YxbZ{iQa6Zw0T8qB-`iyY!MHwOU|smlQGAzofa*Wi54BCHq*iH@i)IKQ^p- z>Da#!&z&kg#x8K45#1Bv&&YmeWq+UpYll+=Q`)Kd?S~HW`V#Y1k-oC#b6IuO#5zUx zk4wZK`6*w&9GOott~&YPlg$mPZLdnEscjH9V2`n3*d5}MFwobG=$;6FZtV~6D2n7M|9jrszyOWosym;4g8@1m3AbzrzD}4^=ALrq+e*?-$0f(>sDqLGD@0`n>l^=7tWCZr)~Y>MTo}K3sJGtvSr- zZSMZ@mNsv)xy92}`@X}r+}+FOv@Pk^H8RuNz=LG^XXU?+KQ{Is#Ouh0=YY-@KN&jt%XVYYKQjMNd)<*$?WJPj=8c&cwmy?wV_@pNTV}t^y~o^R z&zO7W1>3W5hL7KL&5v?M3Ex{$y!;fAQ-+PV0$jT1Py1Fjc*RZ`px2?zL@CO|p;Y54Jm6 zrFfr+Y|?`X+{6In^Ys02Evx(m9`Ou$3OU0So|WH@5U-G|on1M7-epb zeA3?^Ep3=`ZsuchQ+t2%IriS9vu*v*ing{_Tr)zJ;Y+AxCEK4MKgsal)mpak?&0Q^ zO3s(wB0qGAxmQ+e-E)}jyXP`{sz-Uh&J*f4_=T-wO4;UVjcw=Rp5C6(<3+57y&_i2 zYOof?eLRDG#x4@CP=iD_vy-1>`0s2Z|G7wTuUTVhZ%AGq9U<8JSlY(dEcLOG_DGjv z-VV~YModc25Ir)~p1v7V&eziL!& zY{>)XOLqsFn|q$KBMXv)kfciLglRP@vCg$dMZtPDo{qMN^cylj2WbV^1 zwRZiTrG3A}4*u|!x$ple-4$ORlP=7tY`aJ2^Zj|D$BsA|+fiKhFsJLNncZRCa?%TDN_Rf8_|IK^t`2kg|sqz?X z7y6%FT$vfX$=88DBmb40zfeENAM$*#KXunPQB@S z)ptNI%l8{?Uhi5yZ<%~y3Hy4X;^nbG;H13!K1|GsD2 zr?&sAwYFhWL%*&~Ej_pW6dB3SVe}Wxk$=I@nzFC|5_|9*>o3Hh^wVHB$gfym*tvGu z@9v!yO(U8L4FkfpDa9w(k`=wbVKR=W)02VdZV7sQU( zFWy01-@jo&^}fdILHMvEk2s&_9}T0!}2$3T&#aE@Mp+e^1V6vP5f{}M=i%DX9!D#$CGH`P4)G818?c8VoDP$v zyUqd-{UYQDkq!tgy8qNJ$UFh@|OFN_*@>J z3#JU=Pv=85!TY$zzjPmZjh_Y|f9{VtJU{fD?$6`%e@Q=4QS|ixj{gQa(5Ka0V~R%T z(~4T^N7BD^dC9%}ABoQVwa>gQ+>Q-4IJ4t_G5+xM_3UWypNcUoP0mE9rh~IQ&Ul+p4OV_A^K*B_O0}f?7N|H&4oA%Kg~Vm z^&Ep|s3p?F!n=4Ud5dsL9+}EPBL3v}G7mntAYT152l*E;v(7u~qIjJh+}Lm6*X$He z+}&Dz3yLY8m0zdcK234zIaP~T!z#zvm8Tc7ddC;C5sJT9D=VwmI@Fm@Qf!+E4T>k* zfsF8;C_`Twl3QapZIgZICqSc-K8@YG&pzveolWn^Kn1`8clbyaWEfLJcx zQY_E;hmw(RhbZ0>9iU&xgEFDPA9Nuz{0B9RWeIuuGe#Z7{p3#IPoLQZIw#L#t(ksq z`b4rD^tW&i@7O*puCK8!h72>vmot!q!)TBh{^UjBJ$ZeENA$}h`{?%*l7rKQJ34{w zX?1eUQ`Tz2Sa?O;YqM0j1N*DE&M^#n#b!%R&>7wlV9taFFAMKu(&NcPv2f6T17Qzl6&wK@R@!KYzg0) zfWFz#;6-Sl@t5OI-iIykak}6>Ki=<6jT?K5Y;a^f1D=8(dd~n)WW9cc*k0lT&`rM& zP&Sa-JU)PR>pNS;@)T%5J_(JI1~kYu{=gXQOn858j@W6|9DE5uaL+ORyxZ4u3gz>13Y_8H zxj6zWeeB4!D^SX?<*We*{CQWP0sLie_$LG6S|HzE0S9V;;FcL5kbm?58YJpMH`%oW z8srLpaA!`|=S#}QpsSh9pBX*4pLbyIzmPt&XLoI{*cK+@A7}vV_yl17r)&j24?Dnj zY=|F#DYLl(4UmOE17fA4!5_OtZ!2~+EBa>!6ZoT}?1^x~+ZC?tzo(PT|L{EcG3QXp zJaBIr8v6!hhTgprMGJXZ3HK)-!JB;n?A7CMM}t57rXLbtg#X6Rj3ANx+-*U8Vg zf+zSIcV_r=Kl8$C{30}s5bJ+>?}fImIKZhU->Z$m~h zqBqy_3V-yS{Sd^b_%3X7R`Vvq0}kK@uB*EW_9E(CDRzp_^`PgO>XFAUo_AtC|9A32 z;#p`6{e%2@{3pb?b57jM-?%4v&b-7Q*wIsBZQ?Lwfq65UGh72_Xawyl6idCQI^_g4;ywJ0DHS!&z0dzp-h=u&OJ9H2C(U0&~;g2u+d2sv< zv=FleToaGrO2d-_{!5II{P3Kedd_17rV9 zuIomWG*_msxf0cVjfeb|JRX^6?~CVe0*=c&kS`SQcE{5w;cxWkWF?1rrT_SCdgz>d zuN$EKCnv`?DN*k@hbHWkVJ{VHoyY*VU45E*W%PSb8}4=22wVpn)YY?6pSe1IRU0a4??HdE6e zS0^`HOUzS5edJ};^I7FAbG2I9N4gK2g3X6U^!(E+<7qHi$3TO`qvW2r7}^HEnJkCl zcV6NT&JOv#AkH^~4}=EjJaGzrx5OyeJn9qVE9}i7KmA&^!&Rzh?kx4*v_8e$b!BZq zrvknf#CMU1@4$QiXzeMvAwKtX(6z)P^vMbC&>%1Ir=Qrtn>umL3A|WKhVSr!JRVtQ zFC?)dww!)aa#P|}r+p=^nfk5K-<$bnOa;D!>1$vQw~Oun#ns~X@C<9bgX$T!S0^$DIWex(31h4$s@!BiFjsqo)`QFf8xwgvv37u!z7dB zAyb>haWTG$d=ndi4WMrVyHCxE+?{&9=R3TI1{}v#_3y#{!_$Bl`V>ZHc;)nZUf~aa ziPPM98bzv@Yam$`4X8y?zd%0WH*yTU=#hjb*up1u&s52Zn=IScPyNb$)t}s3z2QSA zc$PJ5XO*`ATH-6pqW&ol8E zu;K^Nk6^d_9_M~dRr4FIZ?dY_cH|W4!4x0=k;iqbtv(;wm2P!Y{J>r^+Mb%?W8+Zc zPxLp5cxHB<=lC~F$GV%QpaXRmVkBgnnyu^CS-1}r-ZO;X-RACmAl@4x9dZ+e z`@<{DJ-%8!`7f$}{B^(2z`dh>{dYI2FLw#6bV) z*>dQ>@eQ<(QZUy!UHh@hTZ7}{z9?#X#67+0#kmr`j~KuWYA)WY*L}iB_0-<4zU_JH z6IS20_OqZrKMvPD^KVlx^c(SBoHy5-TPxf*eq`>WPt;rdwYlYkeJsV^Hhe!c$V}!F zujdwjY7BheqfYt!eqDl?20w&c6VJOwvSD?^{|hx*HuAAL-#OegAdYpgg}_Iyd}CAH zKe&eYeXrzLdw6cYImUbbQt|t7@pXl_f7}P%+;sJE%^#}1aP{Rcm5q4pCdtGk^;7G) zXQVgNWp^Ym?32O1Z1B<=sWs*`M5Xa6k) z_RE7mxDx|^*AIS5rte!Io-WhAttV{vygS6tXSJ{8CH0<5$6t8a*LA@gy++1(o}89C z5rcE;BGk>WfB3}Q_`}@dALO4{cHU*N{lbQk??aO~Zjl@gk&T|BIB0Sq8!BG0mWPZG z>+y|uH|<7q4?ZGUmR(!+r2iJ-&-16nd#GN0N8cfQ*Y8K7$ANv?<{HZJ81468nsOuS>=N5m~|9FOY4}7T2z{+o27m$`-VjSJ-?9_|{C z#X2&Ubd&Bh_xT<=MeX&h6H>emAPd1CW@ZbH1b=GAycavhIW-B^T8Zu4pwqYc1X{BAc$g3tL{AWA4YD z+RLRq3wwT!_X6lUelAr#^=Z!c7VqDyzpWl+X|tQ!_hZZ0+r10;9tHd%^*?%Yi4(EY zK{oJN(Bw$*=UMa&nL`K3Pw1g{BdbZT&l8^FC-!*eJwDEVppE`Ese$m8T?23SfW7jz zmNLWog*W?YSI+W&1U-U&)Un*=_sspUO+4Qre(zQeR8TrpSoh0Me7nwm z*|p6M?iVdG!ae!g&)c<^PV+w}Kl$KA_TA_*{+k@+WSzC&_N+>U{8|e=(%_L>{DVC~ zmWcm{$_Ke|vU_tEDTe8yeT%Yxa|g;-FHt_Pn#Kdt;}Ekwzr@=?aOYWciTxPvf##C+ zA7g&++U{#u$QAjr&lT=ENp|2ejdnR33)<>?r;ID&Bm1w$<@fLUc~rb!K@San8Cx3i z5gl{9{u%K1@!#Z2<e;A(XHAKt~~JR<>I+)+?|SFW?wA1e@fpS&hLEz`h)yH z1L78HLwoKO4dB^^MfR@n<~sg`IDKAKHKQzV>F<7CjUP==-|vgAbImH1RwoULhyOE@7wXTOiJ(_K!XF z--TXwjsM;~^-|V%sC%HZc`-r_Tlnv@krVMP0b(}jL4A)JD14xnwtGxr-v^N08b*L4x5uNg|A})2`S&OXM}1Nx4{eC?|~GnR+x z#eCj?4<^S6d0X(U@cqxi9UA62{!53(u?zdy@!`7_vwilGui3kG5B?szXy3Z~VvT6B zQ!(FsU*jit#}E8jvYwI5|My#qBgc_&M;a6TK8BiRT9IL#)*w+T} zZ+|5Xjs$=DZ4zaY^F#IDr*DYm{7|f_ICbMv9~-k4KrZL*YZCK4nFgDmv$ehB|34M= z-jKUw#J9Yx&&xE$>KZl2iPNnZo<2VX|&Pe#JFx6?TjDF7M-rH3L2z zg+I9g{XyJ^jVG7i!2b(CJP-H&_~kp6hJD=eg>4^K*4rlP9mI#s5$4a!V@~lWH%Wwn zIvzA2{^UBcip&zj^L^9Az1;zSawKdU_u|v3>-act^;qRL>n(NfcKc-caQ*)em1~2fv?H%8+0ID{saGm{9-qt8M!#mAyeoOxVU>S2Rg}BlHu5=kns1 z9sZfoAXyH`(VzkO6t&R>l9NNWEffA{27k~G=#iM~@%yjlKlrE90A1Lds0+#V02*Kq zu=Vr+?wlwecR(?aVjJqli#YWe|5~*8drB4@cpCdNK`I14-5ea7BMv<8upD z4|(fuU;m{)llfTh{7)LJ=OBy8^^bse;!*hjK@O;GCena&>>7J`uh`)b)y$b+7O5Ay(jexaU9Zh)e=&`uH`G@5$%7 x=WLCA3HOKR{#%Y&;-4-D|IIYW7XNe_G?EP97ec-GzvcKpvLXNX?|(4`{y)2Xx8DE& literal 0 HcmV?d00001 diff --git a/admin_patches/setup.py b/admin_patches/setup.py index 5fa91427..33e6f9a7 100644 --- a/admin_patches/setup.py +++ b/admin_patches/setup.py @@ -11,15 +11,17 @@ includefiles = [ - (os.path.join(SRC_PATH, 'patches/something.patch'), 'patches/something.patch'), + (os.path.join(SRC_PATH, 'patches/current_rules.inc.patch'), 'patches/current_rules.inc.patch'), + (os.path.join(SRC_PATH, 'patches/gamesummary.inc.patch'), 'patches/gamesummary.inc.patch'), + (os.path.join(SRC_PATH, 'patches/header_base.inc.patch'), 'patches/header_base.inc.patch'), ] -target_name = "magicked_admin" +target_name = "admin_patches" if WIN_NT: target_name += ".exe" build_exe_options = { - "packages": ["os", "queue", "idna", "encodings"], + "packages": ["os", "queue", "idna", "encodings", "tkinter"], "excludes": [], "includes": [], "include_files": includefiles, From cf2440ebcfa7ff43cb488f6d13608b9f7a82bb8e Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 20:57:42 +0100 Subject: [PATCH 17/61] Fix patch paths --- admin_patches/admin_patches.py | 3 ++- admin_patches/patches/header_base.inc.patch | 10 +++++----- admin_patches/utils/patcher.py | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/admin_patches/admin_patches.py b/admin_patches/admin_patches.py index 04d8a663..f7dbc087 100644 --- a/admin_patches/admin_patches.py +++ b/admin_patches/admin_patches.py @@ -47,7 +47,7 @@ def run(target=None): .format(server_path), pause=True) info("Validating files...") - target_path = path.join(server_path, "KFGame/Web/ServerAdmin/") + target_path = path.join(server_path, "KFGame/Web/ServerAdmin") if not validate_files(target_path): die("Server file validation failed, possible reasons:" "\n\t - Game update" @@ -56,6 +56,7 @@ def run(target=None): info("Patching files...") patches_path = find_data_file(PATCHES_PATH) + if not patch_files(target_path, patches_path): die("Patching failed") else: diff --git a/admin_patches/patches/header_base.inc.patch b/admin_patches/patches/header_base.inc.patch index 421072e6..afb49bde 100644 --- a/admin_patches/patches/header_base.inc.patch +++ b/admin_patches/patches/header_base.inc.patch @@ -1,12 +1,12 @@ -diff --git a/ServerAdmin/header_base.inc b/ServerAdmin/header_base.inc -index 217a460..9b085bd 100755 ---- a/ServerAdmin/header_base.inc -+++ b/ServerAdmin/header_base.inc +diff --git a/header_base.inc b/header_base.inc +index 217a460..9e2fe92 100755 +--- a/header_base.inc ++++ b/header_base.inc @@ -1,6 +1,7 @@ -+ ++ Killing Floor 2 WebAdmin - <%page.title%> diff --git a/admin_patches/utils/patcher.py b/admin_patches/utils/patcher.py index 3177ec46..3984b3d9 100644 --- a/admin_patches/utils/patcher.py +++ b/admin_patches/utils/patcher.py @@ -2,7 +2,7 @@ from hashlib import md5 from checksums import ORIG_MD5 -from utils import find_data_file, info +from utils import find_data_file, info, warning from utils.patch import fromfile @@ -37,5 +37,7 @@ def patch_files(target_path, patches_path): info("Applying {}".format(filename + ".patch")) patch = fromfile(patch_path) - patch.apply(0, target_path) + success = patch.apply(0, target_path) + if not success: + warning("Patch failed to apply successfully") return True From 7424166dec08839db074c9516f81cbdf3f087760 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 20:59:25 +0100 Subject: [PATCH 18/61] Add tkinter include --- admin_patches/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_patches/setup.py b/admin_patches/setup.py index 33e6f9a7..e534e54f 100644 --- a/admin_patches/setup.py +++ b/admin_patches/setup.py @@ -23,7 +23,7 @@ build_exe_options = { "packages": ["os", "queue", "idna", "encodings", "tkinter"], "excludes": [], - "includes": [], + "includes": ["tkinter"], "include_files": includefiles, "include_msvcr": True, "optimize": 2, From f64a042d1f7eb5d55bb60422c91b50b997555408 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 22:02:10 +0100 Subject: [PATCH 19/61] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a00913e1..a92bb658 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM python:3 COPY magicked_admin /magicked_admin -RUN pip install colorama termcolor lxml requests +RUN pip install -r requirements.txt WORKDIR /magicked_admin From 6bd3dc13773ac8d1b5181b4696a8ad48914fbeee Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 22:20:01 +0100 Subject: [PATCH 20/61] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a92bb658..c46c7fc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ FROM python:3 COPY magicked_admin /magicked_admin +COPY requirements.txt /magicked_admin/requirements.txt -RUN pip install -r requirements.txt +RUN pip install -r /magicked_admin/requirements.txt WORKDIR /magicked_admin -CMD [ "python", "magicked_admin.py", "-s"] \ No newline at end of file +CMD [ "python", "magicked_admin.py", "-s"] From d57c040cc5166689bd0bfe61f7f10752a5bf8be8 Mon Sep 17 00:00:00 2001 From: the_z Date: Wed, 25 Sep 2019 23:09:18 +0100 Subject: [PATCH 21/61] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52d2c472..580886cd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@

+

Killing Floor 2 Magicked Admin

- + +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg)](https://coveralls.io/github/th3-z/kf2-magicked-admin) + Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through From 62295439ec3399dee5f7932087111f97fa6d109e Mon Sep 17 00:00:00 2001 From: the_z Date: Fri, 27 Sep 2019 18:28:58 +0100 Subject: [PATCH 22/61] Fixes #101 --- magicked_admin/chatbot/command_scheduler.py | 6 +- .../chatbot/commands/event_commands.py | 22 +++-- .../chatbot/commands/server_commands.py | 4 +- magicked_admin/server/game_tracker.py | 88 +++++++++++-------- 4 files changed, 71 insertions(+), 49 deletions(-) diff --git a/magicked_admin/chatbot/command_scheduler.py b/magicked_admin/chatbot/command_scheduler.py index 6769fca2..4c1de7a5 100644 --- a/magicked_admin/chatbot/command_scheduler.py +++ b/magicked_admin/chatbot/command_scheduler.py @@ -160,9 +160,11 @@ def event_check(self, server, message): message = message.split() if message[0] == "new_wave": - new_wave = message[1] + if wave == ALL_WAVES: + return True - if int(new_wave) == wave: + new_wave = message[1] + if wave or int(new_wave) == wave: return True return False diff --git a/magicked_admin/chatbot/commands/event_commands.py b/magicked_admin/chatbot/commands/event_commands.py index acb8d0b0..ef32d039 100644 --- a/magicked_admin/chatbot/commands/event_commands.py +++ b/magicked_admin/chatbot/commands/event_commands.py @@ -1,5 +1,6 @@ from chatbot.command_scheduler import (CommandOnJoin, CommandOnTime, - CommandOnTrader, CommandOnWave) + CommandOnTrader, CommandOnWave, + ALL_WAVES) from chatbot.commands.command import Command @@ -54,7 +55,7 @@ def __init__(self, server, scheduler): self.scheduler = scheduler self.help_text = "start_wc help" - self.parser.add_argument("wave") + self.parser.add_argument("--wave", "-w", type=int) self.parser.add_argument("command", nargs="*") def execute(self, username, args, user_flags): @@ -64,13 +65,16 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) - try: - wave = int(args.wave) - except ValueError: - return self.format_response( - "'{}' is not a valid wave number".format(args.wave), - args - ) + if args.wave: + try: + wave = int(args.wave) + except ValueError: + return self.format_response( + "'{}' is not a valid wave number".format(args.wave), + args + ) + else: + wave = ALL_WAVES if not args.command: return self.format_response( diff --git a/magicked_admin/chatbot/commands/server_commands.py b/magicked_admin/chatbot/commands/server_commands.py index 2c8d2656..2bf3f399 100644 --- a/magicked_admin/chatbot/commands/server_commands.py +++ b/magicked_admin/chatbot/commands/server_commands.py @@ -468,6 +468,8 @@ def execute(self, username, args, user_flags): self.server.change_game_type(mode) return self.format_response( - "Game mode will be changed to {0}".format(str(mode)), + "Game mode will be changed to {0}".format( + str(GAME_TYPE_DISPLAY[mode]) + ), args ) diff --git a/magicked_admin/server/game_tracker.py b/magicked_admin/server/game_tracker.py index 21c8a65a..1119dc91 100644 --- a/magicked_admin/server/game_tracker.py +++ b/magicked_admin/server/game_tracker.py @@ -40,22 +40,17 @@ def __poll(self): self.__update_players(players_now) self.__update_game(game_now) - def __update_game(self, game_now): - new_game = False - - # W/o installation wave cannot be determined on endless/weekly - # TODO Refactor method - if game_now.wave is not None: - new_map = self.server.game.game_map.title != game_now.map_title - wave_drop = game_now.wave < (self.server.game.wave or 0) - wave_reset = self.server.game.wave is None or wave_drop + @staticmethod + def __is_new_game(game_now, game_before): + # Skip until a map name is available + if game_now.map_title == GAME_MAP_TITLE_UNKNOWN: + return False - if new_map or wave_reset: - new_game = True - else: - # Pick up the transition between supported and unsupported modes - new_type = self.server.game.game_type != game_now.game_type - if new_type: + new_game = False + # An unsupported game mode wont have a wave counter + if game_now.wave is None: + # Initial mode change + if game_before.game_type != game_now.game_type: message = ("Game type ({}) support not installed, please " "patch your webadmin to correct this! Guidance is " "available at: {}") @@ -63,49 +58,68 @@ def __update_game(self, game_now): game_now.game_type, colored(BANNER_URL, 'magenta') )) - # TODO end_game should be triggered + # This new game is the last that will be detected because it + # depends on the wave counter being present + new_game = True + + # Supported mode always has a valid wave, try to detect a game change + else: + map_change = game_before.game_map.title != game_now.map_title + wave_drop = game_now.wave < (game_before.wave or 0) + wave_reset = game_before.wave is None or wave_drop + + if map_change or wave_reset: + new_game = True - # Trigger end-game before loading next map's info - if new_game and self.server.game.game_map.title \ - != GAME_MAP_TITLE_UNKNOWN: - if self.server.game.game_type == GAME_TYPE_SURVIVAL: - survival_boss_defeat = self.__survival_boss_defeat() - self.server.event_end_game(not survival_boss_defeat) - else: + return new_game + + def __update_game(self, game_now): + new_game = self.__is_new_game(game_now, self.server.game) + + # End previous game before loading next game's info + if new_game: + # TODO: Victory detection + # Skip event until map is initialised + if self.server.game.game_map.title != GAME_MAP_TITLE_UNKNOWN: self.server.event_end_game(False) + # Trader open/closed if game_now.trader_open and not self.server.trader_time: + # End waves on trader close self.server.event_wave_end() self.server.event_trader_open() if not game_now.trader_open and self.server.trader_time: self.server.event_trader_close() + # Game timer + if game_now.wave is not None: + # Not in lobby or boss wave + is_zed_wave = 0 < game_now.wave <= game_now.length + if not self.server.trader_time and is_zed_wave: + now = time.time() + self.server.game.time += now - self.game_timer + self.game_timer = time.time() + self.server.game.game_map.title = game_now.map_title self.server.game.game_map.name = game_now.map_name self.server.game.wave = game_now.wave self.server.game.length = game_now.length self.server.game.difficulty = game_now.difficulty + self.server.game.zeds_dead = game_now.zeds_dead self.server.game.zeds_total = game_now.zeds_total self.server.game.game_type = game_now.game_type self.server.game.players_max = game_now.players_max - if new_game and game_now.map_title != GAME_MAP_TITLE_UNKNOWN: + # New game after loading next game's info + if new_game: self.server.event_new_game() + self.previous_wave = 0 - # TODO something better, abstract tracker per mode, test INSTALLED - if self.server.game.wave is not None: - if not self.server.trader_time \ - and 0 < self.server.game.wave <= self.server.game.length: - now = time.time() - self.server.game.time += now - self.game_timer - self.game_timer = time.time() - else: - self.game_timer = time.time() - - if game_now.wave > self.previous_wave: - self.server.event_wave_start() - self.previous_wave = self.server.game.wave + # And wave start + if game_now.wave > self.previous_wave: + self.server.event_wave_start() + self.previous_wave = self.server.game.wave def __survival_boss_defeat(self): game_over = True From 3cda71e451012086e397c9a0795ee6cf8ecfcea2 Mon Sep 17 00:00:00 2001 From: the_z Date: Fri, 27 Sep 2019 21:55:19 +0100 Subject: [PATCH 23/61] Update event command formats --- magicked_admin/chatbot/command_scheduler.py | 18 +++++------ .../chatbot/commands/event_commands.py | 31 +++++++++++++++---- magicked_admin/server/game_tracker.py | 3 +- magicked_admin/server/server.py | 6 ++-- 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/magicked_admin/chatbot/command_scheduler.py b/magicked_admin/chatbot/command_scheduler.py index 4c1de7a5..5ee82ad3 100644 --- a/magicked_admin/chatbot/command_scheduler.py +++ b/magicked_admin/chatbot/command_scheduler.py @@ -164,7 +164,7 @@ def event_check(self, server, message): return True new_wave = message[1] - if wave or int(new_wave) == wave: + if int(new_wave) == wave: return True return False @@ -200,11 +200,10 @@ def resolve_command(self, internal_message): class CommandOnTrader(ScheduledCommand): - def __init__(self, server, command, on_close=False): + def __init__(self, server, command, wave=ALL_WAVES): ScheduledCommand.__init__(self, server, command) - # TODO: Implemented but un-used - self.on_close = on_close + self.wave = wave def event_check(self, server, message): if not message: @@ -212,9 +211,10 @@ def event_check(self, server, message): args = message.split() - if args[0] == "t_open" and not self.on_close: - return True - elif args[0] == "t_close" and self.on_close: + if args[0] == "t_open": + wave = int(args[1]) + if self.wave != ALL_WAVES and wave != self.wave: + return False return True - - return False + else: + return False diff --git a/magicked_admin/chatbot/commands/event_commands.py b/magicked_admin/chatbot/commands/event_commands.py index ef32d039..3d6525ec 100644 --- a/magicked_admin/chatbot/commands/event_commands.py +++ b/magicked_admin/chatbot/commands/event_commands.py @@ -55,7 +55,7 @@ def __init__(self, server, scheduler): self.scheduler = scheduler self.help_text = "start_wc help" - self.parser.add_argument("--wave", "-w", type=int) + self.parser.add_argument("--wave", "-w") self.parser.add_argument("command", nargs="*") def execute(self, username, args, user_flags): @@ -114,7 +114,8 @@ def __init__(self, server, scheduler): self.scheduler = scheduler self.help_text = "start_tc help" - self.parser.add_argument("interval") + self.parser.add_argument("--time", "-t") + self.parser.add_argument("--repeat", "-r", action="store_true") self.parser.add_argument("command", nargs="*") def execute(self, username, args, user_flags): @@ -124,11 +125,17 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) + if not args.time: + return self.format_response( + "Please specify a time interval, '!start_tc -h' for help", + args + ) + try: - interval = float(args.interval) + interval = float(args.time) except ValueError: return self.format_response( - "'{}' is not a valid time interval".format(args.interval), + "'{}' is not a valid time interval".format(args.time), args ) @@ -137,8 +144,10 @@ def execute(self, username, args, user_flags): "Please specify a command to run", args ) + run_once = False if args.repeat else True + command = CommandOnTime( - self.server, " ".join(args.command), interval + self.server, " ".join(args.command), interval, run_once=run_once ) self.scheduler.schedule_command(command) return self.format_response("Time interval command started", args) @@ -170,6 +179,7 @@ def __init__(self, server, scheduler): self.scheduler = scheduler self.help_text = "start_tc help" + self.parser.add_argument("--wave", "-w") self.parser.add_argument("command", nargs="*") def execute(self, username, args, user_flags): @@ -184,8 +194,17 @@ def execute(self, username, args, user_flags): "Please specify a command to run", args ) + wave = args.wave if args.wave else ALL_WAVES + try: + wave = int(wave) + except ValueError: + return self.format_response( + "'{}' is not a valid wave number".format(args.wave), + args + ) + command = CommandOnTrader( - self.server, " ".join(args.command) + self.server, " ".join(args.command), wave=wave ) self.scheduler.schedule_command(command) return self.format_response("Trader open command started", args) diff --git a/magicked_admin/server/game_tracker.py b/magicked_admin/server/game_tracker.py index 1119dc91..33adfb6e 100644 --- a/magicked_admin/server/game_tracker.py +++ b/magicked_admin/server/game_tracker.py @@ -118,7 +118,8 @@ def __update_game(self, game_now): # And wave start if game_now.wave > self.previous_wave: - self.server.event_wave_start() + if self.server.game.wave > 0: + self.server.event_wave_start() self.previous_wave = self.server.game.wave def __survival_boss_defeat(self): diff --git a/magicked_admin/server/server.py b/magicked_admin/server/server.py index 6c68a353..c4a697b5 100644 --- a/magicked_admin/server/server.py +++ b/magicked_admin/server/server.py @@ -260,10 +260,12 @@ def event_wave_end(self): def event_trader_open(self): self.trader_time = True - self.web_admin.chat.handle_message("internal_command", "!t_open", + command = "!t_open {}".format(self.game.wave) + self.web_admin.chat.handle_message("internal_command", command, USER_TYPE_INTERNAL) def event_trader_close(self): self.trader_time = False - self.web_admin.chat.handle_message("internal_command", "!t_close", + command = "!t_close {}".format(self.game.wave) + self.web_admin.chat.handle_message("internal_command", command, USER_TYPE_INTERNAL) From d8424f773ace1e97cc7990c064fa73ca5cc3d38b Mon Sep 17 00:00:00 2001 From: the_z Date: Fri, 27 Sep 2019 22:05:19 +0100 Subject: [PATCH 24/61] Update README.md --- README.md | 38 ++++++++++++--------- magicked_admin/chatbot/command_scheduler.py | 9 +++-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 580886cd..5a233dae 100644 --- a/README.md +++ b/README.md @@ -128,27 +128,33 @@ the `!op` command. - Available tokens: `%PLR` - username, `%KLL%` - total kills, `%DSH%` - total dosh * `!stop_jc` - Stops all join commands -* `!start_wc [wave] ` - Start a command that runs on wave `[wave]` - - `[wave`] Can be omitted to have the command run every wave - - `[wave`] Can be negative to count backwards from the boss wave +* `!start_wc [-w ] ` - Start a command that runs on wave `[wave]` + - `-w` Wave to run the command on, can be omitted to have the command + run every wave + - `-w` Can be negative to count backwards from the boss wave - Example: `!start_wc -1 say Welcome to the boss wave` * `!stop_wc` - Stops all wave commands -* `!start_tc ` - Start a command that runs every - `` seconds - - Example: `!start_tc 600 say Join our Steam group!\n +* `!start_tc [-r, -t ] ` - Start a command that runs after + `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n http://steam.group/` * `!stop_tc` - Stops all timed commands -* `!start_trc ` - Start a commands that runs when the trader opens +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command + run every wave + - `-w` Can be negative to count backwards from the boss wave - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh - this wave when the trader opens + every wave when the trader opens * `!stop_trc` - Stop all commands that run on trader open * `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players * `!run ` - Executes a script from the `scripts` folder, more information in the scripts section - Example: `!run example` -* `!marquee ` - Runs a marquee in the chat from the `marquee` - folder, _experimental_ +* `!marquee ` - Runs a marquee in the chat from the + `conf/marquee` folder, _experimental_ - Example: `!marquee example` * `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option @@ -157,9 +163,9 @@ the `!op` command. ### MOTD leaderboard -Writing a `server_name.motd` file containing pairs of `%PLR` and `%SCR` and -enabling the `motd_scoreboard` option will put a live leaderboard in the motd -and update it every 5 minutes. +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` +and enabling the `motd_scoreboard` option will put a live leaderboard in the +motd and update it every 5 minutes. `%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. @@ -169,10 +175,10 @@ metric on the leaderboard. The options for this are: `dosh` or `kills`. ### Scripts -Writting a `server_name.init` in the root folder with a series of commands +Writting a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. -Additional scripts can be written in the `scripts` folder and ran with the +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. @@ -204,7 +210,7 @@ is the name of the server, this can be changed to whatever you want. ### Options -Options can be configured in the config file `magicked_admin.conf`. +Options can be configured in the config file `conf/magicked_admin.conf`. * `address` - Web address of the server's webadmin panel. Requires scheme and protocol, diff --git a/magicked_admin/chatbot/command_scheduler.py b/magicked_admin/chatbot/command_scheduler.py index 5ee82ad3..7fb5315d 100644 --- a/magicked_admin/chatbot/command_scheduler.py +++ b/magicked_admin/chatbot/command_scheduler.py @@ -211,9 +211,14 @@ def event_check(self, server, message): args = message.split() + # Translate negative input to positive, '-1' runs on boss wave + length = server.game.length + wave = (length + 1) + (self.wave + 1) if self.wave < 0 else self.wave + if args[0] == "t_open": - wave = int(args[1]) - if self.wave != ALL_WAVES and wave != self.wave: + + new_wave = int(args[1]) + if self.wave != ALL_WAVES and new_wave != wave: return False return True else: From 84703a07fe58045ca900a9ec0dea2a67666b7ad7 Mon Sep 17 00:00:00 2001 From: the_z Date: Fri, 27 Sep 2019 22:09:47 +0100 Subject: [PATCH 25/61] Update README.md --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5a233dae..7b5b64ac 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ the `!op` command. - Available tokens: `%PLR` - username, `%KLL%` - total kills, `%DSH%` - total dosh * `!stop_jc` - Stops all join commands -* `!start_wc [-w ] ` - Start a command that runs on wave `[wave]` +* `!start_wc [-w ] ` - Start a command that runs on wave `` - `-w` Wave to run the command on, can be omitted to have the command run every wave - `-w` Can be negative to count backwards from the boss wave @@ -150,7 +150,7 @@ the `!op` command. * `!stop_trc` - Stop all commands that run on trader open * `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players -* `!run ` - Executes a script from the `scripts` folder, more +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section - Example: `!run example` * `!marquee ` - Runs a marquee in the chat from the @@ -200,7 +200,7 @@ Configuration options --------------------- Basic setup is done on the first run. However this does not cover all of the -options KF2-MA can offer. Please see the config file, `magicked_admin.conf`, +options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. Each server managed by KF2-MA has a section that looks something like @@ -242,9 +242,13 @@ Running with docker is easy. Just issue this command: ``` docker run -it -p 1880:1880 --name kf-magicked-admin -v '':'/magicked_admin/conf' th3-z/kf-magicked-admin ``` -You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf-magicked-admin` is a popular choice for systems running Unraid. +You will need to change `` to wheverever you want +to store your config folder. `/mnt/user/appdata/kf-magicked-admin` is a popular +choice for systems running Unraid. -After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! +After this command runs the container will exit out and the logs will tell you +to setup the config file. Go to your `conf` folder and set things up then run +the container again and you are good to go! Running from Python sources --------------------------- From f787dbdf00e07f4d4e11930ddce34ed5848c0b63 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 00:30:01 +0100 Subject: [PATCH 26/61] Add help texts Resolves #21 --- README.md | 7 +- .../chatbot/commands/event_commands.py | 34 +++-- .../chatbot/commands/info_commands.py | 36 ++++-- .../chatbot/commands/player_commands.py | 31 +++-- .../chatbot/commands/server_commands.py | 122 +++++++++++++----- magicked_admin/database/database.py | 4 +- 6 files changed, 167 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 7b5b64ac..4bf03420 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,15 @@ Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. -All commands have in-game help text that can be accessed with the `-h` parameter. +All commands have in-game help text that can be accessed with the `-h` flag. * Example: `!commands -h` +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + Escape sequences as follows are available to format messages. * `\n` - Newline diff --git a/magicked_admin/chatbot/commands/event_commands.py b/magicked_admin/chatbot/commands/event_commands.py index 3d6525ec..d96d3a79 100644 --- a/magicked_admin/chatbot/commands/event_commands.py +++ b/magicked_admin/chatbot/commands/event_commands.py @@ -9,7 +9,9 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "start_jc help" + self.help_text = "Usage: !start_jc COMMAND\n" \ + "\tCOMMAND - Command to run\n" \ + "Desc: Runs a command when a player joins the match" self.parser.add_argument("command", nargs="*") def execute(self, username, args, user_flags): @@ -34,7 +36,8 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "stop_jc help" + self.help_text = "Usage: !stop_jc\n" \ + "Desc: Stops all join commands" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -54,7 +57,11 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "start_wc help" + self.help_text = "Usage: !start_wc [--wave] COMMAND\n" \ + "\t-w --wave - Optional, wave to run on\n" \ + "\tCOMMAND - Command to run\n" \ + "Desc: Run a command at the start of a wave, wave" \ + " can be omitted top run on every wave" self.parser.add_argument("--wave", "-w") self.parser.add_argument("command", nargs="*") @@ -93,7 +100,8 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "stop_wc help" + self.help_text = "Usage: !stop_wc\n" \ + "Desc: Stops all wave commands" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -113,7 +121,11 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "start_tc help" + self.help_text = "Usage: !start_tc [-r -t] COMMAND\n" \ + "\tCOMMAND - Command to run\n" \ + "\t-r --repeat - Optional, run repeatedly\n" \ + "\t-t --time - Seconds before running\n" \ + "Desc: Runs a command after some time delay" self.parser.add_argument("--time", "-t") self.parser.add_argument("--repeat", "-r", action="store_true") self.parser.add_argument("command", nargs="*") @@ -158,7 +170,8 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "stop_tc help" + self.help_text = "Usage: !stop_tc\n" \ + "Desc: Stops all timed commands" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -178,7 +191,11 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "start_tc help" + self.help_text = "Usage: !start_trc [--wave] COMMAND\n" \ + "\tCOMMAND - Command to run\n" \ + "\t-w --wave - Optional, wave to run on\n" \ + "Desc: Runs a command when the trader opens, wave" \ + " can be omitted to run every time the trader opens" self.parser.add_argument("--wave", "-w") self.parser.add_argument("command", nargs="*") @@ -215,7 +232,8 @@ def __init__(self, server, scheduler): Command.__init__(self, server, admin_only=True, requires_patch=False) self.scheduler = scheduler - self.help_text = "stop_wc help" + self.help_text = "Usage: !stop_trc\n" \ + "Desc: Stops all trader commands" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) diff --git a/magicked_admin/chatbot/commands/info_commands.py b/magicked_admin/chatbot/commands/info_commands.py index c9702f91..32e1f61b 100644 --- a/magicked_admin/chatbot/commands/info_commands.py +++ b/magicked_admin/chatbot/commands/info_commands.py @@ -13,7 +13,9 @@ def __init__(self, server, chatbot): self.chatbot = chatbot Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "marquee help" + self.help_text = "Usage: !marquee FILE\n" \ + "\tFILE - Some file in 'conf/marquee'\n" \ + "Desc: Runs a marquee in chat" # self.parser.add_argument("iterations") self.parser.add_argument("filename", nargs="*") @@ -70,7 +72,8 @@ class CommandPlayerCount(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "player count help" + self.help_text = "Usage: !players\n" \ + "Desc: Shows the number of players currently online" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -91,7 +94,9 @@ class CommandPlayers(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "players help" + self.help_text = "Usage: !players\n" \ + "Desc: Shows detailed information about online " \ + "players" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -115,7 +120,8 @@ class CommandGame(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "game help" + self.help_text = "Usage: !game\n" \ + "Desc: Shows current game info and rules" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -131,7 +137,8 @@ class CommandGameMap(Command): def __init__(self, server, admin_only=False, requires_patch=False): Command.__init__(self, server, admin_only) - self.help_text = "map help" + self.help_text = "Usage: !map\n" \ + "Desc: Shows statistics about the current map" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -147,7 +154,9 @@ class CommandGameTime(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "game time help" + self.help_text = "Usage: !game_time\n" \ + "Desc: Shows the number of seconds since the match " \ + "started. Excludes trader time and the boss wave." def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -163,7 +172,8 @@ class CommandHighWave(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=True) - self.help_text = "highest wave help" + self.help_text = "Usage: !record_wave\n" \ + "Desc: Shows the highest wave reached on this map" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -183,7 +193,8 @@ class CommandCommands(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "commands help" + self.help_text = "Usage: !commands\n" \ + "Desc: Lists all player commands" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -200,8 +211,6 @@ def execute(self, username, args, user_flags): "\t!top_kills,\n" \ "\t!top_dosh,\n" \ "\t!top_time,\n" \ - "\t!top_wave_kills,\n" \ - "\t!top_wave_dosh,\n" \ "\t!stats,\n" \ "\t!game_time,\n" \ "\t!server_kills,\n" \ @@ -218,7 +227,10 @@ class CommandStats(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "stats help" + self.help_text = "Usage: !stats USERNAME\n" \ + "\tUSERNAME - Person to get stats for\n" \ + "Desc: Shows statistics about a player, username " \ + "can be omitted to get personal stats" self.parser.add_argument("username", nargs="*") def execute(self, username, args, user_flags): @@ -233,8 +245,6 @@ def execute(self, username, args, user_flags): if args.username: username = " ".join(args.username) - print(username) - player = self.server.get_player_by_username(username) if player: # TODO: Move this ... diff --git a/magicked_admin/chatbot/commands/player_commands.py b/magicked_admin/chatbot/commands/player_commands.py index e6f674ba..b562432f 100644 --- a/magicked_admin/chatbot/commands/player_commands.py +++ b/magicked_admin/chatbot/commands/player_commands.py @@ -7,7 +7,8 @@ class CommandServerDosh(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "server dosh help" + self.help_text = "Usage: !server_dosh\n" \ + "Desc: Shows total dosh earned on this server" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -28,7 +29,8 @@ class CommandServerKills(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "server dosh help" + self.help_text = "Usage: !server_kills\n" \ + "Desc: Shows total ZEDs killed on this server" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -49,7 +51,10 @@ class CommandKills(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "kills help" + self.help_text = "Usage: !kills USERNAME\n" \ + "\tUSERNAME - User to get kill stats for\n" \ + "Desc: Shows kill statistics for a player, username" \ + " can be omitted to get personal stats" self.parser.add_argument("username", nargs="*") def execute(self, username, args, user_flags): @@ -84,7 +89,10 @@ class CommandDosh(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "dosh help" + self.help_text = "Usage: !dosh USERNAME\n" \ + "\tUSERNAME - User to get dosh stats for\n" \ + "Desc: Shows dosh statistics for a player, username" \ + " can be omitted to get personal stats" self.parser.add_argument("username", nargs="*") def execute(self, username, args, user_flags): @@ -117,7 +125,8 @@ class CommandTopKills(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "top kills help" + self.help_text = "Usage: !top_kills\n" \ + "Desc: Show the global kills leaderboard" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -145,7 +154,8 @@ class CommandTopDosh(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "top dosh help" + self.help_text = "Usage: !top_dosh\n" \ + "Desc: Shows the global dosh leaderboard" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -173,7 +183,8 @@ class CommandTopTime(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "top time help" + self.help_text = "Usage: !top_time\n" \ + "Desc: Shows the global play time leaderboard" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -201,7 +212,8 @@ class CommandTopWaveKills(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=True) - self.help_text = "top wave kills help" + self.help_text = "Usage: !top_wave_kills\n" \ + "Desc: Shows who killed the most ZEDs in this wave" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -231,7 +243,8 @@ class CommandTopWaveDosh(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=True) - self.help_text = "top wave dosh help" + self.help_text = "Usage: !top_wave_dosh\n" \ + "Desc: Shows who earned the most dosh this wave" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) diff --git a/magicked_admin/chatbot/commands/server_commands.py b/magicked_admin/chatbot/commands/server_commands.py index 2bf3f399..fe191301 100644 --- a/magicked_admin/chatbot/commands/server_commands.py +++ b/magicked_admin/chatbot/commands/server_commands.py @@ -10,8 +10,10 @@ class CommandBan(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.parser.add_argument("username") - self.help_text = "Help text for the ban command" + self.parser.add_argument("username", nargs="*") + self.help_text = "Usage: !ban USERNAME\n" \ + "\tUSERNAME - Player to ban\n" \ + "Desc: Bans a player from the server" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -20,12 +22,14 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) - if not args.username: + if args.username: + username = " ".join(args.username) + else: return self.format_response( "Missing argument, username or Steam ID", args ) - banned = self.server.ban_player(args.username) + banned = self.server.ban_player(username) if banned: return self.format_response( @@ -39,7 +43,9 @@ class CommandSay(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "this is the say help" + self.help_text = "Usage: !say MESSAGE\n" \ + "\tMESSAGE - Message to echo\n" \ + "Desc: Echos a message in chat" self.parser.add_argument("message", nargs="*") def execute(self, username, args, user_flags): @@ -62,8 +68,10 @@ class CommandOp(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "op help" - self.parser.add_argument("username") + self.help_text = "Usage: !op USERNAME\n" \ + "\tUSERNAME - Player to give operator status\n" \ + "Desc: Allows a player to use admin commands" + self.parser.add_argument("username", nargs="*") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -72,9 +80,16 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) - player = self.server.get_player_by_username(args.username) + if args.username: + username = " ".join(args.username) + else: + return self.format_response( + "Missing argument, username or Steam ID", args + ) + + player = self.server.get_player_by_username(username) if not player: - message = "Couldn't find player '{}'".format(args.username) + message = "Couldn't find player '{}'".format(username) else: player.op = 1 message = "Oped {}".format(player.username) @@ -88,8 +103,11 @@ class CommandDeop(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "deop help" - self.parser.add_argument("username") + self.help_text = "Usage: !deop USERNAME\n" \ + "\tUSERNAME - Player to revoke op status for\n" \ + "Desc: Revokes a players ability to use admin " \ + "commands" + self.parser.add_argument("username", nargs="*") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -98,9 +116,16 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) - player = self.server.get_player_by_username(args.username) + if args.username: + username = " ".join(args.username) + else: + return self.format_response( + "Missing argument, username or Steam ID", args + ) + + player = self.server.get_player_by_username(username) if not player: - message = "Couldn't find player '{}'".format(args.username) + message = "Couldn't find player '{}'".format(username) else: player.op = 0 message = "Deoped {}".format(player.username) @@ -114,7 +139,9 @@ class CommandGameMaps(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "game maps help text" + self.help_text = "Usage: !maps [--all]\n" \ + "\t-a --all - Show all available maps\n" \ + "Desc: Shows maps that are in the map cycle" self.parser.add_argument( "-a", "--all", action="store_true" @@ -136,7 +163,8 @@ class CommandGameMap(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=False) - self.help_text = "game map help text" + self.help_text = "Usage: !map\n" \ + "Desc: Shows statistics about the current map" self.parser.add_argument("map_name", nargs="?") def execute(self, username, args, user_flags): @@ -154,6 +182,7 @@ def execute(self, username, args, user_flags): self.server.write_game_map() game_map = game.GameMap(map_title) + self.server.write_game_map() self.server.database.load_game_map(game_map) total_plays = game_map.plays_survival \ @@ -162,7 +191,7 @@ def execute(self, username, args, user_flags): + game_map.plays_survival_vs \ + game_map.plays_other - message = "Stats for {} ({}):\n".format(game_map.name, game_map.title) + message = "Stats for {}:\n".format(game_map.name) message += "Total plays: {} \n".format(total_plays) message += "Record wave: {} \n".format(game_map.highest_wave) message += "Survival wins: {} \n".format(game_map.wins_survival) @@ -174,7 +203,9 @@ class CommandEnforceDosh(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "enforce_dosh help" + self.help_text = "Usage: !enforce_dosh\n" \ + "Desc: Kicks players with more dosh than the " \ + "threshold configured in 'conf/magicked_admin.conf'" # TODO amount optional argument def execute(self, username, args, user_flags): @@ -191,7 +222,10 @@ class CommandKick(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.parser.add_argument("username") + self.parser.add_argument("username", nargs="*") + self.help_text = "Usage: !kick USERNAME\n" \ + "\tUSERNAME - Player to kick\n" \ + "Desc: Kicks a player from the match" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -200,12 +234,14 @@ def execute(self, username, args, user_flags): elif args.help: return self.format_response(self.help_text, args) - if not args.username: + if args.username: + username = " ".join(args.username) + else: return self.format_response( - "Missing argument, username or Steam ID", args.pad_output + "Missing argument, username or Steam ID", args ) - kicked = self.server.kick_player(args.username) + kicked = self.server.kick_player(username) if kicked: return self.format_response( @@ -220,7 +256,9 @@ def __init__(self, server, chatbot): Command.__init__(self, server, admin_only=True, requires_patch=False) self.chatbot = chatbot - self.help_text = "run help" + self.help_text = "Usage: !run FILE\n" \ + "\tFILE - Some file in 'conf/scripts'\n" \ + "Desc: Runs a script" self.parser.add_argument("file", nargs="*") self.scripts_folder = "scripts" @@ -247,7 +285,8 @@ class CommandRestart(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "restart help" + self.help_text = "Usage: !restart\n" \ + "Desc: Restarts the match" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -264,8 +303,10 @@ class CommandLoadMap(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "load map help" - self.parser.add_argument("map_name") + self.help_text = "Usage: !load_map MAP_NAME\n" \ + "\tMAP_NAME - Map to load\n" \ + "Desc: Immediately changes the map." + self.parser.add_argument("map_name", nargs="?") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -285,7 +326,12 @@ class CommandPassword(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "password help" + self.help_text = "Usage: !password [--set] STATE\n" \ + "\tSTATE - On, off, or new password\n" \ + "\t-s --set - Set a new password\n" \ + "Desc: Enables or disables the game password " \ + "configured in 'conf/magicked_admin.conf', state " \ + "can be on, off, or a new password." self.parser.add_argument("-s", "--set", type=str) self.parser.add_argument("state", nargs="?") @@ -328,7 +374,9 @@ def __init__(self, server, chatbot): Command.__init__(self, server, admin_only=True, requires_patch=False) self.chatbot = chatbot - self.help_text = "silent help" + self.help_text = "Usage: !silent [--quiet]\n" \ + "\t-q --quiet - Suppresses output'\n" \ + "Desc: Toggles command output globally" def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -355,8 +403,10 @@ class CommandLength(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "length help" - self.parser.add_argument("length") + self.help_text = "Usage: !length LENGTH\n" \ + "\tLENGTH - Length to change to\n" \ + "Desc: Changes the game length next match" + self.parser.add_argument("length", nargs="?") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -393,8 +443,10 @@ class CommandDifficulty(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "difficulty help" - self.parser.add_argument("difficulty") + self.help_text = "Usage: !difficulty DIFFICULTY\n" \ + "\tDIFFICULTY - Difficulty to change to\n" \ + "Desc: Changes the difficulty next match" + self.parser.add_argument("difficulty", nargs="?") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -434,8 +486,10 @@ class CommandGameMode(Command): def __init__(self, server): Command.__init__(self, server, admin_only=True, requires_patch=False) - self.help_text = "game mode help" - self.parser.add_argument("game_mode") + self.help_text = "Usage: !game_mode MODE\n" \ + "\tMODE - Mode to change to\n" \ + "Desc: Immediately changes the game mode" + self.parser.add_argument("game_mode", nargs="?") def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) @@ -446,7 +500,7 @@ def execute(self, username, args, user_flags): if not args.game_mode: return self.format_response( - "GameMode not recognised, options are: endless, survival, " + "Mode not recognised, options are: endless, survival, " "weekly or versus", args ) diff --git a/magicked_admin/database/database.py b/magicked_admin/database/database.py index 0f84384b..f43e8acc 100644 --- a/magicked_admin/database/database.py +++ b/magicked_admin/database/database.py @@ -267,7 +267,7 @@ def load_game_map(self, game_map, r_flag=False): map_sql = """ SELECT name, plays_survival, plays_weekly, plays_endless, - plays_survival_vs, plays_other + plays_survival_vs, plays_other, highest_wave FROM maps WHERE @@ -292,7 +292,7 @@ def load_game_map(self, game_map, r_flag=False): game_map.plays_weekly = map_result['plays_weekly'] game_map.plays_endless = map_result['plays_endless'] game_map.plays_other = map_result['plays_other'] - game_map.highest_wave = self.highest_wave(game_map) + game_map.highest_wave = map_result['highest_wave'] game_map.name = map_result['name'] def save_game_map(self, game_map): From c3289913fb0c07106af6efbac4aafd75ab0072b3 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 00:50:06 +0100 Subject: [PATCH 27/61] Adds scoreboard command #87 --- magicked_admin/chatbot/command_map.py | 3 +- .../chatbot/commands/player_commands.py | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/magicked_admin/chatbot/command_map.py b/magicked_admin/chatbot/command_map.py index e1a35174..45a4419a 100644 --- a/magicked_admin/chatbot/command_map.py +++ b/magicked_admin/chatbot/command_map.py @@ -64,7 +64,8 @@ def generate_map(self): 'server_dosh': CommandServerDosh(self.server), 'map': CommandGameMap(self.server), 'maps': CommandGameMaps(self.server), - 'player_count': CommandPlayerCount(self.server) + 'player_count': CommandPlayerCount(self.server), + 'scoreboard': CommandScoreboard(self.server) } return command_map diff --git a/magicked_admin/chatbot/commands/player_commands.py b/magicked_admin/chatbot/commands/player_commands.py index b562432f..8e80d43b 100644 --- a/magicked_admin/chatbot/commands/player_commands.py +++ b/magicked_admin/chatbot/commands/player_commands.py @@ -208,6 +208,38 @@ def execute(self, username, args, user_flags): return self.format_response(message[:-1], args) +class CommandScoreboard(Command): + def __init__(self, server): + Command.__init__(self, server, admin_only=False, requires_patch=False) + + self.help_text = "Usage: !scoreboard\n" \ + "Desc: Shows full player scoreboard" + + def execute(self, username, args, user_flags): + args, err = self.parse_args(username, args, user_flags) + if err: + return err + elif args.help: + return self.format_response(self.help_text, args) + + message = "Scoreboard (name, kills, dosh):\n" + + self.server.players.sort( + key=lambda player: player.kills, + reverse=True + ) + + for player in self.server.players: + username = trim_string(player.username, 20) + dosh = millify(player.dosh) + kills = player.kills + message += "{}\t- {}Kills £{}\n".format( + username, kills, dosh + ) + + return self.format_response(message[:-1], args) + + class CommandTopWaveKills(Command): def __init__(self, server): Command.__init__(self, server, admin_only=False, requires_patch=True) From 0725e83c98c9ea3977df5bc41c49075000ac6562 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:04:10 +0100 Subject: [PATCH 28/61] Add scoreboard alias --- magicked_admin/chatbot/command_map.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magicked_admin/chatbot/command_map.py b/magicked_admin/chatbot/command_map.py index 45a4419a..2a1e387c 100644 --- a/magicked_admin/chatbot/command_map.py +++ b/magicked_admin/chatbot/command_map.py @@ -65,7 +65,8 @@ def generate_map(self): 'map': CommandGameMap(self.server), 'maps': CommandGameMaps(self.server), 'player_count': CommandPlayerCount(self.server), - 'scoreboard': CommandScoreboard(self.server) + 'scoreboard': CommandScoreboard(self.server), + 'sb': CommandScoreboard(self.server) } return command_map From ee101e10c8bfde05fae7df5833f05aaa820b5988 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:06:15 +0100 Subject: [PATCH 29/61] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4bf03420..433fb045 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ Commands that can be executed by any player. - Example: `!start_trc top_wave_dosh` * `!server_kills` - Shows total kills on the server * `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same * `!game` - Shows information about the current game * `!maps` - Shows the maplist * `!player_count` - Shows the player count and max players From efc20e028245601de07bc2e003f37fe1d55333d6 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:09:10 +0100 Subject: [PATCH 30/61] Fix typo --- magicked_admin/chatbot/commands/player_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/chatbot/commands/player_commands.py b/magicked_admin/chatbot/commands/player_commands.py index 8e80d43b..4d3f4e9b 100644 --- a/magicked_admin/chatbot/commands/player_commands.py +++ b/magicked_admin/chatbot/commands/player_commands.py @@ -233,7 +233,7 @@ def execute(self, username, args, user_flags): username = trim_string(player.username, 20) dosh = millify(player.dosh) kills = player.kills - message += "{}\t- {}Kills £{}\n".format( + message += "{}\t- {} Kills, £{}\n".format( username, kills, dosh ) From bf57a3c4dc4df6785172ddf6b01cb8fc39404590 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:16:04 +0100 Subject: [PATCH 31/61] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 433fb045..8aa8b68b 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,12 @@ Commands that can be executed by any player. * `!stats ` - Shows general statistics about a user - Example: `!stats` Shows stats about yourself - Example: `!stats the_z` Shows stats about the_z -* `!kills` - Shows kill statistics about yourself -* `!dosh` - Shows dosh statistics about yourself +* `!kills ` - Shows kill statistics about a user + - Example: `!stats` Shows kill stats about yourself + - Example: `!stats the_z` Shows killstats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!stats` Shows dosh stats about yourself + - Example: `!stats the_z` Shows dosh stats about the_z * `!map` - Shows statistics about the current map * `!record_wave` - Shows the highest wave achieved on the current map * `!top_kills` - Shows the global kills leaderboard From 17e7aa8ff949e49217e199b44d987aae2043c13f Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:19:41 +0100 Subject: [PATCH 32/61] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8aa8b68b..85c09305 100644 --- a/README.md +++ b/README.md @@ -251,10 +251,10 @@ Running with Docker Running with docker is easy. Just issue this command: ``` - docker run -it -p 1880:1880 --name kf-magicked-admin -v '':'/magicked_admin/conf' th3-z/kf-magicked-admin + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin ``` You will need to change `` to wheverever you want -to store your config folder. `/mnt/user/appdata/kf-magicked-admin` is a popular +to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. After this command runs the container will exit out and the logs will tell you From 36c4382d37e7227ebe8191c357cd86cedfd0cc93 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 01:21:47 +0100 Subject: [PATCH 33/61] Update __init__.py --- magicked_admin/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/utils/__init__.py b/magicked_admin/utils/__init__.py index 29267d8b..b9e0883c 100644 --- a/magicked_admin/utils/__init__.py +++ b/magicked_admin/utils/__init__.py @@ -10,7 +10,7 @@ # TODO: Switch to Nuitka for compilation DEBUG = __debug__ and not hasattr(sys, 'frozen') -VERSION = "0.1.3" +VERSION = "0.1.4" BANNER_URL = "https://th3-z.xyz/kf2-ma" From eceb0ea73efd2955590aeeda0485f2b33ff3df44 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 13:18:53 +0100 Subject: [PATCH 34/61] Fix #E501s --- admin_patches/checksums.py | 15 ++++++---- admin_patches/setup.py | 9 ++++-- magicked_admin/chatbot/commands/command.py | 5 ++-- .../chatbot/commands/server_commands.py | 4 +-- magicked_admin/database/database.py | 3 +- magicked_admin/server/server.py | 8 ++++-- magicked_admin/settings.py | 28 +++++++++---------- magicked_admin/web_admin/web_admin.py | 28 +++++++++++++------ magicked_admin/web_admin/web_interface.py | 6 ++-- makefile | 2 +- 10 files changed, 65 insertions(+), 43 deletions(-) diff --git a/admin_patches/checksums.py b/admin_patches/checksums.py index 768e622d..ca1d6a8a 100644 --- a/admin_patches/checksums.py +++ b/admin_patches/checksums.py @@ -35,12 +35,15 @@ # "current_players.html": "48848e49df8169cc6676a564a2895a2e", # "current_players_row_action.inc": "dcc591344e3b32d1be9c31fa6178e74c", # "current_players_row.inc": "764a48d8b4432590078b543ff1c24a9d", - # "current_rules_kfgameinfo_survival.inc": "d6aa00c399d931dcf779675dc254248d", + # "current_rules_kfgameinfo_survival.inc": + # "d6aa00c399d931dcf779675dc254248d", # "current_spectators.inc": "7718da7b0511ee4ccfad4b121ddc48eb", # "current_team.inc": "3fcd59406c7aa8de84a44a5c1cafc0e4", # "current_teams.inc": "f5b3aa0467f707b6403c83a90443781c", - # "default_maplist_additional_cycle.inc": "6386dace1fd22a6cbff8e3eac4399c96", - # "default_maplist_additional_edit.inc": "bd99f835e37a019c599145dddbd96de8", + # "default_maplist_additional_cycle.inc": + # "6386dace1fd22a6cbff8e3eac4399c96", + # "default_maplist_additional_edit.inc": + # "bd99f835e37a019c599145dddbd96de8", # "default_maplist_additional.html": "65054dbba0f9378786e87ecacf7078dc", # "default_maplist_editor.inc": "5a9639f8b0e8d0d1c69e28c6c5057965", # "default_maplist_editor.js": "a05e7705d7f91d33fd35d1e096672aaf", @@ -51,14 +54,16 @@ # "default_settings_general.html": "396c0a06a827502ad4f9d21f4be6bd61", # "default_settings_mutators.html": "6e202f2f4c8c4339ee32ae9fed020841", # "default_settings_mutators.inc": "39a575248d33be12a957d61f18a9e0be", - # "default_settings_mutators_select.inc": "486212f1d398bb956335e78bebdfa5c4", + # "default_settings_mutators_select.inc": + # "486212f1d398bb956335e78bebdfa5c4", # "default_settings_password.html": "1e402364ec8db2ced6fd4349c2fac3b0", # "default_settings_welcome.html": "97bc67c1adb95825b0d5f905f0ef0aff", # "footer_base.inc": "91c52188cc249642954061d1c1619f73", # "footer.inc": "65f63d4deb9c28ea43adf1bab6d509e0", # "gamesummary_base.inc": "3319af6efb70753866b2bafce634e258", # "gamesummary.js": "3723867be22e71f8f655b3ac1815c119", - # "gamesummary_kfgameinfo_survival.inc": "86f11c0d38193fd39ab6b966a8ade24a", + # "gamesummary_kfgameinfo_survival.inc": + # "86f11c0d38193fd39ab6b966a8ade24a", # "header.inc": "562ac9fa12fb6f1dbfc0352bf99ea76a", # "login.html": "08bfb87514ab579bd89e470fc50bd245", # "message_error.inc": "9c3885f94344bf53cf90effa965e255a", diff --git a/admin_patches/setup.py b/admin_patches/setup.py index e534e54f..9c3696ab 100644 --- a/admin_patches/setup.py +++ b/admin_patches/setup.py @@ -11,9 +11,12 @@ includefiles = [ - (os.path.join(SRC_PATH, 'patches/current_rules.inc.patch'), 'patches/current_rules.inc.patch'), - (os.path.join(SRC_PATH, 'patches/gamesummary.inc.patch'), 'patches/gamesummary.inc.patch'), - (os.path.join(SRC_PATH, 'patches/header_base.inc.patch'), 'patches/header_base.inc.patch'), + (os.path.join(SRC_PATH, 'patches/current_rules.inc.patch'), + 'patches/current_rules.inc.patch'), + (os.path.join(SRC_PATH, 'patches/gamesummary.inc.patch'), + 'patches/gamesummary.inc.patch'), + (os.path.join(SRC_PATH, 'patches/header_base.inc.patch'), + 'patches/header_base.inc.patch'), ] target_name = "admin_patches" diff --git a/magicked_admin/chatbot/commands/command.py b/magicked_admin/chatbot/commands/command.py index febee160..f3a05a69 100644 --- a/magicked_admin/chatbot/commands/command.py +++ b/magicked_admin/chatbot/commands/command.py @@ -17,8 +17,9 @@ def __init__(self, server, admin_only=True, requires_patch=False): not_supported_message = "This action isn't supported without Killing" \ " Floor 2 Magicked Administrator's server" \ - " side patch! Please review the documentation" \ - " at '{}' for guidance.".format(BANNER_URL) + " side patch! Please review the " \ + "documentation at '{}' for guidance."\ + .format(BANNER_URL) self.not_supported_message = pad_output(not_supported_message) self.help_text = "The help text for this command hasn't been written!" diff --git a/magicked_admin/chatbot/commands/server_commands.py b/magicked_admin/chatbot/commands/server_commands.py index fe191301..cf8555d7 100644 --- a/magicked_admin/chatbot/commands/server_commands.py +++ b/magicked_admin/chatbot/commands/server_commands.py @@ -456,8 +456,8 @@ def execute(self, username, args, user_flags): return self.format_response(self.help_text, args) if not args.difficulty: - message = "Difficulty not recognised, options are: normal, hard, " \ - "suicidal, or hell" + message = "Difficulty not recognised, options are: normal, " \ + "hard, suicidal, or hell" return self.format_response(message, args) if args.difficulty in ["normal", "0"]: diff --git a/magicked_admin/database/database.py b/magicked_admin/database/database.py index f43e8acc..4b08918e 100644 --- a/magicked_admin/database/database.py +++ b/magicked_admin/database/database.py @@ -88,7 +88,8 @@ def rank_kd(self, steam_id): FROM players as player2 WHERE - (player2.kills/player2.deaths) >= (player1.kills/player1.deaths) + (player2.kills/player2.deaths) + >= (player1.kills/player1.deaths) ) AS kd_rank FROM players AS player1 diff --git a/magicked_admin/server/server.py b/magicked_admin/server/server.py index c4a697b5..e5354a1d 100644 --- a/magicked_admin/server/server.py +++ b/magicked_admin/server/server.py @@ -191,9 +191,11 @@ def event_player_join(self, player): message = "Player {} joined {} from {}" \ .format(new_player.username, self.name, new_player.country) print(colored(message, 'cyan')) - self.web_admin.chat.handle_message("internal_command", - "!player_join " + new_player.username, - USER_TYPE_INTERNAL) + self.web_admin.chat.handle_message( + "internal_command", + "!player_join " + new_player.username, + USER_TYPE_INTERNAL + ) def event_player_quit(self, player): self.players.remove(player) diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index 41a47f61..a02d2ce8 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -25,8 +25,8 @@ 'scoreboard_type', 'dosh_threshold', 'max_players', 'enable_greeter'] -CONFIG_DIE_MESG = "Please correct this manually or delete '{}' to create a clean config next run.".format( - CONFIG_PATH) +CONFIG_DIE_MESG = "Please correct this manually or delete '{}' to create " \ + "a clean config next run.".format(CONFIG_PATH) class Settings: @@ -43,21 +43,18 @@ def __init__(self, skip_setup=False): config.write(config_file) if skip_setup: - info("Guided setup was skipped, a template has been generated.") - die( - "Setup is not complete yet, please amend '{}' with your " - "server details.".format(CONFIG_PATH_DISPLAY) - ) + info("Guided setup was skipped, a template has been " + "generated.") + die("Setup is not complete yet, please amend '{}' with your " + "server details.".format(CONFIG_PATH_DISPLAY)) try: self.config = configparser.ConfigParser() self.config.read(CONFIG_PATH) except configparser.DuplicateOptionError as e: - fatal( - "Configuration error(s) found!\nSection '{}' has a duplicate setting: '{}'." - .format(e.section, e.option) - ) + fatal("Configuration error(s) found!\nSection '{}' has a duplicate" + " setting: '{}'.".format(e.section, e.option)) die(CONFIG_DIE_MESG, pause=True) config_errors = self.validate_config(self.config) @@ -94,8 +91,8 @@ def construct_config_interactive(): if resolved_address: break else: - print( - "Address not responding!\nAccepted formats are: 'ip:port', 'domain', or 'domain:port'") + print("Address not responding!\nAccepted formats are: " + "'ip:port', 'domain', or 'domain:port'") username = input("Username [default - Admin]: ") or "Admin" password = getpass( @@ -142,7 +139,8 @@ def validate_config(config): config.get(section, setting) except configparser.NoOptionError: errors.append( - "Section '{}' is missing a required setting: '{}'.".format( - section, setting)) + "Section '{}' is missing a required setting: " + "'{}'.".format(section, setting) + ) return errors diff --git a/magicked_admin/web_admin/web_admin.py b/magicked_admin/web_admin/web_admin.py index a0e2f686..447be60f 100644 --- a/magicked_admin/web_admin/web_admin.py +++ b/magicked_admin/web_admin/web_admin.py @@ -199,7 +199,8 @@ def get_game_players(self): @staticmethod def __get_players(info_tree): players = [] - theads_path = "//table[@id=\"players\"]/thead//th[position()>1]//text()" + theads_path = "//table[@id=\"players\"]/thead//th[position()>1]" \ + "//text()" theads_result = info_tree.xpath(theads_path) if len(theads_result): @@ -261,7 +262,8 @@ def __get_game(info_tree): zeds_dead, zeds_total = None, None trader_open = False - players_path = "//dl[@id=\"currentRules\"]/dt[text()=\"Players\"]/following-sibling::dd[1]/text()" + players_path = "//dl[@id=\"currentRules\"]/dt[text()=\"Players\"]" \ + "/following-sibling::dd[1]/text()" players_result = info_tree.xpath(players_path) if len(players_result): @@ -269,7 +271,8 @@ def __get_game(info_tree): else: players_max = None - wave_path = "//dl[@id=\"currentRules\"]/dt[text()=\"Wave\"]/following-sibling::dd[1]/text()" + wave_path = "//dl[@id=\"currentRules\"]/dt[text()=\"Wave\"]" \ + "/following-sibling::dd[1]/text()" wave_result = info_tree.xpath(wave_path) if len(wave_result): @@ -277,7 +280,9 @@ def __get_game(info_tree): else: wave, length = None, LEN_UNKNOWN - difficulty_path = "//dl[@id=\"currentRules\"]/dt[text()=\"Difficulty\"]/following-sibling::dd[1]/text()" + difficulty_path = "//dl[@id=\"currentRules\"]" \ + "/dt[text()=\"Difficulty\"]" \ + "/following-sibling::dd[1]/text()" difficulty_result = info_tree.xpath(difficulty_path) if len(difficulty_result): @@ -295,7 +300,8 @@ def __get_game(info_tree): else: difficulty = DIFF_UNKNOWN - game_type_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Game type\"]/following-sibling::dd[1]/@title" + game_type_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Game type\"]" \ + "/following-sibling::dd[1]/@title" game_type_result = info_tree.xpath(game_type_path) if len(game_type_result): @@ -303,9 +309,11 @@ def __get_game(info_tree): else: game_type = GAME_TYPE_UNKNOWN - map_title_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Map\"]/following-sibling::dd[1]/@title" + map_title_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Map\"]" \ + "/following-sibling::dd[1]/@title" map_title_result = info_tree.xpath(map_title_path) - map_name_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Map\"]/following-sibling::dd[1]/text()" + map_name_path = "//dl[@id=\"currentGame\"]/dt[text()=\"Map\"]" \ + "/following-sibling::dd[1]/text()" map_name_result = info_tree.xpath(map_name_path) if len(map_title_result) and len(map_name_result): @@ -321,7 +329,8 @@ def get_player_identity(self, username): response = self.__web_interface.get_players() player_tree = html.fromstring(response.content) - theads_path = "//table[@id=\"players\"]/thead//th[position()>1]//text()" + theads_path = "//table[@id=\"players\"]/thead//th[position()>1]" \ + "//text()" theads_result = player_tree.xpath(theads_path) name_col = theads_result.index("Player name") @@ -337,7 +346,8 @@ def get_player_identity(self, username): trows_result = [list(group) for k, group in groupby(trows_result, lambda x: x == "\xa0") if not k] - player_keys_path = "//table[@id=\"players\"]/tbody//input[@name=\"playerkey\"]//@value" + player_keys_path = "//table[@id=\"players\"]/tbody" \ + "//input[@name=\"playerkey\"]//@value" player_keys_result = player_tree.xpath(player_keys_path) for i in range(0, len(player_keys_result)): trows_result[i][player_key_col] = player_keys_result[i] diff --git a/magicked_admin/web_admin/web_interface.py b/magicked_admin/web_admin/web_interface.py index 0b68dd58..fd722874 100644 --- a/magicked_admin/web_admin/web_interface.py +++ b/magicked_admin/web_admin/web_interface.py @@ -154,9 +154,11 @@ def __new_session(self): response = self.__post(session, self.__urls['login'], login_payload, login=True) - if "hashAlg" in response.text or "Exceeded login attempts" in response.text: + if "hashAlg" in response.text \ + or "Exceeded login attempts" in response.text: # TODO Expand on handling here, should gracefully terminate - die("Login failure, bad credentials or login attempts exceeded.", pause=True) + die("Login failure, bad credentials or login attempts exceeded.", + pause=True) if "" in response.text: self.ma_installed = True diff --git a/makefile b/makefile index ff7e6a53..e38d8385 100755 --- a/makefile +++ b/makefile @@ -26,7 +26,7 @@ pytest: lint: @echo "$(YELLOW_COLOR)Checking lints...$(NO_COLOR)\n" - @flake8 --ignore F405,E501,F403,E722,W503,F401 --exclude=admin_patches/utils/patch.py && \ + @flake8 --ignore F405,F403,E722,W503,F401 --exclude=admin_patches/utils/patch.py && \ echo "$(GREEN_COLOR)success!$(NO_COLOR)" \ || { echo "$(RED_COLOR)failure!$(NO_COLOR)\n"; exit 1; } From 3556bab7f635a5527ddccdeed308af976dc5b988 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 13:28:13 +0100 Subject: [PATCH 35/61] Fix F422s --- magicked_admin/utils/net.py | 6 +++--- makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/magicked_admin/utils/net.py b/magicked_admin/utils/net.py index 340e11c2..5038cddb 100644 --- a/magicked_admin/utils/net.py +++ b/magicked_admin/utils/net.py @@ -15,7 +15,7 @@ def __add_address_scheme(address): def __is_valid_address(address): try: code = urlopen(address).getcode() - except: + except Exception: return False return code == 200 @@ -26,7 +26,7 @@ def __follow_redirect(address): response = urlopen(address) redirect_url = urlparse(response.geturl()) return redirect_url.scheme + "://" + redirect_url.netloc - except: + except Exception: return address @@ -45,7 +45,7 @@ def phone_home(): try: # See git.th3-z.xyz/www-th3-z-xyz/ code = urlopen("https://www.th3-z.xyz/kf2-ma-ping") - except: + except Exception: return False return code == 200 diff --git a/makefile b/makefile index e38d8385..dfe64600 100755 --- a/makefile +++ b/makefile @@ -26,7 +26,7 @@ pytest: lint: @echo "$(YELLOW_COLOR)Checking lints...$(NO_COLOR)\n" - @flake8 --ignore F405,F403,E722,W503,F401 --exclude=admin_patches/utils/patch.py && \ + @flake8 --ignore F405,F403,W503,F401 --exclude=admin_patches/utils/patch.py && \ echo "$(GREEN_COLOR)success!$(NO_COLOR)" \ || { echo "$(RED_COLOR)failure!$(NO_COLOR)\n"; exit 1; } From 9ab5e630f88517fef219816cd830d90000c998b0 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 14:38:18 +0100 Subject: [PATCH 36/61] Update pull_request_template.md --- .github/pull_request_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1c0282ce..27e869c6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,6 +18,7 @@ Please delete options that are not relevant. - [ ] Follows the style guidelines of this project - [ ] Corresponding changes to the documentation and help texts - [ ] Generates no new warnings -- [ ] Linter passes +- [ ] Added tests +- [ ] Pytests and linter passes - [ ] Added relevant labels to the pull request - [ ] I agree to these changes being released under the terms of the MIT license From 14c5c88bd58397674da5e422d4875bb1b2ae92b8 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 14:07:38 +0100 Subject: [PATCH 37/61] net unit tests --- magicked_admin/utils/net.py | 14 +++++++----- tests/magicked_admin/__init__.py | 0 tests/magicked_admin/utils/__init__.py | 0 tests/magicked_admin/utils/test_net.py | 31 ++++++++++++++++++++++++++ tests/test_app.py | 11 --------- 5 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 tests/magicked_admin/__init__.py create mode 100644 tests/magicked_admin/utils/__init__.py create mode 100644 tests/magicked_admin/utils/test_net.py delete mode 100644 tests/test_app.py diff --git a/magicked_admin/utils/net.py b/magicked_admin/utils/net.py index 5038cddb..cbc107b1 100644 --- a/magicked_admin/utils/net.py +++ b/magicked_admin/utils/net.py @@ -47,19 +47,23 @@ def phone_home(): code = urlopen("https://www.th3-z.xyz/kf2-ma-ping") except Exception: return False - return code == 200 + return code # Get geographical information for an ip address def get_country(ip): - url = "https://ipapi.co/" + ip + "/json/" + url = "http://ip-api.com/" + "/json/" + ip unknown = ("Unknown", "??") + print(url) + geo_data = requests.get(url).json() - if 'country_name' in geo_data: - country = geo_data['country_name'] - country_code = geo_data['country'] + print(geo_data) + + if 'country' in geo_data: + country = geo_data['country'] + country_code = geo_data['countryCode'] return country, country_code else: return unknown diff --git a/tests/magicked_admin/__init__.py b/tests/magicked_admin/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/magicked_admin/utils/__init__.py b/tests/magicked_admin/utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/magicked_admin/utils/test_net.py b/tests/magicked_admin/utils/test_net.py new file mode 100644 index 00000000..d9125e21 --- /dev/null +++ b/tests/magicked_admin/utils/test_net.py @@ -0,0 +1,31 @@ +import pytest + +from magicked_admin.utils.net import get_country, phone_home, resolve_address + + +def test_phone_home(): + assert phone_home() + + +def test_get_country(): + expected = ("United States", "US") + assert get_country("8.8.8.8") == expected + + +def test_resolve_address(): + tests = [ + {"address": "kf2.th3-z.xyz", + "expected": "https://kf2.th3-z.xyz"}, + {"address": "https://kf2.th3-z.xyz", + "expected": "https://kf2.th3-z.xyz"}, + {"address": "http://kf2.th3-z.xyz", + "expected": "https://kf2.th3-z.xyz"}, + {"address": "kf2.th3-z.xyz:8080", + "expected": "http://kf2.th3-z.xyz:8080"}, + {"address": "45.32.187.80:8080", + "expected": "http://45.32.187.80:8080"} + ] + + for test in tests: + result = resolve_address(test["address"]) + assert result == test["expected"] diff --git a/tests/test_app.py b/tests/test_app.py deleted file mode 100644 index 31e93e07..00000000 --- a/tests/test_app.py +++ /dev/null @@ -1,11 +0,0 @@ -import pytest - -from magicked_admin.utils.net import get_country - - -def test_true(): - assert True - - -def test_net(): - assert get_country("8.8.8.8") From c55c4d8866b1c40e4c5cc2ca6d7b4d8266c6c5b4 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 14:34:10 +0100 Subject: [PATCH 38/61] Add util tests --- tests/magicked_admin/utils/test_text.py | 84 +++++++++++++++++++++++++ tests/magicked_admin/utils/test_time.py | 20 ++++++ 2 files changed, 104 insertions(+) create mode 100644 tests/magicked_admin/utils/test_text.py create mode 100644 tests/magicked_admin/utils/test_time.py diff --git a/tests/magicked_admin/utils/test_text.py b/tests/magicked_admin/utils/test_text.py new file mode 100644 index 00000000..6b0f4ca5 --- /dev/null +++ b/tests/magicked_admin/utils/test_text.py @@ -0,0 +1,84 @@ +import pytest + +from magicked_admin.utils.text import ( + str_to_bool, trim_string, pad_output, millify +) + + +def test_str_to_bool(): + tests = [ + {"str": "True", + "expected": True}, + {"str": "1", + "expected": True}, + {"str": "False", + "expected": False}, + {"str": "0", + "expected": False}, + ] + + for test in tests: + result = str_to_bool(test["str"]) + assert result == test["expected"] + + +def test_trim_string(): + tests = [ + {"str": "test", + "len": 8, + "expected": "test"}, + {"str": "12345678", + "len": 8, + "expected": "12345678"}, + {"str": "123456789", + "len": 8, + "expected": "123456.."}, + {"str": "123456789", + "len": 2, + "expected": ".."} + ] + + for test in tests: + result = trim_string(test["str"], test["len"]) + assert result == test["expected"] + + +def test_millify(): + tests = [ + {"num": "1000", + "expected": "1K"}, + {"num": 1000, + "expected": "1K"}, + {"num": 1200, + "expected": "1K"}, + {"num": 1000000, + "expected": "1M"}, + {"num": 1000000000, + "expected": "1B"}, + {"num": 1000000000000, + "expected": "1T"}, + # TODO: This rounding is undesirable + {"num": 1600000000000, + "expected": "2T"}, + {"num": 0, + "expected": "0"}, + {"num": "0", + "expected": "0"}, + ] + + for test in tests: + result = millify(test["num"]) + assert result == test["expected"] + + +def test_pad_output(): + tests = [ + {"str": "test", + "expected": "\n\n\n\n\n\n\ntest"}, + {"str": "a\ntest", + "expected": "\n\n\n\n\n\na\ntest"} + ] + + for test in tests: + result = pad_output(test["str"]) + assert result == test["expected"] diff --git a/tests/magicked_admin/utils/test_time.py b/tests/magicked_admin/utils/test_time.py new file mode 100644 index 00000000..9a95c80f --- /dev/null +++ b/tests/magicked_admin/utils/test_time.py @@ -0,0 +1,20 @@ +import pytest + +from magicked_admin.utils.time import seconds_to_hhmmss + + +def test_seconds_to_hhmmss(): + tests = [ + {"seconds": 12, + "expected": "00:00:12"}, + {"seconds": 0, + "expected": "00:00:00"}, + {"seconds": 60 * 60 * 3, + "expected": "03:00:00"}, + {"seconds": 71237934, + "expected": "19788:18:54"} + ] + + for test in tests: + result = seconds_to_hhmmss(test["seconds"]) + assert result == test["expected"] From 6b6317dd6da49e8612bb289f9b83553a36156f1e Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 14:51:48 +0100 Subject: [PATCH 39/61] Update requirements.txt --- requirements.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cfa8e38f..b1088634 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,7 @@ termcolor cx_Freeze certifi babel - +isort +flake8 +pytest +pytest-cov From f420d134fd94cb29ea83e99cd80494031083488b Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 14:53:19 +0100 Subject: [PATCH 40/61] Update README.md --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 85c09305..de228c98 100644 --- a/README.md +++ b/README.md @@ -295,23 +295,15 @@ You can build a binary release for distribution with `make` after installing both the run and build requirements. ### Requirements -Examples work on Debian 10 and Ubuntu 19.04, may differ for other operating +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. * Python 3.x - `apt install python3` * Pip - `apt install python3-pip` -* Python 3 dependencies - `pip3 install -r requirements.txt` +* Pip dependencies - `pip3 install -r requirements.txt` * Make - `apt install make` * zlib-dev - `apt install zlib1g-dev` -### Development -Development make targets also use the following dependencies. - -* isort - `pip3 install isort` -* flake8 - `pip3 install flake8` -* pytest - `pip3 install pytest` -* pytest-cov - `pip3 install pytest-cov` - ### Windows users You can build the program without make by running `setup.py`. From 8d4b8f7758838c3fca968dd29bd2a292afae7ec8 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 16:01:52 +0100 Subject: [PATCH 41/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de228c98..c59d7aee 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

Killing Floor 2 Magicked Admin

-[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg)](https://coveralls.io/github/th3-z/kf2-magicked-admin) +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD From 4bd86be67fab5ae880ad9af9797e2300c2d01268 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 19:00:42 +0100 Subject: [PATCH 42/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c59d7aee..9ea99899 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ metric on the leaderboard. The options for this are: `dosh` or `kills`. ### Scripts -Writting a `server_name.init` in the `conf` folder with a series of commands +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. Additional scripts can be written in the `conf/scripts` folder and ran with the From e023c747a4b4aeeb6c8d17ae7beb948d149c6f63 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 19:27:08 +0100 Subject: [PATCH 43/61] Update example --- magicked_admin/conf/scripts/example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/conf/scripts/example b/magicked_admin/conf/scripts/example index 4e30bcc0..fbd9fc25 100644 --- a/magicked_admin/conf/scripts/example +++ b/magicked_admin/conf/scripts/example @@ -5,7 +5,7 @@ ; ; Example script - Sets up a private game silent -q ; -q supresses command output -password set 123 +password --set 123 difficulty hell length long load_map biotics From b70214948f98a73a191a65809acdd00f4b3cffea Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 19:28:49 +0100 Subject: [PATCH 44/61] Update __init__.py --- magicked_admin/chatbot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/chatbot/__init__.py b/magicked_admin/chatbot/__init__.py index e9eb7ab4..d82a0f71 100644 --- a/magicked_admin/chatbot/__init__.py +++ b/magicked_admin/chatbot/__init__.py @@ -5,6 +5,6 @@ ; ; Example: ; silent -; start_wc 1 Welcome to wave 1 +; start_wc -w 1 Welcome to wave 1 ; silent ''' From b9d350af3cb41ab1535ab84e29b9e4c2f02f9a2c Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 28 Sep 2019 20:53:24 +0100 Subject: [PATCH 45/61] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ea99899..bbc060e5 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,11 @@ Commands that can be executed by any player. - Example: `!stats` Shows stats about yourself - Example: `!stats the_z` Shows stats about the_z * `!kills ` - Shows kill statistics about a user - - Example: `!stats` Shows kill stats about yourself - - Example: `!stats the_z` Shows killstats about the_z + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z * `!dosh ` - Shows dosh statistics about a user - - Example: `!stats` Shows dosh stats about yourself - - Example: `!stats the_z` Shows dosh stats about the_z + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z * `!map` - Shows statistics about the current map * `!record_wave` - Shows the highest wave achieved on the current map * `!top_kills` - Shows the global kills leaderboard From e0e78ed3f29518f80ea581e96dd32147ff2a175a Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 00:47:32 +0100 Subject: [PATCH 46/61] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bbc060e5..055bc779 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,16 @@ once. Downloads --------- -The most recent stable version is `0.1.3`. Binaries are provided on the releases +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. - - -[Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4)
Old releases -Release `0.0.7` has been extensively tested and aligns closer with the Steam guide. +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) * [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) * [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
From a4c2836500c0b2e4512bf10ba92f754442687c69 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 01:13:49 +0100 Subject: [PATCH 47/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 055bc779..8fc2d868 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Running from Python sources Before contributing code you will need to install the Python requirements. ### Requirements -Examples work on Debian 10 and Ubuntu 19.04, may differ for other operating +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. * Python 3.x - `apt install python3` From 7e44326c8d9ba1f19c7af72e6dc4c97044c0dbe8 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 01:14:12 +0100 Subject: [PATCH 48/61] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fc2d868..520ce5dd 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,7 @@ Before contributing code you will need to install the Python requirements. Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. -* Python 3.x - `apt install python3` +* Python 3.7 - `apt install python3` * Pip - `apt install python3-pip` * Python 3 dependencies - `pip3 install -r requirements.txt` - This might complain about cx_freeze not installing if you haven't got @@ -296,7 +296,7 @@ both the run and build requirements. Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. -* Python 3.x - `apt install python3` +* Python 3.7 - `apt install python3` * Pip - `apt install python3-pip` * Pip dependencies - `pip3 install -r requirements.txt` * Make - `apt install make` From 54005832bb654eb21f2c2285f50342c1e267ac2d Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 01:15:08 +0100 Subject: [PATCH 49/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 520ce5dd..7c121a97 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ systems. Install the following packages. * Pip - `apt install python3-pip` * Python 3 dependencies - `pip3 install -r requirements.txt` - This might complain about cx_freeze not installing if you haven't got - zlib, but cx_freeze is only needed for building. + zlib-dev, but cx_freeze is only needed for building. ### Running `git clone git@github.com:th3-z/kf2-magicked-admin.git` From 86cc4b3375d5b3c66c73bbb75b1047597a747040 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 01:33:43 +0100 Subject: [PATCH 50/61] Fix whitespace --- magicked_admin/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index a02d2ce8..0421c021 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -76,7 +76,7 @@ def sections(self): @staticmethod def construct_config_interactive(): - print(" Please input your web admin details below.") + print(" Please input your web admin details below.") new_config = configparser.ConfigParser() new_config.add_section(SETTINGS_DEFAULT['server_name']) From 1f1712f229f689e6b5d036e290548f39bdfb4c12 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 14:28:20 +0100 Subject: [PATCH 51/61] Remove greeter option --- magicked_admin/chatbot/chatbot.py | 2 +- magicked_admin/magicked_admin.py | 6 +----- magicked_admin/settings.py | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/magicked_admin/chatbot/chatbot.py b/magicked_admin/chatbot/chatbot.py index 1fa86870..a95d665a 100644 --- a/magicked_admin/chatbot/chatbot.py +++ b/magicked_admin/chatbot/chatbot.py @@ -11,7 +11,7 @@ class Chatbot(ChatListener): - def __init__(self, server, greeter_enabled=True, name=None): + def __init__(self, server, name=None): self.server_name = server.name if name: self.name = name diff --git a/magicked_admin/magicked_admin.py b/magicked_admin/magicked_admin.py index bde2130a..09d4ccf3 100644 --- a/magicked_admin/magicked_admin.py +++ b/magicked_admin/magicked_admin.py @@ -85,11 +85,7 @@ def run(self): self.servers.append(server) - Chatbot(server, - str_to_bool( - settings.setting(server_name, "enable_greeter")), - settings.setting(server_name, "username") - ) + Chatbot(server, settings.setting(server_name, "username")) info("Initialisation complete!\n") diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index 0421c021..ff3c92e0 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -17,13 +17,12 @@ 'motd_scoreboard': 'False', 'scoreboard_type': 'Kills', 'max_players': "6", - 'enable_greeter': "True", 'dosh_threshold': "0", } SETTINGS_REQUIRED = ['address', 'password', 'motd_scoreboard', 'scoreboard_type', 'dosh_threshold', - 'max_players', 'enable_greeter'] + 'max_players'] CONFIG_DIE_MESG = "Please correct this manually or delete '{}' to create " \ "a clean config next run.".format(CONFIG_PATH) From 441e0c2b2351c3bed1a202202b4ee6ac115bf4c6 Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 14:36:18 +0100 Subject: [PATCH 52/61] Update makefile, remove unused cfg option --- magicked_admin/settings.py | 4 ++++ makefile | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/magicked_admin/settings.py b/magicked_admin/settings.py index ff3c92e0..db601827 100644 --- a/magicked_admin/settings.py +++ b/magicked_admin/settings.py @@ -80,6 +80,8 @@ def construct_config_interactive(): new_config.add_section(SETTINGS_DEFAULT['server_name']) for setting in SETTINGS_DEFAULT: + if setting == "server_name": + continue new_config.set(SETTINGS_DEFAULT['server_name'], setting, SETTINGS_DEFAULT[setting]) @@ -111,6 +113,8 @@ def construct_config_template(): new_config.add_section(SETTINGS_DEFAULT['server_name']) for setting in SETTINGS_DEFAULT: + if setting == "server_name": + continue new_config.set(SETTINGS_DEFAULT['server_name'], setting, SETTINGS_DEFAULT[setting]) diff --git a/makefile b/makefile index dfe64600..d9bc8ac0 100755 --- a/makefile +++ b/makefile @@ -8,8 +8,8 @@ build: clean: -@rm -rf bin - -@rm -rf magicked_admin/*.sqlite - -@rm -rf magicked_admin/magicked_admin.conf + -@rm -rf magicked_admin/conf/*.sqlite + -@rm -rf magicked_admin/conf/magicked_admin.conf -@find . -name '*.pyc' -exec rm -f {} + -@find . -name '*.pyo' -exec rm -f {} + From aa3767899c85cb014970735e771b4d7dacb0ac9b Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 14:54:50 +0100 Subject: [PATCH 53/61] Join command delay --- magicked_admin/chatbot/commands/event_commands.py | 8 +++++++- magicked_admin/utils/net.py | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/magicked_admin/chatbot/commands/event_commands.py b/magicked_admin/chatbot/commands/event_commands.py index d96d3a79..367e27a0 100644 --- a/magicked_admin/chatbot/commands/event_commands.py +++ b/magicked_admin/chatbot/commands/event_commands.py @@ -14,6 +14,8 @@ def __init__(self, server, scheduler): "Desc: Runs a command when a player joins the match" self.parser.add_argument("command", nargs="*") + self.run_delay = 8 + def execute(self, username, args, user_flags): args, err = self.parse_args(username, args, user_flags) if err: @@ -26,7 +28,11 @@ def execute(self, username, args, user_flags): "Please specify a command to run", args ) - command = CommandOnJoin(self.server, " ".join(args.command)) + delayed_command = [ + "start_tc", "-qt", str(self.run_delay), *args.command + ] + + command = CommandOnJoin(self.server, " ".join(delayed_command)) self.scheduler.schedule_command(command) return self.format_response("Player join command started", args) diff --git a/magicked_admin/utils/net.py b/magicked_admin/utils/net.py index cbc107b1..635dde87 100644 --- a/magicked_admin/utils/net.py +++ b/magicked_admin/utils/net.py @@ -55,12 +55,8 @@ def get_country(ip): url = "http://ip-api.com/" + "/json/" + ip unknown = ("Unknown", "??") - print(url) - geo_data = requests.get(url).json() - print(geo_data) - if 'country' in geo_data: country = geo_data['country'] country_code = geo_data['countryCode'] From 157fb7c1a2f28f4e45b93406abf53e7eaf1a43df Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 15:00:29 +0100 Subject: [PATCH 54/61] Stanardize some tokens --- magicked_admin/chatbot/command_scheduler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magicked_admin/chatbot/command_scheduler.py b/magicked_admin/chatbot/command_scheduler.py index 7fb5315d..f583865d 100644 --- a/magicked_admin/chatbot/command_scheduler.py +++ b/magicked_admin/chatbot/command_scheduler.py @@ -190,11 +190,11 @@ def resolve_command(self, internal_message): username = " ".join(message[1:]) - if "%PLR%" in self.command: + if "%PLR" in self.command: player = self.server.get_player_by_username(username) - command = command.replace("%PLR%", player.username) - command = command.replace("%DSH%", str(player.total_dosh)) - command = command.replace("%KLL%", str(player.total_kills)) + command = command.replace("%PLR", player.username) + command = command.replace("%DSH", str(player.total_dosh)) + command = command.replace("%KLL", str(player.total_kills)) return command From 32aecac16d987127b8f948278f46cd0dd47c0f8b Mon Sep 17 00:00:00 2001 From: the_z Date: Sun, 29 Sep 2019 15:06:19 +0100 Subject: [PATCH 55/61] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c121a97..d4f4561c 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,8 @@ Commands that can be executed by any player. * `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players - Alias: `!sb` Does the same * `!game` - Shows information about the current game -* `!maps` - Shows the maplist +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps * `!player_count` - Shows the player count and max players @@ -133,8 +134,8 @@ the `!op` command. - Example: `!password off` Disables the game password - Example: `!password --set somePass` Sets a specific password * `!start_jc ` - Start a command that runs every time a player joins - - Example: `!start_jc say Welcome %PLR%` - Greets a player on join - - Available tokens: `%PLR` - username, `%KLL%` - total kills, `%DSH%` - + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh * `!stop_jc` - Stops all join commands * `!start_wc [-w ] ` - Start a command that runs on wave `` From f4ce560184886de2f9d1d0db8ca8bb3e68f5cab1 Mon Sep 17 00:00:00 2001 From: the_z Date: Fri, 4 Oct 2019 19:07:46 +0100 Subject: [PATCH 56/61] Add objective mode support --- magicked_admin/web_admin/constants.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magicked_admin/web_admin/constants.py b/magicked_admin/web_admin/constants.py index be3214da..bf06d018 100644 --- a/magicked_admin/web_admin/constants.py +++ b/magicked_admin/web_admin/constants.py @@ -32,12 +32,14 @@ GAME_TYPE_WEEKLY = "kfgamecontent.KFGameInfo_Weekly" GAME_TYPE_SURVIVAL_VS = "kfgamecontent.KFGameInfo_VersusSurvival" GAME_TYPE_ENDLESS = "kfgamecontent.KFGameInfo_Endless" +GAME_TYPE_OBJECTIVE = "kfgamecontent.KFGameInfo_Objective" GAME_TYPE_DISPLAY = { GAME_TYPE_UNKNOWN: "Unknown", GAME_TYPE_SURVIVAL: "Survival", GAME_TYPE_WEEKLY: "Weekly", GAME_TYPE_SURVIVAL_VS: "Versus Survival", - GAME_TYPE_ENDLESS: "Endless" + GAME_TYPE_ENDLESS: "Endless", + GAME_TYPE_OBJECTIVE: "Objective" } GAME_MAP_TITLE_UNKNOWN = "kf-default" From a6fc220253e02e0fe2913e97184edd7e2bd0f01d Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 5 Oct 2019 15:00:15 +0100 Subject: [PATCH 57/61] Merge requirements --- admin_patches/requirements.txt | 1 - requirements.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 admin_patches/requirements.txt diff --git a/admin_patches/requirements.txt b/admin_patches/requirements.txt deleted file mode 100644 index 323670d5..00000000 --- a/admin_patches/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -patch==1.* diff --git a/requirements.txt b/requirements.txt index b1088634..2c7a9afd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,4 @@ isort flake8 pytest pytest-cov +patch==1.* From 642b72e7a8198266c57566109542dc6c85c1bcc3 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 5 Oct 2019 15:29:20 +0100 Subject: [PATCH 58/61] Markup patcher, update build --- admin_patches/admin_patches.py | 38 +++++++---- admin_patches/locale/admin_patches.pot | 87 ++++++++++++++++++++++++ admin_patches/setup.cfg | 7 ++ admin_patches/setup.py | 11 ++- admin_patches/utils/__init__.py | 5 +- admin_patches/utils/patcher.py | 7 +- magicked_admin/locale/magicked_admin.pot | 9 ++- magicked_admin/setup.py | 2 +- makefile | 9 ++- 9 files changed, 147 insertions(+), 28 deletions(-) create mode 100644 admin_patches/locale/admin_patches.pot create mode 100644 admin_patches/setup.cfg diff --git a/admin_patches/admin_patches.py b/admin_patches/admin_patches.py index f7dbc087..7b24c8e4 100644 --- a/admin_patches/admin_patches.py +++ b/admin_patches/admin_patches.py @@ -1,13 +1,20 @@ from os import path import argparse +import gettext from utils import find_data_file, die, info from utils.patcher import validate_files, patch_files +_ = gettext.gettext + PATCHES_PATH = "patches" -parser = argparse.ArgumentParser(description='Killing Floor 2 Admin Patches') -parser.add_argument('-t', '--target', type=str, help='Specify server location') +parser = argparse.ArgumentParser( + description=_('Killing Floor 2 Admin Patches') +) +parser.add_argument( + '-t', '--target', type=str, help=_('Specify server location') +) args = parser.parse_args() if not args.target: from tkinter import * @@ -19,7 +26,7 @@ def test_dir(d): if not d: return False - test_file = path.join(d, "KFGame/Web/ServerAdmin/current_rules.inc") + test_file = path.join(d, _("KFGame/Web/ServerAdmin/current_rules.inc")) if not path.exists(test_file): return False else: @@ -29,7 +36,7 @@ def test_dir(d): def ask_dir(): return askdirectory( initialdir=".", - title="Select Killing Floor 2 server location" + title=_("Select Killing Floor 2 server location") ) @@ -37,31 +44,32 @@ def run(target=None): if args.target or target: server_path = args.target or target else: - info("Please open your server's install folder in the file dialogue") + info(_("Please open your server's install folder in the file " + "dialogue")) server_path = ask_dir() if not server_path: - die("User cancelled installation") + die(_("User cancelled installation")) if not test_dir(server_path): - die("Killing Floor 2 server not found in path:\n\t{}" + die(_("Killing Floor 2 server not found in path:\n\t{}") .format(server_path), pause=True) - info("Validating files...") + info(_("Validating files...")) target_path = path.join(server_path, "KFGame/Web/ServerAdmin") if not validate_files(target_path): - die("Server file validation failed, possible reasons:" - "\n\t - Game update" - "\n\t - User mods" - "\n\t - Patches already applied") + die(_("Server file validation failed, possible reasons:" + "\n\t - Game update" + "\n\t - User mods" + "\n\t - Patches already applied")) - info("Patching files...") + info(_("Patching files...")) patches_path = find_data_file(PATCHES_PATH) if not patch_files(target_path, patches_path): - die("Patching failed") + die(_("Patching failed")) else: print() # \n - info("Patches installed successfully!\n") + info(_("Patches installed successfully!\n")) if __name__ == "__main__": diff --git a/admin_patches/locale/admin_patches.pot b/admin_patches/locale/admin_patches.pot new file mode 100644 index 00000000..33b0dae2 --- /dev/null +++ b/admin_patches/locale/admin_patches.pot @@ -0,0 +1,87 @@ +# Translations template for PROJECT. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2019. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:28+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "" +"Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "" +"Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "" +"\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/admin_patches/setup.cfg b/admin_patches/setup.cfg new file mode 100644 index 00000000..19993896 --- /dev/null +++ b/admin_patches/setup.cfg @@ -0,0 +1,7 @@ +[extract_messages] +input_dirs = . +output_file = locale/admin_patches.pot + +[compile_catalog] +domain = . +directory = locale diff --git a/admin_patches/setup.py b/admin_patches/setup.py index 9c3696ab..90813488 100644 --- a/admin_patches/setup.py +++ b/admin_patches/setup.py @@ -1,5 +1,6 @@ import os +from babel.messages import frontend as babel from cx_Freeze import Executable, setup VERSION = "0.1" @@ -30,7 +31,7 @@ "include_files": includefiles, "include_msvcr": True, "optimize": 2, - "build_exe": os.path.join(ROOT_PATH, 'bin/'), + "build_exe": os.path.join(ROOT_PATH, 'bin/admin_patches'), "zip_include_packages": "*", "zip_exclude_packages": "" } @@ -45,5 +46,11 @@ targetName=target_name, icon=os.path.join(SRC_PATH, "icon.ico") ) - ] + ], + cmdclass={ + 'compile_catalog': babel.compile_catalog, + 'extract_messages': babel.extract_messages, + 'init_catalog': babel.init_catalog, + 'update_catalog': babel.update_catalog + } ) diff --git a/admin_patches/utils/__init__.py b/admin_patches/utils/__init__.py index 41294d14..81dbf1d0 100644 --- a/admin_patches/utils/__init__.py +++ b/admin_patches/utils/__init__.py @@ -1,5 +1,8 @@ import os import sys +import gettext + +_ = gettext.gettext # __debug__ is always true when building w/ cx_freeze, no known solution # TODO: Switch to Nuitka for compilation @@ -12,7 +15,7 @@ def die(mesg, pause=False): if mesg: fatal(mesg) if pause: - input("\nPress enter to exit...") + input(_("\nPress enter to exit...")) sys.exit(0) diff --git a/admin_patches/utils/patcher.py b/admin_patches/utils/patcher.py index 3984b3d9..9e7cfb94 100644 --- a/admin_patches/utils/patcher.py +++ b/admin_patches/utils/patcher.py @@ -1,10 +1,13 @@ import os from hashlib import md5 +import gettext from checksums import ORIG_MD5 from utils import find_data_file, info, warning from utils.patch import fromfile +_ = gettext.gettext + def md5sum(fname): hash_md5 = md5() @@ -34,10 +37,10 @@ def patch_files(target_path, patches_path): os.path.join(patches_path, filename + ".patch") ) - info("Applying {}".format(filename + ".patch")) + info(_("Applying {}").format(filename + ".patch")) patch = fromfile(patch_path) success = patch.apply(0, target_path) if not success: - warning("Patch failed to apply successfully") + warning(_("Patch failed to apply successfully")) return True diff --git a/magicked_admin/locale/magicked_admin.pot b/magicked_admin/locale/magicked_admin.pot index 85b2f86a..b87b4118 100644 --- a/magicked_admin/locale/magicked_admin.pot +++ b/magicked_admin/locale/magicked_admin.pot @@ -1,15 +1,14 @@ -# Translations template for Magicked Admin. +# Translations template for PROJECT. # Copyright (C) 2019 ORGANIZATION -# This file is distributed under the same license as the Magicked Admin -# project. +# This file is distributed under the same license as the PROJECT project. # FIRST AUTHOR , 2019. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Magicked Admin 0.1.0\n" +"Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-09-19 21:18+0100\n" +"POT-Creation-Date: 2019-10-05 15:28+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/magicked_admin/setup.py b/magicked_admin/setup.py index fe3d5a17..b5a6365c 100644 --- a/magicked_admin/setup.py +++ b/magicked_admin/setup.py @@ -35,7 +35,7 @@ "include_files": includefiles, "include_msvcr": True, "optimize": 2, - "build_exe": os.path.join(ROOT_PATH, 'bin/'), + "build_exe": os.path.join(ROOT_PATH, 'bin/magicked_admin'), "zip_include_packages": "*", "zip_exclude_packages": "" } diff --git a/makefile b/makefile index d9bc8ac0..170fc8f9 100755 --- a/makefile +++ b/makefile @@ -3,8 +3,13 @@ GREEN_COLOR=\033[32m RED_COLOR=\033[31m YELLOW_COLOR=\033[33;01m -build: - @python3 magicked_admin/setup.py build -b bin +build: locale + @python3 magicked_admin/setup.py build -b bin/magicked_admin + @python3 admin_patches/setup.py build -b bin/admin_patches + +locale: + @pybabel extract admin_patches -o admin_patches/locale/admin_patches.pot + @pybabel extract magicked_admin -o magicked_admin/locale/magicked_admin.pot clean: -@rm -rf bin From 55108abfbd8bb94aee2d991c257bbbdc855801d4 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 5 Oct 2019 15:46:19 +0100 Subject: [PATCH 59/61] Gen files for translation --- admin_patches/locale/admin_patches.pot | 2 +- .../locale/es_ES/LC_MESSAGES/messages.po | 88 ++++ docs/steam_guide.txt | 453 ++++++++++++++++++ .../locale/es_ES/LC_MESSAGES/messages.po | 20 + magicked_admin/locale/magicked_admin.pot | 2 +- makefile | 6 +- 6 files changed, 567 insertions(+), 4 deletions(-) create mode 100644 admin_patches/locale/es_ES/LC_MESSAGES/messages.po create mode 100644 docs/steam_guide.txt create mode 100644 magicked_admin/locale/es_ES/LC_MESSAGES/messages.po diff --git a/admin_patches/locale/admin_patches.pot b/admin_patches/locale/admin_patches.pot index 33b0dae2..1670959d 100644 --- a/admin_patches/locale/admin_patches.pot +++ b/admin_patches/locale/admin_patches.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:28+0100\n" +"POT-Creation-Date: 2019-10-05 15:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/admin_patches/locale/es_ES/LC_MESSAGES/messages.po b/admin_patches/locale/es_ES/LC_MESSAGES/messages.po new file mode 100644 index 00000000..d9c8f9c0 --- /dev/null +++ b/admin_patches/locale/es_ES/LC_MESSAGES/messages.po @@ -0,0 +1,88 @@ +# Spanish (Spain) translations for PROJECT. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:38+0100\n" +"PO-Revision-Date: 2019-10-05 15:38+0100\n" +"Last-Translator: FULL NAME \n" +"Language: es_ES\n" +"Language-Team: es_ES \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "" +"Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "" +"Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "" +"\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/docs/steam_guide.txt b/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/magicked_admin/locale/es_ES/LC_MESSAGES/messages.po b/magicked_admin/locale/es_ES/LC_MESSAGES/messages.po new file mode 100644 index 00000000..09841f7c --- /dev/null +++ b/magicked_admin/locale/es_ES/LC_MESSAGES/messages.po @@ -0,0 +1,20 @@ +# Spanish (Spain) translations for PROJECT. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:38+0100\n" +"PO-Revision-Date: 2019-10-05 15:38+0100\n" +"Last-Translator: FULL NAME \n" +"Language: es_ES\n" +"Language-Team: es_ES \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" + diff --git a/magicked_admin/locale/magicked_admin.pot b/magicked_admin/locale/magicked_admin.pot index b87b4118..bbce266c 100644 --- a/magicked_admin/locale/magicked_admin.pot +++ b/magicked_admin/locale/magicked_admin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:28+0100\n" +"POT-Creation-Date: 2019-10-05 15:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/makefile b/makefile index 170fc8f9..5ea143e0 100755 --- a/makefile +++ b/makefile @@ -3,13 +3,15 @@ GREEN_COLOR=\033[32m RED_COLOR=\033[31m YELLOW_COLOR=\033[33;01m -build: locale +build: @python3 magicked_admin/setup.py build -b bin/magicked_admin @python3 admin_patches/setup.py build -b bin/admin_patches -locale: +i18n-init: @pybabel extract admin_patches -o admin_patches/locale/admin_patches.pot + @pybabel init -l es_ES -i admin_patches/locale/admin_patches.pot -d admin_patches/locale @pybabel extract magicked_admin -o magicked_admin/locale/magicked_admin.pot + @pybabel init -l es_ES -i magicked_admin/locale/magicked_admin.pot -d magicked_admin/locale clean: -@rm -rf bin From 4e996485e663b1e5b2034c4baa460fe325dce263 Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 5 Oct 2019 16:00:34 +0100 Subject: [PATCH 60/61] Move locale --- {admin_patches/locale => locale}/admin_patches.pot | 2 +- .../messages.po => locale/es_ES/admin_patches.po | 4 ++-- .../messages.po => locale/es_ES/magicked_admin.po | 4 ++-- {magicked_admin/locale => locale}/magicked_admin.pot | 2 +- makefile | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) rename {admin_patches/locale => locale}/admin_patches.pot (97%) rename admin_patches/locale/es_ES/LC_MESSAGES/messages.po => locale/es_ES/admin_patches.po (95%) rename magicked_admin/locale/es_ES/LC_MESSAGES/messages.po => locale/es_ES/magicked_admin.po (86%) rename {magicked_admin/locale => locale}/magicked_admin.pot (92%) diff --git a/admin_patches/locale/admin_patches.pot b/locale/admin_patches.pot similarity index 97% rename from admin_patches/locale/admin_patches.pot rename to locale/admin_patches.pot index 1670959d..e172588f 100644 --- a/admin_patches/locale/admin_patches.pot +++ b/locale/admin_patches.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:38+0100\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/admin_patches/locale/es_ES/LC_MESSAGES/messages.po b/locale/es_ES/admin_patches.po similarity index 95% rename from admin_patches/locale/es_ES/LC_MESSAGES/messages.po rename to locale/es_ES/admin_patches.po index d9c8f9c0..ce462c13 100644 --- a/admin_patches/locale/es_ES/LC_MESSAGES/messages.po +++ b/locale/es_ES/admin_patches.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:38+0100\n" -"PO-Revision-Date: 2019-10-05 15:38+0100\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:59+0100\n" "Last-Translator: FULL NAME \n" "Language: es_ES\n" "Language-Team: es_ES \n" diff --git a/magicked_admin/locale/es_ES/LC_MESSAGES/messages.po b/locale/es_ES/magicked_admin.po similarity index 86% rename from magicked_admin/locale/es_ES/LC_MESSAGES/messages.po rename to locale/es_ES/magicked_admin.po index 09841f7c..a375452c 100644 --- a/magicked_admin/locale/es_ES/LC_MESSAGES/messages.po +++ b/locale/es_ES/magicked_admin.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:38+0100\n" -"PO-Revision-Date: 2019-10-05 15:38+0100\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:59+0100\n" "Last-Translator: FULL NAME \n" "Language: es_ES\n" "Language-Team: es_ES \n" diff --git a/magicked_admin/locale/magicked_admin.pot b/locale/magicked_admin.pot similarity index 92% rename from magicked_admin/locale/magicked_admin.pot rename to locale/magicked_admin.pot index bbce266c..774aa88b 100644 --- a/magicked_admin/locale/magicked_admin.pot +++ b/locale/magicked_admin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:38+0100\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/makefile b/makefile index 5ea143e0..9eadecf0 100755 --- a/makefile +++ b/makefile @@ -8,10 +8,10 @@ build: @python3 admin_patches/setup.py build -b bin/admin_patches i18n-init: - @pybabel extract admin_patches -o admin_patches/locale/admin_patches.pot - @pybabel init -l es_ES -i admin_patches/locale/admin_patches.pot -d admin_patches/locale - @pybabel extract magicked_admin -o magicked_admin/locale/magicked_admin.pot - @pybabel init -l es_ES -i magicked_admin/locale/magicked_admin.pot -d magicked_admin/locale + @pybabel extract admin_patches -o locale/admin_patches.pot + @pybabel init -l es_ES -i locale/admin_patches.pot -d locale -o ./locale/es_ES/admin_patches.po + @pybabel extract magicked_admin -o locale/magicked_admin.pot + @pybabel init -l es_ES -i locale/magicked_admin.pot -d locale -o ./locale/es_ES/magicked_admin.po clean: -@rm -rf bin From 7637013cd0a961627884fd0c2f75b1f6e2a5befe Mon Sep 17 00:00:00 2001 From: the_z Date: Sat, 5 Oct 2019 16:04:08 +0100 Subject: [PATCH 61/61] Squashed crowdin work --- .crowdin.yml | 9 + locale/cs_CZ/README.md | 248 ++++++++++++++ locale/cs_CZ/admin_patches.export.po | 84 +++++ locale/cs_CZ/admin_patches.po | 84 +++++ locale/cs_CZ/docs/README.md | 248 ++++++++++++++ locale/cs_CZ/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/cs_CZ/magicked_admin.export.po | 19 ++ locale/da_DK/README.md | 248 ++++++++++++++ locale/da_DK/admin_patches.export.po | 84 +++++ locale/da_DK/admin_patches.po | 84 +++++ locale/da_DK/docs/README.md | 248 ++++++++++++++ locale/da_DK/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/da_DK/magicked_admin.export.po | 19 ++ locale/de_DE/README.md | 248 ++++++++++++++ locale/de_DE/admin_patches.export.po | 84 +++++ locale/de_DE/admin_patches.po | 84 +++++ locale/de_DE/docs/README.md | 248 ++++++++++++++ locale/de_DE/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/de_DE/magicked_admin.export.po | 19 ++ locale/el_GR/README.md | 248 ++++++++++++++ locale/el_GR/admin_patches.export.po | 84 +++++ locale/el_GR/admin_patches.po | 84 +++++ locale/el_GR/docs/README.md | 248 ++++++++++++++ locale/el_GR/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/el_GR/magicked_admin.export.po | 19 ++ locale/es_ES/README.md | 248 ++++++++++++++ locale/es_ES/admin_patches.export.po | 84 +++++ locale/es_ES/admin_patches.po | 32 +- locale/es_ES/docs/README.md | 248 ++++++++++++++ locale/es_ES/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/es_ES/magicked_admin.export.po | 19 ++ locale/fi_FI/README.md | 248 ++++++++++++++ locale/fi_FI/admin_patches.export.po | 84 +++++ locale/fi_FI/admin_patches.po | 84 +++++ locale/fi_FI/docs/README.md | 248 ++++++++++++++ locale/fi_FI/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/fi_FI/magicked_admin.export.po | 19 ++ locale/fr_FR/README.md | 248 ++++++++++++++ locale/fr_FR/admin_patches.export.po | 84 +++++ locale/fr_FR/admin_patches.po | 84 +++++ locale/fr_FR/docs/README.md | 248 ++++++++++++++ locale/fr_FR/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/fr_FR/magicked_admin.export.po | 19 ++ locale/hi_IN/README.md | 248 ++++++++++++++ locale/hi_IN/admin_patches.export.po | 84 +++++ locale/hi_IN/admin_patches.po | 84 +++++ locale/hi_IN/docs/README.md | 248 ++++++++++++++ locale/hi_IN/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/hi_IN/magicked_admin.export.po | 19 ++ locale/hu_HU/README.md | 248 ++++++++++++++ locale/hu_HU/admin_patches.export.po | 84 +++++ locale/hu_HU/admin_patches.po | 84 +++++ locale/hu_HU/docs/README.md | 248 ++++++++++++++ locale/hu_HU/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/hu_HU/magicked_admin.export.po | 19 ++ locale/it_IT/README.md | 248 ++++++++++++++ locale/it_IT/admin_patches.export.po | 84 +++++ locale/it_IT/admin_patches.po | 84 +++++ locale/it_IT/docs/README.md | 248 ++++++++++++++ locale/it_IT/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/it_IT/magicked_admin.export.po | 19 ++ locale/ja_JP/README.md | 248 ++++++++++++++ locale/ja_JP/admin_patches.export.po | 84 +++++ locale/ja_JP/admin_patches.po | 84 +++++ locale/ja_JP/docs/README.md | 248 ++++++++++++++ locale/ja_JP/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/ja_JP/magicked_admin.export.po | 19 ++ locale/ko_KR/README.md | 248 ++++++++++++++ locale/ko_KR/admin_patches.export.po | 84 +++++ locale/ko_KR/admin_patches.po | 84 +++++ locale/ko_KR/docs/README.md | 248 ++++++++++++++ locale/ko_KR/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/ko_KR/magicked_admin.export.po | 19 ++ locale/nl_NL/README.md | 248 ++++++++++++++ locale/nl_NL/admin_patches.export.po | 84 +++++ locale/nl_NL/admin_patches.po | 84 +++++ locale/nl_NL/docs/README.md | 248 ++++++++++++++ locale/nl_NL/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/nl_NL/magicked_admin.export.po | 19 ++ locale/no_NO/README.md | 248 ++++++++++++++ locale/no_NO/admin_patches.export.po | 84 +++++ locale/no_NO/admin_patches.po | 84 +++++ locale/no_NO/docs/README.md | 248 ++++++++++++++ locale/no_NO/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/no_NO/magicked_admin.export.po | 19 ++ locale/pl_PL/README.md | 248 ++++++++++++++ locale/pl_PL/admin_patches.export.po | 84 +++++ locale/pl_PL/admin_patches.po | 84 +++++ locale/pl_PL/docs/README.md | 248 ++++++++++++++ locale/pl_PL/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/pl_PL/magicked_admin.export.po | 19 ++ locale/pt_BR/README.md | 248 ++++++++++++++ locale/pt_BR/admin_patches.export.po | 84 +++++ locale/pt_BR/admin_patches.po | 84 +++++ locale/pt_BR/docs/README.md | 248 ++++++++++++++ locale/pt_BR/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/pt_BR/magicked_admin.export.po | 19 ++ locale/pt_PT/README.md | 248 ++++++++++++++ locale/pt_PT/admin_patches.export.po | 84 +++++ locale/pt_PT/admin_patches.po | 84 +++++ locale/pt_PT/docs/README.md | 248 ++++++++++++++ locale/pt_PT/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/pt_PT/magicked_admin.export.po | 19 ++ locale/ro_RO/README.md | 248 ++++++++++++++ locale/ro_RO/admin_patches.export.po | 84 +++++ locale/ro_RO/admin_patches.po | 84 +++++ locale/ro_RO/docs/README.md | 248 ++++++++++++++ locale/ro_RO/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/ro_RO/magicked_admin.export.po | 19 ++ locale/ru_RU/README.md | 248 ++++++++++++++ locale/ru_RU/admin_patches.export.po | 84 +++++ locale/ru_RU/admin_patches.po | 84 +++++ locale/ru_RU/docs/README.md | 248 ++++++++++++++ locale/ru_RU/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/ru_RU/magicked_admin.export.po | 19 ++ locale/sv_SE/README.md | 248 ++++++++++++++ locale/sv_SE/admin_patches.export.po | 84 +++++ locale/sv_SE/admin_patches.po | 84 +++++ locale/sv_SE/docs/README.md | 248 ++++++++++++++ locale/sv_SE/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/sv_SE/magicked_admin.export.po | 19 ++ locale/uk_UA/README.md | 248 ++++++++++++++ locale/uk_UA/admin_patches.export.po | 84 +++++ locale/uk_UA/admin_patches.po | 84 +++++ locale/uk_UA/docs/README.md | 248 ++++++++++++++ locale/uk_UA/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/uk_UA/magicked_admin.export.po | 19 ++ locale/vi_VN/README.md | 248 ++++++++++++++ locale/vi_VN/admin_patches.export.po | 84 +++++ locale/vi_VN/admin_patches.po | 84 +++++ locale/vi_VN/docs/README.md | 248 ++++++++++++++ locale/vi_VN/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/vi_VN/magicked_admin.export.po | 19 ++ locale/zh_CN/README.md | 248 ++++++++++++++ locale/zh_CN/admin_patches.export.po | 84 +++++ locale/zh_CN/admin_patches.po | 84 +++++ locale/zh_CN/docs/README.md | 248 ++++++++++++++ locale/zh_CN/docs/steam_guide.txt | 453 ++++++++++++++++++++++++++ locale/zh_CN/magicked_admin.export.po | 19 ++ 139 files changed, 26067 insertions(+), 18 deletions(-) create mode 100644 .crowdin.yml create mode 100644 locale/cs_CZ/README.md create mode 100644 locale/cs_CZ/admin_patches.export.po create mode 100644 locale/cs_CZ/admin_patches.po create mode 100644 locale/cs_CZ/docs/README.md create mode 100644 locale/cs_CZ/docs/steam_guide.txt create mode 100644 locale/cs_CZ/magicked_admin.export.po create mode 100644 locale/da_DK/README.md create mode 100644 locale/da_DK/admin_patches.export.po create mode 100644 locale/da_DK/admin_patches.po create mode 100644 locale/da_DK/docs/README.md create mode 100644 locale/da_DK/docs/steam_guide.txt create mode 100644 locale/da_DK/magicked_admin.export.po create mode 100644 locale/de_DE/README.md create mode 100644 locale/de_DE/admin_patches.export.po create mode 100644 locale/de_DE/admin_patches.po create mode 100644 locale/de_DE/docs/README.md create mode 100644 locale/de_DE/docs/steam_guide.txt create mode 100644 locale/de_DE/magicked_admin.export.po create mode 100644 locale/el_GR/README.md create mode 100644 locale/el_GR/admin_patches.export.po create mode 100644 locale/el_GR/admin_patches.po create mode 100644 locale/el_GR/docs/README.md create mode 100644 locale/el_GR/docs/steam_guide.txt create mode 100644 locale/el_GR/magicked_admin.export.po create mode 100644 locale/es_ES/README.md create mode 100644 locale/es_ES/admin_patches.export.po create mode 100644 locale/es_ES/docs/README.md create mode 100644 locale/es_ES/docs/steam_guide.txt create mode 100644 locale/es_ES/magicked_admin.export.po create mode 100644 locale/fi_FI/README.md create mode 100644 locale/fi_FI/admin_patches.export.po create mode 100644 locale/fi_FI/admin_patches.po create mode 100644 locale/fi_FI/docs/README.md create mode 100644 locale/fi_FI/docs/steam_guide.txt create mode 100644 locale/fi_FI/magicked_admin.export.po create mode 100644 locale/fr_FR/README.md create mode 100644 locale/fr_FR/admin_patches.export.po create mode 100644 locale/fr_FR/admin_patches.po create mode 100644 locale/fr_FR/docs/README.md create mode 100644 locale/fr_FR/docs/steam_guide.txt create mode 100644 locale/fr_FR/magicked_admin.export.po create mode 100644 locale/hi_IN/README.md create mode 100644 locale/hi_IN/admin_patches.export.po create mode 100644 locale/hi_IN/admin_patches.po create mode 100644 locale/hi_IN/docs/README.md create mode 100644 locale/hi_IN/docs/steam_guide.txt create mode 100644 locale/hi_IN/magicked_admin.export.po create mode 100644 locale/hu_HU/README.md create mode 100644 locale/hu_HU/admin_patches.export.po create mode 100644 locale/hu_HU/admin_patches.po create mode 100644 locale/hu_HU/docs/README.md create mode 100644 locale/hu_HU/docs/steam_guide.txt create mode 100644 locale/hu_HU/magicked_admin.export.po create mode 100644 locale/it_IT/README.md create mode 100644 locale/it_IT/admin_patches.export.po create mode 100644 locale/it_IT/admin_patches.po create mode 100644 locale/it_IT/docs/README.md create mode 100644 locale/it_IT/docs/steam_guide.txt create mode 100644 locale/it_IT/magicked_admin.export.po create mode 100644 locale/ja_JP/README.md create mode 100644 locale/ja_JP/admin_patches.export.po create mode 100644 locale/ja_JP/admin_patches.po create mode 100644 locale/ja_JP/docs/README.md create mode 100644 locale/ja_JP/docs/steam_guide.txt create mode 100644 locale/ja_JP/magicked_admin.export.po create mode 100644 locale/ko_KR/README.md create mode 100644 locale/ko_KR/admin_patches.export.po create mode 100644 locale/ko_KR/admin_patches.po create mode 100644 locale/ko_KR/docs/README.md create mode 100644 locale/ko_KR/docs/steam_guide.txt create mode 100644 locale/ko_KR/magicked_admin.export.po create mode 100644 locale/nl_NL/README.md create mode 100644 locale/nl_NL/admin_patches.export.po create mode 100644 locale/nl_NL/admin_patches.po create mode 100644 locale/nl_NL/docs/README.md create mode 100644 locale/nl_NL/docs/steam_guide.txt create mode 100644 locale/nl_NL/magicked_admin.export.po create mode 100644 locale/no_NO/README.md create mode 100644 locale/no_NO/admin_patches.export.po create mode 100644 locale/no_NO/admin_patches.po create mode 100644 locale/no_NO/docs/README.md create mode 100644 locale/no_NO/docs/steam_guide.txt create mode 100644 locale/no_NO/magicked_admin.export.po create mode 100644 locale/pl_PL/README.md create mode 100644 locale/pl_PL/admin_patches.export.po create mode 100644 locale/pl_PL/admin_patches.po create mode 100644 locale/pl_PL/docs/README.md create mode 100644 locale/pl_PL/docs/steam_guide.txt create mode 100644 locale/pl_PL/magicked_admin.export.po create mode 100644 locale/pt_BR/README.md create mode 100644 locale/pt_BR/admin_patches.export.po create mode 100644 locale/pt_BR/admin_patches.po create mode 100644 locale/pt_BR/docs/README.md create mode 100644 locale/pt_BR/docs/steam_guide.txt create mode 100644 locale/pt_BR/magicked_admin.export.po create mode 100644 locale/pt_PT/README.md create mode 100644 locale/pt_PT/admin_patches.export.po create mode 100644 locale/pt_PT/admin_patches.po create mode 100644 locale/pt_PT/docs/README.md create mode 100644 locale/pt_PT/docs/steam_guide.txt create mode 100644 locale/pt_PT/magicked_admin.export.po create mode 100644 locale/ro_RO/README.md create mode 100644 locale/ro_RO/admin_patches.export.po create mode 100644 locale/ro_RO/admin_patches.po create mode 100644 locale/ro_RO/docs/README.md create mode 100644 locale/ro_RO/docs/steam_guide.txt create mode 100644 locale/ro_RO/magicked_admin.export.po create mode 100644 locale/ru_RU/README.md create mode 100644 locale/ru_RU/admin_patches.export.po create mode 100644 locale/ru_RU/admin_patches.po create mode 100644 locale/ru_RU/docs/README.md create mode 100644 locale/ru_RU/docs/steam_guide.txt create mode 100644 locale/ru_RU/magicked_admin.export.po create mode 100644 locale/sv_SE/README.md create mode 100644 locale/sv_SE/admin_patches.export.po create mode 100644 locale/sv_SE/admin_patches.po create mode 100644 locale/sv_SE/docs/README.md create mode 100644 locale/sv_SE/docs/steam_guide.txt create mode 100644 locale/sv_SE/magicked_admin.export.po create mode 100644 locale/uk_UA/README.md create mode 100644 locale/uk_UA/admin_patches.export.po create mode 100644 locale/uk_UA/admin_patches.po create mode 100644 locale/uk_UA/docs/README.md create mode 100644 locale/uk_UA/docs/steam_guide.txt create mode 100644 locale/uk_UA/magicked_admin.export.po create mode 100644 locale/vi_VN/README.md create mode 100644 locale/vi_VN/admin_patches.export.po create mode 100644 locale/vi_VN/admin_patches.po create mode 100644 locale/vi_VN/docs/README.md create mode 100644 locale/vi_VN/docs/steam_guide.txt create mode 100644 locale/vi_VN/magicked_admin.export.po create mode 100644 locale/zh_CN/README.md create mode 100644 locale/zh_CN/admin_patches.export.po create mode 100644 locale/zh_CN/admin_patches.po create mode 100644 locale/zh_CN/docs/README.md create mode 100644 locale/zh_CN/docs/steam_guide.txt create mode 100644 locale/zh_CN/magicked_admin.export.po diff --git a/.crowdin.yml b/.crowdin.yml new file mode 100644 index 00000000..65c10a61 --- /dev/null +++ b/.crowdin.yml @@ -0,0 +1,9 @@ +files: + - source: /locale/*/admin_patches.po + translation: /locale/%locale_with_underscore%/admin_patches.export.po + - source: /locale/*/magicked_admin.po + translation: /locale/%locale_with_underscore%/magicked_admin.export.po + - source: /docs/steam_guide.txt + translation: /locale/%locale_with_underscore%/docs/steam_guide.txt + - source: README.md + translation: /locale/%locale_with_underscore%/docs/README.md diff --git a/locale/cs_CZ/README.md b/locale/cs_CZ/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/cs_CZ/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/cs_CZ/admin_patches.export.po b/locale/cs_CZ/admin_patches.export.po new file mode 100644 index 00000000..a567dcff --- /dev/null +++ b/locale/cs_CZ/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: cs_CZ\n" +"Language-Team: Czech\n" +"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: cs\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/cs_CZ/admin_patches.po b/locale/cs_CZ/admin_patches.po new file mode 100644 index 00000000..77d583b8 --- /dev/null +++ b/locale/cs_CZ/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: cs_CZ\n" +"Language-Team: Czech\n" +"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: cs\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/cs_CZ/docs/README.md b/locale/cs_CZ/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/cs_CZ/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/cs_CZ/docs/steam_guide.txt b/locale/cs_CZ/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/cs_CZ/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/cs_CZ/magicked_admin.export.po b/locale/cs_CZ/magicked_admin.export.po new file mode 100644 index 00000000..e87049c0 --- /dev/null +++ b/locale/cs_CZ/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: cs_CZ\n" +"Language-Team: Czech\n" +"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: cs\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/da_DK/README.md b/locale/da_DK/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/da_DK/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/da_DK/admin_patches.export.po b/locale/da_DK/admin_patches.export.po new file mode 100644 index 00000000..58349cd6 --- /dev/null +++ b/locale/da_DK/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: da_DK\n" +"Language-Team: Danish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: da\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/da_DK/admin_patches.po b/locale/da_DK/admin_patches.po new file mode 100644 index 00000000..26484677 --- /dev/null +++ b/locale/da_DK/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: da_DK\n" +"Language-Team: Danish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: da\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/da_DK/docs/README.md b/locale/da_DK/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/da_DK/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/da_DK/docs/steam_guide.txt b/locale/da_DK/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/da_DK/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/da_DK/magicked_admin.export.po b/locale/da_DK/magicked_admin.export.po new file mode 100644 index 00000000..7186c546 --- /dev/null +++ b/locale/da_DK/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: da_DK\n" +"Language-Team: Danish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: da\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/de_DE/README.md b/locale/de_DE/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/de_DE/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/de_DE/admin_patches.export.po b/locale/de_DE/admin_patches.export.po new file mode 100644 index 00000000..96ffefa8 --- /dev/null +++ b/locale/de_DE/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: de_DE\n" +"Language-Team: German\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: de\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/de_DE/admin_patches.po b/locale/de_DE/admin_patches.po new file mode 100644 index 00000000..e945d044 --- /dev/null +++ b/locale/de_DE/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: de_DE\n" +"Language-Team: German\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: de\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/de_DE/docs/README.md b/locale/de_DE/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/de_DE/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/de_DE/docs/steam_guide.txt b/locale/de_DE/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/de_DE/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/de_DE/magicked_admin.export.po b/locale/de_DE/magicked_admin.export.po new file mode 100644 index 00000000..cacde6c5 --- /dev/null +++ b/locale/de_DE/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: de_DE\n" +"Language-Team: German\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: de\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/el_GR/README.md b/locale/el_GR/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/el_GR/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/el_GR/admin_patches.export.po b/locale/el_GR/admin_patches.export.po new file mode 100644 index 00000000..e2052386 --- /dev/null +++ b/locale/el_GR/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: el_GR\n" +"Language-Team: Greek\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: el\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/el_GR/admin_patches.po b/locale/el_GR/admin_patches.po new file mode 100644 index 00000000..e426e21c --- /dev/null +++ b/locale/el_GR/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: el_GR\n" +"Language-Team: Greek\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: el\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/el_GR/docs/README.md b/locale/el_GR/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/el_GR/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/el_GR/docs/steam_guide.txt b/locale/el_GR/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/el_GR/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/el_GR/magicked_admin.export.po b/locale/el_GR/magicked_admin.export.po new file mode 100644 index 00000000..03204ce7 --- /dev/null +++ b/locale/el_GR/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: el_GR\n" +"Language-Team: Greek\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: el\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/es_ES/README.md b/locale/es_ES/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/es_ES/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/es_ES/admin_patches.export.po b/locale/es_ES/admin_patches.export.po new file mode 100644 index 00000000..16f1f4dc --- /dev/null +++ b/locale/es_ES/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: es_ES\n" +"Language-Team: Spanish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: es-ES\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/es_ES/admin_patches.po b/locale/es_ES/admin_patches.po index ce462c13..001c1f78 100644 --- a/locale/es_ES/admin_patches.po +++ b/locale/es_ES/admin_patches.po @@ -1,22 +1,21 @@ -# Spanish (Spain) translations for PROJECT. -# Copyright (C) 2019 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2019. -# msgid "" msgstr "" -"Project-Id-Version: PROJECT VERSION\n" +"Project-Id-Version: kf2-magicked-admin\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-10-05 15:59+0100\n" -"PO-Revision-Date: 2019-10-05 15:59+0100\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" "Language: es_ES\n" -"Language-Team: es_ES \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Language-Team: Spanish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: es-ES\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" #: admin_patches/admin_patches.py:13 msgid "Killing Floor 2 Admin Patches" @@ -43,8 +42,7 @@ msgid "User cancelled installation" msgstr "" #: admin_patches/admin_patches.py:54 -msgid "" -"Killing Floor 2 server not found in path:\n" +msgid "Killing Floor 2 server not found in path:\n" "\t{}" msgstr "" @@ -53,8 +51,7 @@ msgid "Validating files..." msgstr "" #: admin_patches/admin_patches.py:60 -msgid "" -"Server file validation failed, possible reasons:\n" +msgid "Server file validation failed, possible reasons:\n" "\t - Game update\n" "\t - User mods\n" "\t - Patches already applied" @@ -73,8 +70,7 @@ msgid "Patches installed successfully!\n" msgstr "" #: admin_patches/utils/__init__.py:18 -msgid "" -"\n" +msgid "\n" "Press enter to exit..." msgstr "" diff --git a/locale/es_ES/docs/README.md b/locale/es_ES/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/es_ES/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/es_ES/docs/steam_guide.txt b/locale/es_ES/docs/steam_guide.txt new file mode 100644 index 00000000..6431e6b0 --- /dev/null +++ b/locale/es_ES/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Admin Magicked - Herramienta de servidor Dedicada [0.1.4] + +Administración, estadísticas y bot de scripts para servidores clasificados de Killing Floor 2. Proporciona comandos en el juego, seguimiento de estadísticas y clasificación de los jugadores, tablero de puntuación y estadísticas de pantalla de bienvenida en vivo, saludo y funciones de administración. Ejecutando enteramente a través del administrador web, no afecta el estado de un servidor de clasificatoria/personalizado. Puede ejecutarse directamente en el servidor o remotamente, y administrar múltiples servidores a la vez. +[list] +[*]Presenta tabla de clasificación en tiempo real en su pantalla de bienvenida y en el chat en el juego. +[*]Estadísticas del jugador de registro incluyendo: matanzas, dinero(DOSH), muertes y tiempo de juego. +[*]Una variedad de comandos administrativos en el juego +[*]Una variedad de comandos en el juego para jugadores +[*]Envía automáticamente comandos basados en: tiempo, oleadas, bienvenidas al servidor o en el trader. +[*]Leer mensajes de jugador desde tu escritorio +[/list] + +[b]Notas[/b] +[list] +[*]KF2 Magicked Admin [b]no[/b] altera el estado de los servidores clasificados o personalizados. +[*]KF2 Magicked Admin trabaja con modos de juego semanales, de supervivencia y sin fin. +[*]KF2 Magicked Admin puede administrar varios servidores en una sola instancia +[/list] + +Si tienes alguna opinión para el administrador de Magicked KF2, o esta guía, háganoslo saber. +Por favor, califique y prefiera la guía si la encuentra útil. + +Si necesitas ayuda en cualquier lugar, agregarme a Steam, y haré todo lo que esté en mi mano para ayudarles. + +Gracias. + +## Descargas +La última versión de la escritura es '[b]0.1.4[/b]', liberada el 29 de septiembre de 2019. Se proporciona un ejecutable de Windows para esta versión [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]aquí[/url]. + +Para Linux y Mac OS se recomienda ejecutar el programa desde fuentes Python ya que probablemente ya lo tengas instalado. La fuente para '[b].1.4[/b]' está disponible [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]aquí[/url]. Sólo necesitas instalar los requisitos con '[b]pip3 install -r requirements.txt[/b]' y ejecutarlo con '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Las versiones de desarrollo y las instrucciones de construcción están disponibles en GitHub [url=https://github.com/th3-z/kf2-magicked-admin]aquí[/url]. + +[b]Nota[/b]: Si quieres usar el Administrador Magicked en un servidor de modo Sin Fin o semanal, hay un paso extra que tienes que hacer, lo mencionaré en el "Soporte de modo juego sin fin y semanal". + +[h1]Ejecutando[/h1] +[olist] +[*]Extraer '[b]kf2-magicked-admin-0.1.4.zip[/b]' en cualquier lugar que te guste. + +[*]Haga doble clic en el archivo ejecutable + +[*]Será guiado a través de la primera configuración + +[b]Nota[/b]: Si desea volver a ejecutar la primera configuración, simplemente elimine el archivo '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Ejecutando con Docker[/h1] + +También está disponible una imagen Docker. Ejecutar con Docker es fácil, sólo emite el siguiente comando. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +Necesitarás cambiar '[b][/b]' a donde quieras guardar tu carpeta de configuración. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' es una elección popular para sistemas que ejecutan Unraid. + +Después de que este comando se ejecute el contenedor se cerrará y los registros le dirán que configurará el archivo de configuración. Vaya a su archivo '[b]conf[/b]' y configure las cosas, luego ejecute el contenedor de nuevo y estará listo para seguir! + +## Comandos +En las siguientes secciones describiré todos los comandos. Sin embargo, hay algunas cosas generales que hay que señalar que se aplican a todos ellos. + +Cuando introduzcas comandos en el chat, deben ser prefijados con '[b]![/b]'. Cuando escribas comandos en un script, o encadenarlos el simbolo '[b]![/b]' debe ser omitido. + +Muchos comandos buscarán coincidencias más cercanas a sus parámetros. Por ejemplo '[i]biotics[/i]' coincidirá '[i]kf-biotics-lab[/i]' y 'userO' coincidirán '[i]userOne™/@:®[/i]'. + +Todos los comandos tienen texto de ayuda en el juego que se puede acceder con la parámetro '[b]-h'[/b]. +[list] +[*] Ejemplo: '[b]!commands -h'[/b] +[/list] +Todos los comandos también tienen los siguientes parámetros. +[list] +[*] Opción '[b]-q[/b]': Supresiones de salida +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Restableciendo estadísticas +Para [b]restablecer[/b] el marcador todo lo que tienes que hacer es [b]eliminar[/b] el archivo '[b]conf/*.sqlite[/b]' asociado con el nombre del servidor, se creará un nuevo en la próxima vez que inicies el Administrador Magicked KF2. + +Si quería restablecer las estadísticas en '[b]server_four[/b]', eliminaría el archivo '[b]conf/server_four.sqlite[/b]' y reiniciar KF2 Magicked Admin. + +## Características planificadas +[h1]Próxima versión - 0.1.5[/h1] +Las siguientes características están actualmente listadas para la próxima versión. +[list] +[*] Comandos de fecha/hora, i.e. ejecutar un comando en una hora específica del día o la fecha +[*] Registro de sesión de jugador, registros de SteamIDs y marcas de tiempo para sesiones de jugador a un archivo +[*] `!restart` retraso, una cuenta atrás antes de reiniciar la partida +[/list] + +[h1]Futuro[/h1] +[list] +[*] Soporte para traducciones de la comunidad a través de crowdin +[/list] + +Estamos aceptando peticiones de características en el rastreador de problemas [url=https://github.com/th3-z/kf2-magicked-admin/issues][/url]. + +# ¿Errores? +Ninguno conocido como escrito. + +Si encuentra un error, por favor, agregue al gestor de incidencias [url=https://github.com/th3-z/kf2-magicked-admin/issues][/url]si tiene una cuenta de GitHub. + +Si no tienes una cuenta de GitHub, puedes escribirla en los comentarios o mensaje [url=https://steamcommunity.com/id/th3-z]me[/url] en Steam. + +Créditos +KF2 Magicked Admin es software de código abierto (MIT), escrito por the_z (th3-z). +Para código fuente completo (Python+SQLite) y orientación de desarrolladores visite el repositorio [url=github.com/th3-z/kf2-magicked-admin]GitHub.[/url] + +[b]Contribuidores[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Las contribuciones son bienvenidas. diff --git a/locale/es_ES/magicked_admin.export.po b/locale/es_ES/magicked_admin.export.po new file mode 100644 index 00000000..0202d3a5 --- /dev/null +++ b/locale/es_ES/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: es_ES\n" +"Language-Team: Spanish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: es-ES\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/fi_FI/README.md b/locale/fi_FI/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/fi_FI/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/fi_FI/admin_patches.export.po b/locale/fi_FI/admin_patches.export.po new file mode 100644 index 00000000..a215197a --- /dev/null +++ b/locale/fi_FI/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fi_FI\n" +"Language-Team: Finnish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fi\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/fi_FI/admin_patches.po b/locale/fi_FI/admin_patches.po new file mode 100644 index 00000000..ab0e357c --- /dev/null +++ b/locale/fi_FI/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fi_FI\n" +"Language-Team: Finnish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fi\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/fi_FI/docs/README.md b/locale/fi_FI/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/fi_FI/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/fi_FI/docs/steam_guide.txt b/locale/fi_FI/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/fi_FI/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/fi_FI/magicked_admin.export.po b/locale/fi_FI/magicked_admin.export.po new file mode 100644 index 00000000..825482fe --- /dev/null +++ b/locale/fi_FI/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fi_FI\n" +"Language-Team: Finnish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fi\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/fr_FR/README.md b/locale/fr_FR/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/fr_FR/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/fr_FR/admin_patches.export.po b/locale/fr_FR/admin_patches.export.po new file mode 100644 index 00000000..ac685f3b --- /dev/null +++ b/locale/fr_FR/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fr_FR\n" +"Language-Team: French\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fr\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/fr_FR/admin_patches.po b/locale/fr_FR/admin_patches.po new file mode 100644 index 00000000..1f81894b --- /dev/null +++ b/locale/fr_FR/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fr_FR\n" +"Language-Team: French\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fr\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/fr_FR/docs/README.md b/locale/fr_FR/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/fr_FR/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/fr_FR/docs/steam_guide.txt b/locale/fr_FR/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/fr_FR/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/fr_FR/magicked_admin.export.po b/locale/fr_FR/magicked_admin.export.po new file mode 100644 index 00000000..5afff059 --- /dev/null +++ b/locale/fr_FR/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: fr_FR\n" +"Language-Team: French\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: fr\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/hi_IN/README.md b/locale/hi_IN/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/hi_IN/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/hi_IN/admin_patches.export.po b/locale/hi_IN/admin_patches.export.po new file mode 100644 index 00000000..2365bad6 --- /dev/null +++ b/locale/hi_IN/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hi_IN\n" +"Language-Team: Hindi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hi\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/hi_IN/admin_patches.po b/locale/hi_IN/admin_patches.po new file mode 100644 index 00000000..4b9292a9 --- /dev/null +++ b/locale/hi_IN/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hi_IN\n" +"Language-Team: Hindi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hi\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/hi_IN/docs/README.md b/locale/hi_IN/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/hi_IN/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/hi_IN/docs/steam_guide.txt b/locale/hi_IN/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/hi_IN/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/hi_IN/magicked_admin.export.po b/locale/hi_IN/magicked_admin.export.po new file mode 100644 index 00000000..bee6ec34 --- /dev/null +++ b/locale/hi_IN/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hi_IN\n" +"Language-Team: Hindi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hi\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/hu_HU/README.md b/locale/hu_HU/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/hu_HU/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/hu_HU/admin_patches.export.po b/locale/hu_HU/admin_patches.export.po new file mode 100644 index 00000000..c8e81c9c --- /dev/null +++ b/locale/hu_HU/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hu_HU\n" +"Language-Team: Hungarian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hu\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/hu_HU/admin_patches.po b/locale/hu_HU/admin_patches.po new file mode 100644 index 00000000..461438a2 --- /dev/null +++ b/locale/hu_HU/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hu_HU\n" +"Language-Team: Hungarian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hu\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/hu_HU/docs/README.md b/locale/hu_HU/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/hu_HU/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/hu_HU/docs/steam_guide.txt b/locale/hu_HU/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/hu_HU/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/hu_HU/magicked_admin.export.po b/locale/hu_HU/magicked_admin.export.po new file mode 100644 index 00000000..90f466d4 --- /dev/null +++ b/locale/hu_HU/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: hu_HU\n" +"Language-Team: Hungarian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: hu\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/it_IT/README.md b/locale/it_IT/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/it_IT/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/it_IT/admin_patches.export.po b/locale/it_IT/admin_patches.export.po new file mode 100644 index 00000000..70c55279 --- /dev/null +++ b/locale/it_IT/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: it_IT\n" +"Language-Team: Italian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: it\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/it_IT/admin_patches.po b/locale/it_IT/admin_patches.po new file mode 100644 index 00000000..caff6dc4 --- /dev/null +++ b/locale/it_IT/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: it_IT\n" +"Language-Team: Italian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: it\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/it_IT/docs/README.md b/locale/it_IT/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/it_IT/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/it_IT/docs/steam_guide.txt b/locale/it_IT/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/it_IT/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/it_IT/magicked_admin.export.po b/locale/it_IT/magicked_admin.export.po new file mode 100644 index 00000000..c243688d --- /dev/null +++ b/locale/it_IT/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: it_IT\n" +"Language-Team: Italian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: it\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/ja_JP/README.md b/locale/ja_JP/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ja_JP/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ja_JP/admin_patches.export.po b/locale/ja_JP/admin_patches.export.po new file mode 100644 index 00000000..587ebbea --- /dev/null +++ b/locale/ja_JP/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ja_JP\n" +"Language-Team: Japanese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ja\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ja_JP/admin_patches.po b/locale/ja_JP/admin_patches.po new file mode 100644 index 00000000..565e02f0 --- /dev/null +++ b/locale/ja_JP/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ja_JP\n" +"Language-Team: Japanese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ja\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ja_JP/docs/README.md b/locale/ja_JP/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ja_JP/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ja_JP/docs/steam_guide.txt b/locale/ja_JP/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/ja_JP/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/ja_JP/magicked_admin.export.po b/locale/ja_JP/magicked_admin.export.po new file mode 100644 index 00000000..24c5295f --- /dev/null +++ b/locale/ja_JP/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ja_JP\n" +"Language-Team: Japanese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ja\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/ko_KR/README.md b/locale/ko_KR/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ko_KR/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ko_KR/admin_patches.export.po b/locale/ko_KR/admin_patches.export.po new file mode 100644 index 00000000..0c9bd446 --- /dev/null +++ b/locale/ko_KR/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ko_KR\n" +"Language-Team: Korean\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ko\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ko_KR/admin_patches.po b/locale/ko_KR/admin_patches.po new file mode 100644 index 00000000..5cd146e2 --- /dev/null +++ b/locale/ko_KR/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ko_KR\n" +"Language-Team: Korean\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ko\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ko_KR/docs/README.md b/locale/ko_KR/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ko_KR/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ko_KR/docs/steam_guide.txt b/locale/ko_KR/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/ko_KR/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/ko_KR/magicked_admin.export.po b/locale/ko_KR/magicked_admin.export.po new file mode 100644 index 00000000..7b125050 --- /dev/null +++ b/locale/ko_KR/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ko_KR\n" +"Language-Team: Korean\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ko\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/nl_NL/README.md b/locale/nl_NL/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/nl_NL/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/nl_NL/admin_patches.export.po b/locale/nl_NL/admin_patches.export.po new file mode 100644 index 00000000..63606f1f --- /dev/null +++ b/locale/nl_NL/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: nl_NL\n" +"Language-Team: Dutch\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: nl\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/nl_NL/admin_patches.po b/locale/nl_NL/admin_patches.po new file mode 100644 index 00000000..f3d8c474 --- /dev/null +++ b/locale/nl_NL/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:09\n" +"Last-Translator: the_z (th3-z)\n" +"Language: nl_NL\n" +"Language-Team: Dutch\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: nl\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "Testing Dutch" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "Testing Dutch again" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/nl_NL/docs/README.md b/locale/nl_NL/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/nl_NL/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/nl_NL/docs/steam_guide.txt b/locale/nl_NL/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/nl_NL/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/nl_NL/magicked_admin.export.po b/locale/nl_NL/magicked_admin.export.po new file mode 100644 index 00000000..3e372b63 --- /dev/null +++ b/locale/nl_NL/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: nl_NL\n" +"Language-Team: Dutch\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: nl\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/no_NO/README.md b/locale/no_NO/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/no_NO/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/no_NO/admin_patches.export.po b/locale/no_NO/admin_patches.export.po new file mode 100644 index 00000000..127e46f1 --- /dev/null +++ b/locale/no_NO/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: no_NO\n" +"Language-Team: Norwegian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: no\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/no_NO/admin_patches.po b/locale/no_NO/admin_patches.po new file mode 100644 index 00000000..affa2026 --- /dev/null +++ b/locale/no_NO/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: no_NO\n" +"Language-Team: Norwegian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: no\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/no_NO/docs/README.md b/locale/no_NO/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/no_NO/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/no_NO/docs/steam_guide.txt b/locale/no_NO/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/no_NO/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/no_NO/magicked_admin.export.po b/locale/no_NO/magicked_admin.export.po new file mode 100644 index 00000000..0ae6bf09 --- /dev/null +++ b/locale/no_NO/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: no_NO\n" +"Language-Team: Norwegian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: no\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/pl_PL/README.md b/locale/pl_PL/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pl_PL/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pl_PL/admin_patches.export.po b/locale/pl_PL/admin_patches.export.po new file mode 100644 index 00000000..44a7a33e --- /dev/null +++ b/locale/pl_PL/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pl_PL\n" +"Language-Team: Polish\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pl\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pl_PL/admin_patches.po b/locale/pl_PL/admin_patches.po new file mode 100644 index 00000000..df5d88d7 --- /dev/null +++ b/locale/pl_PL/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pl_PL\n" +"Language-Team: Polish\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pl\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pl_PL/docs/README.md b/locale/pl_PL/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pl_PL/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pl_PL/docs/steam_guide.txt b/locale/pl_PL/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/pl_PL/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/pl_PL/magicked_admin.export.po b/locale/pl_PL/magicked_admin.export.po new file mode 100644 index 00000000..868b240d --- /dev/null +++ b/locale/pl_PL/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pl_PL\n" +"Language-Team: Polish\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pl\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/pt_BR/README.md b/locale/pt_BR/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pt_BR/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pt_BR/admin_patches.export.po b/locale/pt_BR/admin_patches.export.po new file mode 100644 index 00000000..e6e7539e --- /dev/null +++ b/locale/pt_BR/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_BR\n" +"Language-Team: Portuguese, Brazilian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-BR\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pt_BR/admin_patches.po b/locale/pt_BR/admin_patches.po new file mode 100644 index 00000000..46c9cf73 --- /dev/null +++ b/locale/pt_BR/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_BR\n" +"Language-Team: Portuguese, Brazilian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-BR\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pt_BR/docs/README.md b/locale/pt_BR/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pt_BR/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pt_BR/docs/steam_guide.txt b/locale/pt_BR/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/pt_BR/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/pt_BR/magicked_admin.export.po b/locale/pt_BR/magicked_admin.export.po new file mode 100644 index 00000000..f16ab1de --- /dev/null +++ b/locale/pt_BR/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_BR\n" +"Language-Team: Portuguese, Brazilian\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-BR\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/pt_PT/README.md b/locale/pt_PT/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pt_PT/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pt_PT/admin_patches.export.po b/locale/pt_PT/admin_patches.export.po new file mode 100644 index 00000000..a6029031 --- /dev/null +++ b/locale/pt_PT/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_PT\n" +"Language-Team: Portuguese\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-PT\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pt_PT/admin_patches.po b/locale/pt_PT/admin_patches.po new file mode 100644 index 00000000..0d1928ef --- /dev/null +++ b/locale/pt_PT/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_PT\n" +"Language-Team: Portuguese\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-PT\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/pt_PT/docs/README.md b/locale/pt_PT/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/pt_PT/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/pt_PT/docs/steam_guide.txt b/locale/pt_PT/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/pt_PT/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/pt_PT/magicked_admin.export.po b/locale/pt_PT/magicked_admin.export.po new file mode 100644 index 00000000..26eb2536 --- /dev/null +++ b/locale/pt_PT/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: pt_PT\n" +"Language-Team: Portuguese\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: pt-PT\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/ro_RO/README.md b/locale/ro_RO/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ro_RO/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ro_RO/admin_patches.export.po b/locale/ro_RO/admin_patches.export.po new file mode 100644 index 00000000..deb37b63 --- /dev/null +++ b/locale/ro_RO/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ro_RO\n" +"Language-Team: Romanian\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>0 && n%100<20)) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ro\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ro_RO/admin_patches.po b/locale/ro_RO/admin_patches.po new file mode 100644 index 00000000..a2c7278e --- /dev/null +++ b/locale/ro_RO/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ro_RO\n" +"Language-Team: Romanian\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>0 && n%100<20)) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ro\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ro_RO/docs/README.md b/locale/ro_RO/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ro_RO/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ro_RO/docs/steam_guide.txt b/locale/ro_RO/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/ro_RO/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/ro_RO/magicked_admin.export.po b/locale/ro_RO/magicked_admin.export.po new file mode 100644 index 00000000..b47355fe --- /dev/null +++ b/locale/ro_RO/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ro_RO\n" +"Language-Team: Romanian\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>0 && n%100<20)) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ro\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/ru_RU/README.md b/locale/ru_RU/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ru_RU/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ru_RU/admin_patches.export.po b/locale/ru_RU/admin_patches.export.po new file mode 100644 index 00000000..4a5fac2a --- /dev/null +++ b/locale/ru_RU/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ru_RU\n" +"Language-Team: Russian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ru\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ru_RU/admin_patches.po b/locale/ru_RU/admin_patches.po new file mode 100644 index 00000000..42e6a6f3 --- /dev/null +++ b/locale/ru_RU/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ru_RU\n" +"Language-Team: Russian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ru\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/ru_RU/docs/README.md b/locale/ru_RU/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/ru_RU/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/ru_RU/docs/steam_guide.txt b/locale/ru_RU/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/ru_RU/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/ru_RU/magicked_admin.export.po b/locale/ru_RU/magicked_admin.export.po new file mode 100644 index 00000000..7cd16b81 --- /dev/null +++ b/locale/ru_RU/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: ru_RU\n" +"Language-Team: Russian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: ru\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/sv_SE/README.md b/locale/sv_SE/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/sv_SE/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/sv_SE/admin_patches.export.po b/locale/sv_SE/admin_patches.export.po new file mode 100644 index 00000000..347fbedf --- /dev/null +++ b/locale/sv_SE/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: sv_SE\n" +"Language-Team: Swedish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: sv-SE\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/sv_SE/admin_patches.po b/locale/sv_SE/admin_patches.po new file mode 100644 index 00000000..7236d78d --- /dev/null +++ b/locale/sv_SE/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: sv_SE\n" +"Language-Team: Swedish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: sv-SE\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/sv_SE/docs/README.md b/locale/sv_SE/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/sv_SE/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/sv_SE/docs/steam_guide.txt b/locale/sv_SE/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/sv_SE/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/sv_SE/magicked_admin.export.po b/locale/sv_SE/magicked_admin.export.po new file mode 100644 index 00000000..880a1329 --- /dev/null +++ b/locale/sv_SE/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: sv_SE\n" +"Language-Team: Swedish\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: sv-SE\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/uk_UA/README.md b/locale/uk_UA/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/uk_UA/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/uk_UA/admin_patches.export.po b/locale/uk_UA/admin_patches.export.po new file mode 100644 index 00000000..92374b24 --- /dev/null +++ b/locale/uk_UA/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: uk_UA\n" +"Language-Team: Ukrainian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: uk\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/uk_UA/admin_patches.po b/locale/uk_UA/admin_patches.po new file mode 100644 index 00000000..1ea14c2c --- /dev/null +++ b/locale/uk_UA/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: uk_UA\n" +"Language-Team: Ukrainian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: uk\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/uk_UA/docs/README.md b/locale/uk_UA/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/uk_UA/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/uk_UA/docs/steam_guide.txt b/locale/uk_UA/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/uk_UA/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/uk_UA/magicked_admin.export.po b/locale/uk_UA/magicked_admin.export.po new file mode 100644 index 00000000..2372f2b0 --- /dev/null +++ b/locale/uk_UA/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: uk_UA\n" +"Language-Team: Ukrainian\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: uk\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/vi_VN/README.md b/locale/vi_VN/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/vi_VN/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/vi_VN/admin_patches.export.po b/locale/vi_VN/admin_patches.export.po new file mode 100644 index 00000000..c9e730b5 --- /dev/null +++ b/locale/vi_VN/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: vi_VN\n" +"Language-Team: Vietnamese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: vi\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/vi_VN/admin_patches.po b/locale/vi_VN/admin_patches.po new file mode 100644 index 00000000..896e7efa --- /dev/null +++ b/locale/vi_VN/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: vi_VN\n" +"Language-Team: Vietnamese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: vi\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/vi_VN/docs/README.md b/locale/vi_VN/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/vi_VN/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/vi_VN/docs/steam_guide.txt b/locale/vi_VN/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/vi_VN/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/vi_VN/magicked_admin.export.po b/locale/vi_VN/magicked_admin.export.po new file mode 100644 index 00000000..a75e290a --- /dev/null +++ b/locale/vi_VN/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:07\n" +"Last-Translator: the_z (th3-z)\n" +"Language: vi_VN\n" +"Language-Team: Vietnamese\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: vi\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" + diff --git a/locale/zh_CN/README.md b/locale/zh_CN/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/zh_CN/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/zh_CN/admin_patches.export.po b/locale/zh_CN/admin_patches.export.po new file mode 100644 index 00000000..533823fe --- /dev/null +++ b/locale/zh_CN/admin_patches.export.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 15:59+0100\n" +"PO-Revision-Date: 2019-10-05 15:27\n" +"Last-Translator: the_z (th3-z)\n" +"Language: zh_CN\n" +"Language-Team: Chinese Simplified\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: zh-CN\n" +"X-Crowdin-File: /i18n/locale/es_ES/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/zh_CN/admin_patches.po b/locale/zh_CN/admin_patches.po new file mode 100644 index 00000000..9cd42003 --- /dev/null +++ b/locale/zh_CN/admin_patches.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: zh_CN\n" +"Language-Team: Chinese Simplified\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: zh-CN\n" +"X-Crowdin-File: /i18n/locale/en_GB/admin_patches.po\n" + +#: admin_patches/admin_patches.py:13 +msgid "Killing Floor 2 Admin Patches" +msgstr "" + +#: admin_patches/admin_patches.py:16 +msgid "Specify server location" +msgstr "" + +#: admin_patches/admin_patches.py:29 +msgid "KFGame/Web/ServerAdmin/current_rules.inc" +msgstr "" + +#: admin_patches/admin_patches.py:39 +msgid "Select Killing Floor 2 server location" +msgstr "" + +#: admin_patches/admin_patches.py:47 +msgid "Please open your server's install folder in the file dialogue" +msgstr "" + +#: admin_patches/admin_patches.py:52 +msgid "User cancelled installation" +msgstr "" + +#: admin_patches/admin_patches.py:54 +msgid "Killing Floor 2 server not found in path:\n" +"\t{}" +msgstr "" + +#: admin_patches/admin_patches.py:57 +msgid "Validating files..." +msgstr "" + +#: admin_patches/admin_patches.py:60 +msgid "Server file validation failed, possible reasons:\n" +"\t - Game update\n" +"\t - User mods\n" +"\t - Patches already applied" +msgstr "" + +#: admin_patches/admin_patches.py:65 +msgid "Patching files..." +msgstr "" + +#: admin_patches/admin_patches.py:69 +msgid "Patching failed" +msgstr "" + +#: admin_patches/admin_patches.py:72 +msgid "Patches installed successfully!\n" +msgstr "" + +#: admin_patches/utils/__init__.py:18 +msgid "\n" +"Press enter to exit..." +msgstr "" + +#: admin_patches/utils/patcher.py:40 +msgid "Applying {}" +msgstr "" + +#: admin_patches/utils/patcher.py:45 +msgid "Patch failed to apply successfully" +msgstr "" + diff --git a/locale/zh_CN/docs/README.md b/locale/zh_CN/docs/README.md new file mode 100644 index 00000000..fd3cee02 --- /dev/null +++ b/locale/zh_CN/docs/README.md @@ -0,0 +1,248 @@ +

+ +

+ +

Killing Floor 2 Magicked Admin

+ +[![Downloads](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg)](https://img.shields.io/github/downloads/th3-z/kf2-magicked-admin/total.svg) [![Build Status](https://travis-ci.com/th3-z/kf2-magicked-admin.svg?branch=master)](https://travis-ci.com/th3-z/kf2-magicked-admin) [![Coverage Status](https://coveralls.io/repos/github/th3-z/kf2-magicked-admin/badge.svg?branch=master)](https://coveralls.io/github/th3-z/kf2-magicked-admin?branch=master) + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live MOTD scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. + +Downloads +--------- + +The most recent stable version is `0.1.4`. Binaries are provided on the releases page for Windows users. Linux and Mac OS users should clone the repo and run from source. + +[Release 0.1.4](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.4) + +
+Old releases + +* [Release 0.1.3](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.3) +* [Release 0.1.2](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.1.2) +* [Release 0.0.7](https://github.com/th3-z/kf-magicked-admin/releases/tag/0.0.7)
+ +Features +-------- + +### Commands + +When inputting commands into the chat they need to be prefixed with `!`. When writting commands into a script, or chaining them this should be omitted. + +Many commands will look for closest matches to their parameters. For example '_biotics_' will match '_kf-biotics-lab_' and '_userO_' will match '_userOne™/@:®_'. + +All commands have in-game help text that can be accessed with the `-h` flag. + +* Example: `!commands -h` + +All commands also have the following flags. + +* `-q` - Suppresses output +* `-p` - Pads output to hide the username line + +Escape sequences as follows are available to format messages. + +* `\n` - Newline + - Example: `!say line 0\nline 1` +* `\t` - Tab + - Example: `!say line 0\n\tline 1 is indented` + +#### Player commands + +Commands that can be executed by any player. + +
+Click to see the 18 player commands! + +* `!commands` - Shows a list of all commands available to players +* `!stats ` - Shows general statistics about a user + - Example: `!stats` Shows stats about yourself + - Example: `!stats the_z` Shows stats about the_z +* `!kills ` - Shows kill statistics about a user + - Example: `!kills` Shows kill stats about yourself + - Example: `!kills the_z` Shows kill stats about the_z +* `!dosh ` - Shows dosh statistics about a user + - Example: `!dosh` Shows dosh stats about yourself + - Example: `!dosh the_z` Shows dosh stats about the_z +* `!map` - Shows statistics about the current map +* `!record_wave` - Shows the highest wave achieved on the current map +* `!top_kills` - Shows the global kills leaderboard +* `!top_dosh` - Shows the global dosh leaderboard +* `!top_time` - Shows the global play time leaderboard +* `!top_wave_kills` - Shows information about who killed the most ZEDs in the current wave. Generally for use with `start_trc` + - Example: `!start_trc top_wave_kills` +* `!top_wave_dosh` - Shwows information about who earned the most dosh in the current wave. Generally for use with `!start_trc` + - Example: `!start_trc top_wave_dosh` +* `!server_kills` - Shows total kills on the server +* `!server_dosh` - Shows total dosh earned on the server +* `!scoreboard` - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias: `!sb` Does the same +* `!game` - Shows information about the current game +* `!maps [--all]` - Shows the current map cycle + - Option `-a`: Show all available maps +* `!player_count` - Shows the player count and max players
+ +#### Admin commands + +Commands that can be ran by server administrators or users authorized with the `!op` command. + +
+Click to see the 24 admin commands! + +* `!op ` - Gives a user administrative rights + - Example: `!op the_z` +* `!deop ` - Revokes a user's administrative rights + - Example: `!deop the_z` +* `!say ` - Echoes a message into chat + - Example: `!say The quick brown fox jumps over the lazy dog` + - Example: `!start_trc say The trader is open` +* `!players` - Shows detailed information about players on the server +* `!kick ` - Kicks `` from the match + - Example: `!kick the_z` +* `!ban ` - Bans `` from the server + - Example: `!ban the_z` + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command +* `!length ` - Change the length to `` next game + - Example: `!length short` +* `!difficulty ` - Change the difficulty to `` next game + - Example: `!difficulty hell` +* `!game_mode ` - Immediately change the game mode to `` + - Example: `!game_mode endless` Changes the game mode to Endless +* `!load_map ` - Immediately change the map to `` + - Example: `!load_map biotics` Changes the map to Biotics Lab +* `!restart` - Immediately restart the current game +* `!password [--set] ` + - Example: `!password on` Enables the game password defined in the config + - Example: `!password off` Disables the game password + - Example: `!password --set somePass` Sets a specific password +* `!start_jc ` - Start a command that runs every time a player joins + - Example: `!start_jc say Welcome %PLR` - Greets a player on join + - Available tokens: `%PLR` - username, `%KLL` - total kills, `%DSH` - total dosh +* `!stop_jc` - Stops all join commands +* `!start_wc [-w ] ` - Start a command that runs on wave `` + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_wc -1 say Welcome to the boss wave` +* `!stop_wc` - Stops all wave commands +* `!start_tc [-r, -t ] ` - Start a command that runs after `` seconds + - Option `-r`: Add to have the command run repeatedly + - Option `-t`: Required, the number of seconds before the command runs + - Example: `!start_tc -rt 600 say Join our Steam group!\n +http://steam.group/` +* `!stop_tc` - Stops all timed commands +* `!start_trc [-w ] ` - Start a commands that runs when the trader opens + - `-w` Wave to run the command on, can be omitted to have the command run every wave + - `-w` Can be negative to count backwards from the boss wave + - Example: `!start_trc top_wave_dosh` - Shows who earned the most dosh every wave when the trader opens +* `!stop_trc` - Stop all commands that run on trader open +* `!silent` - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players +* `!run ` - Executes a script from the `conf/scripts` folder, more information in the scripts section + - Example: `!run example` +* `!marquee ` - Runs a marquee in the chat from the `conf/marquee` folder, _experimental_ + - Example: `!marquee example` +* `!enforce_dosh` - Kicks all players that have more dosh than the `dosh_threshold` configuration option + - Example: `!start_tc 600 enforce_dosh`
+ +### MOTD leaderboard + +Writing a `conf/server_name.motd` file containing pairs of `%PLR` and `%SCR` and enabling the `motd_scoreboard` option will put a live leaderboard in the motd and update it every 5 minutes. + +`%SRV_D` and `%SRV_K` will be replaced by the total dosh and kills on the server respectively. + +The `scoreboard_type` configuration option allows you to change the score metric on the leaderboard. The options for this are: `dosh` or `kills`. + +### Scripts + +Writing a `server_name.init` in the `conf` folder with a series of commands will run the commands in sequence when the bot starts on `server_name`. + +Additional scripts can be written in the `conf/scripts` folder and ran with the `!run` command. There is an example already in there that can be ran with `!run example`. + +* Comments can be added to scripts by prefixing a line with `;`. + +### Webadmin patches + +For gamemodes other than survival to function in full patches have to be applied to the `KFGame/Web/ServerAdmin` folder on the server. For this reason a script is provided in the `admin-patches` folder that will automatically patch your server. + +There is currently no CLI or Windows build for this component. You can run it with `python3 admin-patches/admin-patches.py`. A dialogue box will appear asking you to locate your server. + + +Configuration options +--------------------- + +Basic setup is done on the first run. However this does not cover all of the options KF2-MA can offer. Please see the config file, `conf/magicked_admin.conf`, for more configuration options as some features are disabled by default. + +Each server managed by KF2-MA has a section that looks something like `[server_one]`, followed by several options (`x = y`). Copy and edit the default server section if you want to manage multiple servers. `[server_one]` is the name of the server, this can be changed to whatever you want. + +### Options + +Options can be configured in the config file `conf/magicked_admin.conf`. + +* `address` + - Web address of the server's webadmin panel. Requires scheme and protocol, e.g. `https://0.0.0.0:8080` +* `username` + - Webadmin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. +* `password` + - Webadmin password that matches the username above. +* `game_password` + - Default game password to set when the password is toggled using `!password `. +* `motd_scoreboard` + - Boolean value, enable or disable the MOTD scoreboard feature. Defaults to disabled. +* `scoreboard_type` + - Possible values: `kills`, or `dosh`. Change the type of scores that are displayed in the MOTD scoreboard. +* `dosh_threshold` + - Integer value, configures the `!enforce_dosh` command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to `!enforce_dosh`. + +Running with Docker +--------------------------- + +Running with docker is easy. Just issue this command: +``` + docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin +``` +You will need to change `` to wheverever you want to store your config folder. `/mnt/user/appdata/kf2-magicked-admin` is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your `conf` folder and set things up then run the container again and you are good to go! + +Running from Python sources +--------------------------- + +Before contributing code you will need to install the Python requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. Install the following packages. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Python 3 dependencies - `pip3 install -r requirements.txt` + - This might complain about cx_freeze not installing if you haven't got zlib-dev, but cx_freeze is only needed for building. + +### Running +`git clone git@github.com:th3-z/kf2-magicked-admin.git` + +`cd kf2-magicked-admin` + +`pip3 install -r requirements.txt` + +`python3 -O magicked_admin/magicked_admin.py` + +The `-O` flag runs the program in release mode, remove it to run KF2-MA in debug mode. Debug mode will enable more detailed output. + +Building +-------- + +You can build a binary release for distribution with `make` after installing both the run and build requirements. + +### Requirements +Examples work on Debian 10 and Ubuntu Xenial, may differ for other operating systems. + +* Python 3.7 - `apt install python3` +* Pip - `apt install python3-pip` +* Pip dependencies - `pip3 install -r requirements.txt` +* Make - `apt install make` +* zlib-dev - `apt install zlib1g-dev` + +### Windows users +You can build the program without make by running `setup.py`. + +* `python3 setup.py build` + diff --git a/locale/zh_CN/docs/steam_guide.txt b/locale/zh_CN/docs/steam_guide.txt new file mode 100644 index 00000000..13858bba --- /dev/null +++ b/locale/zh_CN/docs/steam_guide.txt @@ -0,0 +1,453 @@ +# KF2 Magicked Admin - Dedicated Server Tool [0.1.4] + +Scripted management, statistics, and bot for ranked Killing Floor 2 servers. Provides in-game commands, player stat tracking and ranking, live welcome screen scoreboard and stats, greeter, and admin functions. Running entirely through the web admin, it does not affect a server's ranked/custom status. It can be ran either directly on the server or remotely, and manage multiple servers at once. +[list] +[*]Present real-time leaderboards in your welcome screen and in-game chat +[*]Record player statistics including: kills, dosh, deaths and play time +[*]A variety of in-game administrative commands +[*]A variety of in-game commands for players +[*]Automatically issue commands based on: time, wave, joins, or trader state +[*]Read player messages from your desktop +[/list] + +[b]Notes[/b] +[list] +[*]KF2 Magicked Admin will [b]not[/b] alter the servers ranked or custom status. +[*]KF2 Magicked Admin works with weekly, survival, and endless game modes. +[*]KF2 Magicked Admin can manage multiple servers in a single instance +[/list] + +If you have any feedback for KF2 Magicked Administrator, or this guide, let me know. +Please rate and favourite the guide if you found it useful. + +If you need some help anywhere, add me on steam, and I will do my best to help you. + +Thanks. + +## Downloads +The latest version as of writing is '[b]0.1.4[/b]', released on the 29th of September 2019. A Windows executable is provided for this release [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-magicked-admin-0.1.4.zip]here[/url]. + +For Linux and Mac OS it is recommended to run the program from Python sources since you likely already have it installed. The source for '[b]0.1.4[/b]' is available [url=https://github.com/th3-z/kf2-magicked-admin/archive/0.1.4.zip]here[/url]. You just need to install the requirements with '[b]pip3 install -r requirements.txt[/b]' and run it with '[b]python3 -O magicked_admin/magicked_admin.py[/b]'. + +Development versions and build instructions are available on GitHub [url=https://github.com/th3-z/kf2-magicked-admin]here[/url]. + +[b]Note[/b]: If you want to use Magicked Admin on an endless or weekly mode server there is an extra step that you have to do which I talk about in the "Endless and weekly game mode support" section. + +[h1]Running[/h1] +[olist] +[*]Extract '[b]kf2-magicked-admin-0.1.4.zip[/b]' anywhere you like. + +[*]Double click the executable file + +[*]You will be guided through the first time setup + +[b]Note[/b]: If you want to re-run the first time setup, just delete the file '[b]conf/magicked_admin.conf[/b]' +[/olist] + +[h1]Running with Docker[/h1] + +A Docker image is also available. Running with docker is easy, just issue the following command. +[code]docker run -it -p 1880:1880 --name kf2-magicked-admin -v '':'/magicked_admin/conf' th3z/kf2-magicked-admin[/code] + +You will need to change '[b][/b]' to wherever you want to store your config folder. '[b]/mnt/user/appdata/kf2-magicked-admin[/b]' is a popular choice for systems running Unraid. + +After this command runs the container will exit out and the logs will tell you to setup the config file. Go to your '[b]conf[/b]' folder and set things up, then run the container again and you are good to go! + +## Commands +In the following sections I will describe all the commands. However there are some general things to note that apply to them all. + +When inputting commands into the chat they need to be prefixed with '[b]![/b]'. When writing commands into a script, or chaining them the '[b]![/b]' should be omitted. + +Many commands will look for closest matches to their parameters. For example '[i]biotics[/i]' will match '[i]kf-biotics-lab[/i]' and 'userO' will match '[i]userOne™/@:®[/i]'. + +All commands have in-game help text that can be accessed with the '[b]-h'[/b] flag. +[list] +[*] Example: '[b]!commands -h'[/b] +[/list] +All commands also have the following flags. +[list] +[*] Option '[b]-q[/b]': Suppresses output +[*] Option '[b]-p[/b]': Pads output to hide the username line +[/list] +Escape sequences as follows are available to format messages. +[list] +[*] '[b]\n[/b]' - Newline + - Example: '[b]!say line 0 \n line 1[/b]' +[*] '[b]\t[/b]' - Tab + - Example: '[b]!say line 0 \n\t line 1 is indented 1 tabstop[/b]' +[/list] + +## Player commands +These commands can be executed by any player. As of writing there are 18 player commands available. +[list] +[*] '[b]!commands[/b]' - Shows a list of all commands available to players + +[*] '[b]!stats [/b]' - Shows general statistics about a user + - Example: '[b]!stats[/b]' Shows stats about yourself + - Example: '[b]!stats the_z[/b]' Shows stats about the_z + +[*] '[b]!kills [/b]' - Shows kill statistics about a user + - Example: '[b]!kills[/b]' Shows kill stats about yourself + - Example: '[b]!kills the_z[/b]' Shows kill stats about the_z + +[*] '[b]!dosh [/b]' - Shows dosh statistics about a user + - Example: '[b]!dosh[/b]' Shows dosh stats about yourself + - Example: '[b]!dosh the_z[/b]' Shows dosh stats about the_z + +[*] '[b]!map[/b]' - Shows statistics about the current map + +[*] '[b]!record_wave[/b]' - Shows the highest wave achieved on the current map + +[*] '[b]!top_kills[/b]' - Shows the global kills leaderboard + +[*] '[b]!top_dosh[/b]' - Shows the global dosh leaderboard + +[*] '[b]!top_time[/b]' - Shows the global play time leaderboard + +[*] '[b]!top_wave_kills[/b]' - Shows information about who killed the most ZEDs in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_kills[/b]' + +[*] '[b]!top_wave_dosh[/b]' - Shows information about who earned the most dosh in the current wave. Generally for use with '[b]!start_trc[/b]' + - Example: '[b]!start_trc top_wave_dosh[/b]' + +[*] '[b]!server_kills[/b]' - Shows total kills on the server + +[*] '[b]!server_dosh[/b]' - Shows total dosh earned on the server + +[*] '[b]!scoreboard[/b]' - Shows the complete player scoreboard, useful on servers with >6 max players + - Alias '[b]!sb[/b]': Does the same + +[*] '[b]!game[/b]' - Shows information about the current game + +[*] '[b]!maps[/b]' - Shows the current map cycle + - Option '[b]-a[/b]': Shows all available maps + - Example: '[b]!maps -a[/b]' + +[*] '[b]!player_count[/b]' - Shows the player count and max players +[/list] + +## Administrator commands +Commands that can be ran by server administrators, and users authorized with the '[b]!op[/b]' command. As of writing there are 24 administrator commands available. +[list] +[*] '[b]!op [/b]' - Gives a user administrative rights, persists until '[b]!deop [/b]' is used. + - Example: '[b]!op the_z[/b]' + +[*] '[b]!deop [/b]' - Revokes a user's administrative rights + - Example: '[b]!deop the_z[/b]' + +[*] '[b]!say [/b]' - Echoes a message into chat + - Example: '[b]!say The quick brown fox jumps over the lazy dog[/b]' + - Example: '[b]!start_trc say The trader is open[/b]' + +[*] '[b]!players[/b]' - Shows detailed information about players on the server + +[*] '[b]!kick [/b]' - Kicks '' from the match + [b]-[/b] Example: '[b]!kick the_z[/b]' + +[*] '[b]!ban [/b]' - Bans '' from the server + - Example: '[b]!ban the_z[/b]' + - Warnng: The web admin currently has a bug that causes bans to persist after they are deleted, thus there is no unban command + +[*] '[b]!length [/b]' - Change the length to '' next game + - Example: '[b]!length short[/b]' + +[*] '[b]!difficulty [/b]' - Change the difficulty to '' next game + - Example: '[b]!difficulty hell[/b]' + +[*] '[b]!game_mode [/b]' - Immediately change the game mode to '' + - Example: '[b]!game_mode endless[/b]' Changes the game mode to Endless + +[*] '[b]!load_map [/b]' - Immediately change the map to '' + - Example: '[b]!load_map biotics[/b]' Changes the map to Biotics Lab + +[*] '[b]!restart[/b]' - Immediately restart the current game + +[*] '[b]!password [--set] [/b]' + - Example: '[b]!password on[/b]' Enables the game password defined in the config + - Example: '[b]!password off[/b]' Disables the game password + - Example: '[b]!password --set superSekritPass[/b]' Sets a specific password + +[*] '[b]!start_jc [/b]' - Start a command that runs every time a player joins + - Example: '[b]!start_jc say Welcome %PLR[/b]' - Greets a player on join + - Available tokens: '[b]%PLR[/b]' - username, '[b]%KLL[/b]' - total kills, '[b]%DSH[/b]' - total dosh + +[*] '[b]!stop_jc[/b]' - Stops all join commands + +[*] '[b]!start_wc [-w ] [/b]' - Start a command that runs on wave '' + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command + run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_wc -1 say Welcome to the boss wave[/b]' + +[*] '[b]!stop_wc[/b]' - Stops all wave commands + +[*] '[b]!start_tc [-r, -t ] [/b]' - Start a command that runs after + '' seconds + - Option '[b]-r[/b]': Add to have the command run repeatedly + - Option '[b]-t[/b]': Required, the number of seconds before the command runs + - Example: '[b]!start_tc -rt 600 say Join our Steam group!\n http://steam.group/[/b]' + +[*] '[b]!stop_tc[/b]' - Stops all timed commands + +[*] '[b]!start_trc [-w ] [/b]' - Start a commands that runs when the trader opens + - Option '[b]-w[/b]': Wave to run the command on, can be omitted to have the command run every wave + - Option '[b]-w[/b]': Can be negative to count backwards from the boss wave + - Example: '[b]!start_trc top_wave_dosh[/b]' - Shows who earned the most dosh every wave when the trader opens + +[*] '[b]!stop_trc[/b]' - Stop all commands that run on trader open + +[*] '[b]!silent[/b]' - Toggles suppression of all chat output, commands still have effect, but the response will not be visible to players + +[*] '[b]!run [/b]' - Executes a script from the 'conf/scripts' folder, more information in the scripts section + - Example: '[b]!run example[/b]' + +[*] '[b]!marquee [/b]' - Runs a marquee in the chat from the '[b]conf/marquee[/b]' folder, [i]experimental[/i] + - Example: '[b]!marquee example[/b]' + +[*] '[b]!enforce_dosh[/b]' - Kicks all players that have more dosh than the 'dosh_threshold' configuration option + - Example: '[b]!start_tc 600 enforce_dosh[/b]' +[/list] + +## Welcome screen leaderboards +Writing a '[b]conf/server_name.motd[/b]' file containing pairs of '[b]%PLR[/b]' and '[b]%SCR[/b]', and enabling the '[b]motd_scoreboard[/b]' option in the config file ('[b]conf/magicked_admin.conf[/b]') will allow you to render live leaderboard on the welcome screen. + +A simple example could be as follows. +[code]Welcome to our server. + +%SRV_K Zeds killed on this server. + +Top Players (total kills): +1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR] +4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR] +7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR] + +Have fun and good luck! +[/code] + +KF2 Magicked Admin will replace '[b]%PLR[/b]' with the player's username, '[b]%SCR[/b]' with the player's total kills or total dosh, '[b]%SRV_K[/b]' with the global server kills, and '[b]%SRV_D[/b]' with the global server dosh. + +The metric for '[b]%SCR[/b]' can be either 'kills', or 'dosh'. This is configured with the '[b]scoreboard_type[/b]' option in '[b]conf/magicked_admin.conf[/b]'. + +Here is my survival suicidal welcome screen as an example of what can be achieved. + +[previewicon=12055995;sizeOriginal,inline;KFGame_2018-04-14_03-27-00.png][/previewicon] + + +[h1]Notes[/h1] +[list] +[*] The leaderboard updates every 5 minutes. +[*] This will overwrite your existing motd. +[/list] + +## Scripts +KF2 Magicked Admin has some rudimentary scripting support which can be used to chain commands into a single action. + +There are two categories of scripts, they differ in when and how they are executed. + +[list] +[*] Comments can be added to scripts by prefixing a line with '[b];[/b]' +[/list] + +[h1]Init scripts[/h1] + +Writing a '[b]server_name.init[/b]' in the '[b]conf[/b]' folder with a series of commands will run the commands in sequence when the bot starts on '[b]server_name[/b]'. The server names are defined in '[b]conf/magicked_admin.conf[/b]', if you haven't changed the name it will default to '[b]server_one[/b]'. + +An example init file will have been generated on first launch, this can be used as a template for writing your own init scripts. + +[h1]Run scripts[/h1] + +The '[b]!run[/b]' command exists to facilitate the running of scripts at any time. These scripts should be placed in the '[b]conf/scripts[/b]' folder. An example script is already in the scripts folder, it can be ran with '[b]!run example[/b]'. + +These scripts are formatted much the same as the init script, the commands will be ran in sequence from top to bottom. + +[h1]Notable examples[/h1] + +Some commands are particularly useful when used in scripts, these are: '[b]!start_tc[/b]', '[b]!start_trc[/b]', '[b]!start_wc[/b]', '[b]!start_jc[/b]', '[b]!top_wave_kills[/b]', '[b]!top_wave_dosh[/b]', '[b]!enforce_dosh[/b]', '[b]!say[/b]'. + +'[b]conf/server_one.init[/b]' - [i]Show who earned the most dosh each wave when the trader opens[/i] +[code] start_trc top_wave_dosh[/code] + +'[b]conf/server_one.init[/b]' - [i]Advertise your Steam group when the boss wave is reached[/i] +[code] start_wc -w -1 say Join our steam group: http://our.steam/group[/code] + +'[b]conf/server_one.init[/b]' - [i]Provide basic bot usage guidance to players[/i] +[code] start_tc -rt 800 say I'm a bot, type !commands to see available commands[/code] + +'[b]conf/scripts/priv_game[/b]' - [i]Setup a private lobby with a single command[/i] +[code]silent -q +password --set superSecretPassword +difficulty hell +length long +load_map biotics +silent -q[/code] + +## Configuration options +Basic setup is done on the first run. However this is only to get you started, it does not cover all of the options KF2 Magicked Admin can offer. Please see the configuration file, '[b]conf/magicked_admin.conf[/b]', for more configuration options as some features are disabled by default. + +Each server managed by KF2 Magicked Admin has a config section that looks something like '[b][server_one][/b]', followed by several options ('[b]x = y[/b]'). Copy the default server section and change the name if you want to manage multiple servers. '[b][server_one][/b]' is the name of the server, this can be changed to whatever you want, but each section should have a unique name. + +[h1]Options[/h1] + +The following options can be configured in the config file '[b]conf/magicked_admin.conf[/b]'. +[list] +[*] '[b]address[/b]' - Web address of the server's web admin panel. Requires scheme and protocol + - Example: '[b]address=https://0.0.0.0:8080[/b]' + +[*] '[b]username[/b]' - Web admin username to login with, this will appear in the chat when the bot has something to output. It's recommended to create a separate account for the bot. + - Example: '[b]username=Admin[/b]' + +[*] '[b]password[/b]' - Web admin password that matches the username above. + - Example: '[b]password=123[/b]' + +[*] '[b]game_password[/b]' - Default game password to set when the password is toggled using '[b]!password [/b]'. + - Example: '[b]game_password=Hunter69[/b]' + +[*] '[b]motd_scoreboard[/b]' - Boolean value, enable or disable the motd leaderboard feature. Defaults to disabled. + - Example: '[b]motd_scoreboard=True[/b]' + +[*] '[b]scoreboard_type[/b]' - Possible values: '[b]kills[/b]', or '[b]dosh[/b]'. Change the type of scores that are displayed in the motd leaderboard. + - Example: '[b]scoreboard_type=dosh[/b]' + +[*] '[b]dosh_threshold[/b]' - Integer value, configures the '[b]!enforce_dosh[/b]' command. The dosh threshold is the amount of dosh a player can carry before they are kicked by the next call to '[b]!enforce_dosh[/b]'. This can be useful on endless servers where it is possible to crash the server by dropping a huge amount of dosh. + - Example: '[b]dosh_threshold=40000[/b]' +[/list] + +## Renaming the chatbot (multi-admin) +To rename your chatbot to something other than 'Admin' your server must be configured for multi-admin. + +If your server already has multi-admin support all you need to do is create an account with the desired name and change the account credentials in '[b]conf/magicked_admin.conf[/b]' + +The following covers the same setup as the official Tripwire documentation on this topic, which is available [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)#Setting_up_multiple_web_admins]here[/url]. +[olist] +[*]Go to your server's config folder. '[b]KF2-Server\KFGame\Config\Config[/b]'. + +[*]Open '[b]KFWebAdmin.ini[/b]' in your favourite editor, add the following under the '[b][WebAdmin.WebAdmin][/b]' section, and save the file. +[code]AuthenticationClass=WebAdmin.MultiWebAdminAuth[/code] + +[*]Now open your web admin panel and there should be a new '[b]Administrators[/b]' section in the sidebar. +[previewicon=11679370;sizeThumb,inline;chrome_2018-03-08_23-53-58.png][/previewicon] + +[*]Click '[b]Administrators[/b]' and select '[b]Create Administrator[/b]'. Enter a name for the Chatbot (This is the name you will use to sign in with). Click OK. + +[*]Give it a '[b]Display Name[/b]', '[b]Password[/b]', and enable the account (the display name is what players will see in chat). +[previewicon=11679547;sizeThumb,inline;chrome_2018-03-09_00-16-09.png][/previewicon] + +[*]Leave '[b]Access Order[/b]' set to '[b]Deny/Allow[/b]', and don't add any '[b]Deny Patterns[/b]' or '[b]Allow Patterns[/b]'. If you have issues using your new account, this is a common culprit so please leave it as is. + +[*]Click '[b]Save[/b]' and the account is ready for use. + +[*]Update the account credentials in '[b]conf/magicked_admin.conf[/b]' +[/olist] + +## Endless and weekly game mode support +In game modes other than survival KF2 Magicked Admin will have a limited feature set due to differences in the web admin panel when in other modes. However the web admin panel can be altered to enable the full feature set. + +For this reason a web admin patcher is available [url=https://github.com/th3-z/kf2-magicked-admin/releases/download/0.1.4/kf2-admin-patches-0.0.1.zip]here[/url]. + +[h1]Notes[/h1] +To use this utility your server files in '[b]KF2Server/KFGame/Web/ServerAdmin[/b]' will have to be stock/clean. If you have edited these files I suggest the following alternatives. +[list] +[*]Validate the server files with steamcmd with the command '[b]app_update 232130 validate[/b]' and use the patcher as normal. +[*]Manually apply the diffs in '[b]admin-patcher/patches[/b]' to your server files. +[/list] + +[h1]Usage (GUI/Desktop)[/h1] +[olist] +[*] Run the executable +[*] Open the location where your server is installed in the destination selection window +[*] Click '[b]open[/b]' +[/olist] + +[h1]Usage (Headless/Server)[/h1] +[*] Run the executable with a target flag, e.g. '[b]./magicked_admin.exe --target /path/to/kf2/server[/b]' +[*] Check the console window for any issues + +## Configuring multiple servers +KF2 Magicked Admin can work with any amount of servers you run. + +To configure more servers, find '[b]conf/magicked_admin.conf[/b]', and open it in your favourite editor. + +Copy the whole '[b][server_one][/b]' section, and paste it at the end of the file. Update the '[b]address[/b]', '[b]username[/b]', and '[b]password[/b]' options. + +Below is an example. +[code] +[server_one] +game_password = 123 +motd_scoreboard = False +scoreboard_type = Kills +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8080 +username = Admin +password = root + +[server_two] +game_password = Hunter69 +motd_scoreboard = True +scoreboard_type = Dosh +max_players = 6 +enable_greeter = True +dosh_threshold = 40000 +address = http://127.0.0.1:8081 +username = Admin +password = 123 +[/code] + +You can do this for as many servers as you want. + +## Renaming servers +If you have a few servers, you might want to name them so you can easily identify them. + +You first need to open '[b]conf/magicked_admin.conf[/b]' and here you can change '[b]server_one[/b]' to anything you want. + +You then need to go back and change '[b]server_one.motd[/b]' and '[b]server_one.init[/b]' to the name you just set it to in '[b]conf/magicked_admin.conf[/b]'. + +## Resetting stats +To [b]reset[/b] the scoreboard all you have to do is [b]delete[/b] the '[b]conf/*.sqlite[/b]' file associated with the server name, a new one will be created the next time you start KF2 Magicked Admin. + +If I wanted to reset the stats on '[b]server_four[/b]', I would delete the '[b]conf/server_four.sqlite[/b]' file and restart KF2 Magicked Admin. + +## Planned features +[h1]Next release - 0.1.5[/h1] +The following features are currently slated for the next release. +[list] +[*] Date/time commands, i.e. run a command at a specific time of day or date +[*] Player session logging, logs SteamIDs and timestamps for player sessions to a file +[*] `!restart` delay, a countdown before restarting the match +[/list] + +[h1]Future[/h1] +[list] +[*] Support for community translations via crowdin +[/list] + +We are accepting feature requests on the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]. + +## Bugs? +None known as of writing. + +If you find a bug, please add it to the [url=https://github.com/th3-z/kf2-magicked-admin/issues]issue tracker[/url]if you have a GitHub account. + +If you don't have a GitHub account you can write it in the comments or message [url=https://steamcommunity.com/id/th3-z]me[/url] on Steam. + +## Credits +KF2 Magicked Admin is open source software (MIT), authored by the_z (th3-z). +For full source code (Python+SQLite) and developer guidance visit the [url=github.com/th3-z/kf2-magicked-admin]GitHub repository.[/url] + +[b]Contributors[/b] + +Developers: +[list] +[*] [url=https://github.com/th3-z]th3-z[/url] +[*] [url=https://github.com/n0x-io]n0x-io[/url] +[*] [url=https://github.com/skylord123]skylord123[/url] +[*] [url=https://github.com/WilliamBrown42]WilliamBrown42[/url] +[/list] +Testers: +[list] +[*] [url=https://steamcommunity.com/id/Stephen720/]Stephen720[/url] +[*] [url=https://steamcommunity.com/profiles/76561198299290553/]WabbitToonz[/url] +[/list] + +Contributions are welcome. diff --git a/locale/zh_CN/magicked_admin.export.po b/locale/zh_CN/magicked_admin.export.po new file mode 100644 index 00000000..09dc99b7 --- /dev/null +++ b/locale/zh_CN/magicked_admin.export.po @@ -0,0 +1,19 @@ +msgid "" +msgstr "" +"Project-Id-Version: kf2-magicked-admin\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2019-10-05 17:46+0100\n" +"PO-Revision-Date: 2019-10-05 17:06\n" +"Last-Translator: the_z (th3-z)\n" +"Language: zh_CN\n" +"Language-Team: Chinese Simplified\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.7.0\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kf2-magicked-admin\n" +"X-Crowdin-Language: zh-CN\n" +"X-Crowdin-File: /i18n/locale/en_GB/magicked_admin.po\n" +