else
rb_strlcpy(target_p->user->suser, parv[2], sizeof(target_p->user->suser));
+ sendto_common_channels_local_butone(target_p, CLICAP_ACCOUNT_NOTIFY, ":%s!%s@%s ACCOUNT %s",
+ target_p->name, target_p->username, target_p->host,
+ EmptyString(target_p->user->suser) ? "*" : target_p->user->suser);
+
invalidate_bancache_user(target_p);
return 0;
* safety --anfl
*/
if(target_p == exist_p)
- return 0;
+ goto doit;
if(MyClient(exist_p))
sendto_one(exist_p, ":%s KILL %s :(Nickname regained by services)",
exist_p->flags |= FLAGS_KILLED;
/* Do not send kills to servers for unknowns -- jilles */
if(IsClient(exist_p))
+ {
kill_client_serv_butone(NULL, exist_p, "%s (Nickname regained by services)",
me.name);
+ sendto_realops_snomask(SNO_SKILL, L_ALL,
+ "Nick collision due to services forced nick change on %s",
+ parv[2]);
+ }
- snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
+ rb_snprintf(buf, sizeof(buf), "Killed (%s (Nickname regained by services))",
me.name);
exit_client(NULL, exist_p, &me, buf);
}
+doit:
newts = atol(parv[3]);
/* timestamp is older than 15mins, ignore it */
target_p->name, parv[2], target_p->username,
target_p->host);
- sendto_common_channels_local(target_p, ":%s!%s@%s NICK :%s",
+ sendto_common_channels_local(target_p, NOCAPS, ":%s!%s@%s NICK :%s",
target_p->name, target_p->username,
target_p->host, parv[2]);
use_id(target_p), parv[2], (long) target_p->tsinfo);
del_from_client_hash(target_p->name, target_p);
- strcpy(target_p->name, parv[2]);
+ rb_strlcpy(target_p->name, parv[2], NICKLEN);
add_to_client_hash(target_p->name, target_p);
monitor_signon(target_p);
/*
** me_nickdelay
-** parv[0] = sender prefix
** parv[1] = duration in seconds (0 to remove)
** parv[2] = nick
*/
if(*p == '\0')
p = data->target->user->suser;
- sendto_one(data->client, form_str(RPL_WHOISLOGGEDIN),
- get_id(&me, data->client),
- get_id(data->client, data->client),
+ sendto_one_numeric(data->client, RPL_WHOISLOGGEDIN,
+ form_str(RPL_WHOISLOGGEDIN),
data->target->name, p);
}
}
{
sendto_one_numeric(data->client, RPL_STATSULINE,
form_str(RPL_STATSULINE),
- ptr->data, "*", "*", "s");
+ (const char *)ptr->data, "*", "*", "s");
}
}
}