Added warnings to control

This commit is contained in:
Cooldude2606
2019-06-29 01:28:17 +01:00
parent c8c0bba860
commit 5d0ef2f11a
76 changed files with 1738 additions and 409 deletions

View File

@@ -8,7 +8,7 @@ local Roles = require 'expcore.roles'
local Store = require 'expcore.store'
local Game = require 'utils.game'
local Reports = require 'modules.control.reports'
local Warnings = require 'modules.addons.warnings-control'
local Warnings = require 'modules.addons.warnings'
local Jail = require 'modules.control.jail'
local Colors = require 'resources.color_presets'
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
@@ -135,7 +135,7 @@ local function warn_player_callback(player,reason)
local action_player_name,action_player_name_color = get_action_player_name(player)
local by_player_name_color = format_chat_player_name(player)
game.print{'expcom-warnings.received',action_player_name_color,by_player_name_color,reason}
Warnings.add_warnings(action_player_name,player.name)
Warnings.add_warning(action_player_name,player.name,reason)
end
-- jails the action player, requires a reason

View File

@@ -14,6 +14,6 @@ return {
game.ban_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.ban',{'links.website'}}})
end
},
temp_warning_cool_down=30, -- time for a temp warning (given by script) to be removed (in minutes)
temp_warning_limit=5 -- the number of temp warnings (given by script) that are allowed before full warnings are given
script_warning_cool_down=30, -- time for a script warning (given by script) to be removed (in minutes)
script_warning_limit=5 -- the number of script warnings (given by script) that are allowed before full warnings are given
}