]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_user/core_user.cpp
Improve the descriptions of various core modules.
[user/henk/code/inspircd.git] / src / coremods / core_user / core_user.cpp
index 6e4e547c16f148668b2018657336f27d7752611b..8f90c4ec5c8669b6646112c105bfc9e1271b39d5 100644 (file)
@@ -57,13 +57,13 @@ class CommandPass : public SplitCommand
 
 /** Handle /PING.
  */
-class CommandPing : public Command
+class CommandPing : public SplitCommand
 {
  public:
        /** Constructor for ping.
         */
        CommandPing(Module* parent)
-               : Command(parent, "PING", 1, 2)
+               : SplitCommand(parent, "PING", 1, 2)
        {
                syntax = "<servername> [:<servername>]";
        }
@@ -73,9 +73,10 @@ class CommandPing : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
+       CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
        {
-               user->WriteServ("PONG %s :%s", ServerInstance->Config->ServerName.c_str(), parameters[0].c_str());
+               ClientProtocol::Messages::Pong pong(parameters[0]);
+               user->Send(ServerInstance->GetRFCEvents().pong, pong);
                return CMD_SUCCESS;
        }
 };
@@ -139,7 +140,6 @@ void MessageWrapper::ReadConfig(const char* prefixname, const char* suffixname,
 class CoreModUser : public Module
 {
        CommandAway cmdaway;
-       CommandMode cmdmode;
        CommandNick cmdnick;
        CommandPart cmdpart;
        CommandPass cmdpass;
@@ -147,6 +147,8 @@ class CoreModUser : public Module
        CommandPong cmdpong;
        CommandQuit cmdquit;
        CommandUser cmduser;
+       CommandIson cmdison;
+       CommandUserhost cmduserhost;
        SimpleUserModeHandler invisiblemode;
        ModeUserOperator operatormode;
        ModeUserServerNoticeMask snomaskmode;
@@ -154,7 +156,6 @@ class CoreModUser : public Module
  public:
        CoreModUser()
                : cmdaway(this)
-               , cmdmode(this)
                , cmdnick(this)
                , cmdpart(this)
                , cmdpass(this)
@@ -162,6 +163,8 @@ class CoreModUser : public Module
                , cmdpong(this)
                , cmdquit(this)
                , cmduser(this)
+               , cmdison(this)
+               , cmduserhost(this)
                , invisiblemode(this, "invisible", 'i')
                , operatormode(this)
                , snomaskmode(this)
@@ -176,7 +179,7 @@ class CoreModUser : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides the AWAY, MODE, NICK, PART, PASS, PING, PONG, QUIT and USER commands", VF_VENDOR|VF_CORE);
+               return Version("Provides the AWAY, ISON, NICK, PART, PASS, PING, PONG, QUIT, USERHOST, and USER commands", VF_VENDOR|VF_CORE);
        }
 };