forked from mtcontrib/factions
Compare commits
4 Commits
e5fdd2bdee
...
767555d276
Author | SHA1 | Date | |
---|---|---|---|
767555d276 | |||
2b0aa5fd95 | |||
a596a1bf35 | |||
3287b6793f |
@ -119,7 +119,7 @@ function factions_chat.cmdhandler(playername,parameter)
|
||||
|
||||
--show factions mod version
|
||||
if cmd == "version" then
|
||||
minetest.chat_send_player(playername, "Factions: version " .. factions_version , false)
|
||||
minetest.chat_send_player(playername, "Factions: version " .. factions.version , false)
|
||||
return
|
||||
end
|
||||
|
||||
@ -360,7 +360,7 @@ function factions_chat.allfactions_chathandler(playername,parameter)
|
||||
local recipients = {}
|
||||
|
||||
for faction,value in pairs(factions.get_factions(player)) do
|
||||
for name,value in pairs(factions.dynamic_data.membertable[faction]) do
|
||||
for name,val in pairs(factions.dynamic_data.membertable[value]) do
|
||||
local object_to_check = minetest.get_player_by_name(name)
|
||||
|
||||
if object_to_check ~= nil then
|
||||
@ -405,16 +405,15 @@ function factions_chat.chathandler(playername,parameter)
|
||||
local valid_faction = false
|
||||
|
||||
for faction,value in pairs(factions.get_factions(player)) do
|
||||
if target_faction == faction then
|
||||
if target_faction == value then
|
||||
valid_faction = true
|
||||
end
|
||||
end
|
||||
|
||||
if faction ~= nil and valid_faction and
|
||||
factions.dynamic_data.membertable[faction] ~= nil then
|
||||
for name,value in pairs(factions.dynamic_data.membertable[faction]) do
|
||||
if target_faction ~= nil and valid_faction and
|
||||
factions.dynamic_data.membertable[target_faction] ~= nil then
|
||||
for name,value in pairs(factions.dynamic_data.membertable[target_faction]) do
|
||||
local object_to_check = minetest.get_player_by_name(name)
|
||||
factions_chat.show_help(playername)
|
||||
if object_to_check ~= nil and
|
||||
name ~= playername then
|
||||
minetest.chat_send_player(name,playername ..": " .. text,false)
|
||||
@ -422,7 +421,7 @@ function factions_chat.chathandler(playername,parameter)
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(playername,
|
||||
"Factions: you're not a member of " .. dump(faction),false)
|
||||
"Factions: you're not a member of " .. dump(target_faction),false)
|
||||
end
|
||||
return
|
||||
end
|
||||
@ -456,10 +455,11 @@ function factions_chat.show_help(playername)
|
||||
|
||||
MSG("\tAdmin commands:")
|
||||
MSG("\t\t/factions create <factionname> -> create a new faction")
|
||||
MSG("\t\t/factions delete <factionname> -> delete a faction faction")
|
||||
MSG("\t\t/factions delete <factionname> -> delete a faction")
|
||||
MSG("\t\t/factions join <factionname> <playername> -> join player to faction")
|
||||
MSG("\t\t/factions leave <factionname> <playername> -> remove player from faction")
|
||||
MSG("\t\t/factions invite <factionname> <playername> -> invite player to faction")
|
||||
MSG("\t\t/factions set_free <factionname> <value> -> set faction free to join")
|
||||
MSG("\t\t/factions admin <factionname> <playername> <value> -> make player admin of faction")
|
||||
MSG("\t\t/factions set_free <factionname> <true|false> -> set faction free to join")
|
||||
MSG("\t\t/factions admin <factionname> <playername> <true|false> -> make player admin of faction")
|
||||
MSG("\t\t/factions description <factionname> <text> -> set description for faction")
|
||||
end
|
||||
|
@ -730,6 +730,7 @@ function factions.load()
|
||||
factions.data.factions[key].adminlist = value.adminlist
|
||||
factions.data.factions[key].open = value.open
|
||||
factions.data.factions[key].invitations = value.invitations
|
||||
factions.data.factions[key].description = value.description
|
||||
|
||||
factions.data.factions[key].reputation = {}
|
||||
for repkey,repvalue in pairs(value.reputation) do
|
||||
|
Reference in New Issue
Block a user