From 40f09daa15e4ca163c4222de293b11dc5ae57a23 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 16:54:25 +0200 Subject: Switch to irc::equals() from irc::string in modules that use it for comparing names of IRC objects --- src/modules/m_cban.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/modules/m_cban.cpp') diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 2a969bec7..7985affd4 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -29,14 +29,14 @@ class CBan : public XLine { private: std::string displaytext; - irc::string matchtext; + std::string matchtext; public: CBan(time_t s_time, long d, const std::string& src, const std::string& re, const std::string& ch) : XLine(s_time, d, src, re, "CBAN") + , matchtext(ch) { this->displaytext = ch; - this->matchtext = ch.c_str(); } // XXX I shouldn't have to define this @@ -47,9 +47,7 @@ public: bool Matches(const std::string &s) { - if (matchtext == s) - return true; - return false; + return irc::equals(matchtext, s); } const std::string& Displayable() -- cgit v1.2.3 From dfea56312886797f3e611cf3f1b72e43a8a365fa Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 16:55:07 +0200 Subject: m_cban Remove now unnecessary field CBan::displaytext --- src/modules/m_cban.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/modules/m_cban.cpp') diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 7985affd4..42cff2850 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -28,7 +28,6 @@ class CBan : public XLine { private: - std::string displaytext; std::string matchtext; public: @@ -36,7 +35,6 @@ public: : XLine(s_time, d, src, re, "CBAN") , matchtext(ch) { - this->displaytext = ch; } // XXX I shouldn't have to define this @@ -52,7 +50,7 @@ public: const std::string& Displayable() { - return displaytext; + return matchtext; } }; -- cgit v1.2.3