Logo Search packages:      
Sourcecode: znc version File versions

void CDCCSock::Disconnected (  )  [virtual]

Override these functions for an easy interface when using the Socket Manager Don't bother using these callbacks if you are using this class directly (without Socket Manager) as the Socket Manager calls most of these callbacks

Disconnected event

Reimplemented from Csock.

Definition at line 64 of file DCCSock.cpp.

References Csock::GetAvgRead(), Csock::GetAvgWrite(), and Csock::GetSockName().

                            {
      DEBUG_ONLY(cout << GetSockName() << " == Disconnected()" << endl);
      if (m_uBytesSoFar > m_uFileSize) {
            m_pUser->PutModule(m_sModuleName, ((m_bSend) ? "DCC -> [" : "DCC <- [") + m_sRemoteNick + "][" + m_sFileName + "] - TooMuchData!");
      } else if (m_uBytesSoFar == m_uFileSize) {
            if (m_bSend) {
                  m_pUser->PutModule(m_sModuleName, ((m_bSend) ? "DCC -> [" : "DCC <- [") + m_sRemoteNick + "][" + m_sFileName + "] - Completed! - Sent [" + m_sLocalFile + "] at [" + CString::ToKBytes(GetAvgWrite() / 1000.0) + "]");
            } else {
                  m_pUser->PutModule(m_sModuleName, ((m_bSend) ? "DCC -> [" : "DCC <- [") + m_sRemoteNick + "][" + m_sFileName + "] - Completed! - Saved to [" + m_sLocalFile + "] at [" + CString::ToKBytes(GetAvgRead() / 1000.0) + "]");
            }
      } else {
            m_pUser->PutModule(m_sModuleName, ((m_bSend) ? "DCC -> [" : "DCC <- [") + m_sRemoteNick + "][" + m_sFileName + "] - Incomplete!");
      }
}


Generated by  Doxygen 1.6.0   Back to index