mirror of
https://github.com/znc/znc.git
synced 2026-08-08 01:43:03 +02:00
Add antiidle module and buffer WALLOPS in the query buffer
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@798 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+8
-4
@@ -2,15 +2,19 @@
|
||||
|
||||
#include "Buffer.h"
|
||||
|
||||
CBufLine::CBufLine(const CString& sPre, const CString& sPost) {
|
||||
CBufLine::CBufLine(const CString& sPre, const CString& sPost, bool bIncNick=true) {
|
||||
m_sPre = sPre;
|
||||
m_sPost = sPost;
|
||||
m_bIncNick = bIncNick;
|
||||
}
|
||||
|
||||
CBufLine::~CBufLine() {}
|
||||
|
||||
void CBufLine::GetLine(const CString& sTarget, CString& sRet) {
|
||||
sRet = m_sPre + sTarget + m_sPost;
|
||||
if(m_bIncNick)
|
||||
sRet = m_sPre + sTarget + m_sPost;
|
||||
else
|
||||
sRet = m_sPre + m_sPost;
|
||||
}
|
||||
|
||||
CBuffer::CBuffer(unsigned int uLineCount) {
|
||||
@@ -19,7 +23,7 @@ CBuffer::CBuffer(unsigned int uLineCount) {
|
||||
|
||||
CBuffer::~CBuffer() {}
|
||||
|
||||
int CBuffer::AddLine(const CString& sPre, const CString& sPost) {
|
||||
int CBuffer::AddLine(const CString& sPre, const CString& sPost, bool bIncNick) {
|
||||
if (!m_uLineCount) {
|
||||
return 0;
|
||||
}
|
||||
@@ -28,7 +32,7 @@ int CBuffer::AddLine(const CString& sPre, const CString& sPost) {
|
||||
erase(begin());
|
||||
}
|
||||
|
||||
push_back(CBufLine(sPre, sPost));
|
||||
push_back(CBufLine(sPre, sPost, bIncNick));
|
||||
return size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user