mirror of
https://github.com/Earu/EasyChat.git
synced 2025-03-04 03:13:20 -05:00
fullproof bad addons
This commit is contained in:
parent
893fc5d754
commit
ddd59791af
@ -883,6 +883,8 @@ local function create_default_settings()
|
||||
end
|
||||
|
||||
local function setup_rank(usergroup)
|
||||
usergroup = usergroup or "user"
|
||||
|
||||
-- sanity check to see if wanted usergroup actually exists
|
||||
if usergroup and not EasyChat.Config.UserGroups[usergroup] then return end
|
||||
|
||||
|
@ -1182,7 +1182,7 @@ if CLIENT then
|
||||
end
|
||||
|
||||
local function should_use_server_settings(ply)
|
||||
local usergroup_prefix = EasyChat.Config.UserGroups[ply:GetUserGroup()]
|
||||
local usergroup_prefix = EasyChat.Config.UserGroups[ply:GetUserGroup() or "user"]
|
||||
if EasyChat.Config.OverrideClientSettings and usergroup_prefix then return true end
|
||||
if not EasyChat.Config.OverrideClientSettings and EC_TEAMS:GetBool() and usergroup_prefix then return true end
|
||||
|
||||
@ -1830,7 +1830,8 @@ if CLIENT then
|
||||
end
|
||||
|
||||
if should_use_server_settings(ply) then
|
||||
local usergroup_prefix = EasyChat.Config.UserGroups[ply:GetUserGroup()]
|
||||
local usergroup_prefix = EasyChat.Config.UserGroups[ply:GetUserGroup() or "user"]
|
||||
if usergroup_prefix then
|
||||
local tags_data = extract_tags_data(usergroup_prefix.Tag)
|
||||
for _, tag_data in ipairs(tags_data) do
|
||||
if is_color(tag_data) then
|
||||
@ -1874,6 +1875,7 @@ if CLIENT then
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local ply_title = EasyChat.Config.Titles[ply:SteamID()]
|
||||
if ply_title then
|
||||
|
Loading…
Reference in New Issue
Block a user