summaryrefslogtreecommitdiff
path: root/include/xline.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 17:22:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 17:22:02 +0000
commit4ae08d527280778daf991a38af80956c2b84693b (patch)
tree97e57f8b54f81578f7eb2fe0a6e5c8bd06ca5b14 /include/xline.h
parentde17f45ced928d8cc3c7fbbb4882ac6a68ce4171 (diff)
Fixified some more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8428 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/xline.h')
-rw-r--r--include/xline.h22
1 files changed, 20 insertions, 2 deletions
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