Replace privilege-controlling Feature settings with
[ircu2.10.12-pk.git] / ircd / m_oper.c
index d23e2f2205b2411f3df4a7ed09d9938804c56b26..002b36d90a8e937c800bcc408d9b3ae45daa293a 100644 (file)
@@ -163,14 +163,10 @@ int m_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
                           cli_sockhost(sptr));
       return 0;
     }
-    if (!PrivHas(&aconf->privs, PRIV_PROPAGATE)) {
-      ClearOper(sptr);
-      SetLocOp(sptr);
-    }
-    else {
-      /*
-       * prevent someone from being both oper and local oper
-       */
+    SetLocOp(sptr);
+    client_set_privs(sptr, aconf);
+    if (HasPriv(sptr, PRIV_PROPAGATE))
+    {
       ClearLocOp(sptr);
       SetOper(sptr);
       ++UserStats.opers;
@@ -182,7 +178,6 @@ int m_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     SetFlag(sptr, FLAG_DEBUG);
     
     set_snomask(sptr, SNO_OPERDEFAULT, SNO_ADD);
-    client_set_privs(sptr, aconf);
     cli_max_sendq(sptr) = 0; /* Get the sendq from the oper's class */
     send_umode_out(cptr, sptr, &old_mode, HasPriv(sptr, PRIV_PROPAGATE));
     send_reply(sptr, RPL_YOUREOPER);