/*
* 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.
*/
: Command(parent, "CONNECT", 1)
{
flags_needed = 'o';
- syntax = "<servername>";
+ syntax = "<servermask>";
}
/** Handle command.
: Command(parent, "SQUIT", 1, 2)
{
flags_needed = 'o';
- syntax = "<servername>";
+ syntax = "<servermask>";
}
/** Handle 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);
}
};