summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-30 21:55:21 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-30 21:55:21 +0000
commit3dc81ee1331d1b37ee85be9bf0d843e3b6827a2d (patch)
tree431e66fceef85d577d360865b3b878dc9132afc2 /src/configreader.cpp
parent7aa5e059a8f66d91bd8b69c58c657ceb70b4baff (diff)
Add explicit reference-counting base class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11785 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 21bfce3db..86d0b3c5e 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -727,11 +727,6 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
Classes[i] = me;
}
}
-
- for(ClassMap::iterator toRemove = oldBlocksByMask.begin(); toRemove != oldBlocksByMask.end(); toRemove++)
- {
- removed_classes.push_back(toRemove->second);
- }
}
@@ -1143,9 +1138,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
// write once here, to try it out and make sure its ok
ServerInstance->WritePID(this->PID);
- FailedPortList pl;
- ServerInstance->BindPorts(pl);
-
/*
* These values can only be set on boot. Keep their old values. Do it before we send messages so we actually have a servername.
*/
@@ -1153,18 +1145,23 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
{
memcpy(this->ServerName, old->ServerName, sizeof(this->ServerName));
memcpy(this->sid, old->sid, sizeof(this->sid));
- }
-
- if (pl.size())
- {
- errstr << "Not all your client ports could be bound.\nThe following port(s) failed to bind:\n";
+ this->argv = old->argv;
+ this->argc = old->argc;
- int j = 1;
- for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
+ // Same for ports... they're bound later on first run.
+ FailedPortList pl;
+ ServerInstance->BindPorts(pl);
+ if (pl.size())
{
- char buf[MAXBUF];
- snprintf(buf, MAXBUF, "%d. Address: %s Reason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
- errstr << buf;
+ errstr << "Not all your client ports could be bound.\nThe following port(s) failed to bind:\n";
+
+ int j = 1;
+ for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
+ {
+ char buf[MAXBUF];
+ snprintf(buf, MAXBUF, "%d. Address: %s Reason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
+ errstr << buf;
+ }
}
}
@@ -1212,12 +1209,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
return;
ApplyModules(user);
- for (std::vector<ConnectClass*>::iterator i = removed_classes.begin(); i != removed_classes.end(); i++)
- {
- ConnectClass* c = *i;
- if (0 == --c->RefCount)
- delete c;
- }
}
void ServerConfig::ApplyModules(User* user)