summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-09 12:33:18 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-09 12:33:18 +0000
commit1f487855a5097c65aaad4752df259b9a877ba364 (patch)
tree494f7b3732726b10f41728c4b91e4d07a8655dff
parent330da271fb8fff08865c7c489a5d4b4bdabcffd2 (diff)
Changed to work with new log-level
Fixed to allow comments in config file to work properly git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@166 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h6
-rw-r--r--src/InspIRCd.layout36
-rw-r--r--src/inspircd_io.cpp24
3 files changed, 46 insertions, 20 deletions
diff --git a/include/modules.h b/include/modules.h
index 9b750e599..4f7921532 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -8,6 +8,12 @@
#ifndef __PLUGIN_H
#define __PLUGIN_H
+#define DEBUG 10
+#define VERBOSE 20
+#define DEFAULT 30
+#define SPARSE 40
+#define NONE 50
+
#include "dynamic.h"
#include "base.h"
#include <string>
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout
index fb50a441f..1fa16ace5 100644
--- a/src/InspIRCd.layout
+++ b/src/InspIRCd.layout
@@ -1,9 +1,9 @@
[Editors]
Focused=1
-Order=7,1,2,3,4,5,6,0,-1
+Order=1
[Editor_0]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=1
@@ -13,13 +13,13 @@ LeftChar=1
[Editor_1]
Open=1
Top=1
-CursorCol=27
-CursorRow=326
+CursorCol=24
+CursorRow=322
TopLine=307
LeftChar=1
[Editor_2]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=56
@@ -27,7 +27,7 @@ TopLine=36
LeftChar=1
[Editor_3]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=3
@@ -35,7 +35,7 @@ TopLine=1
LeftChar=1
[Editor_4]
-Open=1
+Open=0
Top=0
CursorCol=5
CursorRow=57
@@ -43,7 +43,7 @@ TopLine=21
LeftChar=1
[Editor_5]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=40
@@ -51,7 +51,7 @@ TopLine=1
LeftChar=1
[Editor_6]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=3
@@ -59,7 +59,7 @@ TopLine=1
LeftChar=1
[Editor_7]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=1
@@ -67,7 +67,7 @@ TopLine=1
LeftChar=1
[Editor_8]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=1
@@ -75,7 +75,7 @@ TopLine=35
LeftChar=1
[Editor_9]
-Open=1
+Open=0
Top=0
CursorCol=17
CursorRow=1
@@ -83,7 +83,7 @@ TopLine=1
LeftChar=1
[Editor_10]
-Open=1
+Open=0
Top=0
CursorCol=12
CursorRow=42
@@ -131,7 +131,7 @@ TopLine=1
LeftChar=1
[Editor_16]
-Open=1
+Open=0
Top=0
CursorCol=21
CursorRow=22
@@ -139,7 +139,7 @@ TopLine=1
LeftChar=1
[Editor_17]
-Open=1
+Open=0
Top=0
CursorCol=9
CursorRow=60
@@ -163,7 +163,7 @@ TopLine=1
LeftChar=1
[Editor_20]
-Open=1
+Open=0
Top=0
CursorCol=17
CursorRow=125
@@ -171,7 +171,7 @@ TopLine=113
LeftChar=1
[Editor_21]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=1
@@ -195,7 +195,7 @@ TopLine=1
LeftChar=1
[Editor_24]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=1
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index 6e36de477..d8e095441 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -105,7 +105,7 @@ int EnumConf(const char* filename, const char* tag)
{
FILE *config;
int ptr = 0;
- char buffer[MAXBUF], c_tag[MAXBUF], c;
+ char buffer[MAXBUF], c_tag[MAXBUF], c, lastc;
int in_token, in_quotes, tptr, j, idx = 0;
char* key;
@@ -118,9 +118,19 @@ int EnumConf(const char* filename, const char* tag)
ptr = 0;
in_token = 0;
in_quotes = 0;
+ lastc = '\0';
while (!feof(config))
{
+ lastc = c;
c = fgetc(config);
+ if ((c == '#') && (lastc == '\n'))
+ {
+ while ((c != '\n') && (!feof(config)))
+ {
+ lastc = c;
+ c = fgetc(config);
+ }
+ }
if ((c == '<') && (!in_quotes))
{
tptr = 0;
@@ -184,7 +194,7 @@ int ReadConf(const char* filename, const char* tag, const char* var, int index,
{
FILE *config;
int ptr = 0;
- char buffer[MAXBUF], c_tag[MAXBUF], c;
+ char buffer[MAXBUF], c_tag[MAXBUF], c, lastc;
int in_token, in_quotes, tptr, j, idx = 0;
char* key;
@@ -197,9 +207,19 @@ int ReadConf(const char* filename, const char* tag, const char* var, int index,
ptr = 0;
in_token = 0;
in_quotes = 0;
+ lastc = '\0';
while (!feof(config))
{
+ lastc = c;
c = fgetc(config);
+ if ((c == '#') && (lastc == '\n'))
+ {
+ while ((c != '\n') && (!feof(config)))
+ {
+ lastc = c;
+ c = fgetc(config);
+ }
+ }
if ((c == '<') && (!in_quotes))
{
tptr = 0;