]> jfr.im git - irc/atheme/atheme.git/commitdiff
libathemecore: do not allow entities under restriction to take +F at all (closes...
authorWilliam Pitcock <redacted>
Thu, 5 Mar 2015 20:08:28 +0000 (14:08 -0600)
committerWilliam Pitcock <redacted>
Thu, 5 Mar 2015 20:08:53 +0000 (14:08 -0600)
libathemecore/entity.c

index 8cb18d39d1efc0d8c7242364526b55b8f16bc481..c8e9bc0aa9b28adc2f6d25f6978df7c44bd58366 100644 (file)
@@ -184,6 +184,18 @@ static bool linear_can_register_channel(myentity_t *mt)
 
 static bool linear_allow_foundership(myentity_t *mt)
 {
+       myuser_t *mu;
+
+       /* avoid workaround for restricted users where foundership is set on the user after registration. */
+       if ((mu = user(mt)) != NULL)
+       {
+               metadata_t *md;
+
+               md = metadata_find(mu, "private:restrict:setter");
+               if (md != NULL)
+                       return false;
+       }
+
        return true;
 }