From 123edca1011b07ed7996b7211c9b5866388879d0 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 20 Aug 2007 16:15:38 +0000 Subject: 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 --- src/configreader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.3