Restore CIRCNetwork::ClearQueryBuffer() for convenience

Originally removed when query buffers were introduced in 14a534c.
The ideal name would be plural ClearQueryBuffers() now that there
are multiple query buffers, but use the old name for compatibility
reasons (see https://github.com/kylef/znc-contrib/pull/18).
This commit is contained in:
J-P Nurmi
2015-02-28 20:45:26 +01:00
parent 284158c92f
commit 2b0c6e595b
3 changed files with 10 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
#include <znc/Chan.h>
#include <znc/Query.h>
#include <algorithm>
#include <memory>
using std::vector;
using std::set;
@@ -1279,6 +1280,11 @@ bool CIRCNetwork::PutIRC(const CString& sLine) {
return true;
}
void CIRCNetwork::ClearQueryBuffer() {
std::for_each(m_vQueries.begin(), m_vQueries.end(), std::default_delete<CQuery>());
m_vQueries.clear();
}
const CString& CIRCNetwork::GetNick(const bool bAllowDefault) const {
if (m_sNick.empty()) {
return m_pUser->GetNick(bAllowDefault);