Fixed /f kick and /f close

This commit is contained in:
shamoanjac 2016-08-29 01:41:23 +02:00
parent 4165082354
commit 85a50688b9
2 changed files with 6 additions and 2 deletions

View File

@ -250,7 +250,7 @@ factions.register_command("kick", {
local victim = args.players[1]
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
faction:remove_player(player)
faction:remove_player(victim:get_player_name())
return true
elseif not victim_faction then
send_error(player, victim:get_player_name().." is not in your faction.")

View File

@ -476,7 +476,11 @@ function factions.Faction.on_player_invited(self, player)
end
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
function factions.Faction.on_new_alliance(self, faction)