From 36b1166cf6efddbc9a9abc8f00ad13bb0d4e56a9 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 23 Nov 2012 16:56:06 -0500 Subject: Change the return type of ircdmessage to void now that we don't use it, add an ircd message module event, and a few more fixups --- src/process.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/process.cpp') 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 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()) -- cgit