Skip to content

Commit

Permalink
Fixed infinite loop
Browse files Browse the repository at this point in the history
Fixes #3252

Bug 1b77898
  • Loading branch information
robotboy655 authored Mar 11, 2024
1 parent ebdd08d commit 32f8082
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gamemode/modules/chat/sv_chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function GM:canChatCommand(ply, cmd, ...)
return false
end

GM.OldHookCall = GM.OldHookCall or hook.Call
g_DarkRPOldHookCall = g_DarkRPOldHookCall or hook.Call

local GM = GM
function hook.Call(name, gm, ply, text, teamonly, ...)
Expand All @@ -135,7 +135,7 @@ function hook.Call(name, gm, ply, text, teamonly, ...)
local callback
local DoSayFunc

text2 = GM.OldHookCall(name, gm, ply, text, teamonly, dead) or text2
text2 = g_DarkRPOldHookCall(name, gm, ply, text, teamonly, dead) or text2

text2, callback, DoSayFunc = RP_PlayerChat(ply, text2, teamonly)
if tostring(text2) == " " then text2, callback = callback, text2 end
Expand All @@ -152,7 +152,7 @@ function hook.Call(name, gm, ply, text, teamonly, ...)
return ""
end

return GM.OldHookCall(name, gm, ply, text, teamonly, ...)
return g_DarkRPOldHookCall(name, gm, ply, text, teamonly, ...)
end

local function ConCommand(ply, _, args)
Expand Down

0 comments on commit 32f8082

Please sign in to comment.