mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Made /part remove a chan that is in 'Trying' state
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@434 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -127,6 +127,17 @@ void CUserSock::ReadLine(const CString& sData) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (sCommand.CaseCmp("PART") == 0) {
|
||||
if (m_pUser) {
|
||||
CString sChan = sLine.Token(1);
|
||||
CChan* pChan = m_pUser->FindChan(sChan);
|
||||
|
||||
if (pChan && !pChan->IsOn()) {
|
||||
PutStatusNotice("Removing channel [" + sChan + "]");
|
||||
m_pUser->DelChan(sChan);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (sCommand.CaseCmp("QUIT") == 0) {
|
||||
if (m_pIRCSock) {
|
||||
m_pIRCSock->UserDisconnected();
|
||||
@@ -488,6 +499,11 @@ void CUserSock::UserCommand(const CString& sLine) {
|
||||
const vector<CChan*>& vChans = m_pUser->GetChans();
|
||||
const CString& sPerms = m_pUser->GetIRCSock()->GetPerms();
|
||||
|
||||
if (!vChans.size()) {
|
||||
PutStatus("You have no channels defined");
|
||||
return;
|
||||
}
|
||||
|
||||
CTable Table;
|
||||
Table.AddColumn("Name");
|
||||
Table.AddColumn("Status");
|
||||
|
||||
Reference in New Issue
Block a user