summaryrefslogtreecommitdiff
path: root/modules/protocol/plexus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol/plexus.cpp')
-rw-r--r--modules/protocol/plexus.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index 3b108b470..df03ce940 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -226,12 +226,15 @@ class PlexusProto : public IRCDProto
send_cmd(source->GetUID(), "INVITE %s %s", u ? u->GetUID().c_str() : nick.c_str(), chan.c_str());
}
- void SendAccountLogin(const User *u, const NickCore *account)
+ void SendLogin(User *u)
{
- send_cmd(Config->Numeric, "ENCAP * SU %s %s", u->GetUID().c_str(), account->display.c_str());
+ if (!u->Account())
+ return;
+
+ send_cmd(Config->Numeric, "ENCAP * SU %s %s", u->GetUID().c_str(), u->Account()->display.c_str());
}
- void SendAccountLogout(const User *u, const NickCore *account)
+ void SendLogout(User *u)
{
send_cmd(Config->Numeric, "ENCAP * SU %s", u->GetUID().c_str());
}
@@ -558,7 +561,7 @@ bool event_encap(const Anope::string &source, const std::vector<Anope::string> &
if (u && nc)
{
u->Login(nc);
- if (user_na && user_na->nc == nc && user_na->nc->HasFlag(NI_UNCONFIRMED) == false)
+ if (!Config->NoNicknameOwnership && user_na && user_na->nc == nc && user_na->nc->HasFlag(NI_UNCONFIRMED) == false)
u->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
}
}