From 953bfcbbf4bf5c1ba33db16e99a2149c1fb4a2cf Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 2 Dec 2007 15:14:17 +0000 Subject: [PATCH] Add ClearAllChannelBuffers command to *status (ClearBuffer for all channels) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@892 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Client.cpp b/Client.cpp index 3e8d26e4..e2327e68 100644 --- a/Client.cpp +++ b/Client.cpp @@ -1362,6 +1362,14 @@ void CClient::UserCommand(const CString& sLine) { pChan->ClearBuffer(); PutStatus("The buffer for [" + sChan + "] has been cleared"); + } else if (sCommand.CaseCmp("CLEARALLCHANNELBUFFERS") == 0) { + vector::const_iterator it; + const vector& vChans = m_pUser->GetChans(); + + for (it = vChans.begin(); it != vChans.end(); it++) { + (*it)->ClearBuffer(); + } + PutStatus("All buffers have been cleared"); } else if (sCommand.CaseCmp("SETBUFFER") == 0) { CString sChan = sLine.Token(1); @@ -1477,6 +1485,7 @@ void CClient::HelpUser() { Table.AddRow(); Table.SetCell("Command", "Topics"); Table.SetCell("Arguments", ""); Table.SetCell("Description", "Show topics in all channels"); Table.AddRow(); Table.SetCell("Command", "PlayBuffer"); Table.SetCell("Arguments", "<#chan>"); Table.SetCell("Description", "Play back the buffer for a given channel"); Table.AddRow(); Table.SetCell("Command", "ClearBuffer");Table.SetCell("Arguments", "<#chan>"); Table.SetCell("Description", "Clear the buffer for a given channel"); + Table.AddRow(); Table.SetCell("Command", "ClearAllChannelBuffers");Table.SetCell("Arguments", ""); Table.SetCell("Description", "Clear the channel buffers"); Table.AddRow(); Table.SetCell("Command", "SetBuffer"); Table.SetCell("Arguments", "<#chan> [linecount]"); Table.SetCell("Description", "Set the buffer count for a channel"); Table.AddRow(); Table.SetCell("Command", "SetVHost"); Table.SetCell("Arguments", "");Table.SetCell("Description", "Set the VHost for this connection"); Table.AddRow(); Table.SetCell("Command", "Jump"); Table.SetCell("Arguments", ""); Table.SetCell("Description", "Jump to the next server in the list");