Author: Isomer <Isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / s_user.c
index 96391a3f9a05e3fe7e34d0b35bcc6133e5ec554f..690e150a218e50c7f4c149666be531e3a5cb0357 100644 (file)
@@ -195,6 +195,12 @@ int hunt_server_cmd(struct Client *from, const char *cmd, const char *tok,
   if (parc <= server || EmptyString((to = parv[server])) || IsUnknown(from))
     return (HUNTED_ISME);
 
+  if (MustBeOper && !IsPrivileged(from))
+  {
+    send_reply(from, ERR_NOPRIVILEGES);
+    return HUNTED_NOSUCH;
+  }
+
   /* Make sure it's a server */
   if (MyUser(from)) {
     /* Make sure it's a server */
@@ -1058,8 +1064,8 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv
   if (IsServer(sptr) || sptr != acptr)
   {
     if (IsServer(cptr))
-      sendcmdto_flag_butone(&me, CMD_WALLOPS, 0, FLAGS_WALLOP,
-                            ":MODE for User %s from %s!%s", parv[1],
+      sendwallto_group_butone(&me, WALL_WALLOPS, 0, 
+                           "MODE for User %s from %s!%s", parv[1],
                             cli_name(cptr), cli_name(sptr));
     else
       send_reply(sptr, ERR_USERSDONTMATCH);
@@ -1545,9 +1551,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 */
 }