@@ -29,11 +29,9 @@ function Tags:GetNameColor( ply )
29
29
return GAMEMODE :GetTeamColor ( ply )
30
30
end
31
31
32
- local function CustomChat_AddCustomTags ( ply , text , isTeam , isDead )
32
+ function Tags : AddMessageWithCustomTags ( ply , text , isTeam , isDead )
33
33
if not IsValid ( ply ) or not ply :IsPlayer () then return end
34
34
35
- CustomChat .lastReceivedMessage = CustomChat .lastReceivedMessage or { speaker = ply , text = text , channel = " global" }
36
-
37
35
local parts = Tags :GetParts ( ply )
38
36
local customParts , keepOriginal = hook .Run ( " OverrideCustomChatTags" , ply )
39
37
@@ -47,7 +45,6 @@ local function CustomChat_AddCustomTags( ply, text, isTeam, isDead )
47
45
end
48
46
49
47
if not parts and not customParts then
50
- CustomChat .lastReceivedMessage = nil
51
48
return
52
49
end
53
50
@@ -94,18 +91,10 @@ local function CustomChat_AddCustomTags( ply, text, isTeam, isDead )
94
91
Insert ( " : " .. text )
95
92
96
93
chat .AddText ( unpack ( message ) )
97
- CustomChat .lastReceivedMessage = nil
98
94
99
95
return true
100
96
end
101
97
102
- hook .Add ( " InitPostEntity" , " CustomChat.PreventChatTagsConflict" , function ()
103
- if aTags then return end
104
-
105
- CustomChat .USE_TAGS = true
106
- hook .Add ( " OnPlayerChat" , " CustomChat.AddCustomTags" , CustomChat_AddCustomTags , HOOK_LOW )
107
- end )
108
-
109
98
function Tags :OpenEditor ()
110
99
local L = CustomChat .GetLanguageText
111
100
local byTeam = table .Copy ( Tags .byTeam )
0 commit comments