Add traffic tracking support to CSocket

Now every module that uses CSocket automatically gets its generated traffic
counted. Those which use Csock directly should be shot and burried anyway ;)

This adds CModule::IsGlobal().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1283 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-12-06 19:56:38 +00:00
parent 03a13f6d51
commit 08088be7d6
4 changed files with 15 additions and 11 deletions
-8
View File
@@ -58,8 +58,6 @@ public:
EnableReadLine();
}
~CSChatSock();
virtual Csock *GetSockObj(const CS_STRING & sHostname, u_short iPort)
{
CSChatSock *p = new CSChatSock(sHostname, iPort);
@@ -442,12 +440,6 @@ private:
//////////////////// methods ////////////////
CSChatSock::~CSChatSock()
{
m_pModule->GetUser()->AddBytesRead(GetBytesRead());
m_pModule->GetUser()->AddBytesWritten(GetBytesWritten());
}
void CSChatSock::ReadLine(const CS_STRING & sLine)
{
if (m_pModule) {