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:
psychon
2008-12-23 10:07:54 +00:00
parent acd854eb1c
commit 7ba58aba72
4 changed files with 15 additions and 108 deletions

View File

@@ -305,10 +305,10 @@ void CClient::UserCommand(const CString& sLine) {
Table.SetCell("Modes", pChan->GetModeString());
Table.SetCell("Users", CString(pChan->GetNickCount()));
map<char, unsigned int> mPerms = pChan->GetPermCounts();
for (unsigned int b = 0; b < sPerms.size(); b++) {
CString sPerm;
sPerm += sPerms[b];
Table.SetCell(sPerm, CString(pChan->GetPermCount(sPerms[b])));
char cPerm = sPerms[b];
Table.SetCell(CString(cPerm), CString(mPerms[cPerm]));
}
}