From 8eda266bae74ccba10d928ea7efaac7c23f4018c Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 22 Feb 2011 23:36:54 +0100 Subject: [PATCH] Fix shell module shell didn't compile since 6bc36d1708d6 because it used the three-argument-version of CModule::PutModule(). This commit replaced that with a call to CModule::PutUser(). Signed-off-by: Uli Schlachter --- modules/extra/shell.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/extra/shell.cpp b/modules/extra/shell.cpp index 3473ec65..dd9d0d9b 100644 --- a/modules/extra/shell.cpp +++ b/modules/extra/shell.cpp @@ -142,16 +142,11 @@ public: return CONTINUE; } - void PutShell(const CString& sLine) { - CString sPath = m_sPath; - - CString::size_type a = sPath.find(' '); - while (a != CString::npos) { - sPath.replace(a, 1, "_"); - a = sPath.find(' '); - } - - PutModule(sLine, "shell", sPath); + void PutShell(const CString& sMsg) { + CString sPath = m_sPath.Replace_n(" ", "_"); + CString sSource = ":" + GetModNick() + "!shell@" + sPath; + CString sLine = sSource + " PRIVMSG " + m_pUser->GetCurNick() + " :" + sMsg; + PutUser(sLine); } void RunCommand(const CString& sCommand) {