From 2869d4e006a455812ebf65d06fec2282c0873945 Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Sat, 6 Jan 2018 18:51:14 +0100 Subject: [PATCH] [Fix issue #17] Fix faction crash when invoking the faction command : /factions version To use factions admin command, the player must have the the faction_admin privilege. --- mods/factions/chatcommands.lua | 2 +- mods/factions/init.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/factions/chatcommands.lua b/mods/factions/chatcommands.lua index 31f47a19..362b31f0 100755 --- a/mods/factions/chatcommands.lua +++ b/mods/factions/chatcommands.lua @@ -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 diff --git a/mods/factions/init.lua b/mods/factions/init.lua index a5003b43..d1194df2 100755 --- a/mods/factions/init.lua +++ b/mods/factions/init.lua @@ -23,6 +23,7 @@ factions_modpath = minetest.get_modpath("factions") dofile (factions_modpath .. "/factions.lua") dofile (factions_modpath .. "/chatcommands.lua") +factions.version = factions_version factions.load() factions_chat.init()