fix bug when specifying invalid faction for chathandler
parent
76eed32c07
commit
e310a726c5
|
@ -409,7 +409,8 @@ function factions_chat.chathandler(playername,parameter)
|
|||
end
|
||||
end
|
||||
|
||||
if valid_faction then
|
||||
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
|
||||
local object_to_check = mientest.env:get_player_by_name(name)
|
||||
factions_chat.show_help(playername)
|
||||
|
@ -420,7 +421,7 @@ function factions_chat.chathandler(playername,parameter)
|
|||
end
|
||||
else
|
||||
minetest.chat_send_player(playername,
|
||||
"Factions: you're not a member of " .. faction,false)
|
||||
"Factions: you're not a member of " .. dump(faction),false)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
4
init.lua
4
init.lua
|
@ -12,7 +12,7 @@
|
|||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
local factions_version = "0.1.1"
|
||||
local factions_version = "0.1.2"
|
||||
|
||||
print("MOD: factions (by sapier) loading ...")
|
||||
|
||||
|
@ -26,4 +26,4 @@ dofile (factions_modpath .. "/chatcommands.lua")
|
|||
factions.load()
|
||||
factions_chat.init()
|
||||
|
||||
print("MOD: factions (by sapier) " .. factions_version .. " loaded.")
|
||||
print("MOD: factions (by sapier) " .. factions_version .. " loaded.")
|
||||
|
|
Loading…
Reference in New Issue