From 2ed9fead6d30b4d7b7b59de1b09fd0594581fd67 Mon Sep 17 00:00:00 2001 From: stskeeps Date: Tue, 27 Feb 2001 19:40:52 +0000 Subject: [PATCH] -- Fixed one of codemastr's wonderful coding bugs. *slap slap slap* +- Fixed windows CRLF problem in conf2, reported by Zogg --- Changes | 2 +- src/s_conf2.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index cf958063e..8220e0fb3 100644 --- a/Changes +++ b/Changes @@ -261,4 +261,4 @@ removed inittoken, made command initalization happen in init_CommandHash - Adapted /stats M to it. Removed /helpop ?commands temporary. Confirming hashtable works. -- Fixed one of codemastr's wonderful coding bugs. *slap slap slap* +- Fixed windows CRLF problem in conf2, reported by Zogg diff --git a/src/s_conf2.c b/src/s_conf2.c index a98758594..9c9bb9667 100644 --- a/src/s_conf2.c +++ b/src/s_conf2.c @@ -332,6 +332,11 @@ static ConfigFile *config_parse(char *filename, char *confdata) lastce = &(curcf->cf_entries); curce = NULL; cursection = NULL; + /* Replace \r's with spaces .. ugly ugly -Stskeeps */ + for (ptr=confdata; *ptr; ptr++) + if (*ptr == '\r') + *ptr = ' '; + for(ptr=confdata;*ptr;ptr++) { switch(*ptr)