summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2023-06-03 21:42:06 +0100
committerSadie Powell <sadie@witchery.services>2023-06-03 21:51:07 +0100
commit9d0a6ddc67b1e7bd0c32603b6fa90b702c13447d (patch)
tree1e4d019535c89f67e7cf54a76afabe188947c668 /src/users.cpp
parent29db25dac7aff36b4f7239a9fabd57230534cf35 (diff)
parentfbf3b344740f6bd4f9337e485e35e9e8103428bc (diff)
Merge branch '2.0' into 2.1.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index bd35b432d..2b7aacd9b 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -467,9 +467,16 @@ bool User::IsServicesOper()
{
bool match = false;
Anope::string match_host = this->GetIdent() + "@" + this->host;
+ Anope::string match_ip = this->GetIdent() + "@" + this->ip.addr();
for (unsigned i = 0; i < this->nc->o->hosts.size(); ++i)
- if (Anope::Match(match_host, this->nc->o->hosts[i]))
+ {
+ const Anope::string &userhost = this->nc->o->hosts[i];
+ if (Anope::Match(match_host, userhost) || Anope::Match(match_ip, userhost))
+ {
match = true;
+ break;
+ }
+ }
if (match == false)
return false;
}