add hook to prevent chat messages

This commit is contained in:
Pierce 2022-01-22 19:00:02 -05:00 committed by Brandon Sturgeon
parent 043dc20bd5
commit a736ba707d

View File

@ -1,6 +1,9 @@
import guard from ChatTransit
ChatTransit.ReceiveMessage = (ply, text, teamChat) =>
shouldRelay = hook.Run "CFC_ChatTransit_ShouldRelayChatMessage", ply, text, teamChat
return if shouldRelay == false
return if teamChat
return unless text
return if text == ""