]> jfr.im git - irc/UndernetIRC/iauthd-c.git/commitdiff
iauth_class: Implement "hostname" rule
authorMichael Poole <redacted>
Sun, 14 Mar 2021 13:07:43 +0000 (09:07 -0400)
committerMichael Poole <redacted>
Sun, 14 Mar 2021 17:34:48 +0000 (13:34 -0400)
modules/iauth_class.c

index 2485a49a78ea5c36a9c30aaa63afa858e503e8b6..22ce0796cb0b302fd7a8e1b5d13727986af4d902 100644 (file)
@@ -251,6 +251,9 @@ static IAUTH_RULE_FUNC(iauth_class_rule_check)
     if (rule->username && fnmatch(rule->username, req->auth_username, 0))
         return 0;
 
+    if (rule->hostname && fnmatch(rule->hostname, req->hostname, 0))
+        return 0;
+
     if (rule->xreply_ok && (iauth_xreply_ok(req, rule->xreply_ok) <= 0))
         return 0;