diff options
| author | Adam <Adam@anope.org> | 2013-06-19 18:59:26 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-06-19 19:03:56 -0400 |
| commit | 5ac1e9175d90fad5feaf235dfe225ddffc47f257 (patch) | |
| tree | 729e5c1b34e2c23f1c5cdba427e52958b1b17ff0 /modules/pseudoclients | |
| parent | 5695c9e079278e74692d55581769745c833bc284 (diff) | |
Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified
Diffstat (limited to 'modules/pseudoclients')
| -rw-r--r-- | modules/pseudoclients/hostserv.cpp | 9 | ||||
| -rw-r--r-- | modules/pseudoclients/nickserv.cpp | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index 31b623895..2ac0d8f09 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -35,12 +35,15 @@ class HostServCore : public Module HostServ = bi; } - void OnNickIdentify(User *u) anope_override + void OnUserLogin(User *u) anope_override { + if (!IRCD->CanSetVHost) + return; + const NickAlias *na = NickAlias::Find(u->nick); - if (!na || !na->HasVhost()) + if (!na || na->nc != u->Account() || !na->HasVhost()) na = NickAlias::Find(u->Account()->display); - if (!IRCD->CanSetVHost || !na || !na->HasVhost()) + if (!na || !na->HasVhost()) return; if (u->vhost.empty() || !u->vhost.equals_cs(na->GetVhostHost()) || (!na->GetVhostIdent().empty() && !u->GetVIdent().equals_cs(na->GetVhostIdent()))) diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 9d05c339f..f306b1b51 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -64,7 +64,7 @@ class NickServRelease : public User, public Timer public: NickServRelease(NickAlias *na, time_t delay) : User(na->nick, Config->GetBlock("options")->Get<const Anope::string>("enforceruser"), - Config->GetBlock("options")->Get<const Anope::string>("enforcerhost"), "", "", Me, "Services Enforcer", Anope::CurTime, "", Servers::TS6_UID_Retrieve()), Timer(delay), nick(na->nick) + Config->GetBlock("options")->Get<const Anope::string>("enforcerhost"), "", "", Me, "Services Enforcer", Anope::CurTime, "", Servers::TS6_UID_Retrieve(), NULL), Timer(delay), nick(na->nick) { /* Erase the current release timer and use the new one */ std::map<Anope::string, NickServRelease *>::iterator nit = NickServReleases.find(this->nick); @@ -368,7 +368,7 @@ class NickServCore : public Module, public NickServService const Anope::string &unregistered_notice = Config->GetModule(this)->Get<const Anope::string>("unregistered_notice"); if (!Config->GetBlock("options")->Get<bool>("nonicknameownership") && !unregistered_notice.empty() && !na) u->SendMessage(NickServ, unregistered_notice); - else if (na) + else if (na && !u->IsIdentified(true)) this->Validate(u); } |
