mirror of
https://github.com/anope/anope.git
synced 2026-06-30 20:46:38 +02:00
Improve the error diagnostics when the link fails.
This commit is contained in:
+2
-2
@@ -46,9 +46,9 @@ void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
|
||||
void Error::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags)
|
||||
{
|
||||
Log(LOG_TERMINAL) << "ERROR: " << params[0];
|
||||
Anope::QuitReason = "Received ERROR from uplink: " + params[0];
|
||||
Anope::QuitReason = "Received an error from the uplink: " + params.back();
|
||||
Anope::Quitting = true;
|
||||
Log(LOG_TERMINAL) << Anope::QuitReason;
|
||||
}
|
||||
|
||||
Ignore::Ignore(Module *creator, const Anope::string &mname)
|
||||
|
||||
+14
-5
@@ -114,11 +114,20 @@ UplinkSocket::~UplinkSocket()
|
||||
if (!error && !Anope::Quitting)
|
||||
{
|
||||
this->OnError("");
|
||||
Module *protocol = ModuleManager::FindFirstOf(PROTOCOL);
|
||||
if (protocol && !protocol->name.find("inspircd"))
|
||||
Log(LOG_TERMINAL) << "Check that you have loaded m_spanningtree.so on InspIRCd, and are not connecting Anope to an SSL enabled port without configuring SSL in Anope (or vice versa)";
|
||||
else
|
||||
Log(LOG_TERMINAL) << "Check that you are not connecting Anope to an SSL enabled port without configuring SSL in Anope (or vice versa)";
|
||||
|
||||
std::vector<Anope::string> advice = {
|
||||
"You are connecting Anope to an SSL-only port without configuring SSL (or vice versa).",
|
||||
};
|
||||
if (IRCD)
|
||||
{
|
||||
advice.push_back(Anope::Format("You are using the wrong protocol module (currently %s for %s).",
|
||||
IRCD->owner->name.c_str(), IRCD->GetProtocolName().c_str()));
|
||||
IRCD->GetLinkAdvice(advice);
|
||||
}
|
||||
|
||||
Log(LOG_TERMINAL) << "Potential causes include:";
|
||||
for (const auto &line : advice)
|
||||
Log(LOG_TERMINAL) << "* " << line;
|
||||
}
|
||||
|
||||
if (IRCD && Servers::GetUplink() && Servers::GetUplink()->IsSynced())
|
||||
|
||||
Reference in New Issue
Block a user