]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cban.cpp
Make all User::IsModeSet() methods const, accept const ModeHandler
[user/henk/code/inspircd.git] / src / modules / m_cban.cpp
index 2a969bec7cb594666bd6d5d5b8680773fc241f24..42cff2850c0be3b2cba8ecfb5b993591ba9b4f95 100644 (file)
 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,14 +45,12 @@ public:
 
        bool Matches(const std::string &s)
        {
-               if (matchtext == s)
-                       return true;
-               return false;
+               return irc::equals(matchtext, s);
        }
 
        const std::string& Displayable()
        {
-               return displaytext;
+               return matchtext;
        }
 };