X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_stub.cpp;h=7ed3865e3851c9725256e6c2b06be077f5ffa111;hb=384ef31bc01e4a1a2e59d082c9066002410ba54a;hp=28adb9e6a0c9eab8c16e9665f6dd5a822f6f546f;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index 28adb9e6a..7ed3865e3 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -41,12 +41,12 @@ class CommandConnect : public 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) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { /* * This is handled by the server linking module, if necessary. Do not remove this stub. */ - user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick.c_str()); + user->WriteNotice("Look into loading a linking module (like m_spanningtree) if you want this to do anything useful."); return CMD_SUCCESS; } }; @@ -68,10 +68,10 @@ class CommandLinks : public 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) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - user->WriteNumeric(RPL_LINKS, "%s %s :0 %s", ServerInstance->Config->ServerName.c_str(),ServerInstance->Config->ServerName.c_str(),ServerInstance->Config->ServerDesc.c_str()); - user->WriteNumeric(RPL_ENDOFLINKS, "* :End of /LINKS list."); + user->WriteNumeric(RPL_LINKS, ServerInstance->Config->ServerName, ServerInstance->Config->ServerName, InspIRCd::Format("0 %s", ServerInstance->Config->ServerDesc.c_str())); + user->WriteNumeric(RPL_ENDOFLINKS, '*', "End of /LINKS list."); return CMD_SUCCESS; } }; @@ -94,15 +94,15 @@ class CommandServer : public 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) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { if (user->registered == REG_ALL) { - user->WriteNumeric(ERR_ALREADYREGISTERED, ":You are already registered. (Perhaps your IRC client does not have a /SERVER command)."); + user->WriteNumeric(ERR_ALREADYREGISTERED, "You are already registered. (Perhaps your IRC client does not have a /SERVER command)."); } else { - user->WriteNumeric(ERR_NOTREGISTERED, "SERVER :You may not register as a server (servers have separate ports from clients, change your config)"); + user->WriteNumeric(ERR_NOTREGISTERED, "SERVER", "You may not register as a server (servers have separate ports from clients, change your config)"); } return CMD_FAILURE; } @@ -127,9 +127,9 @@ class CommandSquit : public 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) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - user->WriteServ("NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick.c_str()); + user->WriteNotice("Look into loading a linking module (like m_spanningtree) if you want this to do anything useful."); return CMD_FAILURE; } }; @@ -147,7 +147,7 @@ class CoreModStub : public Module { } - Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the stub commands CONNECT, LINKS, SERVER and SQUIT", VF_VENDOR|VF_CORE); }