forked from CFC-Servers/cfc_chat_transit
parent
7df5beb3c1
commit
40f8bc299a
@ -1,13 +1,16 @@
|
|||||||
import guard from ChatTransit
|
import guard from ChatTransit
|
||||||
|
|
||||||
ChatTransit.ReceiveMessage = (ply, text, teamChat) =>
|
ChatTransit.ReceiveMessage = (data) =>
|
||||||
shouldRelay = hook.Run "CFC_ChatTransit_ShouldRelayChatMessage", ply, text, teamChat
|
:userid, :text, :teamonly = data
|
||||||
return if shouldRelay == false
|
ply = Player userid
|
||||||
|
|
||||||
return if teamChat
|
return if teamonly == 1
|
||||||
return unless text
|
return unless text
|
||||||
return if text == ""
|
return if text == ""
|
||||||
|
|
||||||
|
shouldRelay = hook.Run "CFC_ChatTransit_ShouldRelayChatMessage", ply, text, teamonly
|
||||||
|
return if shouldRelay == false
|
||||||
|
|
||||||
@Send
|
@Send
|
||||||
Type: "message"
|
Type: "message"
|
||||||
Data:
|
Data:
|
||||||
@ -17,4 +20,5 @@ ChatTransit.ReceiveMessage = (ply, text, teamChat) =>
|
|||||||
SteamId: ply\SteamID64!
|
SteamId: ply\SteamID64!
|
||||||
IrisId: "none"
|
IrisId: "none"
|
||||||
|
|
||||||
hook.Add "PlayerSay", "CFC_ChatTransit_MessageListener", guard(ChatTransit\ReceiveMessage), HOOK_MONITOR_LOW
|
gameevent.Listen "player_say"
|
||||||
|
hook.Add "player_say", "CFC_ChatTransit_MessageListener", guard(ChatTransit\ReceiveMessage)
|
||||||
|
Loading…
Reference in New Issue
Block a user