]> jfr.im git - solanum.git/commitdiff
m_services: delete nick delay on RSFNC
authorDoug Freed <redacted>
Fri, 16 Jul 2021 16:24:33 +0000 (11:24 -0500)
committerGitHub <redacted>
Fri, 16 Jul 2021 16:24:33 +0000 (12:24 -0400)
modules/m_services.c

index 3a64221a9d189fcf40844370df5db206b67e877c..143c8cb8716cfd4ba9b11c2babeebba72470db4b 100644 (file)
@@ -160,6 +160,7 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
        struct Client *target_p;
        struct Client *exist_p;
        time_t newts, curts;
+       struct nd_entry *nd;
        char note[NAMELEN + 10];
 
        if(!(source_p->flags & FLAGS_SERVICE))
@@ -245,6 +246,12 @@ doit:
                        use_id(target_p), parv[2], (long) target_p->tsinfo);
 
        del_from_client_hash(target_p->name, target_p);
+
+       /* invalidate nick delay because we're forcing this nick to be used */
+       nd = rb_dictionary_retrieve(nd_dict, parv[2]);
+       if (nd != NULL)
+               free_nd_entry(nd);
+
        rb_strlcpy(target_p->name, parv[2], NICKLEN);
        add_to_client_hash(target_p->name, target_p);