X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_stub.cpp;h=1e9c830241670b019c97b498a89ef06fad14e100;hb=0e7e1ea3935e48a5093be4ccf2371a344f30bba0;hp=7ed3865e3851c9725256e6c2b06be077f5ffa111;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index 7ed3865e3..1e9c83024 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -1,9 +1,9 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2014 Attila Molnar - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2019 Robby + * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2014-2016 Attila Molnar * * 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 @@ -21,6 +21,13 @@ #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 = ""; + syntax = ""; } /** Handle command. @@ -119,7 +126,7 @@ class CommandSquit : public Command : Command(parent, "SQUIT", 1, 2) { flags_needed = 'o'; - syntax = ""; + syntax = ""; } /** 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); } };