mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Shell module: Also read incomplete lines (no trailing newline) and display them
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1008 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -166,6 +166,12 @@ void CShellSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
void CShellSock::Disconnected() {
|
||||
// If there is some incomplete line in the buffer, read it
|
||||
// (e.g. echo echo -n "hi" triggered this)
|
||||
CString &sBuffer = GetInternalBuffer();
|
||||
if (!sBuffer.empty())
|
||||
ReadLine(sBuffer);
|
||||
|
||||
m_pParent->SetClient(m_pClient);
|
||||
m_pParent->PutShell("znc$");
|
||||
m_pParent->SetClient(NULL);
|
||||
|
||||
Reference in New Issue
Block a user