]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_resv.c
Disallow the sequence '",' in perm xlines,
[irc/rqf/shadowircd.git] / modules / m_resv.c
index 0c983694f962f83c5575559c01a877f55e32249b..3cbf4a86986a83311e945e7bad6c03cdf894e206 100644 (file)
@@ -147,8 +147,8 @@ static int
 ms_resv(struct Client *client_p, struct Client *source_p,
        int parc, const char *parv[])
 {
-       /* parv[0]  parv[1]        parv[2]  parv[3]
-        * oper     target server  resv     reason
+       /* source_p  parv[1]        parv[2]  parv[3]
+        * oper      target server  resv     reason
         */
        propagate_resv(source_p, parv[1], 0, parv[2], parv[3]);
 
@@ -211,6 +211,13 @@ parse_resv(struct Client *source_p, const char *name,
                        return;
                }
 
+               if(strchr(name, ','))
+               {
+                       sendto_one_notice(source_p,
+                                       ":Invalid character ',' in channel RESV");
+                       return;
+               }
+
                if(strchr(reason, '"'))
                {
                        sendto_one_notice(source_p,
@@ -410,8 +417,8 @@ mo_unresv(struct Client *client_p, struct Client *source_p, int parc, const char
 static int
 ms_unresv(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
-       /* parv[0]  parv[1]        parv[2]
-        * oper     target server  resv to remove
+       /* source_p  parv[1]        parv[2]
+        * oper      target server  resv to remove
         */
        propagate_generic(source_p, "UNRESV", parv[1], CAP_CLUSTER,
                        "%s", parv[2]);