diff options
author | Adam <Adam@anope.org> | 2011-10-14 12:20:07 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-10-14 12:20:07 -0400 |
commit | ddc3c2f38cf6ddc0c1f8ad82489a281e01ef50fc (patch) | |
tree | 832b02a62d2da9078b7ab5f9d4d5d99e15570294 /modules/protocol/plexus.cpp | |
parent | 53275c362c521807b70e1eb7cf936f35593dd4dc (diff) |
Added options:nonicknameownership config option
Diffstat (limited to 'modules/protocol/plexus.cpp')
-rw-r--r-- | modules/protocol/plexus.cpp | 11 |
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); } } |