Move some permission checks from set_user_mode() to its callers.
[ircu2.10.12-pk.git] / ircd / s_user.c
index ecedb0629085a789566bed87b7aab699568ac1be..a21f5e2b791db8a316ba33eb1df43d9185c8d1f5 100644 (file)
@@ -984,7 +984,6 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv
 {
   char** p;
   char*  m;
-  struct Client *acptr;
   int what;
   int i;
   struct Flags setflags;
@@ -996,27 +995,6 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv
 
   what = MODE_ADD;
 
-  if (parc < 2)
-    return need_more_params(sptr, "MODE");
-
-  if (!(acptr = FindUser(parv[1])))
-  {
-    if (MyConnect(sptr))
-      send_reply(sptr, ERR_NOSUCHCHANNEL, parv[1]);
-    return 0;
-  }
-
-  if (IsServer(sptr) || sptr != acptr)
-  {
-    if (IsServer(cptr))
-      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);
-    return 0;
-  }
-
   if (parc < 3)
   {
     m = buf;