mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
Take offline and invalid players for probation add/remove as well as regular-remove
This commit is contained in:
parent
76871eefbf
commit
8b814316e4
@ -107,8 +107,7 @@ local function remove_regular(args)
|
||||
local target_player = game.players[target_name]
|
||||
|
||||
if not target_player or not target_player.valid then
|
||||
print_no_target(target_name)
|
||||
return
|
||||
Game.player_print({'common.warn_not_online', target_name}, Color.warning)
|
||||
end
|
||||
|
||||
if Rank.equal(target_name, Ranks.regular) then
|
||||
@ -121,14 +120,13 @@ local function remove_regular(args)
|
||||
end
|
||||
end
|
||||
|
||||
--- Add or remove someone from probation
|
||||
--- Put someone on probation
|
||||
local function probation_add(args)
|
||||
local target_name = args['player']
|
||||
local target_player = game.players[target_name]
|
||||
|
||||
if not target_player or not target_player.valid then
|
||||
print_no_target(target_name)
|
||||
return
|
||||
Game.player_print({'common.warn_not_online', target_name}, Color.warning)
|
||||
end
|
||||
|
||||
if Rank.equal(target_name, Ranks.admin) then
|
||||
@ -146,13 +144,13 @@ local function probation_add(args)
|
||||
end
|
||||
end
|
||||
|
||||
--- Remove someone from probation
|
||||
local function probation_remove(args)
|
||||
local target_name = args['player']
|
||||
local target_player = game.players[target_name]
|
||||
|
||||
if not target_player or not target_player.valid then
|
||||
print_no_target(target_name)
|
||||
return
|
||||
Game.player_print({'common.warn_not_online', target_name}, Color.warning)
|
||||
end
|
||||
|
||||
if Rank.equal(target_name, Ranks.probation) then
|
||||
|
@ -1,5 +1,6 @@
|
||||
[common]
|
||||
fail_no_target=No player found with name: __1__
|
||||
warn_no_target=Warning: player __1__ is not found, but the command will still be executed.
|
||||
|
||||
[ranks]
|
||||
probation=Probation
|
||||
|
Loading…
x
Reference in New Issue
Block a user