X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/5b383ce060e7b8e80a4548aaf4630360b1f801ab..0cce01d388e60da92cf60a93b1459835c05d2bc1:/modules/m_services.c diff --git a/modules/m_services.c b/modules/m_services.c index a74695c7..32a1622a 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -107,6 +107,10 @@ me_su(struct Client *client_p, struct Client *source_p, 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; @@ -183,7 +187,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, * 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)", @@ -192,14 +196,20 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, 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]); + } 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 */ @@ -217,7 +227,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, 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]); @@ -320,7 +330,7 @@ h_svc_stats(hook_data_int *data) { sendto_one_numeric(data->client, RPL_STATSULINE, form_str(RPL_STATSULINE), - ptr->data, "*", "*", "s"); + (const char *)ptr->data, "*", "*", "s"); } } }