From 62fe87f6052dc28e38f2edc940b2002ede087277 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 12 May 2019 16:29:58 +0100 Subject: Add a settings structure for passing around everywhere to store config/settings. Also fix the insanely inconsistent spelling/naming of replay log related things. --- config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 8bfead9..7d26ca0 100644 --- a/config.c +++ b/config.c @@ -1,6 +1,6 @@ #include "config.h" -// TODO - Multiple functions here (at least readnames(), relayseconds() and checkpassword()) have the file opening code, rewrite. +// TODO - Multiple functions here (at least readnames(), replayseconds() and checkpassword()) have the file opening code, rewrite. // TODO - Can isconf() and getconf() just be merged into one function? @@ -107,9 +107,9 @@ int readnames(char *nick, char *username, char *realname) { return 1; } -// Return the relayseconds configuration option -// (How many seconds of relay should be sent to connecting clients) -int confrelayseconds() { +// Return the replayseconds configuration option +// (How many seconds of replay should be sent to connecting clients) +int confreplayseconds() { FILE *fp; char str[MAXCHAR]; char* filename = "blabouncer.conf"; @@ -126,7 +126,7 @@ int confrelayseconds() { while (fgets(str, MAXCHAR, fp) != NULL) { long int len; - if ((len = isconf(str, "relayseconds"))) { + if ((len = isconf(str, "replayseconds"))) { getconf(str, len); strncpy(secondsstr, str, strlen(str)); secondsstr[strlen(str)] = '\0'; -- cgit v1.2.3