diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-22 14:31:28 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-22 14:35:38 +0100 |
commit | 48a400f2e068527b338ceecf8ed1dde2da971ca9 (patch) | |
tree | 93375f28863762b4190a5e4cedfdfa44d6c3dab6 | |
parent | ba31d8080f75a0147d0b380f2c51251e024f0deb (diff) |
Move a bunch of optional module numerics to the module source file.
-rw-r--r-- | include/numerics.h | 12 | ||||
-rw-r--r-- | src/modules/m_cap.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_jumpserver.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_operchans.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_showfile.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_sslmodes.cpp | 3 |
7 files changed, 35 insertions, 15 deletions
diff --git a/include/numerics.h b/include/numerics.h index b4ab0451b..29cbca2e3 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -45,14 +45,12 @@ enum RPL_ISUPPORT = 5, // not RFC, extremely common though (defined as RPL_BOUNCE in 2812, widely ignored) RPL_SNOMASKIS = 8, // unrealircd - RPL_REDIR = 10, RPL_MAP = 15, // ircu RPL_ENDMAP = 17, // ircu RPL_MAPUSERS = 18, // insp-specific RPL_UMODEIS = 221, - RPL_RULES = 232, // unrealircd RPL_LUSERCLIENT = 251, RPL_LUSEROP = 252, @@ -75,9 +73,6 @@ enum RPL_UNAWAY = 305, RPL_NOWAWAY = 306, - RPL_RULESTART = 308, // unrealircd - RPL_RULESEND = 309, // unrealircd - RPL_WHOISSERVER = 312, RPL_ENDOFWHO = 315, @@ -124,14 +119,12 @@ enum ERR_CANNOTSENDTOCHAN = 404, ERR_TOOMANYCHANNELS = 405, ERR_WASNOSUCHNICK = 406, - ERR_INVALIDCAPSUBCOMMAND = 410, // ratbox/charybdis(?) ERR_NOTEXTTOSEND = 412, ERR_UNKNOWNCOMMAND = 421, ERR_NOMOTD = 422, ERR_NONICKNAMEGIVEN = 431, ERR_ERRONEUSNICKNAME = 432, ERR_NICKNAMEINUSE = 433, - ERR_NORULES = 434, // unrealircd ERR_USERNOTINCHANNEL = 441, ERR_NOTONCHANNEL = 442, ERR_USERONCHANNEL = 443, @@ -171,20 +164,15 @@ enum ERR_RESTRICTED = 484, - ERR_ALLMUSTSSL = 490, // unrealircd ERR_NOOPERHOST = 491, ERR_DELAYREJOIN = 495, // insp-specific, XXX: we should use 'resource temporarily unavailable' from ircnet/ratbox or whatever ERR_UNKNOWNSNOMASK = 501, // insp-specific ERR_USERSDONTMATCH = 502, - ERR_CANTJOINOPERSONLY = 520, // unrealircd, but crap to have so many numerics for cant join.. ERR_CANTSENDTOUSER = 531, // ??? RPL_SYNTAX = 650, // insp-specific ERR_INVALIDMODEPARAM = 696, // insp-specific - ERR_CHANOPEN = 713, - ERR_KNOCKONCHAN = 714, - RPL_OTHERUMODEIS = 803, // insp-specific RPL_OTHERSNOMASKIS = 804, // insp-specific diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index 86de15d95..603c7e235 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -21,6 +21,12 @@ #include "modules/reload.h" #include "modules/cap.h" +enum +{ + // From IRCv3 capability-negotiation-3.1. + ERR_INVALIDCAPCMD = 232 +}; + namespace Cap { class ManagerImpl; @@ -399,7 +405,7 @@ class CommandCap : public SplitCommand } else { - user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, subcommand.empty() ? "*" : subcommand, "Invalid CAP subcommand"); + user->WriteNumeric(ERR_INVALIDCAPCMD, subcommand.empty() ? "*" : subcommand, "Invalid CAP subcommand"); return CMD_FAILURE; } diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 3104a0c55..f94fc31e6 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -22,6 +22,12 @@ #include "inspircd.h" #include "modules/ssl.h" +enum +{ + // From ircd-ratbox. + RPL_REDIR = 10 +}; + /** Handle /JUMPSERVER */ class CommandJumpserver : public Command diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 171893fd7..66abda851 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -24,7 +24,11 @@ enum { // From UnrealIRCd. - ERR_CANNOTKNOCK = 480 + ERR_CANNOTKNOCK = 480, + + // From ircd-ratbox. + ERR_CHANOPEN = 713, + ERR_KNOCKONCHAN = 714 }; /** Handles the /KNOCK command diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 0b074ebab..f0812ce27 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -22,6 +22,12 @@ #include "inspircd.h" +enum +{ + // From UnrealIRCd. + ERR_CANTJOINOPERSONLY = 520 +}; + class OperChans : public SimpleChannelModeHandler { public: diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index b04b699c4..2d1354aff 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -19,6 +19,15 @@ #include "inspircd.h" +enum +{ + // From UnrealIRCd. + RPL_RULES = 232, + RPL_RULESTART = 308, + RPL_RULESEND = 309, + ERR_NORULES = 434 +}; + class CommandShowFile : public Command { enum Method diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 688fe70ce..dc0063d29 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -28,7 +28,8 @@ enum { // From UnrealIRCd. - ERR_SECUREONLYCHAN = 489 + ERR_SECUREONLYCHAN = 489, + ERR_ALLMUSTSSL = 490 }; namespace |