forked from mtcontrib/factions
Prevented extra long rank names
This commit is contained in:
parent
c552a58b63
commit
0a47417e77
@ -403,8 +403,12 @@ factions.register_command("newrank", {
|
||||
faction_permissions = {"ranks"},
|
||||
on_success = function(player, faction, pos, parcelpos, args)
|
||||
local rank = args.strings[1]
|
||||
if #rank > factions.rank then
|
||||
send_error(player, "Go away Todd")
|
||||
return false
|
||||
end
|
||||
if faction.ranks[rank] then
|
||||
--TODO: rank already exists
|
||||
send_error(player, "Rank already exists")
|
||||
return false
|
||||
end
|
||||
faction:add_rank(rank, args.other)
|
||||
|
@ -34,6 +34,7 @@ factions.power_per_tick = .125
|
||||
factions.tick_time = 60.
|
||||
factions.power_per_attack = 2.
|
||||
factions.faction_name_max_length = 50
|
||||
factions.rank_name_max_length = 25
|
||||
|
||||
---------------------
|
||||
--! @brief returns whether a faction can be created or not (allows for implementation of blacklists and the like)
|
||||
|
Loading…
Reference in New Issue
Block a user