Merge pull request #33 from shamoanjac/master

Fixes
This commit is contained in:
agrecascino 2016-08-30 09:50:41 -04:00 committed by GitHub
commit aaaa3886a1
2 changed files with 7 additions and 2 deletions

View File

@ -37,6 +37,7 @@ factions.register_command = function(cmd_name, cmd)
local bool, missing_privs = minetest.check_player_privs(player, tmp)
if not bool then
send_error(player, "Unauthorized.")
return false
end
end
-- checks argument formats
@ -250,7 +251,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)