diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-31 03:42:20 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-31 03:42:20 +0000 |
commit | 1cda046fed93adef23eee9e2c21abfdf7c863e34 (patch) | |
tree | 90d049f51482bf162f1c6d6abe2d215e504f53a3 /src/configreader.cpp | |
parent | d46783efbda0a89b92175120ed5249a3456e25ee (diff) |
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
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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()) |