diff options
Diffstat (limited to 'src/process.cpp')
-rw-r--r-- | src/process.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/process.cpp b/src/process.cpp index cc2b32a27..2b94c1e7a 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -75,8 +75,13 @@ void Anope::Process(const Anope::string &buffer) } static const Anope::string proto_name = ModuleManager::FindFirstOf(PROTOCOL) ? ModuleManager::FindFirstOf(PROTOCOL)->name : ""; + + MessageSource src(source); - // event + EventReturn MOD_RESULT; + FOREACH_RESULT(I_OnMessage, OnMessage(src, command, params)); + if (MOD_RESULT == EVENT_STOP) + return; ServiceReference<IRCDMessage> m("IRCDMessage", proto_name + "/" + command.lower()); if (!m) @@ -85,8 +90,6 @@ void Anope::Process(const Anope::string &buffer) return; } - MessageSource src(source); - if (m->HasFlag(IRCDMESSAGE_SOFT_LIMIT) ? (params.size() < m->GetParamCount()) : (params.size() != m->GetParamCount())) Log(LOG_DEBUG) << "invalid parameters for " << command << ": " << params.size() << " != " << m->GetParamCount(); else if (m->HasFlag(IRCDMESSAGE_REQUIRE_USER) && !src.GetUser()) |