From 8e8299ff15efe7dfec4b8d6d59a1b7bf5b164d25 Mon Sep 17 00:00:00 2001 From: Emil Date: Fri, 4 Aug 2023 03:51:14 -0600 Subject: [PATCH] THE IMPOSSIBLE --- docs/rizon_default.cfg | 4 ---- src/parse.c | 9 ++++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/rizon_default.cfg b/docs/rizon_default.cfg index 1793dcd..3373740 100644 --- a/docs/rizon_default.cfg +++ b/docs/rizon_default.cfg @@ -2,7 +2,3 @@ server=irc.rizon.net username=probotic port=6667 admins=anon8697 emilemilemil fa11_1eaf - -; provide channel yourself -; lines without an equal sign are dropped -; prefix comments with a semicolon for future compat diff --git a/src/parse.c b/src/parse.c index 9192b0c..028c325 100644 --- a/src/parse.c +++ b/src/parse.c @@ -174,8 +174,8 @@ parse_pair(char const * buf, size_t len) /* X macro for handling this data may be better */ if (strncmp(buf, cred_names[f], cred_names_len[f]) == 0) { - /* fprintf(stderr, "f%ld:len%ld:%s\n", f, cred_names_len[f], */ - /* cred_names[f]); fflush(stderr); */ + fprintf(stderr, "f%ld:len%ld:%s\n", f, cred_names_len[f], + cred_names[f]); fflush(stderr); buf += i; while (buf[x] != '\0') { @@ -192,7 +192,10 @@ parse_pair(char const * buf, size_t len) case CHANNEL: creds.channel = strndup(buf,x); break; case SERVER: creds.server = strndup(buf,x); break; case PORT: creds.port = atoi(buf); break; - case ADMINS: adm = strndup(buf,x); parse_admins(adm); free(adm); break; + case ADMINS: adm = strndup(buf,x); + parse_admins(adm); + free(adm); + break; } if (x + 2 < len) { buf += x + 1; }