Break some way too long lines into way less long lines

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1025 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-04-18 09:25:28 +00:00
parent 011ddfe499
commit 8d5fa6bc3b
2 changed files with 15 additions and 5 deletions
+7 -4
View File
@@ -69,17 +69,20 @@ void CDCCSock::Connected() {
}
void CDCCSock::Disconnected() {
const CString sStart = ((m_bSend) ? "DCC -> [" : "DCC <- [") + m_sRemoteNick + "][" + m_sFileName + "] - ";
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!");
m_pUser->PutModule(m_sModuleName, sStart + "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) + "]");
m_pUser->PutModule(m_sModuleName, sStart + "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) + "]");
m_pUser->PutModule(m_sModuleName, sStart + "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!");
m_pUser->PutModule(m_sModuleName, sStart + "Incomplete!");
}
}
+8 -1
View File
@@ -422,7 +422,14 @@ private:
/**
* @class CSafePtr
* @author prozac <prozac@rottenboy.com>
* @brief This class is intended to be created on the stack and hold a pointer which will be deleted upon destruction. It is useful for functions where you need an allocated pointer and have many return paths. It prevents copying to get around the exclusive ownership situation which makes std::auto_ptr invalidate the first pointer on copy. This is intended to be used in simplistic situations such as local variables.
* @brief Safe deletion of a pointer.
*
* This class is intended to be created on the stack and hold a pointer which
* will be deleted upon destruction. It is useful for functions where you need
* an allocated pointer and have many return paths. It prevents copying to get
* around the exclusive ownership situation which makes std::auto_ptr
* invalidate the first pointer on copy. This is intended to be used in
* simplistic situations such as local variables.
*/
template<typename T>
class CSafePtr : private CNoCopy {