diff options
author | Peter Powell <petpow@saberuk.com> | 2019-04-03 15:25:00 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-04-04 12:27:56 +0100 |
commit | be0c809590635fc53fa11ca05ba974699b9ec1b6 (patch) | |
tree | ccd2c1539e42d686546e0515a2c4c807126415bc /src | |
parent | 9ea8ecfaf395955a4e58c743c2f9e35a26528039 (diff) |
Document OnUserInit properly and add OnUserPostInit.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 1 | ||||
-rw-r--r-- | src/usermanager.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 66f424dcb..690ff0feb 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -102,6 +102,7 @@ void Module::OnBackgroundTimer(time_t) { DetachEvent(I_OnBackgroundTimer); } ModResult Module::OnPreCommand(std::string&, CommandBase::Params&, LocalUser*, bool) { DetachEvent(I_OnPreCommand); return MOD_RES_PASSTHRU; } void Module::OnPostCommand(Command*, const CommandBase::Params&, LocalUser*, CmdResult, bool) { DetachEvent(I_OnPostCommand); } void Module::OnUserInit(LocalUser*) { DetachEvent(I_OnUserInit); } +void Module::OnUserPostInit(LocalUser*) { DetachEvent(I_OnUserPostInit); } ModResult Module::OnCheckReady(LocalUser*) { DetachEvent(I_OnCheckReady); return MOD_RES_PASSTHRU; } ModResult Module::OnUserRegister(LocalUser*) { DetachEvent(I_OnUserRegister); return MOD_RES_PASSTHRU; } ModResult Module::OnUserPreKick(User*, Membership*, const std::string&) { DetachEvent(I_OnUserPreKick); return MOD_RES_PASSTHRU; } diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 40e0096a2..fafeffb42 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -210,8 +210,8 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs New->WriteNotice("*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded."); FOREACH_MOD(OnSetUserIP, (New)); - if (New->quitting) - return; + if (!New->quitting) + FOREACH_MOD(OnUserPostInit, (New)); } void UserManager::QuitUser(User* user, const std::string& quitreason, const std::string* operreason) |