From f29e1cf383529a1a29f02b0669d973f5ee0b7a66 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 May 2014 12:07:29 -0400 Subject: Move most of the core pseudoclient logic to modules --- modules/pseudoclients/hostserv.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/pseudoclients/hostserv.cpp') diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index 373275e59..f99d0712a 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -22,7 +22,7 @@ class HostServCore : public Module , public EventHook { Reference HostServ; - + public: HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , EventHook("OnUserLogin") @@ -54,9 +54,9 @@ class HostServCore : public Module if (!IRCD->CanSetVHost) return; - const NickAlias *na = NickAlias::Find(u->nick); + const NickServ::Nick *na = NickServ::FindNick(u->nick); if (!na || na->nc != u->Account() || !na->HasVhost()) - na = NickAlias::Find(u->Account()->display); + na = NickServ::FindNick(u->Account()->display); if (!na || !na->HasVhost()) return; @@ -73,9 +73,9 @@ class HostServCore : public Module if (HostServ) { if (!na->GetVhostIdent().empty()) - u->SendMessage(HostServ, _("Your vhost of \002%s\002@\002%s\002 is now activated."), na->GetVhostIdent().c_str(), na->GetVhostHost().c_str()); + u->SendMessage(*HostServ, _("Your vhost of \002%s\002@\002%s\002 is now activated."), na->GetVhostIdent().c_str(), na->GetVhostHost().c_str()); else - u->SendMessage(HostServ, _("Your vhost of \002%s\002 is now activated."), na->GetVhostHost().c_str()); + u->SendMessage(*HostServ, _("Your vhost of \002%s\002 is now activated."), na->GetVhostHost().c_str()); } } } @@ -97,7 +97,7 @@ class HostServCore : public Module { } - void OnSetVhost(NickAlias *na) override + void OnSetVhost(NickServ::Nick *na) override { if (Config->GetModule(this)->Get("activate_on_set")) { @@ -116,15 +116,15 @@ class HostServCore : public Module if (HostServ) { if (!na->GetVhostIdent().empty()) - u->SendMessage(HostServ, _("Your vhost of \002%s\002@\002%s\002 is now activated."), na->GetVhostIdent().c_str(), na->GetVhostHost().c_str()); + u->SendMessage(*HostServ, _("Your vhost of \002%s\002@\002%s\002 is now activated."), na->GetVhostIdent().c_str(), na->GetVhostHost().c_str()); else - u->SendMessage(HostServ, _("Your vhost of \002%s\002 is now activated."), na->GetVhostHost().c_str()); + u->SendMessage(*HostServ, _("Your vhost of \002%s\002 is now activated."), na->GetVhostHost().c_str()); } } } } - void OnDeleteVhost(NickAlias *na) override + void OnDeleteVhost(NickServ::Nick *na) override { if (Config->GetModule(this)->Get("activate_on_set")) { -- cgit