X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcoremods%2Fcore_info%2Fcmd_info.cpp;h=0d8c1a45a9a7d382e9d41a322f72f9ca34a78df7;hb=5043a2f83598baa3afba53201f690e6deac3eafd;hp=7f1e923c9296d42e8cf09e01a7ec2e25264073be;hpb=c67d3103e9f7397f0ab9631bf07a5e5547deb2c3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_info/cmd_info.cpp b/src/coremods/core_info/cmd_info.cpp index 7f1e923c9..0d8c1a45a 100644 --- a/src/coremods/core_info/cmd_info.cpp +++ b/src/coremods/core_info/cmd_info.cpp @@ -21,33 +21,14 @@ #include "inspircd.h" +#include "core_info.h" -/** Handle /INFO. - */ -class CommandInfo : public Command +CommandInfo::CommandInfo(Module* parent) + : Command(parent, "INFO") { - public: - /** Constructor for info. - */ - CommandInfo(Module* parent) : Command(parent,"INFO") - { - Penalty = 4; - syntax = "[]"; - } - - /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command - * @return A value from CmdResult to indicate command success or failure. - */ - CmdResult Handle(const std::vector& parameters, User *user); - RouteDescriptor GetRouting(User* user, const std::vector& parameters) - { - if (parameters.size() > 0) - return ROUTE_UNICAST(parameters[0]); - return ROUTE_LOCALONLY; - } -}; + Penalty = 4; + syntax = "[]"; +} static const char* const lines[] = { " -/\\- \2InspIRCd\2 -\\/-", @@ -106,4 +87,9 @@ CmdResult CommandInfo::Handle (const std::vector& parameters, User return CMD_SUCCESS; } -COMMAND_INIT(CommandInfo) +RouteDescriptor CommandInfo::GetRouting(User* user, const std::vector& parameters) +{ + if (parameters.size() > 0) + return ROUTE_UNICAST(parameters[0]); + return ROUTE_LOCALONLY; +}