From 4245edf4d1f8e8f8fb74325c1acc0fc62f22fb39 Mon Sep 17 00:00:00 2001 From: Rubat <3299036+robotboy655@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:29:57 -0700 Subject: [PATCH] Fixed infinite loop Fixes https://github.com/FPtje/DarkRP/issues/3252 Bug https://github.com/FPtje/DarkRP/commit/1b778981033ee472dea57820bd0e99958e68d19a --- gamemode/modules/chat/sv_chat.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gamemode/modules/chat/sv_chat.lua b/gamemode/modules/chat/sv_chat.lua index c37d1df0a..c370df8ed 100644 --- a/gamemode/modules/chat/sv_chat.lua +++ b/gamemode/modules/chat/sv_chat.lua @@ -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, ...) @@ -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 @@ -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)