This commit is contained in:
Anthony Recascino 2016-07-30 00:40:27 -04:00
parent e82a02e3c9
commit 5a7d08e75f
2 changed files with 4 additions and 3 deletions

View File

@ -168,6 +168,7 @@ function factions_chat.cmdhandler(playername,parameter)
--if minetest.check_player_privs(playername,{ faction_admin=true }) then --if minetest.check_player_privs(playername,{ faction_admin=true }) then
--create new faction --create new faction
if cmd == "create" then if cmd == "create" then
minetest.chat_send_player(playername,"dfdsofjdspofndsfjdsp",false)
if params[2] ~= nil then if params[2] ~= nil then
if factions.add_faction(params[2]) then if factions.add_faction(params[2]) then
minetest.chat_send_player(playername, minetest.chat_send_player(playername,

View File

@ -264,8 +264,8 @@ function factions.member_add(name, object)
factions.dynamic_data.membertable[name][new_entry.name] = true factions.dynamic_data.membertable[name][new_entry.name] = true
factions.data.factions[name].invitations[new_entry.name] = nil factions.data.factions[name].invitations[new_entry.name] = nil
if factions.data.factions[name].owner == "" then if factions.data.factions[name].owner == "" then
factions.data.factions[name].owner = object.get_player_name() factions.data.factions[name].owner = object:get_player_name()
factions.set_admin(name,object.get_player_name(), true) factions.set_admin(name,object:get_player_name(), true)
end end
factions.save() factions.save()
return true return true
@ -334,7 +334,7 @@ function factions.member_remove(name,object)
factions.save() factions.save()
return true return true
end 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) factions.delete_faction(name)
end end