From fa8c035373a7c20a2f533ec565acd385fef2c7c9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 12 Apr 2022 00:52:10 +0100 Subject: Use ERR_UNAVAILRESOURCE for things that should be retried later. Also move it to the global numerics header to avoid duplication. --- src/modules/m_joinflood.cpp | 6 ------ src/modules/m_kicknorejoin.cpp | 7 ------- src/modules/m_spanningtree/main.cpp | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 90397e980..62b39f246 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -26,12 +26,6 @@ #include "inspircd.h" #include "modules/server.h" -enum -{ - // From RFC 2182. - ERR_UNAVAILRESOURCE = 437 -}; - // The number of seconds the channel will be closed for. static unsigned int duration; diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 2b0970d29..f6d04c78d 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -29,13 +29,6 @@ #include "inspircd.h" #include "modules/invite.h" -enum -{ - // From RFC 2182. - ERR_UNAVAILRESOURCE = 437 -}; - - class KickRejoinData { struct KickedUser diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 614c7cd83..49f5dc920 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -376,7 +376,7 @@ ModResult ModuleSpanningTree::OnPreTopicChange(User* user, Channel* chan, const // other servers will drop our FTOPIC. This restriction will be removed when the protocol is updated. if ((chan->topicset >= ServerInstance->Time()) && (Utils->serverlist.size() > 1)) { - user->WriteNumeric(ERR_CHANOPRIVSNEEDED, chan->name, "Retry topic change later"); + user->WriteNumeric(ERR_UNAVAILRESOURCE, chan->name, "Retry topic change later"); return MOD_RES_DENY; } return MOD_RES_PASSTHRU; -- cgit v1.3.1-10-gc9f91