summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-20 16:15:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-20 16:15:38 +0000
commit123edca1011b07ed7996b7211c9b5866388879d0 (patch)
tree25f00ff8a0b49a0e06766f1086a01db97eb7eae5
parent6b453db541c7a1a168dc22f26de3823d97e2e322 (diff)
Whoops! trunk-only fix to config reader so it doesnt bomb out if you omit an optional tag
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7767 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index b3258eb2e..b696fe26a 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -409,6 +409,11 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v
const char* parent = values[13].GetString();
int maxchans = values[14].GetInteger();
+ if (!allow)
+ allow = "";
+ if (!deny)
+ deny = "";
+
if (*parent)
{
/* Find 'parent' and inherit a new class from it,
@@ -419,7 +424,7 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v
if (item->GetName() == name)
{
ConnectClass c(name, *item);
- c.Update(timeout, flood, std::string(*allow ? allow : deny), pingfreq, password, threshold, sendq, recvq, localmax, globalmax, maxchans, port);
+ c.Update(timeout, flood, *allow ? allow : deny, pingfreq, password, threshold, sendq, recvq, localmax, globalmax, maxchans, port);
conf->Classes.push_back(c);
}
}