mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01: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:
@@ -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]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user