diff options
| author | 2013-05-16 16:33:16 +0200 | |
|---|---|---|
| committer | 2013-05-20 23:30:11 +0200 | |
| commit | 7a67685bcb863b0d4199715e86697fee423596c2 (patch) | |
| tree | e9d5d9de3a8ea66b785131012e2a777eaa8004e5 /src/modules.cpp | |
| parent | Fixup last commit (diff) | |
Remove OnUserPreNotice and OnUserNotice hooks, add MessageType argument to OnUserMessage and OnUserPreMessage
All modules (except m_nonotice) that perform filtering on messages have common logic for handling PRIVMSGs and NOTICEs and most of them run the exact same code in both cases
Diffstat (limited to 'src/modules.cpp')
| -rw-r--r-- | src/modules.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 63e1118d9..9a7d8a6a7 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -103,8 +103,7 @@ void Module::OnPostOper(User*, const std::string&, const std::string &) { } void Module::OnInfo(User*) { } void Module::OnWhois(User*, User*) { } ModResult Module::OnUserPreInvite(User*, User*, Channel*, time_t) { return MOD_RES_PASSTHRU; } -ModResult Module::OnUserPreMessage(User*, void*, int, std::string&, char, CUList&) { return MOD_RES_PASSTHRU; } -ModResult Module::OnUserPreNotice(User*, void*, int, std::string&, char, CUList&) { return MOD_RES_PASSTHRU; } +ModResult Module::OnUserPreMessage(User*, void*, int, std::string&, char, CUList&, MessageType) { return MOD_RES_PASSTHRU; } ModResult Module::OnUserPreNick(User*, const std::string&) { return MOD_RES_PASSTHRU; } void Module::OnUserPostNick(User*, const std::string&) { } ModResult Module::OnPreMode(User*, User*, Channel*, const std::vector<std::string>&) { return MOD_RES_PASSTHRU; } @@ -141,8 +140,7 @@ int Module::OnStreamSocketWrite(StreamSocket*, std::string&) { return -1; } void Module::OnStreamSocketClose(StreamSocket*) { } void Module::OnStreamSocketConnect(StreamSocket*) { } int Module::OnStreamSocketRead(StreamSocket*, std::string&) { return -1; } -void Module::OnUserMessage(User*, void*, int, const std::string&, char, const CUList&) { } -void Module::OnUserNotice(User*, void*, int, const std::string&, char, const CUList&) { } +void Module::OnUserMessage(User*, void*, int, const std::string&, char, const CUList&, MessageType) { } void Module::OnRemoteKill(User*, User*, const std::string&, const std::string&) { } void Module::OnUserInvite(User*, User*, Channel*, time_t) { } void Module::OnPostTopicChange(User*, Channel*, const std::string&) { } |
