Fixed /f kick and /f close
This commit is contained in:
parent
4165082354
commit
85a50688b9
@ -250,7 +250,7 @@ factions.register_command("kick", {
|
|||||||
local victim = args.players[1]
|
local victim = args.players[1]
|
||||||
local victim_faction = factions.get_player_faction(victim:get_player_name())
|
local victim_faction = factions.get_player_faction(victim:get_player_name())
|
||||||
if victim_faction and victim:get_player_name() ~= faction.leader then -- can't kick da king
|
if victim_faction and victim:get_player_name() ~= faction.leader then -- can't kick da king
|
||||||
faction:remove_player(player)
|
faction:remove_player(victim:get_player_name())
|
||||||
return true
|
return true
|
||||||
elseif not victim_faction then
|
elseif not victim_faction then
|
||||||
send_error(player, victim:get_player_name().." is not in your faction.")
|
send_error(player, victim:get_player_name().." is not in your faction.")
|
||||||
|
@ -476,7 +476,11 @@ function factions.Faction.on_player_invited(self, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function factions.Faction.on_toggle_join_free(self, player)
|
function factions.Faction.on_toggle_join_free(self, player)
|
||||||
self:broadcast("This faction is now invite-free.")
|
if self.join_free then
|
||||||
|
self:broadcast("This faction is now invite-free.")
|
||||||
|
else
|
||||||
|
self:broadcast("This faction is no longer invite-free.")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function factions.Faction.on_new_alliance(self, faction)
|
function factions.Faction.on_new_alliance(self, faction)
|
||||||
|
Loading…
Reference in New Issue
Block a user