From 3bf260cb99dd91a92f2363716440e1196d7f5cf1 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 10 Dec 2006 02:13:59 +0000 Subject: Add prefix to /PRIVMSG, similar to bug #178 for /NOTICE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5906 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_privmsg.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp index 896aa4c3e..a1839ca41 100644 --- a/src/cmd_privmsg.cpp +++ b/src/cmd_privmsg.cpp @@ -99,7 +99,15 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) return CMD_FAILURE; } - chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %s :%s", chan->name, parameters[1]); + if (status) + { + chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%c %s", status, chan->name, status, parameters[1]); + } + else + { + chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %s :%s", chan->name, parameters[1]); + } + FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,chan,TYPE_CHANNEL,parameters[1],status,except_list)); } else -- cgit v1.2.3