1
0
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:
Ryan 2023-10-03 18:50:59 +02:00
parent 893fc5d754
commit ddd59791af
2 changed files with 36 additions and 32 deletions

View File

@ -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

View File

@ -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