From 1cda046fed93adef23eee9e2c21abfdf7c863e34 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 31 Jan 2010 03:42:20 +0000 Subject: Allow connect classes to be specified without an allow or deny mask git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12336 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 04763cbab..bbf3adf59 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -261,7 +261,7 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) for(ClassVector::iterator i = current->Classes.begin(); i != current->Classes.end(); ++i) { ConnectClass* c = *i; - std::string typeMask = (c->type == CC_ALLOW) ? "a" : "d"; + std::string typeMask = (c->type == CC_ALLOW) ? "a" : (c->type == CC_DENY) ? "d" : "n"; typeMask += c->host; oldBlocksByMask[typeMask] = c; } @@ -335,7 +335,9 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) } else { - throw CoreException("Connect class must have an allow or deny mask at " + tag->getTagLocation()); + type = CC_NAMED; + mask = name; + typeMask = 'n' + mask; } ClassMap::iterator dupMask = newBlocksByMask.find(typeMask); if (dupMask != newBlocksByMask.end()) -- cgit v1.2.3