summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-12 15:09:03 +0100
committerGitHub <noreply@github.com>2017-10-12 15:09:03 +0100
commitc46f8a368c42f64284244f3d2dfc022a383294fa (patch)
tree6534f80b1802973d9c1af23b5435df40a3e96bff
parent1522ba9800db574bf19504fa3b1bfa86112f96b2 (diff)
parent7add0bc5e22a8093a4fa0106fbcd8bf307c0f453 (diff)
Merge pull request #1361 from genius3000/master+rline_IP
Make RLines match against IP as well as host
-rw-r--r--src/modules/m_rline.cpp5
1 files changed, 3 insertions, 2 deletions
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)