Bugfix for weird chats with newlines in them. They don't save to SV very well
Wobin [04-20-14 - 09:15]
Bugfix for weird chats with newlines in them. They don't save to SV very well
diff --git a/BorrowerAndLender.lua b/BorrowerAndLender.lua
index d1516e1..0ed3287 100644
--- a/BorrowerAndLender.lua
+++ b/BorrowerAndLender.lua
@@ -39,6 +39,9 @@ local function FilterNPC(eventCode, channel, npc, chat)
if channel ~= CHAT_CHANNEL_MONSTER_SAY and channel ~= CHAT_CHANNEL_MONSTER_YELL then return end
if blacklist[npc] then return end
if not settings.chats[npc] then settings.chats[npc] = {} end
+
+ chat = chat:gsub("\n","")
+
if not settings.chats[npc][chat] then settings.chats[npc][chat] = 0 return end
settings.chats[npc][chat] = settings.chats[npc][chat] + 1