forked from mtcontrib/factions
Bug fix delrank
When you delete a rank like member the faction will still give new players that rank and cause errors because the rank is deleted.
This commit is contained in:
parent
e7fff79b78
commit
f75a2ea008
|
@ -529,6 +529,14 @@ function factions.Faction.delete_rank(self, rank, newrank)
|
|||
end
|
||||
self.ranks[rank] = nil
|
||||
self:on_delete_rank(rank, newrank)
|
||||
if rank == self.default_leader_rank then
|
||||
self.default_leader_rank = newrank
|
||||
self:broadcast("The default leader rank has been set to "..newrank)
|
||||
end
|
||||
if rank == self.default_rank then
|
||||
self.default_rank = newrank
|
||||
self:broadcast("The default rank given to new players is set to "..newrank)
|
||||
end
|
||||
factions.save()
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user