From f661f2a002e8dadee654dcc49a08d853a126d155 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 20 Jan 2013 10:33:24 +0700 Subject: [PATCH] Use CModule::ExpandString --- modules/autoreply.cpp | 6 +----- modules/identfile.cpp | 6 +++--- modules/perform.cpp | 9 ++------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/modules/autoreply.cpp b/modules/autoreply.cpp index 8bf44722..e4b3f736 100644 --- a/modules/autoreply.cpp +++ b/modules/autoreply.cpp @@ -39,11 +39,7 @@ public: SetReply(sReply); } - if (m_pNetwork) { - return m_pNetwork->ExpandString(sReply); - } - - return m_pUser->ExpandString(sReply); + return ExpandString(sReply); } void Handle(const CString& sNick) { diff --git a/modules/identfile.cpp b/modules/identfile.cpp index 412d3957..6d84bcf0 100644 --- a/modules/identfile.cpp +++ b/modules/identfile.cpp @@ -48,12 +48,12 @@ public: void SetFormat(const CString& sLine) { SetNV("Format", sLine.Token(1, true)); PutModule("Format has been set to: " + GetNV("Format")); - PutModule("Format would be expanded to: " + m_pUser->ExpandString(GetNV("Format"))); + PutModule("Format would be expanded to: " + ExpandString(GetNV("Format"))); } void GetFormat(const CString& sLine) { PutModule("Format is set to: " + GetNV("Format")); - PutModule("Format would be expanded to: " + m_pUser->ExpandString(GetNV("Format"))); + PutModule("Format would be expanded to: " + ExpandString(GetNV("Format"))); } void Show(const CString& sLine) { @@ -109,7 +109,7 @@ public: return false; } - CString sData = m_pNetwork->ExpandString(GetNV("Format")); + CString sData = ExpandString(GetNV("Format")); // If the format doesn't contain anything expandable, we'll // assume this is an "old"-style format string. diff --git a/modules/perform.cpp b/modules/perform.cpp index 04c7bcd1..7821d68f 100644 --- a/modules/perform.cpp +++ b/modules/perform.cpp @@ -40,7 +40,6 @@ class CPerform : public CModule { void List(const CString& sCommand) { CTable Table; unsigned int index = 1; - CString sExpanded; Table.AddColumn("Id"); Table.AddColumn("Perform"); @@ -51,11 +50,7 @@ class CPerform : public CModule { Table.SetCell("Id", CString(index)); Table.SetCell("Perform", *it); - if (m_pNetwork) { - sExpanded = m_pNetwork->ExpandString(*it); - } else { - sExpanded = GetUser()->ExpandString(*it); - } + CString sExpanded = ExpandString(*it); if (sExpanded != *it) { Table.SetCell("Expanded", sExpanded); @@ -128,7 +123,7 @@ public: virtual void OnIRCConnected() { for (VCString::const_iterator it = m_vPerform.begin(); it != m_vPerform.end(); ++it) { - PutIRC(m_pNetwork->ExpandString(*it)); + PutIRC(ExpandString(*it)); } }