X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_commands.cpp;h=36408b3638ec3e3aa0eca58d3f526ca3ff157365;hb=23e8bba13c55d33ce89d505780da36c9589e300a;hp=2d4d42a1f4c26611f34fd986fa9c8c598bf86e16;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_commands.cpp b/src/commands/cmd_commands.cpp index 2d4d42a1f..36408b363 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 @@ -48,9 +40,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 +48,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",