mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Removed Temp ban related stuff
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--[[-- Commands Module - Jail
|
||||
- Adds a commands that allow admins to jail, unjail, and temp ban players
|
||||
- Adds a commands that allow admins to jail and unjail
|
||||
@commands Jail
|
||||
]]
|
||||
|
||||
@@ -45,38 +45,3 @@ Commands.new_command('unjail', 'Removes a player from jail.')
|
||||
return Commands.error{'expcom-jail.not-jailed', action_player_name_color}
|
||||
end
|
||||
end)
|
||||
|
||||
--- Temp bans a player until the next reset; this requires a reason; this will clear the players inventory.
|
||||
-- @command temp-ban
|
||||
-- @tparam LuaPlayer player the player that will be temp banned
|
||||
-- @tparam string reason the reason that the player is being temp banned
|
||||
Commands.new_command('temp-ban', 'Temp bans a player until the next reset; this requires a reason; this will clear the players inventory.')
|
||||
:add_param('player', false, 'player-role')
|
||||
:add_param('reason', false)
|
||||
:enable_auto_concat()
|
||||
:register(function(player, action_player, reason)
|
||||
local action_player_name_color = format_chat_player_name(action_player)
|
||||
local by_player_name_color = format_chat_player_name(player)
|
||||
if Jail.temp_ban_player(action_player, player.name, reason) then
|
||||
game.print{'expcom-jail.temp-ban', action_player_name_color, by_player_name_color, reason}
|
||||
else
|
||||
return Commands.error{'expcom-jail.already-banned', action_player_name_color}
|
||||
end
|
||||
end)
|
||||
|
||||
--- Removes temp ban from a player; this will not restore their items.
|
||||
-- @command clear-temp-ban
|
||||
-- @tparam LuaPlayer player the player to revoke the temp ban from
|
||||
Commands.new_command('clear-temp-ban', 'Removes temp ban from a player; this will not restore their items.')
|
||||
:add_param('player', false, 'player-role')
|
||||
:add_alias('untemp-ban', 'remove-temp-ban')
|
||||
:enable_auto_concat()
|
||||
:register(function(player, action_player)
|
||||
local action_player_name_color = format_chat_player_name(action_player)
|
||||
local by_player_name_color = format_chat_player_name(player)
|
||||
if Jail.untemp_ban_player(action_player, player.name) then
|
||||
game.print{'expcom-jail.temp-ban-clear', action_player_name_color, by_player_name_color}
|
||||
else
|
||||
return Commands.error{'expcom-jail.not-temp-banned', action_player_name_color}
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user