diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 20:29:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 20:29:53 +0000 |
commit | 1580ba87b9e75adfff6efd98714f10c4ef7ad71c (patch) | |
tree | 4f971e89a648423280b12dafc18c64db5cecee2c /src | |
parent | f5f716ea6feafaa79a2dfa40895d77d3e0f39f60 (diff) |
I think this is done. Add overloaded Matches() which takes std::string and implement it in zline and qline, the rest dont need it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8409 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/xline.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index a6ed0e605..71e94aab7 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -650,7 +650,10 @@ XLineManager::XLineManager(InspIRCd* Instance) : ServerInstance(Instance) { } - +virtual bool Matches(const std::string &str) +{ + return false; +} bool KLine::Matches(User *u) { @@ -706,3 +709,20 @@ bool QLine::Matches(User *u) return false; } + +bool ZLine::Matches(const std::string &str) +{ + if (match(str.c_str(), this->ipaddr, true)) + return true; + else + return false; +} + +bool QLine::Matches(const std::string &str) +{ + if (match(str.c_str(), this->nick)) + return true; + + return false; +} + |