mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
CClient: share the chan detaching code
This commit is contained in:
@@ -121,14 +121,7 @@ void CClient::UserCommand(CString& sLine) {
|
||||
}
|
||||
|
||||
set<CChan*> sChans = MatchChans(sPatterns);
|
||||
|
||||
unsigned int uDetached = 0;
|
||||
for (CChan* pChan : sChans) {
|
||||
if (pChan->IsDetached())
|
||||
continue;
|
||||
uDetached++;
|
||||
pChan->DetachUser();
|
||||
}
|
||||
unsigned int uDetached = DetachChans(sChans);
|
||||
|
||||
PutStatus("There were [" + CString(sChans.size()) + "] channels matching [" + sPatterns + "]");
|
||||
PutStatus("Detached [" + CString(uDetached) + "] channels");
|
||||
|
||||
Reference in New Issue
Block a user