From 0f6b39ae5f81899bf50ded35cdb167549628501f Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 15 Mar 2021 17:36:32 +0100 Subject: [PATCH] Proper badge support --- bot.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot.lua b/bot.lua index 778cf2c..ce9b5aa 100644 --- a/bot.lua +++ b/bot.lua @@ -43,7 +43,11 @@ function furrybot.recieve(rawmsg) if nameidx and (first_byte == 60 or first_byte == 27) then local idx = msg:find(">") local player = msg:sub(nameidx + 1, idx - 1) - local message = msg:sub(idx + 3, #msg) + local sidx = idx + 2 + if msg:sub(idx + 1, idx + 1) == ":" then + sidx = sidx + 1 + end + local message = msg:sub(sidx, #msg) if message:find("!") == 1 then local args = message:sub(2, #message):split(" ") local cmd = table.remove(args, 1) -- 2.44.0