]> 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 219b031ce08542bd14ba07eef5020c34c89ce4a9..f4b837bc4d132486414cadf8f90aa588f9f0fdc8 100644 (file)
@@ -58,7 +58,7 @@ struct Message tmode_msgtab = {
 };
 struct Message mlock_msgtab = {
        "MLOCK", 0, 0, 0, MFLG_SLOW,
-       {mg_ignore, mg_ignore, {ms_mlock, 4}, {ms_mlock, 4}, mg_ignore, mg_ignore}
+       {mg_ignore, mg_ignore, {ms_mlock, 3}, {ms_mlock, 3}, mg_ignore, mg_ignore}
 };
 struct Message bmask_msgtab = {
        "BMASK", 0, 0, 0, MFLG_SLOW,
@@ -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, parc - 3, 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 ||