Fix a bug in factions_ui when name is nil
parent
dac9d2e41c
commit
fd2f2fe658
|
@ -40,6 +40,11 @@ factions.maximum_faction_inactivity = 604800 -- 1 week
|
|||
--! @brief returns whether a faction can be created or not (allows for implementation of blacklists and the like)
|
||||
--! @param name String containing the faction's name
|
||||
factions.can_create_faction = function(name)
|
||||
-- Can't create faction with nil name
|
||||
if name == nil or name == '' then
|
||||
return false
|
||||
end
|
||||
|
||||
if #name > factions.faction_name_max_length then
|
||||
return false
|
||||
elseif factions.factions[name] then
|
||||
|
|
Loading…
Reference in New Issue