summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xline.h6
-rw-r--r--src/xline.cpp8
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;