From 7add0bc5e22a8093a4fa0106fbcd8bf307c0f453 Mon Sep 17 00:00:00 2001 From: genius3000 Date: Sat, 5 Aug 2017 01:10:32 -0600 Subject: Make RLines match against IP as well as host --- src/modules/m_rline.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index e77a00b6d..eb54e56b7 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -62,8 +62,9 @@ class RLine : public XLine if (lu && lu->exempt) return false; - std::string compare = u->nick + "!" + u->ident + "@" + u->host + " " + u->fullname; - return regex->Matches(compare); + const std::string host = u->nick + "!" + u->ident + "@" + u->host + " " + u->fullname; + const std::string ip = u->nick + "!" + u->ident + "@" + u->GetIPString() + " " + u->fullname; + return (regex->Matches(host) || regex->Matches(ip)); } bool Matches(const std::string &compare) -- cgit v1.2.3