Closed Cynosphere closed 3 years ago
@Cynosphere I'm not sure I understand fully the issue, what happens with greentext and local? Does it not add the (Local) tag or ?
The code in question is this:
local EC_ONLY_LOCAL = CreateConVar("easychat_only_local", "0", FCVAR_ARCHIVE, "Shows only local chat")
EasyChat.RegisterConvar(EC_ONLY_LOCAL, "Only show local chat messages")
hook.Add("OnPlayerChat", "only_local", function(_, _, _, _, is_local)
if not EC_ONLY_LOCAL:GetBool() then return end
if not is_local then return true end
end)
return "Only Local"
Which you can find here https://gitlab.com/metastruct/internal/srvaddons/-/blob/master/Chat/lua/easychat/modules/client/only_local.lua
Unfortunately I'm unsure what can be done here as both greentext and this meta-specific module are using the OnPlayerChat
hook.
Could either move Only Local to base (not ideal without gamemode checks or what not) or just check if the convar exists and if its active and local chat. Other than that, I didn't realize it was meta-specific and thought it was apart of base.
I've moved the module inside EasyChat where it makes the most sense: https://github.com/Earu/EasyChat/commit/7a33a6b6bbf5353ad1045a79fd8591ca50196e9e
Mainly just greentext found so far but theres probably other text modifying modules that don't have checks