summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-01 20:05:52 -0400
committerAdam <Adam@anope.org>2010-08-01 20:05:52 -0400
commit90976b66728fcc671f3ecc4a2d39e438d6d8bcb6 (patch)
tree3bfa64be578a52480b1c18535e46a14a72592df0 /modules
parente8d6524411e188f4de32a231857b078b57aef151 (diff)
Fixed some issues with reconnecting if we disconnect from the uplink
Diffstat (limited to 'modules')
-rw-r--r--modules/core/os_jupe.cpp2
-rw-r--r--modules/core/os_stats.cpp8
-rw-r--r--modules/protocol/bahamut.cpp2
-rw-r--r--modules/protocol/inspircd11.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/modules/core/os_jupe.cpp b/modules/core/os_jupe.cpp
index a6d478708..220e88abd 100644
--- a/modules/core/os_jupe.cpp
+++ b/modules/core/os_jupe.cpp
@@ -28,7 +28,7 @@ class CommandOSJupe : public Command
if (!isValidHost(jserver, 3))
notice_lang(Config.s_OperServ, u, OPER_JUPE_HOST_ERROR);
- else if (server && (server == Me || server == Me->GetUplink()))
+ else if (server && (server == Me || server == Me->GetLinks().front()))
notice_lang(Config.s_OperServ, u, OPER_JUPE_INVALID_SERVER);
else
{
diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp
index 9cb3865a1..efbf62e2f 100644
--- a/modules/core/os_stats.cpp
+++ b/modules/core/os_stats.cpp
@@ -28,8 +28,8 @@ static int stats_count_servers(Server *s)
int count = 1;
if (!s->GetLinks().empty())
- for (std::list<Server *>::const_iterator it = s->GetLinks().begin(), it_end = s->GetLinks().end(); it != it_end; ++it)
- count += stats_count_servers(*it);
+ for (unsigned i = 0, j = s->GetLinks().size(); i < j; ++i)
+ count += stats_count_servers(s->GetLinks()[i]);
return count;
}
@@ -209,9 +209,9 @@ class CommandOSStats : public Command
if (!buf.empty())
buf.erase(buf.begin());
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER, Me->GetUplink()->GetName().c_str());
+ notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER, Me->GetLinks().front()->GetName().c_str());
notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_CAPAB, buf.c_str());
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER_COUNT, stats_count_servers(Me->GetUplink()));
+ notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER_COUNT, stats_count_servers(Me->GetLinks().front()));
return MOD_CONT;
}
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 724c59879..d71e88dd3 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -700,7 +700,7 @@ int anope_event_burst(const Anope::string &source, int ac, const char **av)
* server finished bursting. -GD
*/
if (!s)
- s = Me->GetUplink();
+ s = Me->GetLinks().front();
if (s)
s->Sync(true);
}
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index e7297b679..c13ee1120 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -1036,7 +1036,7 @@ int anope_event_capab(const Anope::string &source, int ac, const char **av)
int anope_event_endburst(const Anope::string &source, int ac, const char **av)
{
- Me->GetUplink()->Sync(true);
+ Me->GetLinks().front()->Sync(true);
return MOD_CONT;
}