diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2007-09-24 17:32:33 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2007-09-24 17:32:33 +0000 |
commit | f598d67c16d5ec0bb668de93b3e2e50c667df201 (patch) | |
tree | c116fdc7252f711cc66acf519aeee77a6d622fb7 | |
parent | b289f05fbf2446b367a7b14f397932eec0c16dc3 (diff) |
BUILD : 1.7.19 (1308) BUGS : 787 NOTES : Applied a patch by T fixing moduleGetConfigDirective disliking CRLF line-ends
git-svn-id: svn://svn.anope.org/anope/trunk@1308 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1026 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/modules.c | 17 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 20 insertions, 4 deletions
@@ -47,6 +47,7 @@ Anope Version S V N Provided by Trystan <trystan@nomadirc.net> - 2007 08/29 F Module runtime directory not always properly cleaned up. [#768] +09/24 F ModuleGetConfigDirective having issues with CRLF line-ends. [#787] Provided by nenolod <nenolod@nenolod.net> - 2007 08/29 F TS6 UID generation for Charybdis. [#731] diff --git a/src/modules.c b/src/modules.c index a02593119..b54d1fa58 100644 --- a/src/modules.c +++ b/src/modules.c @@ -2482,6 +2482,7 @@ int moduleGetConfigDirective(Directive * d) FILE *config; char *dir = NULL; char buf[1024]; + char *directive; int linenum = 0; int ac = 0; char *av[MAXPARAMS]; @@ -2497,8 +2498,9 @@ int moduleGetConfigDirective(Directive * d) } while (fgets(buf, sizeof(buf), config)) { linenum++; - if (*buf == '#' || *buf == '\r' || *buf == '\n') + if (*buf == '#' || *buf == '\r' || *buf == '\n') { continue; + } dir = myStrGetOnlyToken(buf, '\t', 0); if (dir) { str = myStrGetTokenRemainder(buf, '\t', 1); @@ -2510,7 +2512,13 @@ int moduleGetConfigDirective(Directive * d) continue; } } - if (stricmp(dir, d->name) == 0) { + if (dir) { + directive = normalizeBuffer(dir); + } else { + continue; + } + + if (stricmp(directive, d->name) == 0) { if (str) { s = str; while (isspace(*s)) @@ -2543,8 +2551,11 @@ int moduleGetConfigDirective(Directive * d) s++; } } - retval = parse_directive(d, dir, ac, av, linenum, 0, s); + retval = parse_directive(d, directive, ac, av, linenum, 0, s); } + if (directive) { + free(directive); + } } if (dir) free(dir); diff --git a/version.log b/version.log index d59e41fcf..200714c2d 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="19" VERSION_EXTRA="-svn" -VERSION_BUILD="1307" +VERSION_BUILD="1308" # $Log$ # +# BUILD : 1.7.19 (1308) +# BUGS : 787 +# NOTES : Applied a patch by T fixing moduleGetConfigDirective disliking CRLF line-ends +# # BUILD : 1.7.19 (1307) # BUGS : 788 # NOTES : Fixed OS HELP OPER showing admin instead of root (OH NOES) |