X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_userhost.cpp;h=399de0b1a21d8dff83fbd73e4078d4bcde8045ba;hb=1d3d2a5434fedb40c5eff621f67c10ff75493de5;hp=c19ad5b6f4be657b955b56d2d529cbd013cd6bf8;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index c19ad5b6f..399de0b1a 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -20,14 +20,6 @@ #include "inspircd.h" -#ifndef CMD_USERHOST_H -#define CMD_USERHOST_H - -// include the common header files - -#include "users.h" -#include "channels.h" - /** Handle /USERHOST. 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,9 @@ class CommandUserhost : public Command public: /** Constructor for userhost. */ - CommandUserhost ( Module* parent) : Command(parent,"USERHOST",0,1) { syntax = "{,}"; } + CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) { + syntax = " {}"; + } /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command @@ -48,12 +42,9 @@ class CommandUserhost : public Command CmdResult Handle(const std::vector& parameters, User *user); }; -#endif - - CmdResult CommandUserhost::Handle (const std::vector& parameters, User *user) { - std::string retbuf = std::string("302 ") + user->nick + " :"; + std::string retbuf = "302 " + user->nick + " :"; for (unsigned int i = 0; i < parameters.size(); i++) { @@ -64,13 +55,9 @@ CmdResult CommandUserhost::Handle (const std::vector& parameters, U retbuf = retbuf + u->nick; if (IS_OPER(u)) - { - retbuf = retbuf + "*="; - } - else - { - retbuf = retbuf + "="; - } + retbuf = retbuf + "*"; + + retbuf = retbuf + "="; if (IS_AWAY(u)) retbuf += "-";