From 4ae08d527280778daf991a38af80956c2b84693b Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 31 Oct 2007 17:22:02 +0000 Subject: Fixified some more git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8428 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/xline.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/xline.h b/include/xline.h index 5b81eef82..cca0e9b76 100644 --- a/include/xline.h +++ b/include/xline.h @@ -69,9 +69,9 @@ class CoreExport XLine : public classbase /** Returns true wether or not the given string exactly matches the gline * (no wildcard use in this method) -- used for removal of a line */ - virtual bool MatchesLiteral(std::string &str) = 0; + virtual bool MatchesLiteral(const std::string &str) = 0; - virtual bool Matches(const std::string &str); + virtual bool Matches(const std::string &str) = 0; virtual void Apply(User* u); @@ -123,6 +123,8 @@ class CoreExport KLine : public XLine { identmask = strdup(ident); hostmask = strdup(host); + matchtext = this->identmask; + matchtext.append("@").append(this->hostmask); } /** Destructor @@ -135,6 +137,8 @@ class CoreExport KLine : public XLine virtual bool Matches(User *u); + virtual bool Matches(const std::string &str); + virtual bool MatchesLiteral(const std::string &str); virtual void Apply(User* u); @@ -147,6 +151,8 @@ class CoreExport KLine : public XLine /** Host mask */ char* hostmask; + + std::string matchtext; }; /** GLine class @@ -166,6 +172,8 @@ class CoreExport GLine : public XLine { identmask = strdup(ident); hostmask = strdup(host); + matchtext = this->identmask; + matchtext.append("@").append(this->hostmask); } /** Destructor @@ -178,6 +186,8 @@ class CoreExport GLine : public XLine virtual bool Matches(User *u); + virtual bool Matches(const std::string &str); + virtual bool MatchesLiteral(const std::string &str); virtual void Apply(User* u); @@ -190,6 +200,8 @@ class CoreExport GLine : public XLine /** Host mask */ char* hostmask; + + std::string matchtext; }; /** ELine class @@ -209,6 +221,8 @@ class CoreExport ELine : public XLine { identmask = strdup(ident); hostmask = strdup(host); + matchtext = this->identmask; + matchtext.append("@").append(this->hostmask); } ~ELine() @@ -219,6 +233,8 @@ class CoreExport ELine : public XLine virtual bool Matches(User *u); + virtual bool Matches(const std::string &str); + virtual bool MatchesLiteral(const std::string &str); virtual void Unset(); @@ -233,6 +249,8 @@ class CoreExport ELine : public XLine /** Host mask */ char* hostmask; + + std::string matchtext; }; /** ZLine class -- cgit v1.2.3