Currently there are /znc clearallchannelbuffers and /znc clearallquerybuffers. /znc clearallbuffers to clear both channel and query buffers could be useful especially with mobile client.
Currently there are `/znc clearallchannelbuffers` and `/znc clearallquerybuffers`. `/znc clearallbuffers` to clear both channel and query buffers could be useful especially with mobile client.
<!-- github-sync-id:56944449 -->
I actually have this as my own addon aliased to /clr for exactly this reason!
I thought it was a bit niche so I haven't PRd it, but:
#include<znc/Chan.h>#include<znc/IRCNetwork.h>#include<znc/Modules.h>#include<znc/Query.h>#include<znc/User.h>classCClearAllBuffers:publicCModule{public:MODCONSTRUCTOR(CClearAllBuffers){}virtualvoidOnModCommand(constCString&sCommand){intcount=0;for(autonetwork:m_pUser->GetNetworks()){for(autochan:network->GetChans()){chan->ClearBuffer();count++;}for(autoquery:network->GetQueries()){network->DelQuery(query->GetName());count++;}}PutStatus("Cleared "+CString(count)+" buffers");}};USERMODULEDEFS(CClearAllBuffers,"Provides command to clear ALL buffers")
I actually have this as my own addon aliased to /clr for exactly this reason!
I thought it was a bit niche so I haven't PRd it, but:
``` c++
#include <znc/Chan.h>
#include <znc/IRCNetwork.h>
#include <znc/Modules.h>
#include <znc/Query.h>
#include <znc/User.h>
class CClearAllBuffers : public CModule {
public:
MODCONSTRUCTOR(CClearAllBuffers) {}
virtual void OnModCommand(const CString& sCommand) {
int count = 0;
for (auto network : m_pUser->GetNetworks()) {
for (auto chan : network->GetChans()) {
chan->ClearBuffer();
count++;
}
for (auto query : network->GetQueries()) {
network->DelQuery(query->GetName());
count++;
}
}
PutStatus("Cleared " + CString(count) + " buffers");
}
};
USERMODULEDEFS(CClearAllBuffers, "Provides command to clear ALL buffers")
```
<!-- github-comment-id:73403243 -->
Oh and if you just want the current network, simply use *alias:
<*alias> Actions for alias CL:
<*alias> 0 ZNC ClearAllChannelBuffers
<*alias> 1 ZNC ClearAllQueryBuffers
<*alias> End of actions for alias CL.
Oh and if you just want the current network, simply use *alias:
```
<*alias> Actions for alias CL:
<*alias> 0 ZNC ClearAllChannelBuffers
<*alias> 1 ZNC ClearAllQueryBuffers
<*alias> End of actions for alias CL.
```
<!-- github-comment-id:73403272 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently there are
/znc clearallchannelbuffersand/znc clearallquerybuffers./znc clearallbuffersto clear both channel and query buffers could be useful especially with mobile client.I actually have this as my own addon aliased to /clr for exactly this reason!
I thought it was a bit niche so I haven't PRd it, but:
Oh and if you just want the current network, simply use *alias:
For those using the playback module:
/msg *playback clear *