summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgenius3000 <genius3000@g3k.solutions>2017-08-05 01:10:32 -0600
committergenius3000 <genius3000@g3k.solutions>2017-10-10 22:03:04 -0600
commit7add0bc5e22a8093a4fa0106fbcd8bf307c0f453 (patch)
tree7dd85590fce4f4ad472ad01dd9379ff83d82ef29
parent6acb2dcdd235e2594f800f33978e1a598c7792da (diff)
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)