]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_wallops.cpp
Add support for blocking tag messages with the deaf mode.
[user/henk/code/inspircd.git] / src / coremods / core_wallops.cpp
index 6b055f874a6df046e9c966963b26a80075600587..3855f319d6efcd659e213fe904408e64e72bb94d 100644 (file)
@@ -1,8 +1,13 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2018-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013-2014, 2018 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+ *   Copyright (C) 2006, 2010 Craig Edwards <brain@inspircd.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -36,7 +41,7 @@ class CommandWallops : public Command
                , protoevprov(parent, name)
        {
                flags_needed = 'o';
-               syntax = "<any-text>";
+               syntax = ":<message>";
        }
 
        /** Handle command.
@@ -54,6 +59,12 @@ class CommandWallops : public Command
 
 CmdResult CommandWallops::Handle(User* user, const Params& parameters)
 {
+       if (parameters[0].empty())
+       {
+               user->WriteNumeric(ERR_NOTEXTTOSEND, "No text to send");
+               return CMD_FAILURE;
+       }
+
        ClientProtocol::Message msg("WALLOPS", user);
        msg.PushParamRef(parameters[0]);
        ClientProtocol::Event wallopsevent(protoevprov, msg);