summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-09 19:13:33 -0500
committerAdam <Adam@anope.org>2012-11-09 19:13:33 -0500
commitff3e396e92dfc6f95bf8e7a099e43cc0d3eebdf9 (patch)
tree19451d97ba9cf4dd321fc49a1e20191b273abacc /modules/protocol/unreal.cpp
parent2fe387b4f0cb0e9df43c2689a1343a24f07018ca (diff)
Add a config option to disable sasl
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r--modules/protocol/unreal.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 03a63687f..62157b8b4 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -867,7 +867,7 @@ struct IRCDMessageSASL : IRCDMessage
return;
UplinkSocket::Message(Me) << "SVSLOGIN " << this->uid.substr(0, p) << " " << this->uid << " " << this->GetAccount();
- UplinkSocket::Message(findbot(Config->NickServ)) << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D S";
+ UplinkSocket::Message() << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D S";
}
void OnFail() anope_override
@@ -876,7 +876,9 @@ struct IRCDMessageSASL : IRCDMessage
if (p == Anope::string::npos)
return;
- UplinkSocket::Message(findbot(Config->NickServ)) << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D F";
+ UplinkSocket::Message() << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D F";
+
+ Log(findbot(Config->NickServ)) << "A user failed to identify for account " << this->GetAccount() << " using SASL";
}
};
@@ -893,12 +895,11 @@ struct IRCDMessageSASL : IRCDMessage
bool Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
{
size_t p = params[1].find('!');
- if (p == Anope::string::npos)
+ if (!Config->NSSASL || p == Anope::string::npos)
return true;
- /* Unreal segfaults if we send from Me */
if (params[2] == "S")
- UplinkSocket::Message(findbot(Config->NickServ)) << "SASL " << params[1].substr(0, p) << " " << params[1] << " C +";
+ UplinkSocket::Message() << "SASL " << params[1].substr(0, p) << " " << params[1] << " C +";
else if (params[2] == "C")
{
Anope::string decoded;