about summary refs log tree commit diff
path: root/bot.lua
diff options
context:
space:
mode:
authorequa <equaa@protonmail.com>2023-03-08 11:27:40 -0500
committerequa <equaa@protonmail.com>2023-03-08 11:27:40 -0500
commit4aa89fc5a0f14eb8ea375590732ac3a91ce376a4 (patch)
treea5684b25a53524925d45a25996f8f0e964f47874 /bot.lua
parent6fec1265c14124ceda8d45a736fdd0132f84ad9f (diff)
fix up illegal char handling. oops HEAD main
Diffstat (limited to 'bot.lua')
-rw-r--r--bot.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot.lua b/bot.lua
index 66e3d12..55ce64f 100644
--- a/bot.lua
+++ b/bot.lua
@@ -48,7 +48,7 @@ local function emit_message(message)
 	table.insert(out, message.command)
 
 	for i, v in ipairs(message.params or {}) do
-		assert(not string.match(i, "[\0\r\n]"))
+		v = string.gsub(v, "[\0\r\n]", "")
 
 		if i == #(message.params or {}) then
 			table.insert(out, " :")