Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / s_user.c
index 96391a3f9a05e3fe7e34d0b35bcc6133e5ec554f..6029736cbc363d7c136a0090ac9ba81db89fe104 100644 (file)
@@ -191,6 +191,11 @@ int hunt_server_cmd(struct Client *from, const char *cmd, const char *tok,
   struct Client *acptr;
   char *to;
 
+  if (MustBeOper && !IsPrivileged(from))
+  {
+    send_reply(from, ERR_NOPRIVILEGES);
+    return HUNTED_NOSUCH;
+  }
   /* Assume it's me, if no server or an unregistered client */
   if (parc <= server || EmptyString((to = parv[server])) || IsUnknown(from))
     return (HUNTED_ISME);
@@ -1545,9 +1550,9 @@ send_supported(struct Client *cptr)
   char featurebuf[512];
 
   ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES1, FEATURESVALUES1);
-  send_reply(sptr, RPL_ISUPPORT, featurebuf);
+  send_reply(cptr, RPL_ISUPPORT, featurebuf);
   ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES2, FEATURESVALUES2);
-  send_reply(sptr, RPL_ISUPPORT, featurebuf);
+  send_reply(cptr, RPL_ISUPPORT, featurebuf);
 
   return 0; /* convenience return, if it's ever needed */
 }