示例#1
0
文件: WebModules.cpp 项目: Affix/znc
bool CWebSock::OnLogin(const CString& sUser, const CString& sPass) {
	DEBUG("=================== CWebSock::OnLogin()");
	m_spAuth = new CWebAuth(this, sUser, sPass);

	// Some authentication module could need some time, block this socket
	// until then. CWebAuth will UnPauseRead().
	PauseRead();
	CZNC::Get().AuthUser(m_spAuth);

	// If CWebAuth already set this, don't change it.
	return IsLoggedIn();
}
示例#2
0
文件: bouncedcc.cpp 项目: sorbits/znc
void CDCCBounce::ReadData(const char* data, size_t len) {
    if (m_pPeer) {
        m_pPeer->Write(data, len);

        size_t BufLen = m_pPeer->GetInternalWriteBuffer().length();

        if (BufLen >= m_uiMaxDCCBuffer) {
            DEBUG(GetSockName() << " The send buffer is over the "
                  "limit (" << BufLen <<"), throttling");
            PauseRead();
        }
    }
}