mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Set a name on all connect blocks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12065 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
eaace5ed7c
commit
bee3f8676a
@ -361,13 +361,15 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
|
||||
}
|
||||
|
||||
std::string name = tag->getString("name");
|
||||
if (!name.empty())
|
||||
if (name.empty())
|
||||
{
|
||||
if (names.find(name) != names.end())
|
||||
throw CoreException("Two connect classes with name \"" + name + "\" defined!");
|
||||
names[name] = i;
|
||||
name = "unnamed-" + ConvToStr(i);
|
||||
}
|
||||
|
||||
if (names.find(name) != names.end())
|
||||
throw CoreException("Two connect classes with name \"" + name + "\" defined!");
|
||||
names[name] = i;
|
||||
|
||||
std::string mask, typeMask;
|
||||
char type;
|
||||
|
||||
@ -393,8 +395,7 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
|
||||
new ConnectClass(tag, type, mask, *parent) :
|
||||
new ConnectClass(tag, type, mask);
|
||||
|
||||
if (!name.empty())
|
||||
me->name = name;
|
||||
me->name = name;
|
||||
|
||||
tag->readString("password", me->pass);
|
||||
tag->readString("hash", me->hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user