]> jfr.im git - solanum.git/blobdiff - modules/um_callerid.c
reference.conf: add drain_reason
[solanum.git] / modules / um_callerid.c
index 63290f45ae5053d60fbbc5dfdbdf8e71bbc20083..897435982064c7eadf7833c25b8d93ffec649198 100644 (file)
@@ -96,14 +96,16 @@ allow_message(struct Client *source_p, struct Client *target_p)
        if (!IsSetAnyCallerID(target_p))
                return true;
 
-       if (IsSetRelaxedCallerID(target_p) && has_common_channel(source_p, target_p) && !IsSetStrictCallerID(target_p))
+       if (!IsPerson(source_p))
                return true;
 
-       if (IsServer(source_p))
+       if (IsSetRelaxedCallerID(target_p) &&
+                       !IsSetStrictCallerID(target_p) &&
+                       has_common_channel(source_p, target_p))
                return true;
 
        /* XXX: controversial?  allow opers to send through +g */
-       if (HasPrivilege(source_p, "oper:message"))
+       if (MayHavePrivilege(source_p, "oper:message"))
                return true;
 
        if (accept_message(source_p, target_p))