mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
Make CChan smaller
This is mostly done by removing unused members, but there is also removes a cache which saved how many opped, voiced etc users are on a channel. This shouldn't result in a big slowdown, since this data is only ever used for /msg *status listchans. Also, this replaces the API to access this data with a version which should be faster especially for big channels. On amd64 the size of CChan was 600 bytes before and is 400 bytes now. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1301 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
-24
@@ -154,20 +154,6 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
case 372: // motd
|
||||
case 376: // end motd
|
||||
m_pUser->AddMotdBuffer(":" + sServer + " " + sCmd + " ", " " + sRest);
|
||||
break;
|
||||
case 471: // :irc.server.net 471 nick #chan :Cannot join channel (+l)
|
||||
case 473: // :irc.server.net 473 nick #chan :Cannot join channel (+i)
|
||||
case 475: // :irc.server.net 475 nick #chan :Cannot join channel (+k)
|
||||
if (m_pUser->IsUserAttached()) {
|
||||
CChan* pChan = m_pUser->FindChan(sRest.substr(0, sRest.find(' ')));
|
||||
|
||||
if ((pChan) && (!pChan->IsOn())) {
|
||||
if (!pChan->DecClientRequests()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 437:
|
||||
// :irc.server.net 437 * badnick :Nick/channel is temporarily unavailable
|
||||
@@ -185,16 +171,6 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 315: {
|
||||
// :irc.server.com 315 yournick #chan :End of /WHO list.
|
||||
CChan* pChan = m_pUser->FindChan(sLine.Token(3));
|
||||
|
||||
if (pChan) {
|
||||
pChan->SetWhoDone();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 331: {
|
||||
// :irc.server.com 331 yournick #chan :No topic is set.
|
||||
CChan* pChan = m_pUser->FindChan(sLine.Token(3));
|
||||
|
||||
Reference in New Issue
Block a user