diff options
| author | Adam <Adam@anope.org> | 2016-07-28 21:29:35 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-07-28 21:29:35 -0400 |
| commit | 0e758a2ac23dc4a001e8e126cec14588da9a9769 (patch) | |
| tree | 45df813323e023c5c89db7279426c4ad0943b4a9 /modules/nickserv/maxemail.cpp | |
| parent | a3c8afae00c54d5b95c620248b51f90679d7d53f (diff) | |
Allow serializable fields to use storage in the respective objects.
Split service management code nito a proper servicemanager. Make service
references managed instead of lazy lookup. Also made events and
serializable use service manager instead of their respective systems for
management
Diffstat (limited to 'modules/nickserv/maxemail.cpp')
| -rw-r--r-- | modules/nickserv/maxemail.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/nickserv/maxemail.cpp b/modules/nickserv/maxemail.cpp index 38054f819..34f83741d 100644 --- a/modules/nickserv/maxemail.cpp +++ b/modules/nickserv/maxemail.cpp @@ -49,6 +49,7 @@ class NSMaxEmail : public Module public: NSMaxEmail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) + , EventHook<Event::PreCommand>(this) { } @@ -57,17 +58,17 @@ class NSMaxEmail : public Module if (source.IsOper()) return EVENT_CONTINUE; - if (command->name == "nickserv/register") + if (command->GetName() == "nickserv/register") { if (this->CheckLimitReached(source, params.size() > 1 ? params[1] : "")) return EVENT_STOP; } - else if (command->name == "nickserv/set/email") + else if (command->GetName() == "nickserv/set/email") { if (this->CheckLimitReached(source, params.size() > 0 ? params[0] : "")) return EVENT_STOP; } - else if (command->name == "nickserv/ungroup" && source.GetAccount()) + else if (command->GetName() == "nickserv/ungroup" && source.GetAccount()) { if (this->CheckLimitReached(source, source.GetAccount()->GetEmail())) return EVENT_STOP; |
