summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/utils.cpp5
-rw-r--r--src/users.cpp11
2 files changed, 6 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 5091859e1..5862d95e7 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -632,6 +632,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
{
reference<Autoconnect> A = new Autoconnect;
A->Period = Conf->ReadInteger("autoconnect", "period", j, true);
+ A->NextConnectTime = ServerInstance->Time() + A->Period;
A->position = -1;
std::string servers = Conf->ReadValue("autoconnect", "server", j);
irc::spacesepstream ss(servers);
@@ -641,10 +642,6 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
A->servers.push_back(server);
}
- // Fix: Only trip autoconnects if this wouldn't delay autoconnect..
- if (A->NextConnectTime > ((time_t)(ServerInstance->Time() + A->Period)))
- A->NextConnectTime = ServerInstance->Time() + A->Period;
-
if (A->Period <= 0)
{
throw CoreException("Invalid configuration for autoconnect, period not a positive integer!");
diff --git a/src/users.cpp b/src/users.cpp
index 236df2d65..93e7e89a6 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1298,19 +1298,18 @@ void User::WriteCommonQuit(const std::string &normal_text, const std::string &op
snprintf(tb2,MAXBUF,":%s QUIT :%s",this->GetFullHost().c_str(),oper_text.c_str());
std::string out1 = tb1;
std::string out2 = tb2;
+ already_sent[this->fd] = uniq_id;
for (UCListIter v = this->chans.begin(); v != this->chans.end(); v++)
{
const UserMembList* ulist = (*v)->GetUsers();
for (UserMembList::const_iterator i = ulist->begin(); i != ulist->end(); i++)
{
- if (this != i->first)
+ User* u = i->first;
+ if (IS_LOCAL(u) && !u->quitting && (already_sent[u->fd] != uniq_id))
{
- if ((IS_LOCAL(i->first)) && (already_sent[i->first->fd] != uniq_id))
- {
- already_sent[i->first->fd] = uniq_id;
- i->first->Write(IS_OPER(i->first) ? out2 : out1);
- }
+ already_sent[u->fd] = uniq_id;
+ u->Write(IS_OPER(u) ? out2 : out1);
}
}
}