mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-09 17:40:29 +01:00
Fixing regressions in sendChat and sendNotice.
Fixing: Incorrect handling of newlines in message. Fixing: Cleaning ':' from message.
This commit is contained in:
parent
b392b69f87
commit
9bf809f99a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user