Esempio n. 1
0
void CShellSock::ReadLine(const CString& sData) {
	CString sLine = sData;

	sLine.TrimRight("\r\n");
	sLine.Replace("\t", "    ");

	m_pParent->SetClient(m_pClient);
	m_pParent->PutShell(sLine);
	m_pParent->SetClient(NULL);
}
Esempio n. 2
0
File: shell.cpp Progetto: aszrul/znc
void CShellSock::Disconnected() {
    // If there is some incomplete line in the buffer, read it
    // (e.g. echo echo -n "hi" triggered this)
    CString& sBuffer = GetInternalReadBuffer();
    if (!sBuffer.empty()) ReadLine(sBuffer);

    m_pParent->SetClient(m_pClient);
    m_pParent->PutShell("znc$");
    m_pParent->SetClient(nullptr);
}