summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-12 16:29:58 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-12 16:29:58 +0100
commit62fe87f6052dc28e38f2edc940b2002ede087277 (patch)
treee55830502e0bc29bf0210674aafbe5c9c3295f2d /config.c
parent44ed93cdc6a2d7dda355266bfc69134e30278259 (diff)
Add a settings structure for passing around everywhere to store config/settings. Also fix the insanely inconsistent spelling/naming of replay log related things.
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 5 insertions, 5 deletions
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';