diff options
| author | 2017-08-05 01:10:32 -0600 | |
|---|---|---|
| committer | 2017-10-10 22:03:04 -0600 | |
| commit | 7add0bc5e22a8093a4fa0106fbcd8bf307c0f453 (patch) | |
| tree | 7dd85590fce4f4ad472ad01dd9379ff83d82ef29 /src/modules | |
| parent | Add a constant for the 477 numeric (ERR_NEEDREGGEDNICK). (diff) | |
| download | inspircd++-7add0bc5e22a8093a4fa0106fbcd8bf307c0f453.tar.gz inspircd++-7add0bc5e22a8093a4fa0106fbcd8bf307c0f453.tar.bz2 inspircd++-7add0bc5e22a8093a4fa0106fbcd8bf307c0f453.zip | |
Make RLines match against IP as well as host
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_rline.cpp | 5 |
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) |
