Fixing regressions in sendChat and sendNotice.

Fixing: Incorrect handling of newlines in message.
Fixing: Cleaning ':' from message.
This commit is contained in:
Joshua Simmons 2010-07-18 15:24:13 +08:00 committed by JakobOvrum
parent b392b69f87
commit 9bf809f99a
1 changed files with 8 additions and 2 deletions

View File

@ -23,11 +23,17 @@ local function clean(str)
end
function meta:sendChat(target, msg)
self:send("PRIVMSG %s :%s", clean(target), clean(msg))
-- Split the message into segments if it includes newlines.
for line in msg:gmatch("([^\r\n]+)")
self:send("PRIVMSG %s :%s", clean(target), msg)
end
end
function meta:sendNotice(target, msg)
self:send("NOTICE %s :%s", clean(target), clean(msg))
-- Split the message into segments if it includes newlines.
for line in msg:gmatch("([^\r\n]+)")
self:send("NOTICE %s :%s", clean(target), msg)
end
end
function meta:join(channel, key)