]> jfr.im git - solanum.git/blobdiff - ircd/ircd_parser.y
send: add sendto_one_multiline_* API
[solanum.git] / ircd / ircd_parser.y
index ca76d9d9ae2d1de8d70fbcfe590c679faab35cc5..4f6a592edf6ba47b61b5c8d720b6b68415565d24 100644 (file)
@@ -6,8 +6,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include <netinet/in.h>
-
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -15,9 +13,8 @@
 #define WE_ARE_MEMORY_C
 #include "stdinc.h"
 #include "setup.h"
-#include "common.h"
 #include "ircd_defs.h"
-#include "config.h"
+#include "defaults.h"
 #include "client.h"
 #include "modules.h"
 #include "newconf.h"
@@ -61,8 +58,8 @@ time_t conf_find_time(char *name)
 
   for (i = 0; ircd_times[i].name; i++)
     {
-      if (strcasecmp(ircd_times[i].name, name) == 0 ||
-         (ircd_times[i].plural && strcasecmp(ircd_times[i].plural, name) == 0))
+      if (rb_strcasecmp(ircd_times[i].name, name) == 0 ||
+         (ircd_times[i].plural && rb_strcasecmp(ircd_times[i].plural, name) == 0))
        return ircd_times[i].val;
     }
 
@@ -89,7 +86,7 @@ static int    conf_get_yesno_value(char *str)
 
        for (i = 0; yesno[i].word; i++)
        {
-               if (strcasecmp(str, yesno[i].word) == 0)
+               if (rb_strcasecmp(str, yesno[i].word) == 0)
                {
                        return yesno[i].yesno;
                }
@@ -163,7 +160,7 @@ static void add_cur_list(int type, char *str, int number)
 
 %union {
        int             number;
-       char            string[IRCD_BUFSIZE + 1];
+       char            string[1024];
        conf_parm_t *   conf_parm;
 }
 
@@ -173,7 +170,7 @@ static void add_cur_list(int type, char *str, int number)
 %token <number> NUMBER
 
 %type <string> qstring string
-%type <number> number timespec
+%type <number> number timespec unittimespec
 %type <conf_parm> oneitem single itemlist
 
 %start conf
@@ -245,6 +242,9 @@ single: oneitem
                        {
                                add_cur_list(CF_INT, 0, i);
                        }
+
+                       rb_free($1);
+                       rb_free($3);
                }
        }
        ;
@@ -294,7 +294,7 @@ loadmodule:
                 char *m_bn;
                 m_bn = rb_basename((char *) $2);
 
-                if (findmodule_byname(m_bn) == -1)
+                if (findmodule_byname(m_bn) == NULL)
                {
                    load_one_module($2, MAPI_ORIGIN_EXTENSION, 0);
                }
@@ -308,7 +308,7 @@ qstring: QSTRING { strcpy($$, $1); } ;
 string: STRING { strcpy($$, $1); } ;
 number: NUMBER { $$ = $1; } ;
 
-timespec:      number string
+unittimespec:  number string
                {
                        time_t t;
 
@@ -320,7 +320,13 @@ timespec:  number string
 
                        $$ = $1 * t;
                }
-               | timespec timespec
+               ;
+
+timespec: unittimespec
+               {
+                       $$ = $1;
+               }
+               | timespec unittimespec
                {
                        $$ = $1 + $2;
                }