mirror of
https://github.com/anope/anope.git
synced 2026-06-25 11:16:37 +02:00
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
This commit is contained in:
+6
-3
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user