diff options
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r-- | src/modules/m_services_account.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index aac0b9ce0..26a53b4d7 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -104,9 +104,12 @@ class AChannel_M : public SimpleChannelModeHandler class AccountExtItemImpl : public AccountExtItem { + Events::ModuleEventProvider eventprov; + public: AccountExtItemImpl(Module* mod) : AccountExtItem("accountname", ExtensionItem::EXT_USER, mod) + , eventprov(mod, "event/account") { } @@ -123,14 +126,10 @@ class AccountExtItemImpl : public AccountExtItem user->WriteNumeric(900, "%s %s :You are now logged in as %s", user->GetFullHost().c_str(), value.c_str(), value.c_str()); } - - AccountEvent(creator, user, value).Send(); - } - else - { - // Logged out - AccountEvent(creator, user, "").Send(); } + // If value is empty then logged out + + FOREACH_MOD_CUSTOM(eventprov, AccountEventListener, OnAccountChange, (user, value)); } }; |