diff --git a/chatcommands.lua b/chatcommands.lua index d561805..a0406e7 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -63,7 +63,7 @@ factions.register_command = function(cmd_name, cmd) end elseif argtype == "player" then local pl = minetest.get_player_by_name(arg) - if not pl or not factions.players[arg] then + if not pl and not factions.players[arg] then send_error(player, "Player is not online.") return false else