Fix: crash on /f who when not in a faction

This commit is contained in:
Coder12a 2019-05-04 14:09:20 -05:00
parent 073c2288e3
commit b4a85766df
1 changed files with 4 additions and 6 deletions

View File

@ -940,14 +940,12 @@ factions.register_command("who", {
on_success = function(player, faction, pos, parcelpos, args)
local str = args.strings[1]
local f = {}
if str then
f = factions.get_faction(str)
local f = factions.get_faction(str)
if not f and not f.players then
f = factions.get_player_faction(player)
if not f and not f.players then
if not f or not f.players then
minetest.chat_send_player(player, "Your not in a faction.")
return
else
@ -965,8 +963,8 @@ factions.register_command("who", {
return true
end
else
f = factions.get_player_faction(player)
if not f and not f.players then
local f = factions.get_player_faction(player)
if not f or not f.players then
minetest.chat_send_player(player, "Your not in a faction.")
return
else