forked from CFC-Servers/cfc_chat_transit
fix console messages not being relayed ('say word')
This commit is contained in:
parent
d7ea74c929
commit
143c4e493d
@ -2,12 +2,20 @@ import guard from ChatTransit
|
||||
|
||||
ChatTransit.ReceiveMessage = (data) =>
|
||||
:userid, :text, :teamonly = data
|
||||
nick, steamid64 = nil
|
||||
ply = Player userid
|
||||
|
||||
return if teamonly == 1
|
||||
return unless text
|
||||
return if text == ""
|
||||
|
||||
if IsValid ply
|
||||
nick = ply\Nick!
|
||||
steamid64 = ply\SteamID64!
|
||||
else
|
||||
nick = "Console"
|
||||
steamid64 = "0"
|
||||
|
||||
shouldRelay = hook.Run "CFC_ChatTransit_ShouldRelayChatMessage", ply, text, teamonly
|
||||
return if shouldRelay == false
|
||||
|
||||
@ -16,8 +24,8 @@ ChatTransit.ReceiveMessage = (data) =>
|
||||
Data:
|
||||
Type: "message"
|
||||
Content: text
|
||||
SteamName: ply\Nick!
|
||||
SteamId: ply\SteamID64!
|
||||
SteamName: nick
|
||||
SteamId: steamid64
|
||||
IrisId: "none"
|
||||
|
||||
gameevent.Listen "player_say"
|
||||
|
Loading…
Reference in New Issue
Block a user