summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2014-01-31 02:43:26 -0800
committerAdam <adam@sigterm.info>2014-01-31 02:43:26 -0800
commit4455d4346c6b806d9b0754c1dffb6adf9e90887a (patch)
tree5060e3323db0cbe19e8820959d0fcf217c4ae2b4 /modules
parentbacb276181c008069468ebe6b7368b3a8ba7f90b (diff)
parent405b41ec87d5068821ce065f1d3def307184051e (diff)
Merge pull request #42 from ShutterQuick/2.0+saslfix
Have SASL login in on the account name instead of nick alias
Diffstat (limited to 'modules')
-rw-r--r--modules/protocol/charybdis.cpp7
-rw-r--r--modules/protocol/inspircd12.cpp7
-rw-r--r--modules/protocol/unreal.cpp7
3 files changed, 18 insertions, 3 deletions
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp
index bdf6d014b..b1d2e6614 100644
--- a/modules/protocol/charybdis.cpp
+++ b/modules/protocol/charybdis.cpp
@@ -192,6 +192,11 @@ struct IRCDMessageEncap : IRCDMessage
if (!NickServ)
return;
+ Anope::string accountname = GetAccount();
+ NickAlias *na = NickAlias::Find(accountname);
+ if (na)
+ accountname = na->nc->display;
+
/* SVSLOGIN
* parameters: target, new nick, new username, new visible hostname, new login name
* Sent after successful SASL authentication.
@@ -202,7 +207,7 @@ struct IRCDMessageEncap : IRCDMessage
* broadcast, otherwise the changes will be stored, to be used when registration
* completes.
*/
- UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SVSLOGIN " << this->uid << " * * * " << this->GetAccount();
+ UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SVSLOGIN " << this->uid << " * * * " << accountname;
UplinkSocket::Message(Me) << "ENCAP " << msource.GetName() << " SASL " << NickServ->GetUID() << " " << this->uid << " D S";
}
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index 45a00e400..328049c64 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -857,7 +857,12 @@ struct IRCDMessageEncap : IRCDMessage
void OnSuccess() anope_override
{
- UplinkSocket::Message(Me) << "METADATA " << this->uid << " accountname :" << this->GetAccount();
+ Anope::string accountname = GetAccount();
+ NickAlias *na = NickAlias::Find(accountname);
+ if (na)
+ accountname = na->nc->display;
+
+ UplinkSocket::Message(Me) << "METADATA " << this->uid << " accountname :" << accountname;
UplinkSocket::Message(Me) << "ENCAP " << this->uid.substr(0, 3) << " SASL " << Me->GetSID() << " " << this->uid << " D S";
SASLUser su;
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 379be18a5..00f7cc586 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -881,7 +881,12 @@ struct IRCDMessageSASL : IRCDMessage
if (p == Anope::string::npos)
return;
- UplinkSocket::Message(Me) << "SVSLOGIN " << this->uid.substr(0, p) << " " << this->uid << " " << this->GetAccount();
+ Anope::string accountname = GetAccount();
+ NickAlias *na = NickAlias::Find(accountname);
+ if (na)
+ accountname = na->nc->display;
+
+ UplinkSocket::Message(Me) << "SVSLOGIN " << this->uid.substr(0, p) << " " << this->uid << " " << accountname;
UplinkSocket::Message() << "SASL " << this->uid.substr(0, p) << " " << this->uid << " D S";
}