]> jfr.im git - solanum.git/blobdiff - modules/m_services.c
Fix -Wformat errors found in ircd-ratbox.
[solanum.git] / modules / m_services.c
index a74695c71b0f58db1069fb796bc6c91b6a585ede..32a1622a70413735b8a404a738a2476cce45adcc 100644 (file)
@@ -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");
                }
        }
 }