mirror of
https://github.com/znc/znc.git
synced 2026-06-25 04:22:08 +02:00
Main part is: Add disconnect and connect to *status
Other stuff included here: - Always send the quit message when disconnecting from IRC - Partly rewrite CConnectUserTimer::RunJob() for some de-uglification git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@874 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+10
-5
@@ -55,12 +55,17 @@ CIRCSock::~CIRCSock() {
|
||||
CZNC::Get().ReleaseISpoof();
|
||||
}
|
||||
|
||||
PutIRC("QUIT :" + m_pUser->GetQuitMsg());
|
||||
Quit();
|
||||
m_msChans.clear();
|
||||
GetUser()->AddBytesRead(GetBytesRead());
|
||||
GetUser()->AddBytesWritten(GetBytesWritten());
|
||||
}
|
||||
|
||||
void CIRCSock::Quit() {
|
||||
PutIRC("QUIT :" + m_pUser->GetQuitMsg());
|
||||
Close(CLT_AFTERWRITE);
|
||||
}
|
||||
|
||||
void CIRCSock::ReadLine(const CString& sData) {
|
||||
CString sLine = sData;
|
||||
|
||||
@@ -195,14 +200,14 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
} else {
|
||||
char cLetter = 0;
|
||||
if (sBadNick.empty()) {
|
||||
Close();
|
||||
Quit();
|
||||
return;
|
||||
}
|
||||
|
||||
cLetter = sBadNick.Right(1)[0];
|
||||
|
||||
if (cLetter == 'z') {
|
||||
Close();
|
||||
Quit();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -897,8 +902,8 @@ void CIRCSock::Disconnected() {
|
||||
MODULECALL(OnIRCDisconnected(), m_pUser, NULL, );
|
||||
|
||||
DEBUG_ONLY(cout << GetSockName() << " == Disconnected()" << endl);
|
||||
if (!m_pUser->IsBeingDeleted()) {
|
||||
m_pUser->PutStatus("Disconnected from IRC. Reconnecting...");
|
||||
if (!m_pUser->IsBeingDeleted() && m_pUser->GetIRCConnectEnabled()) {
|
||||
m_pUser->PutStatus("Disconnected from IRC. Reconnecting...");
|
||||
}
|
||||
m_pUser->ClearRawBuffer();
|
||||
m_pUser->ClearMotdBuffer();
|
||||
|
||||
Reference in New Issue
Block a user