X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/9b24cbdecc72337e825764f39cdf59ca23f41788..8efff56fdf9f4ce4a3968c74162fed9d8d45c51a:/ircd/ircd_parser.y diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index 900f5ea5..4f6a592e 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -58,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; } @@ -86,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; } @@ -160,7 +160,7 @@ static void add_cur_list(int type, char *str, int number) %union { int number; - char string[BUFSIZE + 1]; + char string[1024]; conf_parm_t * conf_parm; } @@ -170,7 +170,7 @@ static void add_cur_list(int type, char *str, int number) %token NUMBER %type qstring string -%type number timespec +%type number timespec unittimespec %type oneitem single itemlist %start conf @@ -242,6 +242,9 @@ single: oneitem { add_cur_list(CF_INT, 0, i); } + + rb_free($1); + rb_free($3); } } ; @@ -291,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); } @@ -305,7 +308,7 @@ qstring: QSTRING { strcpy($$, $1); } ; string: STRING { strcpy($$, $1); } ; number: NUMBER { $$ = $1; } ; -timespec: number string +unittimespec: number string { time_t t; @@ -317,7 +320,13 @@ timespec: number string $$ = $1 * t; } - | timespec timespec + ; + +timespec: unittimespec + { + $$ = $1; + } + | timespec unittimespec { $$ = $1 + $2; }