X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_commands.cpp;h=1555b4d0443198d69bac2fb298cedafa749d5ba2;hb=748b3a0d89e7ecc9a766471b79fb78f63a5ca2bb;hp=2d4d42a1f4c26611f34fd986fa9c8c598bf86e16;hpb=44f42a13de52c8025942ddab42f51feb36821782;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_commands.cpp b/src/commands/cmd_commands.cpp index 2d4d42a1f..1555b4d04 100644 --- a/src/commands/cmd_commands.cpp +++ b/src/commands/cmd_commands.cpp @@ -20,14 +20,6 @@ #include "inspircd.h" -#ifndef CMD_COMMANDS_H -#define CMD_COMMANDS_H - -// include the common header files - -#include "users.h" -#include "channels.h" - /** Handle /COMMANDS. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work * the same way, however, they can be fully unloaded, where these @@ -38,7 +30,11 @@ class CommandCommands : public Command public: /** Constructor for commands. */ - CommandCommands ( Module* parent) : Command(parent,"COMMANDS",0,0) { } + CommandCommands(Module* parent) : Command(parent,"COMMANDS",0,0) + { + Penalty = 3; + } + /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command @@ -48,9 +44,6 @@ class CommandCommands : public Command CmdResult Handle(const std::vector& parameters, User *user); }; -#endif - - /** Handle /COMMANDS */ CmdResult CommandCommands::Handle (const std::vector&, User *user) @@ -59,6 +52,10 @@ CmdResult CommandCommands::Handle (const std::vector&, User *user) list.reserve(ServerInstance->Parser->cmdlist.size()); for (Commandtable::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++) { + // Don't show S2S commands to users + if (i->second->flags_needed == FLAG_SERVERONLY) + continue; + Module* src = i->second->creator; char buffer[MAXBUF]; snprintf(buffer, MAXBUF, ":%s %03d %s :%s %s %d %d",