diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-03-15 17:36:32 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-03-15 17:36:32 +0100 |
commit | 0f6b39ae5f81899bf50ded35cdb167549628501f (patch) | |
tree | 76d322cdc861df2ca87a4ca29af686690d3de7b3 /bot.lua | |
parent | 3148a989226f2c529a0da9882ee1107ff5cbe484 (diff) | |
download | furrybot-0f6b39ae5f81899bf50ded35cdb167549628501f.tar.xz |
Proper badge support
Diffstat (limited to 'bot.lua')
-rw-r--r-- | bot.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |