Author: Isomer <Isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / s_user.c
index 78b1b0f35ca9334c64faf4d991751ee3d42595fe..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);