mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge pull request #883 from jpnurmi/clearallbuffers
Add CLEARALLBUFFERS command (closes #852)
This commit is contained in:
@@ -1390,6 +1390,19 @@ void CClient::UserCommand(CString& sLine) {
|
||||
m_pNetwork->DelQuery(pQuery->GetName());
|
||||
}
|
||||
PutStatus("All query buffers have been cleared");
|
||||
} else if (sCommand.Equals("CLEARALLBUFFERS")) {
|
||||
if (!m_pNetwork) {
|
||||
PutStatus("You must be connected with a network to use this command");
|
||||
return;
|
||||
}
|
||||
|
||||
for (CChan* pChan : m_pNetwork->GetChans()) {
|
||||
pChan->ClearBuffer();
|
||||
}
|
||||
for (CQuery* pQuery : m_pNetwork->GetQueries()) {
|
||||
m_pNetwork->DelQuery(pQuery->GetName());
|
||||
}
|
||||
PutStatus("All buffers have been cleared");
|
||||
} else if (sCommand.Equals("SETBUFFER")) {
|
||||
if (!m_pNetwork) {
|
||||
PutStatus("You must be connected with a network to use this command");
|
||||
|
||||
Reference in New Issue
Block a user