From e46bcff32467deef0d83790a1587cc5d6d442337 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 12 Oct 2014 19:25:39 -0400 Subject: Move nick register event to make it easier for modules to determine if a newly registered nick is confirmed or not. Add confirm event. --- modules/commands/ns_register.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index 8e916c4d7..4793b2269 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -37,6 +37,7 @@ class CommandNSConfirm : public Command else { na->nc->Shrink("UNCONFIRMED"); + FOREACH_MOD(OnNickConfirm, (source.GetUser(), na->nc)); Log(LOG_ADMIN, source, this) << "to confirm nick " << na->nick << " (" << na->nc->display << ")"; source.Reply(_("Nick \002%s\002 has been confirmed."), na->nick.c_str()); } @@ -51,6 +52,7 @@ class CommandNSConfirm : public Command Log(LOG_COMMAND, source, this) << "to confirm their email"; source.Reply(_("Your email address of \002%s\002 has been confirmed."), source.nc->email.c_str()); nc->Shrink("UNCONFIRMED"); + FOREACH_MOD(OnNickConfirm, (source.GetUser(), nc)); if (source.GetUser()) { @@ -198,8 +200,6 @@ class CommandNSRegister : public Command Log(LOG_COMMAND, source, this) << "to register " << na->nick << " (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")"; - FOREACH_MOD(OnNickRegister, (source.GetUser(), na, pass)); - if (na->nc->GetAccessCount()) source.Reply(_("Nickname \002%s\002 registered under your user@host-mask: %s"), u_nick.c_str(), na->nc->GetAccess(0).c_str()); else @@ -223,6 +223,8 @@ class CommandNSRegister : public Command } } + FOREACH_MOD(OnNickRegister, (source.GetUser(), na, pass)); + if (u) { u->Identify(na); -- cgit