]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Move RPL_SYNTAX to 650 to prevent a collision with RPL_TEXT.
authorPeter Powell <petpow@saberuk.com>
Sat, 2 Sep 2017 18:53:48 +0000 (19:53 +0100)
committerPeter Powell <petpow@saberuk.com>
Wed, 6 Sep 2017 11:08:56 +0000 (12:08 +0100)
Also move the command name to a parameter so that it is more easily
parseable by software.

include/numerics.h
src/command_parse.cpp

index a105b970e1fd19e5850e17b51f7d7f0732b98e24..2dc8d841489651d35c514740c81762e4ae01e9d8 100644 (file)
@@ -73,7 +73,6 @@ enum
        RPL_AWAY                        = 301,
        RPL_USERHOST                    = 302,
        RPL_ISON                        = 303,
-       RPL_SYNTAX                      = 304, // insp-specific
 
        RPL_UNAWAY                      = 305,
        RPL_NOWAWAY                     = 306,
@@ -187,6 +186,8 @@ enum
        ERR_CANTJOINOPERSONLY           = 520, // unrealircd, but crap to have so many numerics for cant join..
        ERR_CANTSENDTOUSER              = 531, // ???
 
+       RPL_SYNTAX                      = 650, // insp-specific
+
        ERR_CHANOPEN                    = 713,
        ERR_KNOCKONCHAN                 = 714,
 
index f3511b05b0c7c36aa4c0f41ffea961e7056b54a2..9ffd20865236e1b7874f211fef472367958a2d86 100644 (file)
@@ -307,7 +307,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
                user->CommandFloodPenalty += failpenalty;
                user->WriteNumeric(ERR_NEEDMOREPARAMS, command, "Not enough parameters.");
                if ((ServerInstance->Config->SyntaxHints) && (user->registered == REG_ALL) && (handler->syntax.length()))
-                       user->WriteNumeric(RPL_SYNTAX, InspIRCd::Format("SYNTAX %s %s", handler->name.c_str(), handler->syntax.c_str()));
+                       user->WriteNumeric(RPL_SYNTAX, handler->name, handler->syntax);
                return;
        }