diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 19:32:23 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 19:32:23 +0000 |
commit | a87326fb1759a9b96de8b0a0842bba1d4177e04e (patch) | |
tree | 69720f1343b0df422a76ff47376c0eaf613a2fd9 | |
parent | ba84759bf7e28a3f07e2d4379fa78a908dd4e3cb (diff) |
Make ZLine use Matches()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8406 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/xline.h | 6 | ||||
-rw-r--r-- | src/xline.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/xline.h b/include/xline.h index d5dd87aa5..0fa6e3f53 100644 --- a/include/xline.h +++ b/include/xline.h @@ -424,11 +424,11 @@ class CoreExport XLineManager */ GLine* matches_gline(User* user); - /** Check if a IP matches a ZLine - * @param ipaddr The IP to check against + /** Check if a user's IP matches a ZLine + * @param user The user to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - ZLine* matches_zline(const char* ipaddr); + ZLine* matches_zline(User *user); /** Check if a hostname matches a KLine * @param user The user to check against diff --git a/src/xline.cpp b/src/xline.cpp index 537b86596..857c54069 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -466,13 +466,13 @@ void XLineManager::zline_set_creation_time(const char* ip, time_t create_time) // returns a pointer to the reason if an ip address matches a zline, NULL if it didnt match -ZLine* XLineManager::matches_zline(const char* ipaddr) +ZLine* XLineManager::matches_zline(User *u) { if (zlines.empty()) return NULL; for (std::vector<ZLine*>::iterator i = zlines.begin(); i != zlines.end(); i++) - if (match(ipaddr,(*i)->ipaddr, true)) + if ((*i)->Matches(u)) return (*i); return NULL; } @@ -609,7 +609,7 @@ void XLineManager::ApplyLines() } if ((What & APPLY_ZLINES) && (zlines.size())) { - if ((check = matches_zline(u->GetIPString()))) + if ((check = matches_zline(u))) { snprintf(reason,MAXBUF,"Z-Lined: %s", check->reason); if (*ServerInstance->Config->MoronBanner) @@ -689,7 +689,7 @@ bool ELine::Matches(User *u) bool ZLine::Matches(User *u) { - if (match(user->GetIPString(), this->ipaddr, true)) + if (match(u->GetIPString(), this->ipaddr, true)) return true; else return false; |