some fixes
parent
dc1115cc94
commit
717ff750d0
|
@ -25,14 +25,14 @@ factions_chat = {}
|
|||
-------------------------------------------------------------------------------
|
||||
function factions_chat.init()
|
||||
|
||||
minetest.register_privilege("factions_user",
|
||||
minetest.register_privilege("faction_user",
|
||||
{
|
||||
description = "this user is allowed to interact with faction mod",
|
||||
give_to_singleplayer = true,
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_privilege("factions_admin",
|
||||
minetest.register_privilege("faction_admin",
|
||||
{
|
||||
description = "this user is allowed to create or delete factions",
|
||||
give_to_singleplayer = true,
|
||||
|
@ -43,7 +43,7 @@ function factions_chat.init()
|
|||
{
|
||||
params = "<cmd> <parameter 1> .. <parameter n>",
|
||||
description = "faction administration functions",
|
||||
privs = { factions_user=true },
|
||||
privs = { faction_user=true },
|
||||
func = factions_chat.cmdhandler,
|
||||
}
|
||||
)
|
||||
|
@ -52,7 +52,7 @@ function factions_chat.init()
|
|||
{
|
||||
params = "text",
|
||||
description = "send message to all factions",
|
||||
privs = { factions_user=true },
|
||||
privs = { faction_user=true },
|
||||
func = factions_chat.allfactions_chathandler,
|
||||
}
|
||||
)
|
||||
|
@ -61,7 +61,7 @@ function factions_chat.init()
|
|||
{
|
||||
params = "<factionname> text",
|
||||
description = "send message to a specific faction",
|
||||
privs = { factions_user=true },
|
||||
privs = { faction_user=true },
|
||||
func = factions_chat.chathandler,
|
||||
}
|
||||
)
|
||||
|
@ -254,15 +254,9 @@ function factions_chat.cmdhandler(playername,parameter)
|
|||
end
|
||||
|
||||
if factions.set_free(params[2],value) then
|
||||
minetest.chat_send_player(playername,
|
||||
"Factions: free to join for " .. params[2] ..
|
||||
" has been set to " .. params[3],
|
||||
false)
|
||||
minetest.chat_send_player(playername, "Factions: free to join for "..params[2].." has been set to "..params[3], false)
|
||||
else
|
||||
minetest.chat_send_player(playername,
|
||||
"Factions: FAILED to set free to join for " ..
|
||||
params[2],
|
||||
false)
|
||||
minetest.chat_send_player(playername, "Factions: FAILED to set free to join for "..params[2], false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -300,6 +294,7 @@ function factions_chat.cmdhandler(playername,parameter)
|
|||
for i=4, #params, 1 do
|
||||
desc = desc .. " " .. params[i]
|
||||
end
|
||||
|
||||
if factions.set_description(params[2],desc) then
|
||||
minetest.chat_send_player(playername,
|
||||
"Factions: updated description of faction " ..
|
||||
|
|
Loading…
Reference in New Issue