mirror of
https://github.com/znc/znc.git
synced 2026-06-26 13:01:44 +02:00
Merged rev 838,888,890,894,899,900,902-904,926,934,963,984-989 from crox's branch:
- Changes to specfile - define PATH_MAX and RTLD_LOCAL if not defines - compile fixes - SetFileName should not set m_iFD - check for cygwin and do not use -fPIC - replaced if ... elif with case in configure.in - handle 437 reply code - allow disabled channels - use strerror() in CIRCSock::SockError() - added GetUser() to CClient and CIRCSock - added support for traffic accounting - added names to timers git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@806 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+9
-1
@@ -51,6 +51,8 @@ CIRCSock::~CIRCSock() {
|
||||
|
||||
PutIRC("QUIT :" + m_pUser->GetQuitMsg());
|
||||
m_msChans.clear();
|
||||
GetUser()->AddBytesRead(GetBytesRead());
|
||||
GetUser()->AddBytesWritten(GetBytesWritten());
|
||||
}
|
||||
|
||||
void CIRCSock::ReadLine(const CString& sData) {
|
||||
@@ -156,6 +158,12 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
break;
|
||||
case 437:
|
||||
// :irc.server.net 437 * badnick :Nick/channel is temporarily unavailable
|
||||
// :irc.server.net 437 mynick badnick :Nick/channel is temporarily unavailable
|
||||
// :irc.server.net 437 mynick badnick :Cannot change nickname while banned on channel
|
||||
if (m_pUser->IsChan(sRest.Token(0)) || sNick != "*")
|
||||
break;
|
||||
case 433: {
|
||||
unsigned int uMax = GetMaxNickLen();
|
||||
CString sBadNick = sRest.Token(0);
|
||||
@@ -873,7 +881,7 @@ void CIRCSock::Disconnected() {
|
||||
void CIRCSock::SockError(int iErrno) {
|
||||
DEBUG_ONLY(cout << GetSockName() << " == SockError(" << iErrno << ")" << endl);
|
||||
if (!m_pUser->IsBeingDeleted()) {
|
||||
m_pUser->PutStatus("Disconnected from IRC. Reconnecting...");
|
||||
m_pUser->PutStatus("Disconnected from IRC (" + CString(strerror(iErrno)) + "). Reconnecting...");
|
||||
}
|
||||
m_pUser->ClearRawBuffer();
|
||||
m_pUser->ClearMotdBuffer();
|
||||
|
||||
Reference in New Issue
Block a user