X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/6fb6bd15aee5b47a5f7185fd0f951b2b26fa798d..765d839d3c25cf804d7c0f8dbf82ad5f04b09a12:/modules/core/m_mode.c?ds=sidebyside diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index 86d1207f..f4b837bc 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -247,7 +247,7 @@ ms_bmask(struct Client *client_p, struct Client *source_p, int parc, const char static char parabuf[BUFSIZE]; struct Channel *chptr; rb_dlink_list *banlist; - const char *s; + char *s, *forward; char *t; char *mbuf; char *pbuf; @@ -342,7 +342,14 @@ ms_bmask(struct Client *client_p, struct Client *source_p, int parc, const char if(tlen > MODEBUFLEN) break; - if(add_id(fakesource_p, chptr, s, banlist, mode_type)) + if((forward = strchr(s+1, '$')) != NULL) + { + *forward++ = '\0'; + if(*forward == '\0') + forward = NULL; + } + + if(add_id(fakesource_p, chptr, s, forward, banlist, mode_type)) { /* this new one wont fit.. */ if(mlen + MAXMODEPARAMS + plen + tlen > BUFSIZE - 5 ||