1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

Fix messages potentially been "posted" twice

This commit is contained in:
Earu 2021-08-01 19:12:55 +02:00
parent c1c70d392b
commit 0a1abfff80
2 changed files with 5 additions and 10 deletions

View File

@ -2170,8 +2170,8 @@ if CLIENT then
chat.AddText = function(...)
if EC_SKIP_STARTUP_MSG:GetBool() and not EasyChat.SkippedAnnoyingMessages then
chat.old_EC_AddText(...)
return
local ret = chat.old_EC_AddText(...)
if ret == "EC_SKIP_MESSAGE" then return end
end
local processed_args = EasyChat.GlobalAddText(...)

View File

@ -215,18 +215,13 @@ if CLIENT then
local calling = is_easychat_calling()
if EC_SKIP_STARTUP_MSG:GetBool() and not calling then
if EasyChat and EasyChat.SkippedAnnoyingMessages then
local processed_args = EasyChat.GlobalAddText(...)
chat.old_EC_HackAddText(processed_args)
chat.old_EC_HackAddText(...)
else
MsgC("\n", ...)
return "EC_SKIP_MESSAGE"
end
else
if EasyChat then
local processed_args = EasyChat.GlobalAddText(...)
chat.old_EC_HackAddText(processed_args)
else
chat.old_EC_HackAddText(...)
end
chat.old_EC_HackAddText(...)
end
end