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:
psychon
2007-05-17 19:09:17 +00:00
parent 4f7b904651
commit b772e2664e
16 changed files with 168 additions and 21 deletions
+9 -1
View File
@@ -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();