]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_stub.cpp
Don't kill cloaking users when hash/md5 is missing.
[user/henk/code/inspircd.git] / src / coremods / core_stub.cpp
index 7ed3865e3851c9725256e6c2b06be077f5ffa111..1e9c830241670b019c97b498a89ef06fad14e100 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
- *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2014-2016 Attila Molnar <attilamolnar@hush.com>
  *
  * 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
 
 #include "inspircd.h"
 
+enum
+{
+       // From RFC 1459.
+       ERR_SUMMONDISABLED = 445,
+       ERR_USERSDISABLED = 446
+};
+
 
 /** Handle /CONNECT.
  */
@@ -33,7 +40,7 @@ class CommandConnect : public Command
                : Command(parent, "CONNECT", 1)
        {
                flags_needed = 'o';
-               syntax = "<servername>";
+               syntax = "<servermask>";
        }
 
        /** Handle command.
@@ -119,7 +126,7 @@ class CommandSquit : public Command
                : Command(parent, "SQUIT", 1, 2)
        {
                flags_needed = 'o';
-               syntax = "<servername>";
+               syntax = "<servermask>";
        }
 
        /** Handle command.
@@ -134,22 +141,61 @@ class CommandSquit : public Command
        }
 };
 
+class CommandSummon
+       : public SplitCommand
+{
+ public:
+       CommandSummon(Module* Creator)
+               : SplitCommand(Creator, "SUMMON", 1)
+       {
+       }
+
+       CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
+       {
+               user->WriteNumeric(ERR_SUMMONDISABLED, "SUMMON has been disabled");
+               return CMD_SUCCESS;
+       }
+};
+
+class CommandUsers
+       : public SplitCommand
+{
+ public:
+       CommandUsers(Module* Creator)
+               : SplitCommand(Creator, "USERS")
+       {
+       }
+
+       CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
+       {
+               user->WriteNumeric(ERR_USERSDISABLED, "USERS has been disabled");
+               return CMD_SUCCESS;
+       }
+};
+
 class CoreModStub : public Module
 {
        CommandConnect cmdconnect;
        CommandLinks cmdlinks;
        CommandServer cmdserver;
        CommandSquit cmdsquit;
+       CommandSummon cmdsummon;
+       CommandUsers cmdusers;
 
  public:
        CoreModStub()
-               : cmdconnect(this), cmdlinks(this), cmdserver(this), cmdsquit(this)
+               : cmdconnect(this)
+               , cmdlinks(this)
+               , cmdserver(this)
+               , cmdsquit(this)
+               , cmdsummon(this)
+               , cmdusers(this)
        {
        }
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides the stub commands CONNECT, LINKS, SERVER and SQUIT", VF_VENDOR|VF_CORE);
+               return Version("Provides stubs for unimplemented commands", VF_VENDOR|VF_CORE);
        }
 };