diff --git a/ircd/s_serv.c b/ircd/s_serv.c index dca66b2b..92539389 100644 --- a/ircd/s_serv.c +++ b/ircd/s_serv.c @@ -81,6 +81,7 @@ unsigned int CAP_ENCAP; unsigned int CAP_TS6; unsigned int CAP_SERVICE; unsigned int CAP_RSFNC; +unsigned int CAP_RSFNCF; unsigned int CAP_SAVE; unsigned int CAP_EUID; unsigned int CAP_EOPMOD; @@ -122,6 +123,7 @@ init_builtin_capabs(void) CAP_ENCAP = capability_put(serv_capindex, "ENCAP", NULL); CAP_SERVICE = capability_put(serv_capindex, "SERVICES", NULL); CAP_RSFNC = capability_put(serv_capindex, "RSFNC", NULL); + CAP_RSFNCF = capability_put(serv_capindex, "RSFNCF", NULL); CAP_SAVE = capability_put(serv_capindex, "SAVE", NULL); CAP_EUID = capability_put(serv_capindex, "EUID", NULL); CAP_EOPMOD = capability_put(serv_capindex, "EOPMOD", NULL); diff --git a/modules/m_services.c b/modules/m_services.c index 768df637..0127887e 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -163,6 +163,13 @@ me_login(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source rb_strlcpy(source_p->user->suser, parv[1], sizeof(source_p->user->suser)); } +/* me_rsfnc() + * parv[1] = current user nickname + * parv[2] = target nickname + * parv[3] = new nickts + * parv[4] = current nickts + * parv[5] = optional; 0 (don't override RESVs) or 1 (override RESVs) + */ static void me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) @@ -198,6 +205,12 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source if(target_p->tsinfo != curts) return; + /* received a non-forced RSFNC for a nickname that is RESV. + * silently ignore it. ~jess + */ + if(parc > 5 && atoi(parv[5]) == 0 && find_nick_resv(parv[2])) + return; + if((exist_p = find_named_client(parv[2]))) { char buf[BUFSIZE];