mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Moved a function
This commit is contained in:
@@ -38,6 +38,13 @@ function string_to_rank(string)
|
|||||||
if #found_ranks == 1 then return found_ranks[1] end
|
if #found_ranks == 1 then return found_ranks[1] end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- surches the rank for a certain allow command
|
||||||
|
function rank_allowed(rank,is_allowed)
|
||||||
|
for _,allow in rank.allow do
|
||||||
|
if allow == is_allowed then return true end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
--Send a message to all members of this rank and above, if no rank given default is mod
|
--Send a message to all members of this rank and above, if no rank given default is mod
|
||||||
--inv sends message to all lower ranks rather than higher
|
--inv sends message to all lower ranks rather than higher
|
||||||
function rank_print(msg, rank, inv)
|
function rank_print(msg, rank, inv)
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ local ranks = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-- Feed the disallows of each rank into the one below itself
|
-- rank table setup
|
||||||
for n,rank in pairs(ranks.ranks) do
|
for n,rank in pairs(ranks.ranks) do
|
||||||
local ranks_list = ranks.ranks
|
local ranks_list = ranks.ranks
|
||||||
rank.power = n
|
rank.power = n
|
||||||
@@ -167,13 +167,6 @@ for n,rank in pairs(ranks.ranks) do
|
|||||||
if rank.time then ranks.lowest_timed_rank=rank end
|
if rank.time then ranks.lowest_timed_rank=rank end
|
||||||
ranks.number_of_ranks=ranks.number_of_ranks+1
|
ranks.number_of_ranks=ranks.number_of_ranks+1
|
||||||
end
|
end
|
||||||
-- surches the rank for a certain allow command
|
|
||||||
function rank_allowed(rank,is_allowed)
|
|
||||||
for _,allow in rank.allow do
|
|
||||||
if allow == is_allowed then return true end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
-- returns a list off all the ranks, return only one part if given
|
-- returns a list off all the ranks, return only one part if given
|
||||||
function get_ranks(part)
|
function get_ranks(part)
|
||||||
local to_return = {}
|
local to_return = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user