summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/hostserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /modules/pseudoclients/hostserv.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/pseudoclients/hostserv.cpp')
-rw-r--r--modules/pseudoclients/hostserv.cpp18
1 files changed, 9 insertions, 9 deletions
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<Event::DeleteVhost>
{
Reference<BotInfo> HostServ;
-
+
public:
HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR)
, EventHook<Event::UserLogin>("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<bool>("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<bool>("activate_on_set"))
{