From 837da3a4971dfd235e273c066947cc6cdce95454 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 18 Apr 2019 15:37:00 +0100 Subject: [PATCH] Added warning config --- config/warnings.lua | 19 +++++++++++++++++++ locale/en/addons.cfg | 10 +++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 config/warnings.lua diff --git a/config/warnings.lua b/config/warnings.lua new file mode 100644 index 00000000..6d05b10c --- /dev/null +++ b/config/warnings.lua @@ -0,0 +1,19 @@ +--- Config file for the warning system, this is very similar to reports but is for the use of moderators rather than normal users. +return { + actions = { -- what actions are taking at number of warnings + -- if a localized string is used then __1__ will by_player_name and __2__ will be the current warning count (auto inserted) + {'warnings.recived'}, + {'warnings.recived'}, + {'warnings.recived',{'warnings.pre-kick'}}, + function(player,by_player_name,number_of_warnings) + game.kick_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.kick'}}) + end, + {'warnings.recived',{'warnings.pre-pre-ban'}}, + {'warnings.recived',{'warnings.pre-ban'}}, + function(player,by_player_name,number_of_warnings) + game.ban_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.ban',{'info.website-link'}}}) + end + }, + temp_warning_cool_down=30, -- time for a temp warning (given by script) to be removed + temp_warning_limit=5 -- the number of temp warnings (given by script) that are allowed before full warnings are given +} \ No newline at end of file diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index d2d99105..9acb6b06 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -25,4 +25,12 @@ custom-commands=We use custom commands, such as /tag and /me, use /chelp for mor read-readme=Make sure you have read the Readme (It can be found through the question mark on the top left) softmod=We run a softmod on our servers. A softmod is a custom scenario that runs on this server, example is the player list. redmew=We dont talk about redmew here; they beat us to 1000 members ;-; -lhd=All trains must be LHD! This is a long standing rule on our servers, please resepect this. \ No newline at end of file +lhd=All trains must be LHD! This is a long standing rule on our servers, please resepect this. + +[warnings] +recived=You recived a warning from __1__. You have __2__ warnings. __3__ +pre-kick=This is your last warning before you are kicked. +kick=You were kicked for having too many warnings; you may rejoy if you wish. +pre-pre-ban=You are close to reciving a ban; successful ban appeals are unlikely. +pre-ban=This your LAST warning before you are BANNED! successful ban appeals are unlikely. +ban=You were banned for having too many warnings; Vist __1__ to request a ban appeal. \ No newline at end of file