Author: Isomer <Isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / s_user.c
index 6029736cbc363d7c136a0090ac9ba81db89fe104..690e150a218e50c7f4c149666be531e3a5cb0357 100644 (file)
@@ -191,14 +191,15 @@ int hunt_server_cmd(struct Client *from, const char *cmd, const char *tok,
   struct Client *acptr;
   char *to;
 
+  /* Assume it's me, if no server or an unregistered client */
+  if (parc <= server || EmptyString((to = parv[server])) || IsUnknown(from))
+    return (HUNTED_ISME);
+
   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);
 
   /* Make sure it's a server */
   if (MyUser(from)) {
@@ -1063,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);