From be76679065d90404d8b2fdee047e70e301888dd9 Mon Sep 17 00:00:00 2001 From: Austin Morton Date: Sat, 28 Jul 2012 02:11:00 -0400 Subject: [PATCH] change PutModule to handle multiple lines if need be. fixes #205 --- src/Client.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Client.cpp b/src/Client.cpp index c655aea1..26daecbb 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -761,12 +761,18 @@ void CClient::PutModNotice(const CString& sModule, const CString& sLine) { } void CClient::PutModule(const CString& sModule, const CString& sLine) { + VCString vsLines; + VCString::iterator it; if (!m_pUser) { return; } DEBUG("(" << GetFullName() << ") ZNC -> CLI [:" + m_pUser->GetStatusPrefix() + ((sModule.empty()) ? "status" : sModule) + "!znc@znc.in PRIVMSG " << GetNick() << " :" << sLine << "]"); - Write(":" + m_pUser->GetStatusPrefix() + ((sModule.empty()) ? "status" : sModule) + "!znc@znc.in PRIVMSG " + GetNick() + " :" + sLine + "\r\n"); + + sLine.Split("\n", vsLines); + for (it = vsLines.begin(); it != vsLines.end(); ++it) { + Write(":" + m_pUser->GetStatusPrefix() + ((sModule.empty()) ? "status" : sModule) + "!znc@znc.in PRIVMSG " + GetNick() + " :" + (*it) + "\r\n"); + } } CString CClient::GetNick(bool bAllowIRCNick) const {