diff --git a/chatcommands.lua b/chatcommands.lua index a8acefa..cd2320d 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -168,6 +168,7 @@ function factions_chat.cmdhandler(playername,parameter) --if minetest.check_player_privs(playername,{ faction_admin=true }) then --create new faction if cmd == "create" then + minetest.chat_send_player(playername,"dfdsofjdspofndsfjdsp",false) if params[2] ~= nil then if factions.add_faction(params[2]) then minetest.chat_send_player(playername, diff --git a/factions.lua b/factions.lua index 185e2df..eb521b5 100644 --- a/factions.lua +++ b/factions.lua @@ -264,8 +264,8 @@ function factions.member_add(name, object) factions.dynamic_data.membertable[name][new_entry.name] = true factions.data.factions[name].invitations[new_entry.name] = nil if factions.data.factions[name].owner == "" then - factions.data.factions[name].owner = object.get_player_name() - factions.set_admin(name,object.get_player_name(), true) + factions.data.factions[name].owner = object:get_player_name() + factions.set_admin(name,object:get_player_name(), true) end factions.save() return true @@ -334,7 +334,7 @@ function factions.member_remove(name,object) factions.save() return true end - if factions.data.objects[id].factions[name].owner == object.get_player_name() then + if factions.data.objects[id].factions[name].owner == object:get_player_name() then factions.delete_faction(name) end