++UserStats.inv_clients;
if (IsOper(sptr))
++UserStats.opers;
+ /* If they get both +x and an account during registration, hide
+ * their hostmask here. Calling hide_hostmask() from IAuth's
+ * account assignment causes a numeric reply during registration.
+ */
+ if (HasHiddenHost(sptr))
+ hide_hostmask(sptr, FLAG_HIDDENHOST);
tmpstr = umode_str(sptr);
/* Send full IP address to IPv6-grokking servers. */
{
char** p;
char* m;
- struct Client *acptr;
int what;
int i;
struct Flags setflags;
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;
++UserStats.inv_clients;
if (!FlagHas(&setflags, FLAG_HIDDENHOST) && do_host_hiding)
hide_hostmask(sptr, FLAG_HIDDENHOST);
- send_umode_out(cptr, sptr, &setflags, prop);
+ if (IsRegistered(sptr))
+ send_umode_out(cptr, sptr, &setflags, prop);
return 0;
}