X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c71a6e3bed32689256460fb072d31696eb8cf4cc..765d839d3c25cf804d7c0f8dbf82ad5f04b09a12:/modules/core/m_mode.c diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index ac020801..f4b837bc 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -235,7 +235,7 @@ ms_mlock(struct Client *client_p, struct Client *source_p, int parc, const char return 0; if(IsServer(source_p)) - set_channel_mlock(client_p, source_p, chptr, parv[3]); + set_channel_mlock(client_p, source_p, chptr, parv[3], TRUE); return 0; } @@ -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 ||