From: Peter Powell Date: Tue, 14 Aug 2018 18:18:15 +0000 (+0100) Subject: Fix a bunch more conflicting/unnamed numerics. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=a69f543be3bb6df77bfc19eaadc313d405ec2d45;p=user%2Fhenk%2Fcode%2Finspircd.git Fix a bunch more conflicting/unnamed numerics. --- diff --git a/include/numerics.h b/include/numerics.h index 8c2f0ce11..d1899b757 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -159,7 +159,6 @@ enum ERR_RESTRICTED = 484, 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_CANTSENDTOUSER = 531, // ??? diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 3eab189f2..a09d0d9e4 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -52,7 +52,7 @@ class AutoOpList : public ListModeBase if (adding && !mh) { - source->WriteNumeric(415, mid, InspIRCd::Format("Cannot find prefix mode '%s' for autoop", mid.c_str())); + source->WriteNumeric(ERR_UNKNOWNMODE, mid, InspIRCd::Format("Cannot find prefix mode '%s' for autoop", mid.c_str())); return MOD_RES_DENY; } else if (!mh) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 5f98def8f..d1fb23620 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -24,6 +24,12 @@ #include "xline.h" #include "modules/stats.h" +enum +{ + // InspIRCd-specific. + ERR_BADCHANNEL = 926 +}; + /** Holds a CBAN item */ class CBan : public XLine @@ -180,7 +186,7 @@ class ModuleCBan : public Module, public Stats::EventListener if (rl) { // Channel is banned. - user->WriteNumeric(384, cname, InspIRCd::Format("Cannot join channel, CBANed (%s)", rl->reason.c_str())); + user->WriteNumeric(ERR_BADCHANNEL, cname, InspIRCd::Format("Channel %s is CBANed: %s", cname.c_str(), rl->reason.c_str())); ServerInstance->SNO->WriteGlobalSno('a', "%s tried to join %s which is CBANed (%s)", user->nick.c_str(), cname.c_str(), rl->reason.c_str()); return MOD_RES_DENY; diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 04f85739a..f2d6bf105 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -27,6 +27,11 @@ enum { + // From ircd-ratbox. + RPL_HELPSTART = 704, + RPL_HELPTXT = 705, + RPL_ENDOFHELP = 706, + // InspIRCd-specific? RPL_DCCALLOWSTART = 990, RPL_DCCALLOWLIST = 991, @@ -36,16 +41,11 @@ enum RPL_DCCALLOWREMOVED = 995, ERR_DCCALLOWINVALID = 996, RPL_DCCALLOWEXPIRED = 997, - ERR_UNKNOWNDCCALLOWCMD = 998, - // TODO: These numerics are conflicting and should be removed - // and be replaced with helpop. - RPL_DCCALLOWHELP = 998, - RPL_ENDOFDCCALLOWHELP = 999 + ERR_UNKNOWNDCCALLOWCMD = 998 }; static const char* const helptext[] = { - "DCCALLOW [(+|-) [