forked from CFC-Servers/cfc_chat_transit
Default anticrash event text when given a non-string value
This commit is contained in:
parent
06c2a7690a
commit
522ef63b5b
@ -124,7 +124,12 @@ ChatTransit.PlayerDisconnected = (ply) =>
|
||||
|
||||
@WebSocket\write message
|
||||
|
||||
ChatTransit.AnticrashEvent = (eventText="Heavy lag detected!") =>
|
||||
ChatTransit.AnticrashEvent = (eventText) =>
|
||||
argType = type eventText
|
||||
|
||||
if argType ~= "string"
|
||||
eventText = "Heavy lag detected!"
|
||||
|
||||
struct =
|
||||
Type: "anticrash_event"
|
||||
Data:
|
||||
|
Loading…
Reference in New Issue
Block a user