]> jfr.im git - solanum.git/blobdiff - modules/core/m_mode.c
Port ircd-seven banfowards to charybdis.
[solanum.git] / modules / core / m_mode.c
index 86d1207f74f691b13fc5c2a56b007693b1dcc84c..f4b837bc4d132486414cadf8f90aa588f9f0fdc8 100644 (file)
@@ -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 ||