]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_notice.cpp
Add all this crapola
[user/henk/code/inspircd.git] / src / cmd_notice.cpp
index 385219c1e1bb299d20344caaf5435cfa2d251256..df0e518b05aa218b157342800fa0fda40bf81fa4 100644 (file)
@@ -2,12 +2,9 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *                <Craig@chatspike.net>
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -82,7 +79,6 @@ CmdResult cmd_notice::Handle (const char** parameters, int pcnt, userrec *user)
                                        return CMD_FAILURE;
                                }
                        }
-
                        int MOD_RESULT = 0;
 
                        std::string temp = parameters[1];
@@ -98,7 +94,21 @@ CmdResult cmd_notice::Handle (const char** parameters, int pcnt, userrec *user)
                                return CMD_FAILURE;
                        }
 
-                       chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %s :%s", chan->name, parameters[1]);
+                       if (status)
+                       {
+                               if (ServerInstance->Config->UndernetMsgPrefix)
+                               {
+                                       chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%c %s", status, chan->name, status, parameters[1]);
+                               }
+                               else
+                               {
+                                       chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %c%s :%s", status, chan->name, parameters[1]);
+                               }
+                       }
+                       else
+                       {
+                               chan->WriteAllExcept(user, false, status, exempt_list, "NOTICE %s :%s", chan->name, parameters[1]);
+                       }
 
                        FOREACH_MOD(I_OnUserNotice,OnUserNotice(user,chan,TYPE_CHANNEL,parameters[1],status,exempt_list));
                }