diff options
author | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
commit | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch) | |
tree | b9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/extra/m_sql_authentication.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'modules/extra/m_sql_authentication.cpp')
-rw-r--r-- | modules/extra/m_sql_authentication.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index b3c0fd6b7..65f0f2800 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -1,5 +1,6 @@ #include "module.h" #include "modules/sql.h" +#include "modules/nickserv.h" static Module *me; @@ -42,7 +43,7 @@ class SQLAuthenticationResult : public SQL::Interface if (na == NULL) { na = new NickAlias(req->GetAccount(), new NickCore(req->GetAccount())); - FOREACH_MOD(OnNickRegister, (user, na)); + NickServ::Event::OnNickRegister(&NickServ::Event::NickRegister::OnNickRegister, user, na); if (user && NickServ) user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str()); } @@ -66,6 +67,8 @@ class SQLAuthenticationResult : public SQL::Interface }; class ModuleSQLAuthentication : public Module + , public EventHook<Event::PreCommand> + , public EventHook<Event::CheckAuthentication> { Anope::string engine; Anope::string query; @@ -75,6 +78,8 @@ class ModuleSQLAuthentication : public Module public: ModuleSQLAuthentication(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) + , EventHook<Event::PreCommand>("OnPreCommand") + , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") { me = this; |