From 1736775c766cddf9e1dc436aff6060bd8553c8c3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 16 Oct 2022 23:24:44 +0100 Subject: [PATCH] Rename the services_account module to account. --- docs/conf/inspircd.conf.example | 2 +- docs/conf/modules.conf.example | 16 +++++----------- .../{m_services_account.cpp => m_account.cpp} | 9 ++++----- src/modules/m_callerid.cpp | 2 +- src/modules/m_sasl.cpp | 4 ++-- 5 files changed, 13 insertions(+), 20 deletions(-) rename src/modules/{m_services_account.cpp => m_account.cpp} (98%) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 6f6dad61c..cd6a23f7a 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -339,7 +339,7 @@ # NOTE: You must complete the signon prior to full connection. Currently, # this is only possible by using SASL authentication; passforward # and PRIVMSG NickServ happen after your final connect block has been found. - # Requires the services_account module to be loaded. + # Requires the account module to be loaded. #requireaccount="yes" # Alternate MOTD file for this connect class. The contents of this file are diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 96417563a..e2268776e 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -53,6 +53,11 @@ # BBC BASIC keywords. # +#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# +# Account support module: Adds support for user accounts as well as +# several several modes relating to accounts. +# + #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Alias module: Allows you to define server-side command aliases. # @@ -2047,17 +2052,6 @@ # To use, SETIDLE must be in one of your oper class blocks. # -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# Services support module: Adds several user modes such as +R and +M. -# This module implements the 'identified' state via account names, -# and is similar in operation to the way asuka and ircu handle services. -# -# Also of note is that this module implements two extbans: -# +b R: (stop matching account names from joining) -# +b U:n!u@h (blocks matching unregistered users) -# -# - #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Services integration module: Adds various features which enable # integrating with a third-party services pseudoserver like Anope or diff --git a/src/modules/m_services_account.cpp b/src/modules/m_account.cpp similarity index 98% rename from src/modules/m_services_account.cpp rename to src/modules/m_account.cpp index 78b040755..dd696f5fa 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_account.cpp @@ -209,7 +209,7 @@ public: } }; -class ModuleServicesAccount final +class ModuleAccount final : public Module , public CTCTags::EventListener , public Who::EventListener @@ -226,8 +226,8 @@ private: UnauthedExtBan unauthedextban; public: - ModuleServicesAccount() - : Module(VF_VENDOR | VF_OPTCOMMON, "Adds various channel and user modes relating to services accounts.") + ModuleAccount() + : Module(VF_VENDOR | VF_OPTCOMMON, "Adds various channel and user modes relating to accounts.") , CTCTags::EventListener(this) , Who::EventListener(this) , Whois::EventListener(this) @@ -242,7 +242,6 @@ public: { } - ModResult OnWhoLine(const Who::Request& request, LocalUser* source, User* user, Membership* memb, Numeric::Numeric& numeric) override { size_t flag_index; @@ -351,4 +350,4 @@ public: } }; -MODULE_INIT(ModuleServicesAccount) +MODULE_INIT(ModuleAccount) diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 4fc1c114e..215b2648d 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -466,7 +466,7 @@ public: void Prioritize() override { - // Want to be after modules like silence or services_account + // Want to be after modules like account or silence ServerInstance->Modules.SetPriority(this, I_OnUserPreMessage, PRIORITY_LAST); } }; diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 73dd21c2a..159d960ed 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -424,8 +424,8 @@ public: void init() override { - if (!ServerInstance->Modules.Find("services_account") || !ServerInstance->Modules.Find("cap")) - ServerInstance->Logs.Normal(MODNAME, "WARNING: m_services_account and m_cap are not loaded! m_sasl will NOT function correctly until these two modules are loaded!"); + if (!ServerInstance->Modules.Find("account") || !ServerInstance->Modules.Find("cap")) + ServerInstance->Logs.Normal(MODNAME, "WARNING: the cap and services modules are not loaded! The sasl module will NOT function correctly until these two modules are loaded!"); } void ReadConfig(ConfigStatus& status) override