From efa08239271572e1c8024f808d61e02c7377ab54 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 26 Oct 2007 20:48:58 +0000 Subject: Add new event for this with gauranteed delivery of message BEFORE the text is sent out git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8376 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_notice.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/commands/cmd_notice.cpp') diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index 9cc846dd8..1f5b854e6 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -41,6 +41,7 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) parameters[1] = temp.c_str(); // notice to server mask const char* servermask = parameters[0] + 1; + FOREACH_MOD(I_OnText,OnText(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,exempt_list)); if (match(ServerInstance->Config->ServerName,servermask)) { user->SendAll("NOTICE", "%s", parameters[1]); @@ -90,6 +91,8 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) return CMD_FAILURE; } + FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,parameters[1],status,except_list)); + if (status) { if (ServerInstance->Config->UndernetMsgPrefix) @@ -138,6 +141,8 @@ CmdResult CommandNotice::Handle (const char** parameters, int pcnt, User *user) } parameters[1] = (char*)temp.c_str(); + FOREACH_MOD(I_OnText,OnText(user,dest,TYPE_USER,parameters[1],0,exempt_list)); + if (IS_LOCAL(dest)) { // direct write, same server -- cgit v1.2.3