summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2023-05-11 13:05:39 +0100
committerSadie Powell <sadie@witchery.services>2023-05-11 13:05:39 +0100
commit41206b991e5aa7821acd424df2ec6800d868df1c (patch)
treebdb3b78c70c9050da9aed9db7cadb6001eb7a1aa /src
parentb7abfe5eca076c29a0d49a411320612264093bdf (diff)
Fix not being able to log into oper accounts when DNS fails.
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 96a3539de..09529bb5f 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -462,9 +462,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;
}