diff --git a/include/bancache.h b/include/bancache.h index 0463f7f9c..c1541bb93 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -34,7 +34,7 @@ */ class CoreExport BanCacheHit final { - public: +public: /** Type of cached ban */ std::string Type; @@ -61,7 +61,7 @@ class CoreExport BanCacheManager final BanCacheHash BanHash; bool RemoveIfExpired(BanCacheHash::iterator& it); - public: +public: /** Creates and adds a Ban Cache item. * @param ip The IP the item is for. diff --git a/include/base.h b/include/base.h index a7d4e6c27..f1fd1dbff 100644 --- a/include/base.h +++ b/include/base.h @@ -51,7 +51,7 @@ class CoreExport refcountbase : private insp::uncopiable { mutable unsigned int refcount = 0; - public: +public: refcountbase(); virtual ~refcountbase(); inline unsigned int GetReferenceCount() const { return refcount; } @@ -71,7 +71,7 @@ class CoreExport usecountbase : private insp::uncopiable { mutable unsigned int usecount = 0; - public: +public: usecountbase() = default; ~usecountbase(); inline unsigned int GetUseCount() const { return usecount; } @@ -83,7 +83,7 @@ template class reference final { T* value = nullptr; - public: +public: reference() = default; reference(T* v) : value(v) { if (value) value->refcount_inc(); } reference(const reference& v) : value(v.value) { if (value) value->refcount_inc(); } @@ -123,7 +123,7 @@ class reference final inline bool operator<(const reference& other) const { return value < other.value; } inline bool operator>(const reference& other) const { return value > other.value; } static inline void* operator new(size_t, void* m) { return m; } - private: +private: #ifndef _WIN32 static void* operator new(size_t); static void operator delete(void*); @@ -151,7 +151,7 @@ enum ServiceType { class CoreExport ServiceProvider : public Cullable { - public: +public: /** Module that is providing this service */ ModuleRef creator; /** Name of the service being provided */ diff --git a/include/channelmanager.h b/include/channelmanager.h index f4a12a3ff..48d395770 100644 --- a/include/channelmanager.h +++ b/include/channelmanager.h @@ -24,11 +24,11 @@ typedef std::unordered_map IsChannel = DefaultIsChannel; diff --git a/include/channels.h b/include/channels.h index 7edb2b4c9..78ad14211 100644 --- a/include/channels.h +++ b/include/channels.h @@ -40,12 +40,12 @@ class CoreExport Channel final : public Extensible { - public: +public: /** A map of Memberships on a channel keyed by User pointers */ typedef std::map > MemberMap; - private: +private: /** Set default modes for the channel on creation */ void SetDefaultModes(); @@ -65,7 +65,7 @@ class CoreExport Channel final */ void DelUser(const MemberMap::iterator& membiter); - public: +public: /** Creates a channel record and initialises it with default values * @param name The name of the channel * @param ts The creation time of the channel diff --git a/include/clientprotocol.h b/include/clientprotocol.h index 69ae1064f..3c3ef627d 100644 --- a/include/clientprotocol.h +++ b/include/clientprotocol.h @@ -55,7 +55,7 @@ class ClientProtocol::TagSelection final { std::bitset<64> selection; - public: +public: /** Check if a tag is selected. * @param tags TagMap the tag is in. The TagMap must contain the same tags as it had when the tag * was selected with Select(), otherwise the result is not meaningful. @@ -95,7 +95,7 @@ class ClientProtocol::MessageSource User* sourceuser; const std::string* sourcestr; - public: +public: /** Constructor, sets the source to be the full host of a user or sets it to be nothing. * The actual source string when serializing will be obtained from User::GetFullHost() if the user is non-NULL. * @param Sourceuser User to set as source of the message. If NULL, the message won't have a source when serialized. @@ -181,7 +181,7 @@ class ClientProtocol::MessageSource class ClientProtocol::Message : public ClientProtocol::MessageSource { - public: +public: /** Contains information required to identify a specific version of a serialized message. */ struct SerializedInfo @@ -224,7 +224,7 @@ class ClientProtocol::Message ptr = other.ptr; } - public: + public: operator const std::string&() const { return (owned ? *str : *ptr); } Param() @@ -282,7 +282,7 @@ class ClientProtocol::Message typedef std::vector ParamList; - private: +private: typedef std::vector > SerializedList; ParamList params; @@ -292,7 +292,7 @@ class ClientProtocol::Message mutable SerializedList serlist; bool sideeffect = false; - protected: +protected: /** Set command string. * @param cmd Command string to set. */ @@ -303,7 +303,7 @@ class ClientProtocol::Message command = cmd; } - public: +public: /** Constructor. * @param cmd Command name, e.g. "JOIN", "NICK". May be NULL. If NULL, the command must be set * with SetCommand() before the message is serialized. @@ -474,7 +474,7 @@ class ClientProtocol::Event const MessageList* initialmsglist = nullptr; bool eventinit_done = false; - public: +public: /** Constructor. * @param protoeventprov Protocol event provider the event is an instance of. */ @@ -522,7 +522,7 @@ class ClientProtocol::Event class ClientProtocol::MessageTagEvent : public Events::ModuleEventProvider { - public: +public: MessageTagEvent(Module* mod) : ModuleEventProvider(mod, "event/messagetag") { @@ -537,7 +537,7 @@ class ClientProtocol::MessageTagEvent class ClientProtocol::MessageTagProvider : public Events::ModuleEventListener { - public: +public: /** Constructor. * @param mod Module owning the provider. */ @@ -585,7 +585,7 @@ class ClientProtocol::MessageTagProvider class ClientProtocol::EventHook : public Events::ModuleEventListener { - public: +public: static std::string GetEventName(const std::string& name) { return "event/protoevent_" + name; @@ -630,7 +630,7 @@ class ClientProtocol::EventHook class ClientProtocol::EventProvider final : public Events::ModuleEventProvider { - public: +public: /** Constructor. * @param Mod Module that owns the event provider. * @param eventname Name of the event this provider is for, e.g. "JOIN", "PART", "NUMERIC". @@ -685,7 +685,7 @@ struct ClientProtocol::RFCEvents final class CoreExport ClientProtocol::Serializer : public DataProvider { - private: +private: ClientProtocol::MessageTagEvent evprov; /** Make a white list containing which tags a user should get. @@ -695,7 +695,7 @@ class CoreExport ClientProtocol::Serializer */ TagSelection MakeTagWhitelist(LocalUser* user, const TagMap& tagmap) const; - public: +public: /** Constructor. * @param mod Module owning the serializer. * @param Name Name of the serializer, e.g. "rfc". diff --git a/include/clientprotocolevent.h b/include/clientprotocolevent.h index 62be09b9c..980a5d974 100644 --- a/include/clientprotocolevent.h +++ b/include/clientprotocolevent.h @@ -57,7 +57,7 @@ class ClientProtocol::Events::Mode std::vector modemsgplist; const Modes::ChangeList& modechanges; - public: +public: static void BuildMessages(User* source, Channel* Chantarget, User* Usertarget, const Modes::ChangeList& changelist, std::list& modelist, std::vector& modemsgplist) { // Build as many MODEs as necessary diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index d451dc904..c0a85a792 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -63,7 +63,7 @@ class ClientProtocol::Messages::Numeric PushParamRef(param); } - public: +public: /** Constructor, target is a User. * @param num Numeric object to send. Must remain valid as long as this object is alive and must not be modified. * @param user User to send the numeric to. May be unregistered, must remain valid as long as this object is alive. @@ -108,7 +108,7 @@ class ClientProtocol::Messages::Join { Membership* memb; - public: +public: /** Constructor. Does not populate parameters, call SetParams() before sending the message. */ Join() @@ -290,7 +290,7 @@ class ClientProtocol::Messages::Mode } } - public: +public: /** Convert an entire mode change list into mode letters and '+' and '-' characters. * @param changelist Mode change list to convert into mode letters. * @return Mode letters. @@ -438,7 +438,7 @@ class ClientProtocol::Messages::Privmsg PushParam("*"); } - public: +public: /** Used to differentiate constructors that copy the text from constructors that do not. */ enum NoCopy { nocopy }; diff --git a/include/command_parse.h b/include/command_parse.h index e384e992a..5e6806a85 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -33,15 +33,15 @@ */ class CoreExport CommandParser final { - public: +public: typedef std::unordered_map CommandMap; - private: +private: /** Command list, a hash_map of command names to Command* */ CommandMap cmdlist; - public: +public: /** Get a command name -> Command* map containing all client to server commands * @return A map of command handlers keyed by command names */ diff --git a/include/configreader.h b/include/configreader.h index 4de1c54a9..ec0455893 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -36,7 +36,7 @@ /** Represents the position within a file. */ class CoreExport FilePosition final { - public: +public: /** The name of the file that the position points to. */ std::string name; @@ -64,10 +64,10 @@ public: /** A mapping of configuration keys to their assigned values. */ typedef insp::flat_map Items; - private: +private: Items items; - public: +public: /** The name of the configuration tag (e.g. "foo" for \). */ const std::string name; @@ -138,7 +138,7 @@ public: */ class ServerLimits final { - public: +public: /** Maximum line length */ size_t MaxLine; /** Maximum nickname length */ @@ -222,7 +222,7 @@ struct CommandLineConf final class CoreExport OperInfo final { - public: +public: TokenList AllowedOperCommands; TokenList AllowedPrivs; @@ -261,13 +261,13 @@ class CoreExport OperInfo final */ class CoreExport ServerConfig final { - private: +private: void ApplyModules(User* user); void CrossCheckConnectBlocks(ServerConfig* current); void CrossCheckOperClassType(); void Fill(); - public: +public: /** How to treat a user in a channel who is banned. */ enum BannedUserTreatment { @@ -283,14 +283,14 @@ class CoreExport ServerConfig final class CoreExport ServerPaths { - private: + private: /** Expands a path fragment to a full path. * @param base The base path to expand from * @param fragment The path fragment to expand on top of base. */ static std::string ExpandPath(const std::string& base, const std::string& fragment); - public: + public: /** Config path */ std::string Config; @@ -533,21 +533,21 @@ class CoreExport ServerConfig final class CoreExport ConfigReaderThread final : public Thread { - private: +private: /** The new server configuration. */ ServerConfig* Config = new ServerConfig(); /** Whether the config has been read yet. */ std::atomic_bool done = { false }; - protected: +protected: /** @copydoc Thread::OnStart */ void OnStart() override; /** @copydoc Thread::OnStop */ void OnStop() override; - public: +public: const std::string UUID; ConfigReaderThread(const std::string& uuid) @@ -567,7 +567,7 @@ class CoreExport ConfigReaderThread final /** Represents the status of a config load. */ class CoreExport ConfigStatus final { - public: +public: /** Whether this is the initial config load. */ bool const initial; diff --git a/include/ctables.h b/include/ctables.h index 8e3c01664..f9de6bda3 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -89,7 +89,7 @@ enum class RouteType : uint8_t /** Describes the routing of an IRC message. */ class RouteDescriptor final { - public: +public: /** The target of the message in question. */ const std::string target; @@ -138,15 +138,15 @@ class RouteDescriptor final class CoreExport CommandBase : public ServiceProvider { - public: +public: /** Encapsulates parameters to a command. */ class Params : public std::vector { - private: + private: /* IRCv3 message tags. */ ClientProtocol::TagMap tags; - public: + public: /** Initializes a new instance from parameter and tag references. * @param paramsref Message parameters. * @param tagsref IRCv3 message tags. @@ -223,7 +223,7 @@ class CoreExport CommandBase class CoreExport Command : public CommandBase { - protected: +protected: /** Initializes a new instance of the Command class. * @param me The module which created this instance. * @param cmd The name of the command. @@ -232,7 +232,7 @@ class CoreExport Command */ Command(Module* me, const std::string& cmd, unsigned int minpara = 0, unsigned int maxpara = 0); - public: +public: /** Unregisters this command from the command parser. */ ~Command() override; @@ -290,7 +290,7 @@ protected: */ SplitCommand(Module* me, const std::string& cmd, unsigned int minpara = 0, unsigned int maxpara = 0); - public: +public: /** @copydoc Command::Handle */ CmdResult Handle(User* user, const Params& parameters) override; diff --git a/include/cull.h b/include/cull.h index b50fcb5e6..1feafa2ef 100644 --- a/include/cull.h +++ b/include/cull.h @@ -28,15 +28,15 @@ class CoreExport Cullable : private insp::uncopiable { - protected: +protected: /** Default constructor for the Cullable class. */ Cullable(); - public: +public: /** Dummy class to help ensure all superclasses get culled. */ class Result final { - public: + public: /** Default constructor for the Cullable::Result class. */ Result() = default; }; @@ -58,7 +58,7 @@ class CoreExport CullList final std::vector list; std::vector SQlist; - public: +public: /** Adds an item to the cull list */ void AddItem(Cullable* item) { list.push_back(item); } @@ -73,7 +73,7 @@ class CoreExport CullList final class CoreExport ActionBase : public Cullable { - public: +public: /** Executes this action. */ virtual void Call() = 0; }; @@ -82,7 +82,7 @@ class CoreExport ActionList { std::vector list; - public: +public: /** Adds an item to the list */ void AddAction(ActionBase* item) { list.push_back(item); } diff --git a/include/dynamic.h b/include/dynamic.h index 1f797e864..d4ec7a30d 100644 --- a/include/dynamic.h +++ b/include/dynamic.h @@ -40,7 +40,7 @@ class CoreExport DLLManager final : public Cullable { - private: +private: /** The last error string. */ std::string err; @@ -57,7 +57,7 @@ class CoreExport DLLManager final /** Sets the last error string. */ void RetrieveLastError(); - public: +public: /** Attempts to load the specified module. * @param name The name of the library to load. */ diff --git a/include/dynref.h b/include/dynref.h index 6c5d13bd3..512be86fd 100644 --- a/include/dynref.h +++ b/include/dynref.h @@ -25,24 +25,24 @@ class CoreExport dynamic_reference_base : public insp::intrusive_list_node { - public: +public: class CaptureHook { - public: + public: /** Called when the target of the dynamic_reference has been acquired */ virtual void OnCapture() = 0; }; - private: +private: std::string name; CaptureHook* hook = nullptr; void resolve(); static void* operator new(std::size_t) = delete; static void* operator new[](std::size_t) = delete; - protected: +protected: ServiceProvider* value = nullptr; - public: +public: ModuleRef creator; dynamic_reference_base(Module* Creator, const std::string& Name); ~dynamic_reference_base(); @@ -69,7 +69,7 @@ template class dynamic_reference : public dynamic_reference_base { - public: +public: dynamic_reference(Module* Creator, const std::string& Name) : dynamic_reference_base(Creator, Name) {} @@ -99,7 +99,7 @@ template class dynamic_reference_nocheck : public dynamic_reference_base { - public: +public: dynamic_reference_nocheck(Module* Creator, const std::string& Name) : dynamic_reference_base(Creator, Name) {} @@ -128,7 +128,7 @@ class ModeHandler; class ChanModeReference final : public dynamic_reference_nocheck { - public: +public: ChanModeReference(Module* mod, const std::string& modename) : dynamic_reference_nocheck(mod, "mode/" + modename) {} }; @@ -136,7 +136,7 @@ class ChanModeReference final class UserModeReference final : public dynamic_reference_nocheck { - public: +public: UserModeReference(Module* mod, const std::string& modename) : dynamic_reference_nocheck(mod, "umode/" + modename) {} }; diff --git a/include/event.h b/include/event.h index 856b8f254..5610cf3da 100644 --- a/include/event.h +++ b/include/event.h @@ -38,7 +38,7 @@ class Events::ModuleEventProvider : public ServiceProvider , private dynamic_reference_base::CaptureHook { - public: +public: struct Comp { bool operator()(ModuleEventListener* lhs, ModuleEventListener* rhs) const; @@ -99,7 +99,7 @@ class Events::ModuleEventProvider template inline ModResult FirstResult(ModResult (Class::*function)(FunArgs...), FwdArgs&&... args) const; - private: +private: void OnCapture() override { // If someone else holds the list from now on, clear mine. See below for more info. @@ -149,7 +149,7 @@ class Events::ModuleEventListener prov->Subscribe(this); } - public: +public: static constexpr unsigned int DefaultPriority = 100; /** Constructor diff --git a/include/exception.h b/include/exception.h index 76e9732b5..b0c3c9c06 100644 --- a/include/exception.h +++ b/include/exception.h @@ -23,11 +23,11 @@ class CoreException : public std::exception { - private: +private: /** The reason this exception was thrown. */ const std::string reason; - public: +public: /** Creates a new instance of the CoreException class with the specified reason. * @param message A message that contains the reason this exception was thrown. */ @@ -49,11 +49,11 @@ class Module; class CoreExport ModuleException : public CoreException { - private: +private: /* The module which threw this exception. */ const Module* module; - public: +public: /** Creates a new instance of the ModuleException class with the specified module instance and reason. * @param mod The module which threw this exception. * @param message A message that contains the reason this exception was thrown. diff --git a/include/extensible.h b/include/extensible.h index d25dc4980..79b0ba138 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -40,7 +40,7 @@ enum class ExtensionType class CoreExport ExtensionItem : public ServiceProvider { - public: +public: /** The type of extensible that this extension extends. */ const ExtensionType type; @@ -87,7 +87,7 @@ class CoreExport ExtensionItem */ virtual std::string ToNetwork(const Extensible* container, void* item) const noexcept; - protected: +protected: /** Initializes an instance of the ExtensionItem class. * @param owner The module which created the extension. * @param key The name of the extension (e.g. foo-bar). @@ -128,7 +128,7 @@ class CoreExport Extensible : public Cullable , public Serializable { - public: +public: /** The container which extension values are stored in. */ typedef insp::flat_map ExtensibleStore; @@ -157,10 +157,10 @@ class CoreExport Extensible */ void UnhookExtensions(const std::vector& items); - protected: +protected: Extensible(); - private: +private: /** The values for extensions which are set on this extensible. */ ExtensibleStore extensions; @@ -171,7 +171,7 @@ class CoreExport Extensible /** Manager for the extension system */ class CoreExport ExtensionManager final { - public: +public: /** The container which registered extensions are stored in. */ typedef std::map ExtMap; @@ -196,7 +196,7 @@ class CoreExport ExtensionManager final */ bool Register(ExtensionItem* item); - private: +private: /** Registered extensions keyed by their names. */ ExtMap types; }; @@ -206,11 +206,11 @@ template > class SimpleExtItem : public ExtensionItem { - protected: +protected: /** Whether to sync this extension across the network. */ bool synced; - public: +public: /** Initializes an instance of the SimpleExtItem class. * @param owner The module which created the extension. * @param key The name of the extension (e.g. foo-bar). @@ -291,7 +291,7 @@ class SimpleExtItem class CoreExport StringExtItem : public SimpleExtItem { - public: +public: /** Initializes an instance of the StringExtItem class. * @param owner The module which created the extension. * @param key The name of the extension (e.g. foo-bar). @@ -317,11 +317,11 @@ class CoreExport StringExtItem class CoreExport IntExtItem : public ExtensionItem { - protected: +protected: /** Whether to sync this extension across the network. */ bool synced; - public: +public: /** Initializes an instance of the IntExtItem class. * @param owner The module which created the extension. * @param key The name of the extension (e.g. foo-bar). @@ -369,11 +369,11 @@ class CoreExport IntExtItem class CoreExport BoolExtItem : public ExtensionItem { - protected: +protected: /** Whether to sync this extension across the network. */ bool synced; - public: +public: /** Initializes an instance of the BoolExtItem class. * @param owner The module which created the extension. * @param key The name of the extension (e.g. foo-bar). diff --git a/include/filelogger.h b/include/filelogger.h index 9bf86918e..ade8d637a 100644 --- a/include/filelogger.h +++ b/include/filelogger.h @@ -32,9 +32,9 @@ class CoreExport FileLogStream final : public LogStream { - private: +private: FileWriter *f; - public: +public: FileLogStream(LogLevel loglevel, FileWriter *fw); ~FileLogStream() override; diff --git a/include/fileutils.h b/include/fileutils.h index 34c65b18e..4048dcfd1 100644 --- a/include/fileutils.h +++ b/include/fileutils.h @@ -29,7 +29,7 @@ class CoreExport FileReader final /** File size in bytes. */ unsigned long totalSize = 0; - public: +public: /** Initializes a new file reader. */ FileReader() = default; diff --git a/include/flat_map.h b/include/flat_map.h index 04be3b1a4..d30b47fd6 100644 --- a/include/flat_map.h +++ b/include/flat_map.h @@ -35,7 +35,7 @@ class map_pair_compare final typedef T value_type; typedef typename value_type::first_type key_type; - public: +public: bool operator()(const value_type& x, const value_type& y) const { return Comp::operator()(x.first, y.first); @@ -55,7 +55,7 @@ class map_pair_compare final template class map_value_compare { - public: +public: bool operator()(const Val& x, const Val& y) const { Comp c; @@ -66,11 +66,11 @@ class map_value_compare template class flat_map_base { - protected: +protected: typedef std::vector storage_type; storage_type vect; - public: +public: typedef typename storage_type::iterator iterator; typedef typename storage_type::const_iterator const_iterator; typedef typename storage_type::reverse_iterator reverse_iterator; @@ -178,7 +178,7 @@ class flat_map_base return std::distance(itpair.first, itpair.second); } - protected: +protected: std::pair insert_single(const value_type& x) { bool inserted = false; @@ -208,7 +208,7 @@ class flat_set { typedef detail::flat_map_base base_type; - public: +public: typedef typename base_type::iterator iterator; typedef typename base_type::value_type value_type; @@ -263,7 +263,7 @@ class flat_multiset { typedef detail::flat_map_base base_type; - public: +public: typedef typename base_type::iterator iterator; typedef typename base_type::value_type value_type; @@ -318,7 +318,7 @@ class flat_map { typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > base_type; - public: +public: typedef typename base_type::iterator iterator; typedef typename base_type::key_type key_type; typedef typename base_type::value_type value_type; @@ -386,7 +386,7 @@ class flat_multimap { typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > base_type; - public: +public: typedef typename base_type::iterator iterator; typedef typename base_type::value_type value_type; typedef U mapped_type; diff --git a/include/hashcomp.h b/include/hashcomp.h index d57a40c39..10ebd312e 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -108,7 +108,7 @@ namespace irc */ class CoreExport sepstream { - protected: + protected: /** Original string. */ std::string tokens; @@ -121,7 +121,7 @@ namespace irc /** If set then GetToken() can return an empty string */ bool allow_empty; - public: + public: /** Create a sepstream and fill it with the provided data */ sepstream(const std::string &source, char separator, bool allowempty = false); @@ -168,7 +168,7 @@ namespace irc */ class CoreExport commasepstream : public sepstream { - public: + public: /** Initialize with comma separator */ commasepstream(const std::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) @@ -180,7 +180,7 @@ namespace irc */ class CoreExport spacesepstream : public sepstream { - public: + public: /** Initialize with space separator */ spacesepstream(const std::string &source, bool allowempty = false) : sepstream(source, ' ', allowempty) @@ -209,7 +209,7 @@ namespace irc /** The current position within the message. */ size_t position = 0; - public: + public: /** Create a tokenstream and fill it with the provided data. */ tokenstream(const std::string& msg, size_t start = 0, size_t end = std::string::npos); @@ -239,7 +239,7 @@ namespace irc */ class CoreExport portparser { - private: + private: /** Used to split on commas */ @@ -269,7 +269,7 @@ namespace irc /** Returns true if val overlaps an existing range */ bool Overlaps(long val); - public: + public: /** Create a portparser and fill it with the provided data * @param source The source text to parse from diff --git a/include/inspircd.h b/include/inspircd.h index c7b0d582d..3bbe5bd79 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -114,7 +114,7 @@ CoreExport extern InspIRCd* ServerInstance; */ class serverstats final { - public: +public: /** Number of accepted connections */ unsigned long Accept = 0; @@ -174,7 +174,7 @@ class serverstats final */ class CoreExport InspIRCd final { - private: +private: /** The current time, updated in the mainloop */ struct timespec TIME; @@ -186,7 +186,7 @@ class CoreExport InspIRCd final ClientProtocol::RFCEvents rfcevents; - public: +public: UIDGenerator UIDGen; diff --git a/include/inspsocket.h b/include/inspsocket.h index b019c6cc5..2a79526e5 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -81,7 +81,7 @@ class BufferedSocket; class CoreExport SocketTimeout final : public Timer { - private: +private: /** BufferedSocket the class is attached to */ BufferedSocket* sock; @@ -90,7 +90,7 @@ class CoreExport SocketTimeout final */ int sfd; - public: +public: /** Create a socket timeout class * @param fd File descriptor of BufferedSocket * @param thesock BufferedSocket to attach to @@ -115,12 +115,12 @@ class CoreExport SocketTimeout final class CoreExport StreamSocket : public EventHandler { - public: +public: /** Socket send queue */ class SendQueue { - public: + public: /** One element of the queue, a continuous buffer */ typedef std::string Element; @@ -215,7 +215,7 @@ class CoreExport StreamSocket other.clear(); } - private: + private: /** Private send queue. Note that individual strings may be shared. */ Container data; @@ -232,7 +232,7 @@ class CoreExport StreamSocket SS_USER }; - private: +private: /** Whether this socket should close once its sendq is empty */ bool closeonempty = false; @@ -280,11 +280,11 @@ class CoreExport StreamSocket */ long HookChainRead(IOHook* hook, std::string& rq); - protected: +protected: /** The data which has been received from the socket. */ std::string recvq; - public: +public: const Type type; StreamSocket(Type sstype = SS_UNKNOWN) : type(sstype) @@ -376,7 +376,7 @@ class CoreExport StreamSocket class CoreExport BufferedSocket : public StreamSocket { - public: +public: /** Timeout object or NULL */ SocketTimeout* Timeout; @@ -431,7 +431,7 @@ class CoreExport BufferedSocket */ virtual void OnTimeout(); - protected: +protected: void OnEventHandlerWrite() override; BufferedSocketError BeginConnect(const irc::sockets::sockaddrs& dest, const irc::sockets::sockaddrs& bind, unsigned long timeout); }; diff --git a/include/intrusive_list.h b/include/intrusive_list.h index d7d34e285..aeb57abeb 100644 --- a/include/intrusive_list.h +++ b/include/intrusive_list.h @@ -44,7 +44,7 @@ class intrusive_list_node ptr_next = ptr_prev = NULL; } - public: +public: friend class intrusive_list; friend class intrusive_list_tail; }; diff --git a/include/intrusive_list_impl.h b/include/intrusive_list_impl.h index 2cf58485f..cdfe1cb81 100644 --- a/include/intrusive_list_impl.h +++ b/include/intrusive_list_impl.h @@ -23,12 +23,12 @@ namespace insp template class INSPIRCD_INTRUSIVE_LIST_NAME { - public: +public: class iterator : public std::iterator { T* curr; - public: + public: iterator(T* i = NULL) : curr(i) { @@ -152,7 +152,7 @@ class INSPIRCD_INTRUSIVE_LIST_NAME listsize--; } - private: +private: T* listhead = nullptr; #ifdef INSPIRCD_INTRUSIVE_LIST_HAS_TAIL T* listtail = nullptr; diff --git a/include/iohook.h b/include/iohook.h index b4a3e0843..5abd0b043 100644 --- a/include/iohook.h +++ b/include/iohook.h @@ -29,7 +29,7 @@ class IOHookProvider { const bool middlehook; - public: +public: enum Type { IOH_UNKNOWN, @@ -70,7 +70,7 @@ class IOHookProvider class IOHook : public Cullable { - public: +public: /** The IOHookProvider for this hook, contains information about the hook, * such as the module providing it and the hook type. */ @@ -125,7 +125,7 @@ class IOHookMiddle */ IOHook* nexthook = nullptr; - protected: +protected: /** Get all queued up data which has not yet been passed up the hook chain * @return RecvQ containing the data */ @@ -136,7 +136,7 @@ class IOHookMiddle */ StreamSocket::SendQueue& GetSendQ() { return sendq; } - public: +public: /** Constructor * @param provider IOHookProvider that creates this object */ diff --git a/include/listmode.h b/include/listmode.h index 67daeb693..57981956c 100644 --- a/include/listmode.h +++ b/include/listmode.h @@ -26,7 +26,7 @@ class CoreExport ListModeBase : public ModeHandler { - public: +public: /** An item in a listmode's list */ struct ListItem @@ -42,7 +42,7 @@ class CoreExport ListModeBase */ typedef std::vector ModeList; - private: +private: class ChanData { public: @@ -85,7 +85,7 @@ class CoreExport ListModeBase */ unsigned long GetLimitInternal(const std::string& channame, ChanData* cd); - protected: +protected: /** Numeric to use when outputting the list */ unsigned int listnumeric; @@ -111,7 +111,7 @@ class CoreExport ListModeBase */ SimpleExtItem extItem; - public: +public: /** Constructor. * @param Creator The creator of this class * @param Name Mode name diff --git a/include/logger.h b/include/logger.h index 3cede0534..62983e3f3 100644 --- a/include/logger.h +++ b/include/logger.h @@ -40,7 +40,7 @@ enum LogLevel */ class CoreExport FileWriter final { - protected: +protected: /** The log file (fd is inside this somewhere, * we get it out with fileno()) */ @@ -54,7 +54,7 @@ class CoreExport FileWriter final */ unsigned int writeops = 0; - public: +public: /** The constructor takes an already opened logfile. */ FileWriter(FILE* logfile, unsigned int flushcount); @@ -94,9 +94,9 @@ class CoreExport FileWriter final class CoreExport LogStream : public Cullable { - protected: +protected: LogLevel loglvl; - public: +public: static const char LogHeader[]; LogStream(LogLevel loglevel) : loglvl(loglevel) @@ -119,7 +119,7 @@ typedef std::map FileLogMap; class CoreExport LogManager final { - private: +private: /** Lock variable, set to true when a log is in progress, which prevents further logging from happening and creating a loop. */ bool Logging = false; @@ -141,7 +141,7 @@ class CoreExport LogManager final */ FileLogMap FileLogs; - public: +public: /** Adds a FileWriter instance to LogManager, or increments the reference count of an existing instance. * Used for file-stream sharing for FileLogStreams. */ diff --git a/include/membership.h b/include/membership.h index 18f06e2ef..008ea8631 100644 --- a/include/membership.h +++ b/include/membership.h @@ -36,7 +36,7 @@ class CoreExport Membership final : public Extensible , public insp::intrusive_list_node { - public: +public: /** Type of the Membership id */ typedef uint64_t Id; diff --git a/include/message.h b/include/message.h index 1ae49ee1f..ea2eb1dd1 100644 --- a/include/message.h +++ b/include/message.h @@ -32,7 +32,7 @@ enum MessageType class CoreExport MessageDetails { - public: +public: /** Whether to echo the message at all. */ bool echo = true; @@ -77,7 +77,7 @@ class CoreExport MessageDetails /** Determines whether the specified message is a CTCP. */ virtual bool IsCTCP() const = 0; - protected: +protected: MessageDetails(MessageType mt, const std::string& msg, const ClientProtocol::TagMap& tags) : original_text(msg) , tags_in(tags) @@ -90,7 +90,7 @@ class CoreExport MessageDetails /** Represents the target of a message (NOTICE, PRIVMSG, etc). */ class CoreExport MessageTarget final { - public: +public: /** An enumeration of possible message target types. */ enum TargetType { @@ -104,11 +104,11 @@ class CoreExport MessageTarget final TYPE_SERVER }; - private: +private: /** The target of the message. */ void* dest; - public: +public: /** If type is TYPE_CHANNEL and the user specified a status rank. */ char status = 0; diff --git a/include/mode.h b/include/mode.h index 0b58db2b3..cbc57d57b 100644 --- a/include/mode.h +++ b/include/mode.h @@ -99,7 +99,7 @@ class ParamModeBase; class CoreExport ModeHandler : public ServiceProvider { - public: +public: typedef size_t Id; enum Class @@ -110,12 +110,12 @@ class CoreExport ModeHandler MC_OTHER }; - private: +private: /** The opaque id of this mode assigned by the mode parser */ Id modeid; - protected: +protected: /** What kind of parameters does the mode take? */ ParamSpec parameters_taken; @@ -162,7 +162,7 @@ class CoreExport ModeHandler /** If non-empty then the syntax of the parameter for this mode. */ std::string syntax; - public: +public: /** * The constructor for ModeHandler initializes the mode handler. * The constructor of any class you derive from ModeHandler should @@ -362,7 +362,7 @@ class CoreExport ModeHandler class CoreExport PrefixMode : public ModeHandler { - protected: +protected: /** The prefix character granted by this mode. '@' for op, '+' for voice, etc. * If 0, this mode does not have a visible prefix character. */ @@ -376,7 +376,7 @@ class CoreExport PrefixMode /** Whether a client with this prefix can remove it from themself. */ bool selfremove = true; - public: +public: /** * Constructor * @param Creator The module creating this mode @@ -456,7 +456,7 @@ class CoreExport PrefixMode class CoreExport SimpleUserMode : public ModeHandler { - public: +public: SimpleUserMode(Module* Creator, const std::string& Name, char modeletter, bool operonly = false) : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_USER) { @@ -474,7 +474,7 @@ class CoreExport SimpleUserMode class CoreExport SimpleChannelMode : public ModeHandler { - public: +public: SimpleChannelMode(Module* Creator, const std::string& Name, char modeletter, bool operonly = false) : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_CHANNEL) @@ -494,7 +494,7 @@ class CoreExport SimpleChannelMode class CoreExport ModeWatcher : public Cullable { - private: +private: /** * The mode name this class is watching */ @@ -505,7 +505,7 @@ class CoreExport ModeWatcher */ ModeType m_type; - public: +public: ModuleRef creator; /** @@ -560,7 +560,7 @@ class CoreExport ModeWatcher */ class CoreExport ModeParser final { - public: +public: /** The maximum number of modes which can be created. */ static constexpr ModeHandler::Id MODEID_MAX = 64; @@ -571,7 +571,7 @@ class CoreExport ModeParser final */ typedef std::unordered_map ModeHandlerMap; - private: +private: /** Type of the container that maps mode names to ModeWatchers */ typedef insp::flat_multimap ModeWatcherMap; @@ -631,7 +631,7 @@ class CoreExport ModeParser final */ ModeHandler::Id AllocateModeId(ModeHandler* mh); - public: +public: typedef std::vector ListModeList; typedef std::vector PrefixModeList; diff --git a/include/modechange.h b/include/modechange.h index a5ef98e0a..85e94a889 100644 --- a/include/modechange.h +++ b/include/modechange.h @@ -69,7 +69,7 @@ struct Modes::Change final */ class Modes::ChangeList final { - public: +public: typedef std::vector List; /** Add a new mode to be changed to this ChangeList @@ -138,6 +138,6 @@ class Modes::ChangeList final */ List& getlist() { return items; } - private: +private: List items; }; diff --git a/include/modules.h b/include/modules.h index 31b230c5d..629214094 100644 --- a/include/modules.h +++ b/include/modules.h @@ -70,11 +70,11 @@ enum ModuleFlags /** Represents the result of a module event. */ class ModResult final { - private: +private: /** The underlying result value. */ char result = 0; - public: +public: /** Creates a new instance of the ModResult class which defaults to MOD_RES_PASSTHRU. */ ModResult() = default; @@ -193,7 +193,7 @@ do { \ class CoreExport DataProvider : public ServiceProvider { - public: +public: DataProvider(Module* Creator, const std::string& Name) : ServiceProvider(Creator, Name, SERVICE_DATA) {} }; @@ -288,7 +288,7 @@ class CoreExport Module : public Cullable , public usecountbase { - protected: +protected: /** Initializes a new instance of the Module class. * @param mprops The properties of this module. * @param mdesc A description of this module. @@ -300,7 +300,7 @@ class CoreExport Module */ void DetachEvent(Implementation i); - public: +public: /** Data which is synchronised between servers on link. */ typedef std::map LinkData; @@ -1020,11 +1020,11 @@ class CoreExport Module */ class CoreExport ModuleManager final { - public: +public: typedef std::multimap DataProviderMap; typedef std::vector ServiceList; - private: +private: /** Holds a string describing the last module error to occur */ std::string LastModuleError; @@ -1055,7 +1055,7 @@ class CoreExport ModuleManager final */ void UnregisterModes(Module* mod, ModeType modetype); - public: +public: typedef std::map ModuleMap; /** Event handler hooks. diff --git a/include/modules/account.h b/include/modules/account.h index 95bd954e1..c543a7725 100644 --- a/include/modules/account.h +++ b/include/modules/account.h @@ -44,7 +44,7 @@ inline AccountExtItem* GetAccountIdExtItem() class AccountEventListener : public Events::ModuleEventListener { - public: +public: AccountEventListener(Module* mod) : ModuleEventListener(mod, "event/account") { diff --git a/include/modules/away.h b/include/modules/away.h index c99ea18e5..9e81d14a2 100644 --- a/include/modules/away.h +++ b/include/modules/away.h @@ -30,13 +30,13 @@ namespace Away class Away::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod) : ModuleEventListener(mod, "event/away") { } - public: +public: /** Called when a user wishes to mark themselves as away. * @param user The user who is going away. * @param message The away message that the user set. @@ -74,7 +74,7 @@ class Away::EventListener class Away::EventProvider final : public Events::ModuleEventProvider { - public: +public: EventProvider(Module* mod) : ModuleEventProvider(mod, "event/away") { diff --git a/include/modules/callerid.h b/include/modules/callerid.h index 7b69d137f..683a8e291 100644 --- a/include/modules/callerid.h +++ b/include/modules/callerid.h @@ -28,7 +28,7 @@ namespace CallerID class CallerID::APIBase : public DataProvider { - public: +public: APIBase(Module* parent) : DataProvider(parent, "m_callerid_api") { @@ -45,7 +45,7 @@ class CallerID::APIBase class CallerID::API final : public dynamic_reference { - public: +public: API(Module* parent) : dynamic_reference(parent, "m_callerid_api") { diff --git a/include/modules/cap.h b/include/modules/cap.h index ce03ea063..3404a2d18 100644 --- a/include/modules/cap.h +++ b/include/modules/cap.h @@ -31,7 +31,7 @@ namespace Cap typedef intptr_t Ext; class ExtItem : public IntExtItem { - public: + public: ExtItem(Module* mod); void FromInternal(Extensible* container, const std::string& value) noexcept override; std::string ToHuman(const Extensible* container, void* item) const noexcept override; @@ -53,7 +53,7 @@ namespace Cap class EventListener : public Events::ModuleEventListener { - public: + public: EventListener(Module* mod) : ModuleEventListener(mod, "event/cap") { @@ -73,7 +73,7 @@ namespace Cap class Manager : public DataProvider { - public: + public: Manager(Module* mod) : DataProvider(mod, "capmanager") { @@ -154,7 +154,7 @@ namespace Cap friend class ManagerImpl; - protected: + protected: /** Notify the manager that the value of the capability changed. * Must be called if the value of the cap changes for any reason. */ @@ -164,7 +164,7 @@ namespace Cap manager->NotifyValueChange(this); } - public: + public: /** Constructor, initializes the capability. * Caps are active by default. * @param mod Module providing the cap @@ -293,7 +293,7 @@ namespace Cap { dynamic_reference_nocheck ref; - public: + public: /** Constructor, initializes the capability reference * @param mod Module creating this object * @param Name Raw name of the cap as used in the protocol (CAP LS, etc.) @@ -334,7 +334,7 @@ namespace Cap class MessageBase : public ClientProtocol::Message { - public: + public: MessageBase(const std::string& subcmd) : ClientProtocol::Message("CAP", ServerInstance->Config->GetServerName()) { diff --git a/include/modules/ctctags.h b/include/modules/ctctags.h index bf7d373e4..b58506a1d 100644 --- a/include/modules/ctctags.h +++ b/include/modules/ctctags.h @@ -33,7 +33,7 @@ namespace CTCTags class CTCTags::CapReference final : public Cap::Reference { - public: +public: CapReference(Module* mod) : Cap::Reference(mod, "message-tags") { @@ -56,7 +56,7 @@ private: PushParam(target); } - public: +public: TagMessage(User* source, const Channel* targetchan, const ClientProtocol::TagMap& Tags, char status = 0) : ClientProtocol::Message("TAGMSG", source) { @@ -91,7 +91,7 @@ private: class CTCTags::TagMessageDetails final { - public: +public: /** Whether to echo the tags at all. */ bool echo = true; @@ -119,13 +119,13 @@ class CTCTags::TagMessageDetails final class CTCTags::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod, unsigned int eventprio = DefaultPriority) : ModuleEventListener(mod, "event/tagmsg", eventprio) { } - public: +public: /** Called before a user sends a tag message to a channel, a user, or a server glob mask. * @param user The user sending the message. * @param target The target of the message. This can either be a channel, a user, or a server diff --git a/include/modules/dns.h b/include/modules/dns.h index 4473d2be7..817e3fd53 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -82,7 +82,7 @@ namespace DNS class Exception final : public ModuleException { - public: + public: Exception(const Module* mod, const std::string& message) : ModuleException(mod, message) { @@ -172,7 +172,7 @@ namespace DNS */ class Manager : public DataProvider { - public: + public: Manager(Module* mod) : DataProvider(mod, "DNS") { } virtual void Process(Request* req) = 0; @@ -185,9 +185,9 @@ namespace DNS */ class Request : public Timer { - protected: + protected: Manager* const manager; - public: + public: Question question; /* Use result cache if available */ bool use_cache; diff --git a/include/modules/exemption.h b/include/modules/exemption.h index 9fa059f7b..c1acfe223 100644 --- a/include/modules/exemption.h +++ b/include/modules/exemption.h @@ -40,13 +40,13 @@ namespace CheckExemption class CheckExemption::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod, unsigned int eventprio = DefaultPriority) : ModuleEventListener(mod, "event/exemption", eventprio) { } - public: +public: /** Called when checking if a user is exempt from something. * @param user The user to check exemption for. * @param chan The channel to check exemption on. @@ -60,7 +60,7 @@ class CheckExemption::EventListener class CheckExemption::EventProvider final : public Events::ModuleEventProvider { - public: +public: EventProvider(Module* mod) : ModuleEventProvider(mod, "event/exemption") { diff --git a/include/modules/extban.h b/include/modules/extban.h index 5bf491d13..f716e82f6 100644 --- a/include/modules/extban.h +++ b/include/modules/extban.h @@ -53,7 +53,7 @@ namespace ExtBan class ExtBan::Manager : public DataProvider { - protected: +protected: /** Initializes an instance of the ExtBan::Base class. * @param Creator The module which created this instance. */ @@ -62,7 +62,7 @@ class ExtBan::Manager { } - public: +public: /** A mapping of extban letters to their associated object. */ typedef std::unordered_map LetterMap; @@ -110,7 +110,7 @@ class ExtBan::Base : public ServiceProvider , private dynamic_reference_base::CaptureHook { - private: +private: /** Whether this ExtBan is currently enabled. */ bool active = false; @@ -127,7 +127,7 @@ class ExtBan::Base SetActive(true); } - protected: +protected: /** Initializes an instance of the ExtBan::Base class. * @param Creator The module which created this instance. * @param Name The name used in bans to signify this extban. @@ -140,7 +140,7 @@ class ExtBan::Base { } - public: +public: /** Retrieves the character used in bans to signify this extban. */ unsigned char GetLetter() const { return letter; } @@ -191,7 +191,7 @@ class ExtBan::Base class ExtBan::Acting final : public Base { - public: +public: /** Initializes an instance of the ExtBan::Acting class. * @param Creator The module which created this instance. * @param Name The name used in bans to signify this extban. @@ -224,7 +224,7 @@ class ExtBan::Acting final class ExtBan::MatchingBase : public Base { - protected: +protected: /** Initializes an instance of the ExtBan::MatchingBase class. * @param Creator The module which created this instance. * @param Name The name used in bans to signify this extban. @@ -235,7 +235,7 @@ class ExtBan::MatchingBase { } - public: +public: /** @copydoc ExtBan::Base::GetType */ Type GetType() const override { return ExtBan::Type::MATCHING; } @@ -247,13 +247,13 @@ class ExtBan::MatchingBase class ExtBan::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod, unsigned int eventprio = DefaultPriority) : ModuleEventListener(mod, "event/extban", eventprio) { } - public: +public: /** Called when an extban is being checked. * @param user The user which the extban is being checked against. * @param chan The channel which the extban is set on. diff --git a/include/modules/geolocation.h b/include/modules/geolocation.h index b40ee8074..eff8c4c89 100644 --- a/include/modules/geolocation.h +++ b/include/modules/geolocation.h @@ -29,7 +29,7 @@ namespace Geolocation class Geolocation::APIBase : public DataProvider { - public: +public: APIBase(Module* parent) : DataProvider(parent, "geolocationapi") { @@ -51,7 +51,7 @@ class Geolocation::APIBase class Geolocation::API final : public dynamic_reference { - public: +public: API(Module* parent) : dynamic_reference(parent, "geolocationapi") { @@ -68,7 +68,7 @@ private: /** The country name for this location. */ std::string name; - public: +public: Location(const std::string& Code, const std::string& Name) : code(Code) , name(Name) diff --git a/include/modules/hash.h b/include/modules/hash.h index 2c176868f..249d2fcd1 100644 --- a/include/modules/hash.h +++ b/include/modules/hash.h @@ -29,7 +29,7 @@ class HashProvider : public DataProvider { - public: +public: const unsigned int out_size; const unsigned int block_size; HashProvider(Module* mod, const std::string& Name, unsigned int osiz = 0, unsigned int bsiz = 0) diff --git a/include/modules/httpd.h b/include/modules/httpd.h index 92b2d855f..23b40a485 100644 --- a/include/modules/httpd.h +++ b/include/modules/httpd.h @@ -36,7 +36,7 @@ class HTTPQueryParameters final : public insp::flat_multimap { - public: +public: bool get(const std::string& key, std::string& value) const { const_iterator it = find(key); @@ -92,9 +92,9 @@ struct HTTPRequestURI final */ class HTTPHeaders final { - protected: +protected: std::map headers; - public: +public: /** Set the value of a header * Sets the value of the named header. If the header is already present, it will be replaced @@ -166,13 +166,13 @@ class HttpServerSocket; */ class HTTPRequest final { - protected: +protected: std::string type; std::string ipaddr; std::string postdata; HTTPRequestURI parseduri; - public: +public: HTTPHeaders *headers; int errorcode; @@ -248,7 +248,7 @@ class HTTPRequest final */ class HTTPDocumentResponse final { - public: +public: /** Module that generated this reply */ Module* const module; @@ -278,7 +278,7 @@ class HTTPDocumentResponse final class HTTPdAPIBase : public DataProvider { - public: +public: HTTPdAPIBase(Module* parent) : DataProvider(parent, "m_httpd_api") { @@ -296,7 +296,7 @@ class HTTPdAPIBase class HTTPdAPI final : public dynamic_reference { - public: +public: HTTPdAPI(Module* parent) : dynamic_reference(parent, "m_httpd_api") { @@ -306,7 +306,7 @@ class HTTPdAPI final class HTTPACLEventListener : public Events::ModuleEventListener { - public: +public: HTTPACLEventListener(Module* mod) : ModuleEventListener(mod, "event/http-acl") { @@ -318,7 +318,7 @@ class HTTPACLEventListener class HTTPRequestEventListener : public Events::ModuleEventListener { - public: +public: HTTPRequestEventListener(Module* mod) : ModuleEventListener(mod, "event/http-request") { diff --git a/include/modules/invite.h b/include/modules/invite.h index 1e8f417c4..9cd3862c7 100644 --- a/include/modules/invite.h +++ b/include/modules/invite.h @@ -32,7 +32,7 @@ namespace Invite class Invite::APIBase : public DataProvider { - public: +public: APIBase(Module* parent); /** Create or extend an Invite. @@ -76,7 +76,7 @@ class Invite::APIBase class Invite::API final : public dynamic_reference { - public: +public: API(Module* parent) : dynamic_reference(parent, "core_channel_invite") { @@ -90,7 +90,7 @@ class Invite::API final class Invite::Invite final : public insp::intrusive_list_node, public insp::intrusive_list_node { - public: +public: /** User the invite is for */ LocalUser* const user; @@ -113,7 +113,7 @@ class Invite::Invite final friend class APIImpl; - private: +private: /** Timer handling expiration. If NULL this invite doesn't expire. */ Timer* expiretimer = nullptr; diff --git a/include/modules/ircv3.h b/include/modules/ircv3.h index cb0b7853c..d98d6b167 100644 --- a/include/modules/ircv3.h +++ b/include/modules/ircv3.h @@ -32,7 +32,7 @@ namespace IRCv3 class IRCv3::WriteNeighborsWithCap final : public User::ForEachNeighborHandler { - private: +private: const Cap::Capability& cap; ClientProtocol::Event& protoev; uint64_t sentid; @@ -43,7 +43,7 @@ class IRCv3::WriteNeighborsWithCap final user->Send(protoev); } - public: +public: WriteNeighborsWithCap(User* user, ClientProtocol::Event& ev, const Cap::Capability& capability, bool include_self = false) : cap(capability) , protoev(ev) @@ -74,7 +74,7 @@ template class IRCv3::CapTag : public ClientProtocol::MessageTagProvider { - protected: +protected: Cap::Capability cap; const std::string tagname; @@ -91,7 +91,7 @@ class IRCv3::CapTag msg.AddTag(tagname, this, *val); } - public: +public: /** Constructor. * @param mod Module that owns the tag. * @param capname Name of the client capability. diff --git a/include/modules/ircv3_batch.h b/include/modules/ircv3_batch.h index 8d2fb2ff0..30d3cb94d 100644 --- a/include/modules/ircv3_batch.h +++ b/include/modules/ircv3_batch.h @@ -47,7 +47,7 @@ class IRCv3::Batch::Manager : public DataProvider , public ClientProtocol::MessageTagProvider { - public: +public: /** Constructor. * @param mod Module that owns the Manager. */ @@ -104,7 +104,7 @@ class IRCv3::Batch::Batch final unsigned int GetId() const { return bit; } intptr_t GetBit() const { return reftag; } - public: +public: /** Constructor. * The batch is initially stopped. To start it, pass it to Manager::Start(). * @param Type Batch type string, used to indicate what kind of grouping the batch does. May be empty. @@ -176,7 +176,7 @@ class IRCv3::Batch::Batch final class IRCv3::Batch::API final : public dynamic_reference_nocheck { - public: +public: API(Module* mod) : dynamic_reference_nocheck(mod, "batchapi") { @@ -189,7 +189,7 @@ class IRCv3::Batch::API final class IRCv3::Batch::CapReference final : public Cap::Reference { - public: +public: CapReference(Module* mod) : Cap::Reference(mod, "batch") { diff --git a/include/modules/ircv3_replies.h b/include/modules/ircv3_replies.h index 7bf594170..4cd80688d 100644 --- a/include/modules/ircv3_replies.h +++ b/include/modules/ircv3_replies.h @@ -37,7 +37,7 @@ namespace IRCv3 class IRCv3::Replies::CapReference final : public Cap::Reference { - public: +public: CapReference(Module* mod) : Cap::Reference(mod, "inspircd.org/standard-replies") { @@ -47,7 +47,7 @@ class IRCv3::Replies::CapReference final /** Base class for standard replies. */ class IRCv3::Replies::Reply { - private: +private: /** The name of the command for this reply. */ const std::string cmd; @@ -72,7 +72,7 @@ class IRCv3::Replies::Reply user->WriteNotice(InspIRCd::Format("*** %s", description.c_str())); } - protected: +protected: /** Initializes a new instance of the Reply class. * @param Creator The module which created this instance. * @param Cmd The name of the command to reply with. @@ -83,7 +83,7 @@ class IRCv3::Replies::Reply { } - public: +public: /** * Sends a standard reply to the specified user. * @param user The user to send the reply to. diff --git a/include/modules/ircv3_servertime.h b/include/modules/ircv3_servertime.h index 7737b35d4..85d9611ed 100644 --- a/include/modules/ircv3_servertime.h +++ b/include/modules/ircv3_servertime.h @@ -49,10 +49,10 @@ namespace IRCv3 class IRCv3::ServerTime::Manager : public DataProvider { - protected: +protected: ClientProtocol::MessageTagProvider* tagprov; - public: +public: /** Constructor. * @param mod Module that owns the Manager. */ @@ -86,7 +86,7 @@ class IRCv3::ServerTime::Manager class IRCv3::ServerTime::API final : public dynamic_reference_nocheck { - public: +public: API(Module* mod) : dynamic_reference_nocheck(mod, "servertimeapi") { diff --git a/include/modules/isupport.h b/include/modules/isupport.h index 7ea28aea1..3e23caddf 100644 --- a/include/modules/isupport.h +++ b/include/modules/isupport.h @@ -33,13 +33,13 @@ namespace ISupport class ISupport::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod) : ModuleEventListener(mod, "event/isupport") { } - public: +public: virtual void OnBuildISupport(TokenMap& tokens) { } virtual void OnBuildClassISupport(ConnectClass::Ptr klass, TokenMap& tokens) { } }; @@ -47,7 +47,7 @@ class ISupport::EventListener class ISupport::EventProvider final : public Events::ModuleEventProvider { - public: +public: EventProvider(Module* mod) : Events::ModuleEventProvider(mod, "event/isupport") { diff --git a/include/modules/ldap.h b/include/modules/ldap.h index 5d11d89fb..5de9e2fbc 100644 --- a/include/modules/ldap.h +++ b/include/modules/ldap.h @@ -24,7 +24,7 @@ typedef int LDAPQuery; class LDAPException final : public CoreException { - public: +public: LDAPException(const std::string& msg) : CoreException(msg) { @@ -130,7 +130,7 @@ struct LDAPResult final class LDAPInterface { - public: +public: ModuleRef creator; LDAPInterface(Module* m) : creator(m) { } @@ -143,7 +143,7 @@ class LDAPInterface class LDAPProvider : public DataProvider { - public: +public: LDAPProvider(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) { } diff --git a/include/modules/names.h b/include/modules/names.h index 6f21221ac..4f1d940bd 100644 --- a/include/modules/names.h +++ b/include/modules/names.h @@ -29,7 +29,7 @@ namespace Names class Names::EventListener : public Events::ModuleEventListener { - public: +public: EventListener(Module* mod) : ModuleEventListener(mod, "event/names") { diff --git a/include/modules/regex.h b/include/modules/regex.h index 89010a629..5964f5a2f 100644 --- a/include/modules/regex.h +++ b/include/modules/regex.h @@ -53,7 +53,7 @@ namespace Regex class Regex::Engine : public DataProvider { - protected: +protected: /** Initializes a new instance of the Regex::Engine class. * @param Creator The module which created this instance. * @param Name The name of this regular expression engine. @@ -63,7 +63,7 @@ class Regex::Engine { } - public: +public: /** Compiles a regular expression pattern. * @param pattern The pattern to compile. * @param options One or more options to use when matching the pattern. @@ -83,7 +83,7 @@ template class Regex::SimpleEngine final : public Regex::Engine { - public: +public: /** @copydoc Regex::Engine::Engine */ SimpleEngine(Module* Creator, const std::string& Name) : Regex::Engine(Creator, Name) @@ -101,7 +101,7 @@ class Regex::SimpleEngine final class Regex::EngineReference final : public dynamic_reference_nocheck { - public: +public: /** Initializes a new instance of the Regex::EngineReference class. * @param Creator The module which created this instance. * @param Name The name of the regular expression engine to reference. @@ -124,7 +124,7 @@ class Regex::EngineReference final class Regex::Exception final : public ModuleException { - public: +public: /** Initializes a new instance of the Regex::Exception class. * @param mod The module which caused this exception to be thrown. * @param regex A regular expression which failed to compile. @@ -150,14 +150,14 @@ class Regex::Exception final /** Represents a compiled regular expression pattern. */ class Regex::Pattern { - private: +private: /** The options used when matching this pattern. */ const uint8_t optionflags; /** The pattern as a string. */ const std::string patternstr; - protected: +protected: /** Initializes a new instance of the Pattern class. * @param pattern The pattern as a string. * @param options The options used when matching this pattern. @@ -168,7 +168,7 @@ class Regex::Pattern { } - public: +public: /** Destroys an instance of the Pattern class. */ virtual ~Pattern() = default; diff --git a/include/modules/reload.h b/include/modules/reload.h index cffae0724..2f3022816 100644 --- a/include/modules/reload.h +++ b/include/modules/reload.h @@ -39,7 +39,7 @@ namespace ReloadModule typedef std::vector List; List list; - public: + public: /** Add data to the saved state of a module. * The provided handler's OnReloadModuleRestore() method will be called when the reload is done with the pointer * provided. @@ -57,7 +57,7 @@ namespace ReloadModule class EventListener : public Events::ModuleEventListener { - public: + public: EventListener(Module* mod) : ModuleEventListener(mod, "event/reloadmodule") { diff --git a/include/modules/server.h b/include/modules/server.h index 3ed06c355..e56b3e0dc 100644 --- a/include/modules/server.h +++ b/include/modules/server.h @@ -36,7 +36,7 @@ namespace ServerProtocol class ServerProtocol::BroadcastEventListener : public Events::ModuleEventListener { - public: +public: BroadcastEventListener(Module* mod) : ModuleEventListener(mod, "event/server-broadcast") { @@ -54,7 +54,7 @@ class ServerProtocol::BroadcastEventListener class ServerProtocol::LinkEventListener : public Events::ModuleEventListener { - public: +public: LinkEventListener(Module* mod) : ModuleEventListener(mod, "event/server-link") { @@ -80,7 +80,7 @@ class ServerProtocol::LinkEventListener class ServerProtocol::MessageEventListener : public Events::ModuleEventListener { - public: +public: MessageEventListener(Module* mod) : ModuleEventListener(mod, "event/server-message") { @@ -104,7 +104,7 @@ class ServerProtocol::MessageEventListener class ServerProtocol::SyncEventListener : public Events::ModuleEventListener { - public: +public: SyncEventListener(Module* mod) : ModuleEventListener(mod, "event/server-sync") { diff --git a/include/modules/shun.h b/include/modules/shun.h index d49c141da..a162c0581 100644 --- a/include/modules/shun.h +++ b/include/modules/shun.h @@ -27,7 +27,7 @@ class Shun final : public XLine { - public: +public: /** Create a Shun. * @param s_time The set time * @param d The duration of the xline @@ -66,7 +66,7 @@ class Shun final return matchtext; } - private: +private: /** Matching mask **/ std::string matchtext; }; diff --git a/include/modules/sql.h b/include/modules/sql.h index 3447dc8e4..291a64012 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -72,7 +72,7 @@ namespace SQL class SQL::Result : public Cullable { - public: +public: /** * Return the number of rows in the result. * @@ -111,11 +111,11 @@ class SQL::Result */ class SQL::Error final { - private: +private: /** The custom error message if one has been specified. */ const std::string message; - public: +public: /** The code which represents this error. */ const ErrorCode code; @@ -170,14 +170,14 @@ class SQL::Error final class SQL::Query : public Cullable { - protected: +protected: /** Creates a new SQL query. */ Query(Module* Creator) : creator(Creator) { } - public: +public: const ModuleRef creator; /* Destroys this Query instance. */ @@ -200,11 +200,11 @@ class SQL::Query class SQL::Provider : public DataProvider { - private: +private: /** The name of the database tag in the config. */ const std::string dbid; - public: +public: Provider(Module* Creator, const std::string& Name) : DataProvider(Creator, "SQL/" + Name) { diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 2b812700e..837f4eda0 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -42,7 +42,7 @@ class ssl_cert final : public refcountbase { - public: +public: std::string dn; std::string issuer; std::string error; @@ -155,7 +155,7 @@ public: class SSLIOHook : public IOHook { - protected: +protected: /** An enumeration of possible TLS socket states. */ enum Status { @@ -201,7 +201,7 @@ class SSLIOHook sendq.push_front(tmp); } - public: +public: static SSLIOHook* IsSSL(StreamSocket* sock) { IOHook* const lasthook = sock->GetLastHook(); @@ -259,7 +259,7 @@ class SSLIOHook */ class SSLClientCert final { - public: +public: /** * Get the client certificate from a socket * @param sock The socket to get the certificate from, the socket does not have to use TLS @@ -293,7 +293,7 @@ class SSLClientCert final class UserCertificateAPIBase : public DataProvider { - public: +public: UserCertificateAPIBase(Module* parent) : DataProvider(parent, "m_sslinfo_api") { @@ -332,7 +332,7 @@ class UserCertificateAPIBase class UserCertificateAPI final : public dynamic_reference { - public: +public: UserCertificateAPI(Module* parent) : dynamic_reference(parent, "m_sslinfo_api") { diff --git a/include/modules/stats.h b/include/modules/stats.h index a2a8dc28b..7244c8761 100644 --- a/include/modules/stats.h +++ b/include/modules/stats.h @@ -38,7 +38,7 @@ enum class Stats::EventListener : public Events::ModuleEventListener { - public: +public: EventListener(Module* mod) : ModuleEventListener(mod, "event/stats") { @@ -54,7 +54,7 @@ class Stats::EventListener class Stats::Row final : public Numeric::Numeric { - public: +public: Row(unsigned int num) : Numeric(num) { @@ -75,7 +75,7 @@ class Stats::Context final */ const char symbol; - public: +public: /** Constructor * @param src Source user of the STATS request, can be a local or remote user * @param sym Symbol (letter) indicating the type of the request diff --git a/include/modules/webirc.h b/include/modules/webirc.h index e335d3b12..e20edd860 100644 --- a/include/modules/webirc.h +++ b/include/modules/webirc.h @@ -31,12 +31,12 @@ namespace WebIRC class WebIRC::EventListener : public Events::ModuleEventListener { - protected: +protected: EventListener(Module* mod) : ModuleEventListener(mod, "event/webirc") { } - public: +public: virtual void OnWebIRCAuth(LocalUser* user, const FlagMap* flags) = 0; }; diff --git a/include/modules/who.h b/include/modules/who.h index e74d878be..779cb6ca5 100644 --- a/include/modules/who.h +++ b/include/modules/who.h @@ -31,7 +31,7 @@ namespace Who class Who::EventListener : public Events::ModuleEventListener { - public: +public: EventListener(Module* mod) : ModuleEventListener(mod, "event/who") { @@ -51,7 +51,7 @@ class Who::EventListener class Who::Request { - public: +public: typedef std::bitset CharState; /** The flags for matching users to include. */ @@ -86,6 +86,6 @@ class Who::Request */ virtual bool GetFieldIndex(char flag, size_t& out) const = 0; - protected: +protected: Request() = default; }; diff --git a/include/modules/whois.h b/include/modules/whois.h index 7b066c53a..02f613e53 100644 --- a/include/modules/whois.h +++ b/include/modules/whois.h @@ -65,7 +65,7 @@ enum class Whois::EventListener : public Events::ModuleEventListener { - public: +public: EventListener(Module* mod) : ModuleEventListener(mod, "event/whois") { @@ -80,7 +80,7 @@ class Whois::EventListener class Whois::LineEventListener : public Events::ModuleEventListener { - public: +public: LineEventListener(Module* mod) : ModuleEventListener(mod, "event/whoisline") { @@ -100,7 +100,7 @@ class Whois::LineEventListener class Whois::Context { - protected: +protected: /** User doing the WHOIS */ LocalUser* const source; @@ -109,7 +109,7 @@ class Whois::Context */ User* const target; - public: +public: Context(LocalUser* sourceuser, User* targetuser) : source(sourceuser) , target(targetuser) diff --git a/include/numeric.h b/include/numeric.h index 9ce34b12b..74be5eabc 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -41,7 +41,7 @@ class Numeric::Numeric */ Server* sourceserver = nullptr; - public: +public: /** Constructor * @param num Numeric number (RPL_*, ERR_*) */ diff --git a/include/numericbuilder.h b/include/numericbuilder.h index 788e385ac..e7f27e6af 100644 --- a/include/numericbuilder.h +++ b/include/numericbuilder.h @@ -42,7 +42,7 @@ class Numeric::WriteNumericSink final { LocalUser* const user; - public: +public: WriteNumericSink(LocalUser* u) : user(u) { @@ -58,7 +58,7 @@ class Numeric::WriteRemoteNumericSink final { User* const user; - public: +public: WriteRemoteNumericSink(User* u) : user(u) { @@ -82,7 +82,7 @@ class Numeric::GenericBuilder return (numeric.GetParams().back().size() + additional <= max); } - public: +public: GenericBuilder(Sink s, unsigned int num, bool addparam = true, size_t additionalsize = 0) : sink(s) , numeric(num) @@ -132,7 +132,7 @@ template class Numeric::Builder : public GenericBuilder { - public: +public: Builder(LocalUser* user, unsigned int num, bool addparam = true, size_t additionalsize = 0) : ::Numeric::GenericBuilder(WriteNumericSink(user), num, addparam, additionalsize + user->nick.size()) { @@ -152,7 +152,7 @@ class Numeric::GenericParamBuilder return (currlen + additional <= max); } - public: +public: GenericParamBuilder(Sink s, unsigned int num, size_t additionalsize) : sink(s) , numeric(num) @@ -192,7 +192,7 @@ template class Numeric::ParamBuilder : public GenericParamBuilder { - public: +public: ParamBuilder(LocalUser* user, unsigned int num) : ::Numeric::GenericParamBuilder(WriteNumericSink(user), num, user->nick.size()) { @@ -211,7 +211,7 @@ namespace Numerics class Numerics::CannotSendTo final : public Numeric::Numeric { - public: +public: CannotSendTo(Channel* chan, const std::string& message) : Numeric(ERR_CANNOTSENDTOCHAN) { @@ -255,7 +255,7 @@ class Numerics::CannotSendTo final class Numerics::InvalidModeParameter final : public Numeric::Numeric { - private: +private: void push_message(ModeHandler* mode, const std::string& message) { if (!message.empty()) @@ -278,7 +278,7 @@ class Numerics::InvalidModeParameter final } } - public: +public: InvalidModeParameter(Channel* chan, ModeHandler* mode, const std::string& parameter, const std::string& message = "") : Numeric(ERR_INVALIDMODEPARAM) { @@ -302,7 +302,7 @@ class Numerics::InvalidModeParameter final class Numerics::NoSuchChannel final : public Numeric::Numeric { - public: +public: NoSuchChannel(const std::string& chan) : Numeric(ERR_NOSUCHCHANNEL) { @@ -315,7 +315,7 @@ class Numerics::NoSuchChannel final class Numerics::NoSuchNick final : public Numeric::Numeric { - public: +public: NoSuchNick(const std::string& nick) : Numeric(ERR_NOSUCHNICK) { diff --git a/include/parammode.h b/include/parammode.h index 5f26cea0d..442278ddc 100644 --- a/include/parammode.h +++ b/include/parammode.h @@ -23,10 +23,10 @@ class CoreExport ParamModeBase : public ModeHandler { - private: +private: virtual void OnUnsetInternal(User* source, Channel* chan) = 0; - public: +public: ParamModeBase(Module* Creator, const std::string& Name, char modeletter, ParamSpec ps) : ModeHandler(Creator, Name, modeletter, ps, MODETYPE_CHANNEL, MC_PARAM) { } @@ -49,7 +49,7 @@ template class ParamMode : public ParamModeBase { - public: +public: ExtItemT ext; /** diff --git a/include/protocol.h b/include/protocol.h index dfcc32007..8afdced80 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -28,7 +28,7 @@ class User; class ProtocolServer { - public: +public: /** Send metadata related to this server to the target server * @param key The 'key' of the data * @param data The string representation of the data @@ -38,12 +38,12 @@ class ProtocolServer class CoreExport ProtocolInterface { - public: +public: typedef ProtocolServer Server; class ServerInfo { - public: + public: std::string servername; std::string parentname; std::string description; diff --git a/include/serialize.h b/include/serialize.h index 16055cf24..2a9150ddf 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -22,10 +22,10 @@ /** Base class for serializable elements. */ class CoreExport Serializable { - protected: +protected: Serializable() = default; - public: +public: /** Encapsulates a chunk of serialised data. */ class CoreExport Data { @@ -43,7 +43,7 @@ class CoreExport Serializable /** A mapping of keys to values. */ EntryMap entries; - public: + public: /** Retrieves the child elements. */ const ChildMap& GetChildren() const { return children; } ChildMap& GetChildren() { return children; } diff --git a/include/server.h b/include/server.h index 9423589ae..8599c9be9 100644 --- a/include/server.h +++ b/include/server.h @@ -24,7 +24,7 @@ class CoreExport Server : public Cullable { - protected: +protected: /** The unique identifier for this server. */ const std::string id; @@ -47,7 +47,7 @@ class CoreExport Server */ friend class ConfigReaderThread; - public: +public: Server(const std::string& srvid, const std::string& srvname, const std::string& srvdesc) : id(srvid) , name(srvname) diff --git a/include/snomasks.h b/include/snomasks.h index bdc75b7f6..88ee3bd8d 100644 --- a/include/snomasks.h +++ b/include/snomasks.h @@ -48,7 +48,7 @@ class Snomask final */ static void Send(char letter, const std::string& desc, const std::string& msg); - public: +public: /** Sends a message to all opers with this snomask. * @param message The message to send * @param letter The snomask character to send the message to. @@ -77,7 +77,7 @@ class CoreExport SnomaskManager final { Snomask masks[26]; - public: +public: /** Create a new SnomaskManager */ SnomaskManager(); diff --git a/include/socket.h b/include/socket.h index f8929a0f6..f7625728a 100644 --- a/include/socket.h +++ b/include/socket.h @@ -172,13 +172,13 @@ typedef std::vector FailedPortList; class CoreExport ListenSocket final : public EventHandler { - public: +public: std::shared_ptr bind_tag; const irc::sockets::sockaddrs bind_sa; class IOHookProvRef : public dynamic_reference_nocheck { - public: + public: IOHookProvRef() : dynamic_reference_nocheck(NULL, std::string()) { diff --git a/include/socketengine.h b/include/socketengine.h index cd2e0791c..1e1cb9420 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -153,13 +153,13 @@ enum EventMask class CoreExport EventHandler : public Cullable { - private: +private: /** Private state maintained by socket engine */ int event_mask; void SetEventMask(int mask) { event_mask = mask; } - protected: +protected: /** File descriptor. * All events which can be handled must have a file descriptor. This * allows you to add events for sockets, fifo's, pipes, and various @@ -168,7 +168,7 @@ class CoreExport EventHandler */ int fd; - public: +public: /** Get the current file descriptor * @return The file descriptor of this handler */ @@ -218,7 +218,7 @@ class CoreExport EventHandler */ class CoreExport SocketEngine final { - public: +public: /** Socket engine statistics: count of various events, bandwidth usage */ class Statistics @@ -231,7 +231,7 @@ class CoreExport SocketEngine final */ void CheckFlush() const; - public: + public: /** Update counters for network data received. * This should be called after every read-type syscall. * @param len_in Number of bytes received, or -1 for error, as typically @@ -259,7 +259,7 @@ class CoreExport SocketEngine final unsigned long ErrorEvents = 0; }; - private: +private: /** Reference table, contains all current handlers **/ static std::vector ref; diff --git a/include/thread.h b/include/thread.h index 3f71a7037..01ecbe42d 100644 --- a/include/thread.h +++ b/include/thread.h @@ -23,7 +23,7 @@ class CoreExport Thread { - private: +private: /** Whether this thread is in the process of stopping. */ std::atomic_bool stopping = { false }; @@ -35,7 +35,7 @@ class CoreExport Thread */ static void StartInternal(Thread* thread); - protected: +protected: /** Callback which is executed on this thread after it has started. */ virtual void OnStart() = 0; @@ -45,7 +45,7 @@ class CoreExport Thread /** Initialises an instance of the Thread class. */ Thread() = default; - public: +public: /** Destroys an instance of the Thread class. */ virtual ~Thread() = default; diff --git a/include/threadsocket.h b/include/threadsocket.h index 95e73e2de..39e3f4346 100644 --- a/include/threadsocket.h +++ b/include/threadsocket.h @@ -28,12 +28,12 @@ class ThreadSignalSocket; class CoreExport SocketThread : public Thread { - private: +private: std::mutex mutex; std::condition_variable_any condvar; ThreadSignalSocket* socket; - protected: +protected: /** Waits for an enqueue operation to complete * You MUST hold the queue lock when you call this. * It will be unlocked while you wait, and will be relocked @@ -43,7 +43,7 @@ class CoreExport SocketThread { condvar.wait(mutex); } - public: +public: /** Notifies parent by making the SignalFD ready to read * No requirements on locking */ diff --git a/include/timer.h b/include/timer.h index ecea0556b..3a0127b7d 100644 --- a/include/timer.h +++ b/include/timer.h @@ -52,7 +52,7 @@ class CoreExport Timer */ bool repeat; - public: +public: /** Default constructor, initializes the triggering time * @param secs_from_now The number of seconds from now to trigger the timer * @param repeating Repeat this timer every secs_from_now seconds if set to true @@ -127,7 +127,7 @@ class CoreExport TimerManager final */ TimerMap Timers; - public: +public: /** Tick all pending Timers */ void TickTimers(); diff --git a/include/token_list.h b/include/token_list.h index 436694334..77fa1fcfb 100644 --- a/include/token_list.h +++ b/include/token_list.h @@ -23,14 +23,14 @@ class CoreExport TokenList final { - private: +private: /** Whether this list includes all tokens by default. */ bool permissive = false; /** Either the tokens to exclude if in permissive mode or the tokens to include if in strict mode. */ insp::flat_set tokens; - public: +public: /** Creates a new empty token list. */ TokenList() = default; diff --git a/include/uid.h b/include/uid.h index 76f7cacfe..8529768bd 100644 --- a/include/uid.h +++ b/include/uid.h @@ -24,7 +24,7 @@ class CoreExport UIDGenerator final { - private: +private: /** Holds the current UID. Used to generate the next one. */ std::string current_uid; @@ -33,7 +33,7 @@ class CoreExport UIDGenerator final */ void IncrementUID(unsigned int pos); - public: +public: /** * This is the maximum length of a UUID (unique user identifier). * It allows up to 12,960 servers and 2,176,782,336 users per server. diff --git a/include/usermanager.h b/include/usermanager.h index 68cb97538..bdfdbe40e 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -30,7 +30,7 @@ class CoreExport UserManager final { - public: +public: struct CloneCounts { unsigned int global = 0; @@ -52,7 +52,7 @@ class CoreExport UserManager final */ typedef insp::intrusive_list LocalList; - private: +private: /** Map of IP addresses for clone counting */ CloneMap clonemap; @@ -70,7 +70,7 @@ class CoreExport UserManager final */ uint64_t already_sent_id; - public: +public: /** Constructor, initializes variables */ UserManager(); diff --git a/include/users.h b/include/users.h index 7b62ddd2a..50e5ac268 100644 --- a/include/users.h +++ b/include/users.h @@ -229,7 +229,7 @@ public: class CoreExport User : public Extensible { - private: +private: /** Cached nick!ident\@dhost value using the displayed hostname */ std::string cached_fullhost; @@ -267,13 +267,13 @@ class CoreExport User */ std::bitset modes; - public: +public: /** To execute a function for each local neighbor of a user, inherit from this class and * pass an instance of it to User::ForEachNeighbor(). */ class ForEachNeighborHandler { - public: + public: /** Method to execute for each local neighbor of a user. * Derived classes must implement this. * @param user Current neighbor @@ -631,9 +631,9 @@ class CoreExport User class CoreExport UserIOHandler final : public StreamSocket { - private: +private: size_t checked_until; - public: +public: LocalUser* const user; UserIOHandler(LocalUser* me) : StreamSocket(StreamSocket::SS_USER) @@ -658,7 +658,7 @@ class CoreExport LocalUser final : public User , public insp::intrusive_list_node { - private: +private: /** The connect class this user is in. */ ConnectClass::Ptr connectclass; @@ -677,7 +677,7 @@ class CoreExport LocalUser final */ void Send(ClientProtocol::Event& protoev, ClientProtocol::MessageList& msglist); - public: +public: LocalUser(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server); LocalUser(int fd, const std::string& uuid, Serializable::Data& data); @@ -833,7 +833,7 @@ class CoreExport LocalUser final class RemoteUser : public User { - public: +public: RemoteUser(const std::string& uid, Server* srv) : User(uid, srv, TYPE_REMOTE) { @@ -843,7 +843,7 @@ class RemoteUser class CoreExport FakeUser final : public User { - public: +public: FakeUser(const std::string& uid, Server* srv) : User(uid, srv, TYPE_SERVER) { diff --git a/include/utility/aligned_storage.h b/include/utility/aligned_storage.h index d3a6fb40a..fbd9b5fba 100644 --- a/include/utility/aligned_storage.h +++ b/include/utility/aligned_storage.h @@ -28,11 +28,11 @@ namespace insp template class insp::aligned_storage final { - private: +private: /** The underlying aligned storage block. */ mutable typename std::aligned_storage::value>::type data; - public: +public: /** Default constructor for the aligned_storage class. */ aligned_storage() = default; diff --git a/include/utility/iterator_range.h b/include/utility/iterator_range.h index cb5025ead..65f611afb 100644 --- a/include/utility/iterator_range.h +++ b/include/utility/iterator_range.h @@ -48,14 +48,14 @@ namespace insp template class insp::iterator_range final { - private: +private: /** An iterator which points to the start of the range. */ const Iterator begini; /* An iterator which points to one past the end of the range. */ const Iterator endi; - public: +public: /** Initialises a new iterator range with the specified iterators. * @param begin An iterator which points to the start of the range. * @param end An iterator which points to one past the end of the range. diff --git a/include/utility/uncopiable.h b/include/utility/uncopiable.h index 937306f94..bb11a0892 100644 --- a/include/utility/uncopiable.h +++ b/include/utility/uncopiable.h @@ -27,14 +27,14 @@ namespace insp /** Prevents instances of an inheriting type from being copied. */ class insp::uncopiable { - private: +private: /** Prevents copying via the copy constructor. */ uncopiable(const uncopiable&) = delete; /** Prevents copying via the assignment operator. */ uncopiable& operator=(const uncopiable&) = delete; - protected: +protected: /** Default constructor for the uncopiable class. */ uncopiable() = default; diff --git a/include/xline.h b/include/xline.h index f76e5bf7f..0827adbd3 100644 --- a/include/xline.h +++ b/include/xline.h @@ -35,7 +35,7 @@ class CoreExport XLine : public Cullable { - protected: +protected: /** Default 'apply' action. Quits the user. * @param u User to apply the line against @@ -44,7 +44,7 @@ class CoreExport XLine */ void DefaultApply(User* u, const std::string &line, bool bancache); - public: +public: /** Create an XLine. * @param s_time The set time @@ -157,7 +157,7 @@ class CoreExport XLine class CoreExport KLine final : public XLine { - public: +public: /** Create a K-line. * @param s_time The set time @@ -199,7 +199,7 @@ class CoreExport KLine final class CoreExport GLine final : public XLine { - public: +public: /** Create a G-line. * @param s_time The set time * @param d The duration of the xline @@ -238,7 +238,7 @@ class CoreExport GLine final class CoreExport ELine final : public XLine { - public: +public: /** Create an E-line. * @param s_time The set time * @param d The duration of the xline @@ -279,7 +279,7 @@ class CoreExport ELine final class CoreExport ZLine final : public XLine { - public: +public: /** Create a Z-line. * @param s_time The set time * @param d The duration of the xline @@ -310,7 +310,7 @@ class CoreExport ZLine final class CoreExport QLine final : public XLine { - public: +public: /** Create a Q-line. * @param s_time The set time * @param d The duration of the xline @@ -345,11 +345,11 @@ class CoreExport QLine final */ class CoreExport XLineFactory { - protected: +protected: std::string type; - public: +public: /** Create an XLine factory * @param t Type of XLine this factory generates @@ -384,7 +384,7 @@ class CoreExport XLineFactory */ class CoreExport XLineManager final { - protected: +protected: /** Used to hold XLines which have not yet been applied. */ std::vector pending_lines; @@ -400,7 +400,7 @@ class CoreExport XLineManager final */ XLineContainer lookup_lines; - public: +public: /** Constructor */ diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp index f3ba67715..6b7cb6387 100644 --- a/src/coremods/core_channel/core_channel.cpp +++ b/src/coremods/core_channel/core_channel.cpp @@ -40,7 +40,7 @@ class JoinHook final Modes::ChangeList modechangelist; const User* joininguser; - public: +public: /** If true, MODE changes after JOIN will be sourced from the user, rather than the server */ bool modefromuser; @@ -130,7 +130,7 @@ class CoreModChannel final return MOD_RES_PASSTHRU; } - public: +public: CoreModChannel() : Module(VF_CORE | VF_VENDOR, "Provides the INVITE, JOIN, KICK, NAMES, and TOPIC commands") , CheckExemption::EventListener(this, UINT_MAX) diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h index aa17c2c32..d1afa8adc 100644 --- a/src/coremods/core_channel/core_channel.h +++ b/src/coremods/core_channel/core_channel.h @@ -62,10 +62,10 @@ enum class CommandInvite final : public Command { - private: +private: Invite::APIImpl& invapi; - public: +public: Invite::AnnounceState announceinvites; CommandInvite(Module* parent, Invite::APIImpl& invapiimpl); @@ -76,7 +76,7 @@ class CommandInvite final class CommandJoin final : public SplitCommand { - public: +public: CommandJoin(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -84,12 +84,12 @@ class CommandJoin final class CommandTopic final : public SplitCommand { - private: +private: CheckExemption::EventProvider exemptionprov; ChanModeReference secretmode; ChanModeReference topiclockmode; - public: +public: CommandTopic(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -97,13 +97,13 @@ class CommandTopic final class CommandNames final : public SplitCommand { - private: +private: ChanModeReference secretmode; ChanModeReference privatemode; UserModeReference invisiblemode; Events::ModuleEventProvider namesevprov; - public: +public: CommandNames(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; @@ -119,7 +119,7 @@ class CommandNames final class CommandKick final : public Command { - public: +public: CommandKick(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -130,7 +130,7 @@ class CommandKick final class ModeChannelBan final : public ListModeBase { - public: +public: ModeChannelBan(Module* Creator) : ListModeBase(Creator, "ban", 'b', "End of channel ban list", RPL_BANLIST, RPL_ENDOFBANLIST, true) { @@ -143,7 +143,7 @@ class ModeChannelBan final class ModeChannelKey final : public ParamMode { - public: +public: std::string::size_type maxkeylen; ModeChannelKey(Module* Creator); ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; @@ -157,7 +157,7 @@ class ModeChannelKey final class ModeChannelLimit final : public ParamMode { - public: +public: ModeChannelLimit(Module* Creator); bool ResolveModeConflict(const std::string& their_param, const std::string& our_param, Channel* channel) override; void SerializeParam(Channel* chan, intptr_t n, std::string& out); @@ -169,7 +169,7 @@ class ModeChannelLimit final class ModeChannelOp final : public PrefixMode { - public: +public: ModeChannelOp(Module* Creator) : PrefixMode(Creator, "op", 'o', OP_VALUE, '@') { @@ -182,7 +182,7 @@ class ModeChannelOp final class ModeChannelVoice final : public PrefixMode { - public: +public: ModeChannelVoice(Module* Creator) : PrefixMode(Creator, "voice", 'v', VOICE_VALUE, '+') { @@ -194,13 +194,13 @@ class ModeChannelVoice final class ExtBanManager final : public ExtBan::Manager { - private: +private: ModeChannelBan& banmode; Events::ModuleEventProvider evprov; LetterMap byletter; NameMap byname; - public: +public: ExtBanManager(Module* Creator, ModeChannelBan& bm) : ExtBan::Manager(Creator) , banmode(bm) diff --git a/src/coremods/core_channel/invite.cpp b/src/coremods/core_channel/invite.cpp index 7b472f2fc..bee3f80f7 100644 --- a/src/coremods/core_channel/invite.cpp +++ b/src/coremods/core_channel/invite.cpp @@ -29,7 +29,7 @@ class InviteExpireTimer final bool Tick() override; - public: +public: InviteExpireTimer(Invite::Invite* invite, time_t timeout); }; diff --git a/src/coremods/core_channel/invite.h b/src/coremods/core_channel/invite.h index d115ae676..5a7ef8439 100644 --- a/src/coremods/core_channel/invite.h +++ b/src/coremods/core_channel/invite.h @@ -47,7 +47,7 @@ template class Invite::ExtItem final : public ExtensionItem { - private: +private: static std::string ToString(void* item, bool human) { std::string ret; @@ -61,7 +61,7 @@ class Invite::ExtItem final return ret; } - public: +public: ExtItem(Module* owner, const char* extname) : ExtensionItem(owner, extname, ExtType) { @@ -122,7 +122,7 @@ class Invite::APIImpl final ExtItem userext; ExtItem chanext; - public: +public: APIImpl(Module* owner); void Create(LocalUser* user, Channel* chan, time_t timeout) override; diff --git a/src/coremods/core_clients.cpp b/src/coremods/core_clients.cpp index 7240d9ad2..95e0c8b62 100644 --- a/src/coremods/core_clients.cpp +++ b/src/coremods/core_clients.cpp @@ -22,9 +22,9 @@ class CoreModClients final : public Module { - private: +private: - public: +public: CoreModClients() : Module(VF_CORE | VF_VENDOR, "Accepts connections to the server.") { diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index cd84da9e4..d8538c698 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -45,7 +45,7 @@ using namespace DNS; class Packet final : public Query { - private: +private: const Module* creator; void PackName(unsigned char* output, unsigned short output_size, unsigned short& pos, const std::string& name) @@ -256,7 +256,7 @@ class Packet final return record; } - public: +public: static constexpr int POINTER = 0xC0; static constexpr int LABEL = 0x3F; static constexpr int HEADER_LENGTH = 12; @@ -449,7 +449,7 @@ class MyManager final this->cache[r.question] = r; } - public: +public: DNS::Request* requests[MAX_REQUEST_ID+1]; size_t stats_total = 0; size_t stats_success = 0; @@ -888,7 +888,7 @@ class ModuleDNS final DNSServer = "127.0.0.1"; } - public: +public: ModuleDNS() : Module(VF_CORE | VF_VENDOR, "Provides support for DNS lookups") , Stats::EventListener(this) diff --git a/src/coremods/core_hostname_lookup.cpp b/src/coremods/core_hostname_lookup.cpp index 73dce2d7d..ca10dd33c 100644 --- a/src/coremods/core_hostname_lookup.cpp +++ b/src/coremods/core_hostname_lookup.cpp @@ -30,7 +30,7 @@ namespace class UserResolver : public DNS::Request { - protected: +protected: // The socket address that the associated user was connected from at the time of lookup. const irc::sockets::sockaddrs sa; @@ -63,7 +63,7 @@ class UserResolver rr.rdata.c_str(), cached ? " (cached)" : ""); } - public: +public: void OnError(const DNS::Query* query) override { LocalUser* user = IS_LOCAL(ServerInstance->Users.FindUUID(uuid)); @@ -76,7 +76,7 @@ class UserResolver class UserIPResolver final : public UserResolver { - public: +public: UserIPResolver(DNS::Manager* mgr, Module* me, LocalUser* user, const std::string& host) : UserResolver(mgr, me, user, host, user->client_sa.family() == AF_INET6 ? DNS::QUERY_AAAA : DNS::QUERY_A) { @@ -153,7 +153,7 @@ class UserIPResolver final class UserHostResolver final : public UserResolver { - public: +public: UserHostResolver(DNS::Manager* mgr, Module* me, LocalUser* user) : UserResolver(mgr, me, user, user->GetIPString(), DNS::QUERY_PTR) { @@ -193,11 +193,11 @@ class UserHostResolver final class ModuleHostnameLookup final : public Module { - private: +private: BoolExtItem dnsLookup; dynamic_reference DNS; - public: +public: ModuleHostnameLookup() : Module(VF_CORE | VF_VENDOR, "Provides support for DNS lookups on connecting clients") , dnsLookup(this, "dns-lookup", ExtensionType::USER) diff --git a/src/coremods/core_info/core_info.cpp b/src/coremods/core_info/core_info.cpp index a21cefbe9..f6cea824b 100644 --- a/src/coremods/core_info/core_info.cpp +++ b/src/coremods/core_info/core_info.cpp @@ -87,7 +87,7 @@ class CoreModInfo final numeric004.push(CreateModeList(MODETYPE_CHANNEL)); numeric004.push(CreateModeList(MODETYPE_CHANNEL, true)); } - public: +public: CoreModInfo() : Module(VF_CORE | VF_VENDOR, "Provides the ADMIN, COMMANDS, INFO, MODULES, MOTD, TIME, SERVLIST, and VERSION commands") , cmdadmin(this) diff --git a/src/coremods/core_info/core_info.h b/src/coremods/core_info/core_info.h index 1f6483656..8c3308e01 100644 --- a/src/coremods/core_info/core_info.h +++ b/src/coremods/core_info/core_info.h @@ -26,7 +26,7 @@ /** This class manages the generation and transmission of ISUPPORT. */ class ISupportManager final { - private: +private: /** The generated numerics which are sent to clients. */ typedef insp::flat_map> NumericMap; NumericMap cachednumerics; @@ -50,7 +50,7 @@ class ISupportManager final */ void BuildNumerics(ISupport::TokenMap& tokens, std::vector& numerics); - public: +public: ISupportManager(Module* mod); /** (Re)build the ISUPPORT vector. @@ -70,7 +70,7 @@ class ISupportManager final class ServerTargetCommand : public Command { - public: +public: ServerTargetCommand(Module* mod, const std::string& Name) : Command(mod, Name) { @@ -82,7 +82,7 @@ class ServerTargetCommand class CommandAdmin final : public ServerTargetCommand { - public: +public: std::string adminname; std::string admindesc; std::string adminemail; @@ -93,7 +93,7 @@ class CommandAdmin final class CommandCommands final : public SplitCommand { - public: +public: CommandCommands(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -101,7 +101,7 @@ class CommandCommands final class CommandInfo final : public SplitCommand { - public: +public: CommandInfo(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -109,7 +109,7 @@ class CommandInfo final class CommandModules final : public ServerTargetCommand { - public: +public: CommandModules(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -117,7 +117,7 @@ class CommandModules final class CommandMotd final : public ServerTargetCommand { - public: +public: ConfigFileCache motds; CommandMotd(Module* parent); @@ -127,10 +127,10 @@ class CommandMotd final class CommandServList final : public SplitCommand { - private: +private: UserModeReference invisiblemode; - public: +public: CommandServList(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -138,7 +138,7 @@ class CommandServList final class CommandTime final : public ServerTargetCommand { - public: +public: CommandTime(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -146,10 +146,10 @@ class CommandTime final class CommandVersion final : public Command { - private: +private: ISupportManager& isupport; - public: +public: CommandVersion(Module* parent, ISupportManager& isupportmgr); CmdResult Handle(User* user, const Params& parameters) override; }; diff --git a/src/coremods/core_list.cpp b/src/coremods/core_list.cpp index c68132abd..18e63853f 100644 --- a/src/coremods/core_list.cpp +++ b/src/coremods/core_list.cpp @@ -30,7 +30,7 @@ class CommandList final : public Command { - private: +private: ChanModeReference secretmode; ChanModeReference privatemode; @@ -46,7 +46,7 @@ class CommandList final return ServerInstance->Time() - (minutes * 60); } - public: +public: // Whether to show modes in the LIST response. bool showmodes; @@ -190,10 +190,10 @@ class CoreModList final : public Module , public ISupport::EventListener { - private: +private: CommandList cmd; - public: +public: CoreModList() : Module(VF_CORE | VF_VENDOR, "Provides the LIST command") , ISupport::EventListener(this) diff --git a/src/coremods/core_loadmodule.cpp b/src/coremods/core_loadmodule.cpp index 63898bf52..ffad143c1 100644 --- a/src/coremods/core_loadmodule.cpp +++ b/src/coremods/core_loadmodule.cpp @@ -29,7 +29,7 @@ class CommandLoadmodule final : public Command { - public: +public: CommandLoadmodule(Module* parent) : Command(parent,"LOADMODULE", 1, 1) { @@ -58,7 +58,7 @@ CmdResult CommandLoadmodule::Handle(User* user, const Params& parameters) class CommandUnloadmodule final : public Command { - public: +public: CommandUnloadmodule(Module* parent) : Command(parent, "UNLOADMODULE", 1) { @@ -104,7 +104,7 @@ class CoreModLoadModule final CommandLoadmodule cmdloadmod; CommandUnloadmodule cmdunloadmod; - public: +public: CoreModLoadModule() : Module(VF_CORE | VF_VENDOR, "Provides the LOADMODULE and UNLOADMODULE commands") , cmdloadmod(this) diff --git a/src/coremods/core_lusers.cpp b/src/coremods/core_lusers.cpp index 63e7455a3..d54e2427e 100644 --- a/src/coremods/core_lusers.cpp +++ b/src/coremods/core_lusers.cpp @@ -58,10 +58,10 @@ struct LusersCounters final class CommandLusers final : public Command { - private: +private: LusersCounters& counters; - public: +public: CommandLusers(Module* parent, LusersCounters& Counters) : Command(parent,"LUSERS",0,0) , counters(Counters) @@ -141,7 +141,7 @@ class ModuleLusers final CommandLusers cmd; InvisibleWatcher mw; - public: +public: ModuleLusers() : Module(VF_CORE | VF_VENDOR, "Provides the LUSERS command") , invisiblemode(this, "invisible") diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 905d342ce..fa4c3797a 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -96,7 +96,7 @@ public: class CommandMessage final : public Command { - private: +private: const MessageType msgtype; bool FirePreEvents(User* source, MessageTarget& msgtarget, MessageDetails& msgdetails) @@ -264,7 +264,7 @@ class CommandMessage final return FirePostEvent(source, msgtarget, msgdetails); } - public: +public: CommandMessage(Module* parent, MessageType mt) : Command(parent, ClientProtocol::Messages::Privmsg::CommandStrFromMsgType(mt), 2, 2) , msgtype(mt) @@ -326,7 +326,7 @@ class CommandMessage final class CommandSQuery final : public Command { - public: +public: CommandSQuery(Module* Creator) : Command(Creator, "SQUERY", 2, 2) { @@ -389,14 +389,14 @@ class CommandSQuery final class ModuleCoreMessage final : public Module { - private: +private: CommandMessage cmdprivmsg; CommandMessage cmdnotice; CommandSQuery cmdsquery; ChanModeReference moderatedmode; ChanModeReference noextmsgmode; - public: +public: ModuleCoreMessage() : Module(VF_CORE | VF_VENDOR, "Provides the NOTICE, PRIVMSG, and SQUERY commands") , cmdprivmsg(this, MSG_PRIVMSG) diff --git a/src/coremods/core_mode.cpp b/src/coremods/core_mode.cpp index ddb0315d9..8d5561beb 100644 --- a/src/coremods/core_mode.cpp +++ b/src/coremods/core_mode.cpp @@ -27,7 +27,7 @@ class CommandMode final : public Command { - private: +private: unsigned int sent[256]; unsigned int seq = 0; ChanModeReference secretmode; @@ -59,7 +59,7 @@ class CommandMode final return !chan->IsModeSet(secretmode) && !chan->IsModeSet(privatemode); } - public: +public: CommandMode(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -269,7 +269,7 @@ class CoreModMode final : public Module , public ISupport::EventListener { - private: +private: CommandMode cmdmode; std::string GenerateModeList(ModeType mt) @@ -353,7 +353,7 @@ class CoreModMode final return includemodechars ? "(" + modechars + ")" + prefixchars : prefixchars; } - public: +public: CoreModMode() : Module(VF_CORE | VF_VENDOR, "Provides the MODE command") , ISupport::EventListener(this) diff --git a/src/coremods/core_oper/cmd_kill.cpp b/src/coremods/core_oper/cmd_kill.cpp index 98ca02c8e..b7d23380f 100644 --- a/src/coremods/core_oper/cmd_kill.cpp +++ b/src/coremods/core_oper/cmd_kill.cpp @@ -40,7 +40,7 @@ CommandKill::CommandKill(Module* parent) class KillMessage final : public ClientProtocol::Message { - public: +public: KillMessage(ClientProtocol::EventProvider& protoev, User* user, LocalUser* target, const std::string& text, const std::string& hidenick) : ClientProtocol::Message("KILL", NULL) { diff --git a/src/coremods/core_oper/core_oper.cpp b/src/coremods/core_oper/core_oper.cpp index 532382a6c..5525ecb66 100644 --- a/src/coremods/core_oper/core_oper.cpp +++ b/src/coremods/core_oper/core_oper.cpp @@ -25,7 +25,7 @@ class CoreModOper final : public Module { - private: +private: CommandDie cmddie; CommandKill cmdkill; CommandOper cmdoper; @@ -34,7 +34,7 @@ class CoreModOper final ModeUserOperator operatormode; ModeUserServerNoticeMask snomaskmode; - public: +public: CoreModOper() : Module(VF_CORE | VF_VENDOR, "Provides the DIE, KILL, OPER, REHASH, and RESTART commands") , cmddie(this) diff --git a/src/coremods/core_oper/core_oper.h b/src/coremods/core_oper/core_oper.h index 51019cf6f..1cb22b762 100644 --- a/src/coremods/core_oper/core_oper.h +++ b/src/coremods/core_oper/core_oper.h @@ -34,7 +34,7 @@ namespace DieRestart class CommandDie final : public Command { - public: +public: CommandDie(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -46,7 +46,7 @@ class CommandKill final std::string killreason; ClientProtocol::EventProvider protoev; - public: +public: /** Set to a non empty string to obfuscate nicknames prepended to a KILL. */ std::string hidenick; @@ -62,7 +62,7 @@ class CommandKill final class CommandOper final : public SplitCommand { - public: +public: CommandOper(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -70,7 +70,7 @@ class CommandOper final class CommandRehash final : public Command { - public: +public: CommandRehash(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -78,7 +78,7 @@ class CommandRehash final class CommandRestart final : public Command { - public: +public: CommandRestart(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -86,7 +86,7 @@ class CommandRestart final class ModeUserServerNoticeMask final : public ModeHandler { - private: +private: /** Process a snomask modifier string, e.g. +abc-de * @param user The target user * @param input A sequence of notice mask characters @@ -96,7 +96,7 @@ class ModeUserServerNoticeMask final */ std::string ProcessNoticeMasks(User* user, const std::string& input); - public: +public: ModeUserServerNoticeMask(Module* Creator); ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; @@ -110,7 +110,7 @@ class ModeUserServerNoticeMask final class ModeUserOperator final : public SimpleUserMode { - public: +public: ModeUserOperator(Module* Creator); ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; }; diff --git a/src/coremods/core_reloadmodule.cpp b/src/coremods/core_reloadmodule.cpp index 87e222aec..481e5af4c 100644 --- a/src/coremods/core_reloadmodule.cpp +++ b/src/coremods/core_reloadmodule.cpp @@ -42,7 +42,7 @@ class DummySerializer final return ClientProtocol::SerializedMessage(); } - public: +public: DummySerializer(Module* mod) : ClientProtocol::Serializer(mod, "dummy") { @@ -55,7 +55,7 @@ class CommandReloadmodule final Events::ModuleEventProvider evprov; DummySerializer dummyser; - public: +public: CommandReloadmodule(Module* parent) : Command(parent, "RELOADMODULE", 1) , evprov(parent, "event/reloadmodule") @@ -293,7 +293,7 @@ class DataKeeper final */ void VerifyServiceProvider(const ProviderInfo& service, const char* type); - public: +public: /** Save module state * @param currmod Module whose data to save */ @@ -676,7 +676,7 @@ class ReloadAction final const std::string uuid; const std::string passedname; - public: +public: ReloadAction(Module* m, const std::string& uid, const std::string& passedmodname) : mod(m) , uuid(uid) @@ -746,10 +746,10 @@ CmdResult CommandReloadmodule::Handle(User* user, const Params& parameters) class CoreModReloadmodule final : public Module { - private: +private: CommandReloadmodule cmd; - public: +public: CoreModReloadmodule() : Module(VF_CORE | VF_VENDOR, "Provides the RELOADMODULE command") , cmd(this) diff --git a/src/coremods/core_serialize_rfc.cpp b/src/coremods/core_serialize_rfc.cpp index b0a536e0e..9aa38723b 100644 --- a/src/coremods/core_serialize_rfc.cpp +++ b/src/coremods/core_serialize_rfc.cpp @@ -39,7 +39,7 @@ class RFCSerializer final static void SerializeTags(const ClientProtocol::TagMap& tags, const ClientProtocol::TagSelection& tagwl, std::string& line); - public: +public: RFCSerializer(Module* mod) : ClientProtocol::Serializer(mod, "rfc") { @@ -230,7 +230,7 @@ class ModuleCoreRFCSerializer final { RFCSerializer rfcserializer; - public: +public: ModuleCoreRFCSerializer() : Module(VF_CORE | VF_VENDOR, "RFC client protocol serializer and unserializer") , rfcserializer(this) diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index b7e3c676e..e9095c607 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -41,7 +41,7 @@ class CommandStats final Events::ModuleEventProvider statsevprov; void DoStats(Stats::Context& stats); - public: +public: /** STATS characters which non-opers can request. */ std::string userstats; @@ -393,10 +393,10 @@ CmdResult CommandStats::Handle(User* user, const Params& parameters) class CoreModStats final : public Module { - private: +private: CommandStats cmd; - public: +public: CoreModStats() : Module(VF_CORE | VF_VENDOR, "Provides the STATS command") , cmd(this) diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index dc4dc3bbd..1b21eba40 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -31,7 +31,7 @@ enum class CommandCapab final : public Command { - public: +public: CommandCapab(Module* parent) : Command(parent, "CAPAB") { @@ -56,7 +56,7 @@ class CommandCapab final class CommandConnect final : public Command { - public: +public: CommandConnect(Module* parent) : Command(parent, "CONNECT", 1) { @@ -77,7 +77,7 @@ class CommandConnect final class CommandLinks final : public Command { - public: +public: CommandLinks(Module* parent) : Command(parent, "LINKS", 0, 0) { @@ -94,7 +94,7 @@ class CommandLinks final class CommandSquit final : public Command { - public: +public: CommandSquit(Module* parent) : Command(parent, "SQUIT", 1, 2) { @@ -112,7 +112,7 @@ class CommandSquit final class CommandSummon final : public SplitCommand { - public: +public: CommandSummon(Module* Creator) : SplitCommand(Creator, "SUMMON", 1) { @@ -128,7 +128,7 @@ class CommandSummon final class CommandUsers final : public SplitCommand { - public: +public: CommandUsers(Module* Creator) : SplitCommand(Creator, "USERS") { @@ -144,7 +144,7 @@ class CommandUsers final class CoreModStub final : public Module { - private: +private: CommandCapab cmdcapab; CommandConnect cmdconnect; CommandLinks cmdlinks; @@ -152,7 +152,7 @@ class CoreModStub final CommandSummon cmdsummon; CommandUsers cmdusers; - public: +public: CoreModStub() : Module(VF_CORE | VF_VENDOR, "Provides stubs for unimplemented commands") , cmdcapab(this) diff --git a/src/coremods/core_user/cmd_ison.cpp b/src/coremods/core_user/cmd_ison.cpp index 817b04dfe..77f0df5bc 100644 --- a/src/coremods/core_user/cmd_ison.cpp +++ b/src/coremods/core_user/cmd_ison.cpp @@ -28,7 +28,7 @@ class IsonReplyBuilder final : public Numeric::Builder<' ', true> { - public: +public: IsonReplyBuilder(LocalUser* user) : Numeric::Builder<' ', true>(user, RPL_ISON) { diff --git a/src/coremods/core_user/core_user.cpp b/src/coremods/core_user/core_user.cpp index 3546df800..71a082ff3 100644 --- a/src/coremods/core_user/core_user.cpp +++ b/src/coremods/core_user/core_user.cpp @@ -24,7 +24,7 @@ class CommandPass final : public SplitCommand { - public: +public: CommandPass(Module* parent) : SplitCommand(parent, "PASS", 1, 1) { @@ -51,7 +51,7 @@ class CommandPass final class CommandPing final : public SplitCommand { - public: +public: CommandPing(Module* parent) : SplitCommand(parent, "PING", 1) { @@ -76,7 +76,7 @@ class CommandPing final class CommandPong final : public Command { - public: +public: CommandPong(Module* parent) : Command(parent, "PONG", 1) { @@ -142,7 +142,7 @@ class CoreModUser final CommandUserhost cmduserhost; SimpleUserMode invisiblemode; - public: +public: CoreModUser() : Module(VF_CORE | VF_VENDOR, "Provides the AWAY, ISON, NICK, PART, PASS, PING, PONG, QUIT, USERHOST, and USER commands") , cmdaway(this) diff --git a/src/coremods/core_user/core_user.h b/src/coremods/core_user/core_user.h index e9c339ce8..11c188480 100644 --- a/src/coremods/core_user/core_user.h +++ b/src/coremods/core_user/core_user.h @@ -36,7 +36,7 @@ class MessageWrapper final std::string suffix; bool fixed; - public: +public: /** * Wrap the given message according to the config rules * @param message The message to wrap @@ -57,10 +57,10 @@ class MessageWrapper final class CommandAway final : public Command { - private: +private: Away::EventProvider awayevprov; - public: +public: CommandAway(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -69,7 +69,7 @@ class CommandAway final class CommandIson final : public SplitCommand { - public: +public: CommandIson(Module* parent) : SplitCommand(parent, "ISON", 1) { @@ -83,7 +83,7 @@ class CommandIson final class CommandNick final : public SplitCommand { - public: +public: CommandNick(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; }; @@ -91,7 +91,7 @@ class CommandNick final class CommandPart final : public Command { - public: +public: MessageWrapper msgwrap; CommandPart(Module* parent); @@ -102,10 +102,10 @@ class CommandPart final class CommandQuit final : public Command { - private: +private: StringExtItem operquit; - public: +public: MessageWrapper msgwrap; CommandQuit(Module* parent); @@ -116,7 +116,7 @@ class CommandQuit final class CommandUser final : public SplitCommand { - public: +public: CommandUser(Module* parent); CmdResult HandleLocal(LocalUser* user, const Params& parameters) override; @@ -133,10 +133,10 @@ class CommandUser final class CommandUserhost final : public Command { - private: +private: UserModeReference hideopermode; - public: +public: CommandUserhost(Module* parent) : Command(parent,"USERHOST", 1) , hideopermode(parent, "hideoper") diff --git a/src/coremods/core_wallops.cpp b/src/coremods/core_wallops.cpp index 2f84eb6a7..dced60c8a 100644 --- a/src/coremods/core_wallops.cpp +++ b/src/coremods/core_wallops.cpp @@ -31,7 +31,7 @@ class CommandWallops final SimpleUserMode wallopsmode; ClientProtocol::EventProvider protoevprov; - public: +public: CommandWallops(Module* parent) : Command(parent, "WALLOPS", 1, 1) , wallopsmode(parent, "wallops", 'w') @@ -73,10 +73,10 @@ CmdResult CommandWallops::Handle(User* user, const Params& parameters) class CoreModWallops final : public Module { - private: +private: CommandWallops cmd; - public: +public: CoreModWallops() : Module(VF_CORE | VF_VENDOR, "Provides the WALLOPS command") , cmd(this) diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index 789e34069..d909c9475 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -116,7 +116,7 @@ struct WhoData final class CommandWho final : public SplitCommand { - private: +private: ChanModeReference secretmode; ChanModeReference privatemode; UserModeReference hidechansmode; @@ -168,7 +168,7 @@ class CommandWho final template void WhoUsers(LocalUser* source, const std::vector& parameters, const T& users, WhoData& data); - public: +public: CommandWho(Module* parent) : SplitCommand(parent, "WHO", 1, 3) , secretmode(parent, "secret") @@ -584,10 +584,10 @@ class CoreModWho final : public Module , public ISupport::EventListener { - private: +private: CommandWho cmd; - public: +public: CoreModWho() : Module(VF_CORE | VF_VENDOR, "Provides the WHO command") , ISupport::EventListener(this) diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp index 7fec3ea68..2d649a458 100644 --- a/src/coremods/core_whois.cpp +++ b/src/coremods/core_whois.cpp @@ -47,7 +47,7 @@ class WhoisContextImpl final { Events::ModuleEventProvider& lineevprov; - public: +public: WhoisContextImpl(LocalUser* sourceuser, User* targetuser, Events::ModuleEventProvider& evprov) : Whois::Context(sourceuser, targetuser) , lineevprov(evprov) @@ -77,7 +77,7 @@ class CommandWhois final void DoWhois(LocalUser* user, User* dest, time_t signon, unsigned long idle); void SendChanList(WhoisContextImpl& whois); - public: +public: /** If true then all opers are shown with a generic 'is a server operator' line rather than the oper type. */ bool genericoper; @@ -103,7 +103,7 @@ class CommandWhois final class WhoisNumericSink final { WhoisContextImpl& whois; - public: +public: WhoisNumericSink(WhoisContextImpl& whoisref) : whois(whoisref) { @@ -118,7 +118,7 @@ class WhoisNumericSink final class WhoisChanListNumericBuilder final : public Numeric::GenericBuilder<' ', false, WhoisNumericSink> { - public: +public: WhoisChanListNumericBuilder(WhoisContextImpl& whois) : Numeric::GenericBuilder<' ', false, WhoisNumericSink>(WhoisNumericSink(whois), RPL_WHOISCHANNELS, false, whois.GetSource()->nick.size() + whois.GetTarget()->nick.size() + 1) { @@ -142,7 +142,7 @@ class WhoisChanList final out.Add(prefixstr, memb->chan->name); } - public: +public: WhoisChanList(WhoisContextImpl& whois, const SplitWhoisState& sws) : splitwhois(sws) , num(whois) @@ -326,10 +326,10 @@ CmdResult CommandWhois::HandleLocal(LocalUser* user, const Params& parameters) class CoreModWhois final : public Module { - private: +private: CommandWhois cmd; - public: +public: CoreModWhois() : Module(VF_CORE | VF_VENDOR, "Provides the WHOIS command") , cmd(this) diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index aa95cb968..f49bdc78e 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -90,7 +90,7 @@ namespace WhoWas class Manager final { - public: + public: struct Stats final { /** Number of currently existing WhoWas::Entry objects */ @@ -133,7 +133,7 @@ namespace WhoWas /** Destructor */ ~Manager(); - private: + private: /** Order in which the users were added into the map, used to remove oldest nick */ typedef insp::intrusive_list_tail FIFO; @@ -175,7 +175,7 @@ namespace WhoWas class CommandWhowas final : public Command { - public: +public: // Manager handling all whowas database related tasks WhoWas::Manager manager; @@ -402,7 +402,7 @@ class ModuleWhoWas final { CommandWhowas cmd; - public: +public: ModuleWhoWas() : Module(VF_CORE | VF_VENDOR, "Provides the WHOWAS command") , Stats::EventListener(this) diff --git a/src/coremods/core_xline/core_xline.cpp b/src/coremods/core_xline/core_xline.cpp index 387402560..9db5092a4 100644 --- a/src/coremods/core_xline/core_xline.cpp +++ b/src/coremods/core_xline/core_xline.cpp @@ -63,7 +63,7 @@ class CoreModXLine final CommandQline cmdqline; CommandZline cmdzline; - public: +public: CoreModXLine() : Module(VF_CORE | VF_VENDOR, "Provides the ELINE, GLINE, KLINE, QLINE, and ZLINE commands") , cmdeline(this) diff --git a/src/coremods/core_xline/core_xline.h b/src/coremods/core_xline/core_xline.h index 99ec93f64..1280f0996 100644 --- a/src/coremods/core_xline/core_xline.h +++ b/src/coremods/core_xline/core_xline.h @@ -26,10 +26,10 @@ class InsaneBan final { - public: +public: class MatcherBase { - public: + public: virtual long Run(const std::string& mask) = 0; }; @@ -37,7 +37,7 @@ class InsaneBan final class Matcher : public MatcherBase { - public: + public: long Run(const std::string& mask) override { long matches = 0; @@ -54,7 +54,7 @@ class InsaneBan final class IPHostMatcher final : public Matcher { - public: + public: bool Check(User* user, const std::string& mask) const; }; @@ -72,7 +72,7 @@ class InsaneBan final class CommandEline final : public Command { - public: +public: CommandEline(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -80,7 +80,7 @@ class CommandEline final class CommandGline final : public Command { - public: +public: CommandGline(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -88,7 +88,7 @@ class CommandGline final class CommandKline final : public Command { - public: +public: CommandKline(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -96,15 +96,15 @@ class CommandKline final class CommandQline final : public Command { - private: +private: class NickMatcher final : public InsaneBan::Matcher { - public: + public: bool Check(User* user, const std::string& mask) const; }; - public: +public: CommandQline(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; @@ -112,15 +112,15 @@ class CommandQline final class CommandZline final : public Command { - private: +private: class IPMatcher final : public InsaneBan::Matcher { - public: + public: bool Check(User* user, const std::string& mask) const; }; - public: +public: CommandZline(Module* parent); CmdResult Handle(User* user, const Params& parameters) override; }; diff --git a/src/modules/extra/m_argon2.cpp b/src/modules/extra/m_argon2.cpp index 80289286e..3df31664c 100644 --- a/src/modules/extra/m_argon2.cpp +++ b/src/modules/extra/m_argon2.cpp @@ -33,7 +33,7 @@ class ProviderConfig final { - private: +private: static Argon2_version SanitizeArgon2Version(unsigned long version) { // Note, 10 is 0x10, and 13 is 0x13. Referring to it as @@ -52,7 +52,7 @@ class ProviderConfig final return ARGON2_VERSION_13; } - public: +public: uint32_t iterations; uint32_t lanes; uint32_t memory; @@ -96,10 +96,10 @@ class ProviderConfig final class HashArgon2 final : public HashProvider { - private: +private: const Argon2_type argon2Type; - public: +public: ProviderConfig config; bool Compare(const std::string& input, const std::string& hash) override @@ -170,12 +170,12 @@ class HashArgon2 final class ModuleArgon2 final : public Module { - private: +private: HashArgon2 argon2i; HashArgon2 argon2d; HashArgon2 argon2id; - public: +public: ModuleArgon2() : Module(VF_VENDOR, "Allows other modules to generate Argon2 hashes.") , argon2i(this, "argon2i", Argon2_i) diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index bff8c4b78..abaa22bad 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -38,7 +38,7 @@ class GeolocationExtItem final : public ExtensionItem { - public: +public: GeolocationExtItem(Module* parent) : ExtensionItem(parent, "geolocation", ExtensionType::USER) { @@ -79,7 +79,7 @@ typedef insp::flat_map LocationMap; class GeolocationAPIImpl final : public Geolocation::APIBase { - public: +public: GeolocationExtItem ext; LocationMap locations; MMDB_s mmdb; @@ -148,10 +148,10 @@ class GeolocationAPIImpl final class ModuleGeoMaxMind final : public Module { - private: +private: GeolocationAPIImpl geoapi; - public: +public: ModuleGeoMaxMind() : Module(VF_VENDOR, "Allows the server to perform geolocation lookups on both IP addresses and users.") , geoapi(this) diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index bce1b446f..123ef2626 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -56,7 +56,7 @@ class LDAPService; class LDAPRequest { - public: +public: LDAPService* service; LDAPInterface* inter; LDAPMessage* message = nullptr; /* message returned by ldap_ */ @@ -91,7 +91,7 @@ class LDAPBind final { std::string who, pass; - public: +public: LDAPBind(LDAPService* s, LDAPInterface* i, const std::string& w, const std::string& p) : LDAPRequest(s, i, LDAP_SUCCESS) , who(w) @@ -111,7 +111,7 @@ class LDAPSearch final int searchscope; std::string filter; - public: +public: LDAPSearch(LDAPService* s, LDAPInterface* i, const std::string& b, int se, const std::string& f) : LDAPRequest(s, i, LDAP_SUCCESS) , base(b) @@ -131,7 +131,7 @@ class LDAPAdd final std::string dn; LDAPMods attributes; - public: +public: LDAPAdd(LDAPService* s, LDAPInterface* i, const std::string& d, const LDAPMods& attr) : LDAPRequest(s, i, LDAP_SUCCESS) , dn(d) @@ -149,7 +149,7 @@ class LDAPDel final { std::string dn; - public: +public: LDAPDel(LDAPService* s, LDAPInterface* i, const std::string& d) : LDAPRequest(s, i, LDAP_SUCCESS) , dn(d) @@ -167,7 +167,7 @@ class LDAPModify final std::string base; LDAPMods attributes; - public: +public: LDAPModify(LDAPService* s, LDAPInterface* i, const std::string& b, const LDAPMods& attr) : LDAPRequest(s, i, LDAP_SUCCESS) , base(b) @@ -185,7 +185,7 @@ class LDAPCompare final { std::string dn, attr, val; - public: +public: LDAPCompare(LDAPService* s, LDAPInterface* i, const std::string& d, const std::string& a, const std::string& v) : LDAPRequest(s, i, LDAP_COMPARE_TRUE) , dn(d) @@ -209,7 +209,7 @@ class LDAPService final int searchscope; time_t timeout; - public: +public: static LDAPMod** BuildMods(const LDAPMods& attributes) { LDAPMod** mods = new LDAPMod*[attributes.size() + 1]; @@ -258,7 +258,7 @@ class LDAPService final delete[] mods; } - private: +private: void Reconnect() { // Only try one connect a minute. It is an expensive blocking operation @@ -288,7 +288,7 @@ class LDAPService final this->UnlockQueueWakeup(); } - public: +public: typedef std::vector query_queue; query_queue queries, results; std::mutex process_mutex; /* held when processing requests not in either queue */ @@ -408,7 +408,7 @@ class LDAPService final QueueRequest(comp); } - private: +private: void BuildReply(int res, LDAPRequest* req) { LDAPResult* ldap_result = req->result = new LDAPResult(); @@ -507,7 +507,7 @@ class LDAPService final process_mutex.unlock(); } - public: +public: void OnStart() override { while (!this->IsStopping()) @@ -556,7 +556,7 @@ class ModuleLDAP final typedef insp::flat_map ServiceMap; ServiceMap LDAPServices; - public: +public: void ReadConfig(ConfigStatus& status) override { ServiceMap conns; diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 23bbdce3d..62d411f7a 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -126,7 +126,7 @@ typedef std::deque ResultQueue; class ModuleSQL final : public Module { - public: +public: DispatcherThread* Dispatcher = nullptr; QueryQueue qq; // MUST HOLD MUTEX ResultQueue rq; // MUST HOLD MUTEX @@ -142,9 +142,9 @@ class ModuleSQL final class DispatcherThread final : public SocketThread { - private: +private: ModuleSQL* const Parent; - public: +public: DispatcherThread(ModuleSQL* CreatorModule) : Parent(CreatorModule) { } void OnStart() override; void OnNotify() override; @@ -155,7 +155,7 @@ class DispatcherThread final class MySQLresult final : public SQL::Result { - public: +public: SQL::Error err; int currentrow = 0; int rows = 0; @@ -265,7 +265,7 @@ class MySQLresult final class SQLConnection final : public SQL::Provider { - private: +private: bool EscapeString(SQL::Query* query, const std::string& in, std::string& out) { // In the worst case each character may need to be encoded as using two bytes and one @@ -290,7 +290,7 @@ class SQLConnection final return true; } - public: +public: std::shared_ptr config; MYSQL* connection = nullptr; std::mutex lock; diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 998c25630..81ae07c06 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -76,9 +76,9 @@ enum SQLstatus class ReconnectTimer final : public Timer { - private: +private: ModulePgSQL* mod; - public: +public: ReconnectTimer(ModulePgSQL* m) : Timer(5, false), mod(m) { } @@ -115,7 +115,7 @@ class PgSQLresult final colnames[i] = PQfname(res, i); } } - public: +public: PgSQLresult(PGresult* result) : res(result) { @@ -188,7 +188,7 @@ class SQLConn final : public SQL::Provider , public EventHandler { - public: +public: std::shared_ptr conf; /* The entry */ std::deque queue; PGconn* sql = nullptr; /* PgSQL database connection handle */ @@ -528,7 +528,7 @@ restart: class ModulePgSQL final : public Module { - public: +public: ConnMap connections; ReconnectTimer* retimer = nullptr; diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp index 681dd4021..24015faae 100644 --- a/src/modules/extra/m_regex_pcre.cpp +++ b/src/modules/extra/m_regex_pcre.cpp @@ -39,10 +39,10 @@ class PCREPattern final : public Regex::Pattern { - private: +private: pcre2_code* regex; - public: +public: PCREPattern(const Module* mod, const std::string& pattern, uint8_t options) : Regex::Pattern(pattern, options) { @@ -78,10 +78,10 @@ class PCREPattern final class ModuleRegexPCRE final : public Module { - private: +private: Regex::SimpleEngine regex; - public: +public: ModuleRegexPCRE() : Module(VF_VENDOR, "Provides the pcre regular expression engine which uses the PCRE library.") , regex(this, "pcre") diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp index bbde6ab35..a65bf1f1b 100644 --- a/src/modules/extra/m_regex_posix.cpp +++ b/src/modules/extra/m_regex_posix.cpp @@ -31,10 +31,10 @@ class POSIXPattern final : public Regex::Pattern { - private: +private: regex_t regex; - public: +public: POSIXPattern(const Module* mod, const std::string& pattern, uint8_t options) : Regex::Pattern(pattern, options) { @@ -71,10 +71,10 @@ class POSIXPattern final class ModuleRegexPOSIX final : public Module { - private: +private: Regex::SimpleEngine regex; - public: +public: ModuleRegexPOSIX() : Module(VF_VENDOR, "Provides the posix regular expression engine which uses the POSIX.2 regular expression matching system.") , regex(this, "posix") diff --git a/src/modules/extra/m_regex_re2.cpp b/src/modules/extra/m_regex_re2.cpp index fc94a61c2..0ac7704a9 100644 --- a/src/modules/extra/m_regex_re2.cpp +++ b/src/modules/extra/m_regex_re2.cpp @@ -34,7 +34,7 @@ class RE2Pattern final : public Regex::Pattern { - private: +private: RE2 regex; RE2::Options BuildOptions(uint8_t options) @@ -45,7 +45,7 @@ class RE2Pattern final return re2options; } - public: +public: RE2Pattern(const Module* mod, const std::string& pattern, uint8_t options) : Regex::Pattern(pattern, options) , regex(pattern, BuildOptions(options)) @@ -63,10 +63,10 @@ class RE2Pattern final class ModuleRegexRE2 final : public Module { - private: +private: Regex::SimpleEngine regex; - public: +public: ModuleRegexRE2() : Module(VF_VENDOR, "Provides the re2 regular expression engine which uses the RE2 library.") , regex(this, "re2") diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 879585e2e..9459a84cf 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -49,7 +49,7 @@ typedef insp::flat_map ConnMap; class SQLite3Result final : public SQL::Result { - public: +public: int currentrow = 0; int rows = 0; std::vector columns; @@ -100,7 +100,7 @@ class SQLConn final sqlite3* conn; std::shared_ptr config; - public: +public: SQLConn(Module* Parent, std::shared_ptr tag) : SQL::Provider(Parent, tag->getString("id")) , config(tag) @@ -231,10 +231,10 @@ class SQLConn final class ModuleSQLite3 final : public Module { - private: +private: ConnMap conns; - public: +public: ModuleSQLite3() : Module(VF_VENDOR, "Provides the ability for SQL modules to query a SQLite 3 database.") { diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index c6237c574..4d9f9475b 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -76,7 +76,7 @@ namespace GnuTLS class Init final { - public: + public: Init() { gnutls_global_init(); } ~Init() { gnutls_global_deinit(); } }; @@ -84,7 +84,7 @@ namespace GnuTLS class Exception final : public ModuleException { - public: + public: Exception(const std::string& msg) : ModuleException(thismod, msg) { @@ -107,7 +107,7 @@ namespace GnuTLS { gnutls_datum_t datum; - public: + public: Datum(const std::string& dat) { datum.data = (unsigned char*)dat.data(); @@ -121,7 +121,7 @@ namespace GnuTLS { gnutls_digest_algorithm_t hash; - public: + public: // Nothing to deallocate, constructor may throw freely Hash(const std::string& hashname) { @@ -151,7 +151,7 @@ namespace GnuTLS ThrowOnError(gnutls_dh_params_init(&dh_params), "gnutls_dh_params_init() failed"); } - public: + public: /** Import */ static std::shared_ptr Import(const std::string& dhstr) { @@ -176,7 +176,7 @@ namespace GnuTLS */ class RAIIKey final { - public: + public: gnutls_x509_privkey_t key; RAIIKey() @@ -190,7 +190,7 @@ namespace GnuTLS } } key; - public: + public: /** Import */ X509Key(const std::string& keystr) { @@ -205,7 +205,7 @@ namespace GnuTLS { std::vector certs; - public: + public: /** Import */ X509CertList(const std::string& certstr) { @@ -243,7 +243,7 @@ namespace GnuTLS { class RAIICRL final { - public: + public: gnutls_x509_crl_t crl; RAIICRL() @@ -257,7 +257,7 @@ namespace GnuTLS } } crl; - public: + public: /** Import */ X509CRL(const std::string& crlstr) { @@ -272,7 +272,7 @@ namespace GnuTLS { gnutls_priority_t priority; - public: + public: Priority(const std::string& priorities) { // Try to set the priorities for ciphers, kex methods etc. to the user supplied string @@ -341,10 +341,10 @@ namespace GnuTLS std::shared_ptr dh; #endif - protected: + protected: gnutls_certificate_credentials_t cred; - public: + public: CertCredentials() { ThrowOnError(gnutls_certificate_allocate_credentials(&cred), "Cannot allocate certificate credentials"); @@ -394,7 +394,7 @@ namespace GnuTLS static int cert_callback(gnutls_session_t session, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st); - public: + public: X509Credentials(const std::string& certstr, const std::string& keystr) : key(keystr) , certs(certstr) @@ -435,7 +435,7 @@ namespace GnuTLS #ifdef INSPIRCD_GNUTLS_HAS_RECV_PACKET gnutls_packet_t packet; - public: + public: DataReader(gnutls_session_t sess) { // Using the packet API avoids the final copy of the data which GnuTLS does if we supply @@ -456,7 +456,7 @@ namespace GnuTLS #else char* const buffer; - public: + public: DataReader(gnutls_session_t sess) : buffer(ServerInstance->GetReadBuffer()) { @@ -538,7 +538,7 @@ namespace GnuTLS return priostr; } - public: + public: struct Config final { std::string name; @@ -628,7 +628,7 @@ namespace GnuTLS class GnuTLSIOHook final : public SSLIOHook { - private: +private: gnutls_session_t sess = nullptr; #ifdef INSPIRCD_GNUTLS_HAS_CORK size_t gbuffersize = 0; @@ -904,7 +904,7 @@ info_done_dealloc: return ret; } - public: +public: GnuTLSIOHook(std::shared_ptr hookprov, StreamSocket* sock, unsigned int flags) : SSLIOHook(hookprov) { @@ -1077,7 +1077,7 @@ class GnuTLSIOHookProvider final { GnuTLS::Profile profile; - public: +public: GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) @@ -1165,7 +1165,7 @@ class ModuleSSLGnuTLS final profiles.swap(newprofiles); } - public: +public: ModuleSSLGnuTLS() : Module(VF_VENDOR, "Allows TLS encrypted connections using the GnuTLS library.") { diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 385829750..8e4f01086 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -58,7 +58,7 @@ namespace mbedTLS class Exception final : public ModuleException { - public: + public: Exception(const std::string& msg) : ModuleException(thismod, msg) { @@ -87,7 +87,7 @@ namespace mbedTLS { T obj; - public: + public: RAIIObj() { init(&obj); @@ -107,7 +107,7 @@ namespace mbedTLS class CTRDRBG final : private RAIIObj { - public: + public: bool Seed(Entropy& entropy) { return (mbedtls_ctr_drbg_seed(get(), mbedtls_entropy_func, entropy.get(), NULL, 0) == 0); @@ -122,7 +122,7 @@ namespace mbedTLS class DHParams final : public RAIIObj { - public: + public: void set(const std::string& dhstr) { // Last parameter is buffer size, must include the terminating null @@ -134,7 +134,7 @@ namespace mbedTLS class X509Key final : public RAIIObj { - public: + public: /** Import */ X509Key(const std::string& keystr) { @@ -153,7 +153,7 @@ namespace mbedTLS { std::vector list; - public: + public: Ciphersuites(const std::string& str) { // mbedTLS uses the ciphersuite format "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256" internally. @@ -181,7 +181,7 @@ namespace mbedTLS { std::vector list; - public: + public: Curves(const std::string& str) { irc::sepstream ss(str, ':'); @@ -202,7 +202,7 @@ namespace mbedTLS class X509CertList final : public RAIIObj { - public: + public: /** Import or create empty */ X509CertList(const std::string& certstr, bool allowempty = false) { @@ -218,7 +218,7 @@ namespace mbedTLS class X509CRL final : public RAIIObj { - public: + public: X509CRL(const std::string& crlstr) { if (crlstr.empty()) @@ -238,7 +238,7 @@ namespace mbedTLS */ X509CertList certs; - public: + public: X509Credentials(const std::string& certstr, const std::string& keystr) : key(keystr) , certs(certstr) @@ -282,7 +282,7 @@ namespace mbedTLS } #endif - public: + public: Context(CTRDRBG& ctrdrbg, unsigned int endpoint) { mbedtls_ssl_config_init(&conf); @@ -355,7 +355,7 @@ namespace mbedTLS */ mutable std::vector buf; - public: + public: Hash(std::string hashstr) { std::transform(hashstr.begin(), hashstr.end(), hashstr.begin(), ::toupper); @@ -406,7 +406,7 @@ namespace mbedTLS */ const unsigned int outrecsize; - public: + public: struct Config final { const std::string name; @@ -534,7 +534,7 @@ namespace mbedTLS class mbedTLSIOHook final : public SSLIOHook { - private: +private: mbedtls_ssl_context sess; void CloseSession() @@ -688,7 +688,7 @@ class mbedTLSIOHook final return int(ret); } - public: +public: mbedTLSIOHook(std::shared_ptr hookprov, StreamSocket* sock, bool isserver) : SSLIOHook(hookprov) { @@ -834,7 +834,7 @@ class mbedTLSIOHookProvider final { mbedTLS::Profile profile; - public: +public: mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) @@ -868,7 +868,7 @@ mbedTLS::Profile& mbedTLSIOHook::GetProfile() class ModuleSSLmbedTLS final : public Module { - private: +private: typedef std::vector> ProfileList; mbedTLS::Entropy entropy; @@ -923,7 +923,7 @@ class ModuleSSLmbedTLS final profiles.swap(newprofiles); } - public: +public: ModuleSSLmbedTLS() : Module(VF_VENDOR, "Allows TLS encrypted connections using the mbedTLS library.") { diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 9ee81877f..dc196e00d 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -73,7 +73,7 @@ namespace OpenSSL class Exception final : public ModuleException { - public: + public: Exception(const std::string& msg) : ModuleException(thismod, msg) { @@ -85,7 +85,7 @@ namespace OpenSSL { DH* dh; - public: + public: DHParams(const std::string& filename) { BIO* dhpfile = BIO_new_file(filename.c_str(), "r"); @@ -116,7 +116,7 @@ namespace OpenSSL SSL_CTX* const ctx; long ctx_options; - public: + public: Context(SSL_CTX* context) : ctx(context) { @@ -358,7 +358,7 @@ namespace OpenSSL ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "%s %s context options: %ld", name.c_str(), ctxname.c_str(), final); } - public: + public: Profile(const std::string& profilename, std::shared_ptr tag) : name(profilename) #ifndef INSPIRCD_OPENSSL_AUTO_DH @@ -516,7 +516,7 @@ static int OnVerify(int preverify_ok, X509_STORE_CTX *ctx) class OpenSSLIOHook final : public SSLIOHook { - private: +private: SSL* sess; bool data_to_write = false; @@ -681,7 +681,7 @@ class OpenSSLIOHook final // Calls our private SSLInfoCallback() friend void StaticSSLInfoCallback(const SSL* ssl, int where, int rc); - public: +public: OpenSSLIOHook(std::shared_ptr hookprov, StreamSocket* sock, SSL* session) : SSLIOHook(hookprov) , sess(session) @@ -904,7 +904,7 @@ class OpenSSLIOHookProvider final { OpenSSL::Profile profile; - public: +public: OpenSSLIOHookProvider(Module* mod, const std::string& profilename, std::shared_ptr tag) : SSLIOHookProvider(mod, profilename) , profile(profilename, tag) @@ -983,7 +983,7 @@ class ModuleSSLOpenSSL final profiles.swap(newprofiles); } - public: +public: ModuleSSLOpenSSL() : Module(VF_VENDOR, "Allows TLS encrypted connections using the OpenSSL library.") { diff --git a/src/modules/extra/m_sslrehashsignal.cpp b/src/modules/extra/m_sslrehashsignal.cpp index d975be453..3f90bf86d 100644 --- a/src/modules/extra/m_sslrehashsignal.cpp +++ b/src/modules/extra/m_sslrehashsignal.cpp @@ -25,13 +25,13 @@ static volatile sig_atomic_t signaled; class ModuleSSLRehashSignal final : public Module { - private: +private: static void SignalHandler(int) { signaled = 1; } - public: +public: ModuleSSLRehashSignal() : Module(VF_VENDOR, "Allows the SIGUSR1 signal to be sent to the server to reload TLS certificates.") { diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index 910f551ac..dfed73020 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -32,7 +32,7 @@ enum class ModuleAbbreviation final : public Module { - public: +public: ModuleAbbreviation() : Module(VF_VENDOR, "Allows commands to be abbreviated by appending a full stop.") { diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 4a5f24cf1..70b302f6e 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -31,7 +31,7 @@ */ class Alias final { - public: +public: /** The text of the alias command */ std::string AliasedCommand; @@ -80,7 +80,7 @@ class ModuleAlias final // Whether we are actively executing an alias. bool active = false; - public: +public: void ReadConfig(ConfigStatus& status) override { AliasMap newAliases; diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp index 07e853f3f..91fd0dc37 100644 --- a/src/modules/m_allowinvite.cpp +++ b/src/modules/m_allowinvite.cpp @@ -29,11 +29,11 @@ class ModuleAllowInvite final : public Module { - private: +private: ExtBan::Acting extban; SimpleChannelMode ni; - public: +public: ModuleAllowInvite() : Module(VF_VENDOR, "Adds channel mode A (allowinvite) which allows unprivileged users to use the /INVITE command and extended ban A: (blockinvite) which bans specific masks from using the /INVITE command.") , extban(this, "blockinvite", 'A') diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index ee60d32b6..88c00783b 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -29,7 +29,7 @@ class CommandAlltime final : public Command { - public: +public: CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0) { access_needed = CmdAccess::OPERATOR; @@ -56,10 +56,10 @@ class CommandAlltime final class Modulealltime final : public Module { - private: +private: CommandAlltime mycommand; - public: +public: Modulealltime() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /ALLTIME command which allows server operators to see the current UTC time on all of the servers on the network.") , mycommand(this) diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp index 3d8f2c8ba..aad53b7a1 100644 --- a/src/modules/m_anticaps.cpp +++ b/src/modules/m_anticaps.cpp @@ -32,7 +32,7 @@ enum AntiCapsMethod class AntiCapsSettings final { - public: +public: const AntiCapsMethod method; const uint16_t minlen; const uint8_t percent; @@ -48,7 +48,7 @@ class AntiCapsSettings final class AntiCapsMode final : public ParamMode> { - private: +private: bool ParseMethod(irc::sepstream& stream, AntiCapsMethod& method) { std::string methodstr; @@ -99,7 +99,7 @@ class AntiCapsMode final return true; } - public: +public: AntiCapsMode(Module* Creator) : ParamMode >(Creator, "anticaps", 'B') { @@ -154,7 +154,7 @@ class AntiCapsMode final class ModuleAntiCaps final : public Module { - private: +private: ChanModeReference banmode; CheckExemption::EventProvider exemptionprov; std::bitset uppercase; @@ -178,7 +178,7 @@ class ModuleAntiCaps final user->WriteNumeric(Numerics::CannotSendTo(channel, message + " and was blocked.")); } - public: +public: ModuleAntiCaps() : Module(VF_VENDOR | VF_COMMON, "Adds channel mode B (anticaps) which allows channels to block messages which are excessively capitalised.") , banmode(this, "ban") diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 052d3fe6d..979173d0b 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -31,7 +31,7 @@ class AuditoriumMode final : public SimpleChannelMode { - public: +public: AuditoriumMode(Module* Creator) : SimpleChannelMode(Creator, "auditorium", 'u') { @@ -55,7 +55,7 @@ class JoinHook final ModuleAuditorium* const parentmod; bool active; - public: +public: JoinHook(ModuleAuditorium* mod); void OnEventInit(const ClientProtocol::Event& ev) override; ModResult OnPreEventSend(LocalUser* user, const ClientProtocol::Event& ev, ClientProtocol::MessageList& messagelist) override; @@ -75,7 +75,7 @@ class ModuleAuditorium final bool OperCanSee; JoinHook joinhook; - public: +public: ModuleAuditorium() : Module(VF_VENDOR, "Adds channel mode u (auditorium) which hides unprivileged users in a channel from each other.") , Names::EventListener(this) diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 57a3a648a..d19197a81 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -34,7 +34,7 @@ enum class AutoOpList final : public ListModeBase { - public: +public: AutoOpList(Module* Creator) : ListModeBase(Creator, "autoop", 'w', "End of Channel Access List", RPL_ACCESSLIST, RPL_ENDOFACCESSLIST, true) { @@ -89,7 +89,7 @@ class ModuleAutoOp final { AutoOpList mh; - public: +public: ModuleAutoOp() : Module(VF_VENDOR, "Adds channel mode w (autoop) which allows channel operators to define an access list which gives status ranks to users on join.") , mh(this) diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index f742464fd..ca0ef5ba3 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -39,7 +39,7 @@ enum class BanException final : public ListModeBase { - public: +public: BanException(Module* Creator) : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", RPL_EXCEPTLIST, RPL_ENDOFEXCEPTLIST, true) { @@ -52,10 +52,10 @@ class ModuleBanException final , public ExtBan::EventListener , public ISupport::EventListener { - private: +private: BanException be; - public: +public: ModuleBanException() : Module(VF_VENDOR, "Adds channel mode e (banexception) which allows channel operators to exempt user masks from channel mode b (ban).") , ExtBan::EventListener(this) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index dfa44d68b..1926bf464 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -37,7 +37,7 @@ class BanRedirectEntry final { - public: +public: std::string targetchan; std::string banmask; @@ -52,7 +52,7 @@ typedef std::vector BanRedirectList; class BanRedirect final : public ModeWatcher { - public: +public: ChanModeReference banmode; SimpleExtItem redirectlist; @@ -250,13 +250,13 @@ class BanRedirect final class ModuleBanRedirect final : public Module { - private: +private: BanRedirect banwatcher; bool nofollow = false; ChanModeReference limitmode; ChanModeReference redirectmode; - public: +public: ModuleBanRedirect() : Module(VF_VENDOR | VF_COMMON, "Allows specifying a channel to redirect a banned user to in the ban mask.") , banwatcher(this) diff --git a/src/modules/m_bcrypt.cpp b/src/modules/m_bcrypt.cpp index c6eebbb96..c6615a728 100644 --- a/src/modules/m_bcrypt.cpp +++ b/src/modules/m_bcrypt.cpp @@ -28,7 +28,7 @@ class BCryptProvider final : public HashProvider { - private: +private: std::string Salt() { char entropy[16]; @@ -42,7 +42,7 @@ class BCryptProvider final return salt; } - public: +public: unsigned long rounds = 10; std::string Generate(const std::string& data, const std::string& salt) @@ -76,10 +76,10 @@ class BCryptProvider final class ModuleBCrypt final : public Module { - private: +private: BCryptProvider bcrypt; - public: +public: ModuleBCrypt() : Module(VF_VENDOR, "Allows other modules to generate bcrypt hashes.") , bcrypt(this) diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index cdca8d84d..698ad6f86 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -37,7 +37,7 @@ enum BlockAction { IBLOCK_KILL, IBLOCK_KILLOPERS, IBLOCK_NOTICE, IBLOCK_NOTICEOP */ class BlockedMessage final { - public: +public: std::string message; std::string target; time_t sent; @@ -55,7 +55,7 @@ class ModuleBlockAmsg final BlockAction action; SimpleExtItem blockamsg; - public: +public: ModuleBlockAmsg() : Module(VF_VENDOR, "Blocks mass messages sent using the /AME and /AMSG commands that exist in clients such as mIRC and HexChat.") , blockamsg(this, "blockamsg", ExtensionType::USER) diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index b05c050a2..82e5b09e1 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -34,12 +34,12 @@ class ModuleBlockColor final : public Module { - private: +private: ExtBan::Acting extban; CheckExemption::EventProvider exemptionprov; SimpleChannelMode bc; - public: +public: ModuleBlockColor() : Module(VF_VENDOR, "Adds channel mode c (blockcolor) which allows channels to block messages which contain IRC formatting codes.") , extban(this, "blockcolor", 'c') diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index d0175369c..95100ae0f 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -32,11 +32,11 @@ class BotTag final : public ClientProtocol::MessageTagProvider { - private: +private: SimpleUserMode& botmode; CTCTags::CapReference ctctagcap; - public: +public: BotTag(Module* mod, SimpleUserMode& bm) : ClientProtocol::MessageTagProvider(mod) , botmode(bm) @@ -63,12 +63,12 @@ class ModuleBotMode final , public Who::EventListener , public Whois::EventListener { - private: +private: SimpleUserMode bm; BotTag tag; bool forcenotice; - public: +public: ModuleBotMode() : Module(VF_VENDOR, "Adds user mode B (bot) which marks users with it set as bots in their /WHOIS response.") , ISupport::EventListener(this) diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 083585c43..a407606ca 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -45,7 +45,7 @@ enum class callerid_data final { - public: +public: typedef insp::flat_set UserSet; typedef std::vector CallerIdDataSet; @@ -333,10 +333,10 @@ public: class CallerIDAPIImpl final : public CallerID::APIBase { - private: +private: CallerIDExtInfo& ext; - public: +public: CallerIDAPIImpl(Module* Creator, CallerIDExtInfo& Ext) : CallerID::APIBase(Creator) , ext(Ext) @@ -355,7 +355,7 @@ class ModuleCallerID final , public CTCTags::EventListener , public ISupport::EventListener { - private: +private: CommandAccept cmd; CallerIDAPIImpl api; SimpleUserMode myumode; diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index ccb01851f..54db7cd51 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -142,7 +142,7 @@ class Cap::ManagerImpl final delete capmoddata; } - public: +public: ManagerImpl(Module* mod, Events::ModuleEventProvider& evprovref) : Cap::Manager(mod) , ReloadModule::EventListener(mod) @@ -346,7 +346,7 @@ void Cap::ExtItem::FromInternal(Extensible* container, const std::string& value) class CapMessage final : public Cap::MessageBase { - public: +public: CapMessage(LocalUser* user, const std::string& subcmd, const std::string& result, bool asterisk) : Cap::MessageBase(subcmd) { @@ -360,7 +360,7 @@ class CapMessage final class CommandCap final : public SplitCommand { - private: +private: Events::ModuleEventProvider evprov; Cap::ManagerImpl manager; ClientProtocol::EventProvider protoevprov; @@ -392,7 +392,7 @@ class CommandCap final user->Send(ev); } - public: +public: BoolExtItem holdext; CommandCap(Module* mod) @@ -461,7 +461,7 @@ class CommandCap final class PoisonCap final : public Cap::Capability { - public: +public: PoisonCap(Module* mod) : Cap::Capability(mod, "inspircd.org/poison") { @@ -477,12 +477,12 @@ class PoisonCap final class ModuleCap final : public Module { - private: +private: CommandCap cmd; PoisonCap poisoncap; Cap::Capability stdrplcap; - public: +public: ModuleCap() : Module(VF_VENDOR, "Implements support for the IRCv3 Client Capability Negotiation extension.") , cmd(this) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 0fa971c96..897bf7bfa 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -74,7 +74,7 @@ public: class CBanFactory final : public XLineFactory { - public: +public: CBanFactory() : XLineFactory("CBAN") { } XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override @@ -91,7 +91,7 @@ class CBanFactory final class CommandCBan final : public Command { - public: +public: CommandCBan(Module* Creator) : Command(Creator, "CBAN", 1, 3) { access_needed = CmdAccess::OPERATOR; @@ -160,7 +160,7 @@ class ModuleCBan final CommandCBan mycommand; CBanFactory f; - public: +public: ModuleCBan() : Module(VF_VENDOR | VF_COMMON, "Adds the /CBAN command which allows server operators to prevent channels matching a glob from being created.") , Stats::EventListener(this) diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index d28c7fa69..b23953c73 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -28,7 +28,7 @@ class ModuleChanCreate final : public Module { - public: +public: ModuleChanCreate() : Module(VF_VENDOR, "Sends a notice to snomasks j (local) and J (remote) when a channel is created.") { diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index a689f1f3b..a96b5f5b6 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -38,7 +38,7 @@ enum class ChanFilter final : public ListModeBase { - public: +public: unsigned long maxlen; ChanFilter(Module* Creator) @@ -86,7 +86,7 @@ class ModuleChanFilter final return NULL; } - public: +public: ModuleChanFilter() : Module(VF_VENDOR, "Adds channel mode g (filter) which allows channel operators to define glob patterns for inappropriate phrases that are not allowed to be used in the channel.") diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index 32768a0b2..da8510c53 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -78,7 +78,7 @@ struct HistoryList final class HistoryMode final : public ParamMode> { - public: +public: unsigned long maxlines; HistoryMode(Module* Creator) : ParamMode >(Creator, "history", 'H') @@ -142,7 +142,7 @@ class ModuleChanHistory final : public Module , public ServerProtocol::BroadcastEventListener { - private: +private: HistoryMode historymode; SimpleUserMode nohistorymode; bool prefixmsg; @@ -191,7 +191,7 @@ class ModuleChanHistory final batchmanager->End(batch); } - public: +public: ModuleChanHistory() : Module(VF_VENDOR, "Adds channel mode H (history) which allows message history to be viewed on joining the channel.") , ServerProtocol::BroadcastEventListener(this) diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index c0be029b1..1171a10c2 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -36,7 +36,7 @@ class ModuleChanLog final typedef insp::flat_multimap ChanLogTargets; ChanLogTargets logstreams; - public: +public: ModuleChanLog() : Module(VF_VENDOR, "Allows messages sent to snomasks to be logged to a channel.") { diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index 23ccdbe67..fbea7d640 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -28,7 +28,7 @@ static std::bitset<256> allowedmap; class NewIsChannelHandler final { - public: +public: static bool Call(const std::string&); }; @@ -53,7 +53,7 @@ class ModuleChannelNames final bool badchan = false; ChanModeReference permchannelmode; - public: +public: ModuleChannelNames() : Module(VF_VENDOR, "Allows the server administrator to define what characters are allowed in channel names.") , rememberer(ServerInstance->Channels.IsChannel) diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index 0a6fa57cb..0658edfdf 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -29,7 +29,7 @@ class ChannelExtBan final : public ExtBan::MatchingBase { - public: +public: ChannelExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "channel", 'j') { @@ -59,10 +59,10 @@ class ChannelExtBan final class ModuleBadChannelExtban final : public Module { - private: +private: ChannelExtBan extban; - public: +public: ModuleBadChannelExtban() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban j: (channel) which checks whether users are in a channel matching the specified glob pattern.") , extban(this) diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index f06355949..ea5ebe16e 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -36,7 +36,7 @@ enum class CheckContext final { - private: +private: User* const user; const std::string& target; @@ -48,7 +48,7 @@ class CheckContext final return timestr; } - public: +public: CheckContext(User* u, const std::string& targetstr) : user(u) , target(targetstr) @@ -108,7 +108,7 @@ class CheckContext final class List final : public Numeric::GenericBuilder<' ', false, Numeric::WriteRemoteNumericSink> { - public: + public: List(CheckContext& context, const char* checktype) : Numeric::GenericBuilder<' ', false, Numeric::WriteRemoteNumericSink>(Numeric::WriteRemoteNumericSink(context.GetUser()), RPL_CHECK, false, (IS_LOCAL(context.GetUser()) ? context.GetUser()->nick.length() : ServerInstance->Config->Limits.MaxNick) + strlen(checktype) + 1) { @@ -153,7 +153,7 @@ class CommandCheck final return ret; } - public: +public: CommandCheck(Module* parent) : Command(parent,"CHECK", 1) , snomaskmode(parent, "snomask") @@ -330,10 +330,10 @@ class CommandCheck final class ModuleCheck final : public Module { - private: +private: CommandCheck cmd; - public: +public: ModuleCheck() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /CHECK command which allows server operators to look up details about a channel, user, IP address, or hostname.") , cmd(this) diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index e9874630c..41d3ea520 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -28,7 +28,7 @@ class CommandChghost final : public Command { - public: +public: std::bitset hostmap; CommandChghost(Module* Creator) @@ -86,10 +86,10 @@ class CommandChghost final class ModuleChgHost final : public Module { - private: +private: CommandChghost cmd; - public: +public: ModuleChgHost() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /CHGHOST command which allows server operators to change the displayed hostname of a user.") , cmd(this) diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 9446fcfdf..3a4f4c888 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -31,7 +31,7 @@ class CommandChgident final : public Command { - public: +public: CommandChgident(Module* Creator) : Command(Creator,"CHGIDENT", 2) { allow_empty_last_param = false; @@ -82,10 +82,10 @@ class CommandChgident final class ModuleChgIdent final : public Module { - private: +private: CommandChgident cmd; - public: +public: ModuleChgIdent() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /CHGIDENT command which allows server operators to change the username (ident) of a user.") , cmd(this) diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index 053f6427d..ea3ef35c8 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -29,7 +29,7 @@ class CommandChgname final : public Command { - public: +public: CommandChgname(Module* Creator) : Command(Creator,"CHGNAME", 2, 2) { allow_empty_last_param = false; @@ -78,10 +78,10 @@ class CommandChgname final class ModuleChgName final : public Module { - private: +private: CommandChgname cmd; - public: +public: ModuleChgName() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /CHGNAME command which allows server operators to change the real name of a user.") , cmd(this) diff --git a/src/modules/m_classban.cpp b/src/modules/m_classban.cpp index 8dcacfea1..5da94dde2 100644 --- a/src/modules/m_classban.cpp +++ b/src/modules/m_classban.cpp @@ -24,11 +24,11 @@ class ClassExtBan final : public ExtBan::MatchingBase { - private: +private: std::string space; std::string underscore; - public: +public: ClassExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "class", 'n') , space(" ") @@ -52,10 +52,10 @@ class ClassExtBan final class ModuleClassBan final : public Module { - private: +private: ClassExtBan extban; - public: +public: ModuleClassBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban n: (class) which check whether users are in a connect class matching the specified glob pattern.") , extban(this) diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index a840037fd..d3a646a3c 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -25,7 +25,7 @@ class CommandClearChan final : public Command { - public: +public: Channel* activechan; CommandClearChan(Module* Creator) @@ -146,10 +146,10 @@ class CommandClearChan final class ModuleClearChan final : public Module { - private: +private: CommandClearChan cmd; - public: +public: ModuleClearChan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /CLEARCHAN command which allows server operators to mass-punish the members of a channel.") , cmd(this) diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index c401d64ae..828262ed0 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -85,7 +85,7 @@ typedef std::vector CloakList; class CloakExtItem final : public SimpleExtItem { - public: +public: CloakExtItem(Module* Creator) : SimpleExtItem(Creator, "cloaks", ExtensionType::USER) { @@ -100,7 +100,7 @@ class CloakExtItem final class CloakUser final : public ModeHandler { - public: +public: bool active = false; CloakExtItem ext; std::string debounce_uid; @@ -196,7 +196,7 @@ class CloakUser final class CommandCloak final : public Command { - public: +public: CommandCloak(Module* Creator) : Command(Creator, "CLOAK", 1) { access_needed = CmdAccess::OPERATOR; @@ -209,7 +209,7 @@ class CommandCloak final class ModuleCloaking final : public Module { - public: +public: CloakUser cu; CommandCloak ck; std::vector cloaks; diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index 78b67bcf1..df447a930 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -22,7 +22,7 @@ class Codepage { - public: +public: enum AllowCharacterResult { // The character is allowed in a nick. @@ -87,7 +87,7 @@ class Codepage class SingleByteCodepage final : public Codepage { - private: +private: typedef std::bitset AllowedChars; // The characters which are allowed in nicknames. @@ -96,7 +96,7 @@ class SingleByteCodepage final // The characters which are allowed at the front of a nickname. AllowedChars allowedfrontchars; - public: +public: AllowCharacterResult AllowCharacter(uint32_t character, bool front) override { // Single byte codepage can, as their name suggests, only be one byte in size. @@ -173,7 +173,7 @@ class ModuleCodepage final : public Module , public ISupport::EventListener { - private: +private: // The currently active codepage. std::unique_ptr codepage; @@ -233,7 +233,7 @@ class ModuleCodepage final RehashHashmap(ServerInstance->Channels.GetChans()); } - public: +public: ModuleCodepage() : Module(VF_VENDOR | VF_COMMON, "Allows the server administrator to define what characters are allowed in nicknames and how characters should be compared in a case insensitive way.") , ISupport::EventListener(this) diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 41d674862..067aeb994 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -28,7 +28,7 @@ class ModuleCommonChans final : public Module , public CTCTags::EventListener { - private: +private: SimpleUserMode mode; ModResult HandleMessage(User* user, const MessageTarget& target) @@ -47,7 +47,7 @@ class ModuleCommonChans final return MOD_RES_DENY; } - public: +public: ModuleCommonChans() : Module(VF_VENDOR, "Adds user mode c (deaf_commonchan) which requires users to have a common channel before they can privately message each other.") , CTCTags::EventListener(this) diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index 4185c7987..ae23214c6 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -42,12 +42,12 @@ static void JoinChannels(LocalUser* u, const std::string& chanlist) class JoinTimer final : public Timer { - private: +private: LocalUser* const user; const std::string channels; SimpleExtItem& ext; - public: +public: JoinTimer(LocalUser* u, SimpleExtItem& ex, const std::string& chans, unsigned int delay) : Timer(delay, false) , user(u), channels(chans), ext(ex) @@ -68,12 +68,12 @@ class JoinTimer final class ModuleConnJoin final : public Module { - private: +private: SimpleExtItem ext; std::string defchans; unsigned int defdelay; - public: +public: ModuleConnJoin() : Module(VF_VENDOR, "Allows the server administrator to force users to join one or more channels on connect.") , ext(this, "join-timer", ExtensionType::USER) diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp index a0df0ae8a..400ced24b 100644 --- a/src/modules/m_conn_umodes.cpp +++ b/src/modules/m_conn_umodes.cpp @@ -26,7 +26,7 @@ class ModuleModesOnConnect final : public Module { - public: +public: ModuleModesOnConnect() : Module(VF_VENDOR, "Allows the server administrator to set user modes on connecting users.") { diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index 7359d9e93..f091af270 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -33,7 +33,7 @@ class ModuleWaitPong final bool killonbadreply; StringExtItem ext; - public: +public: ModuleWaitPong() : Module(VF_VENDOR, "Requires all clients to respond to a PING request before they can fully connect.") , ext(this, "waitpong-cookie", ExtensionType::USER) diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index 7146e0df2..989d1be5b 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -34,7 +34,7 @@ class ModuleConnectBan final , public ServerProtocol::LinkEventListener , public WebIRC::EventListener { - private: +private: typedef std::map ConnectMap; ConnectMap connects; @@ -78,7 +78,7 @@ class ModuleConnectBan final return user->GetClass() && !user->GetClass()->config->getBool("useconnectban", true); } - public: +public: // Stop GCC warnings about the deprecated OnServerSplit event. using ServerProtocol::LinkEventListener::OnServerSplit; diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index b040880e9..1d491a1d9 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -28,7 +28,7 @@ class ModuleConnFlood final : public Module { - private: +private: unsigned long seconds; unsigned long timeout; unsigned long boot_wait; @@ -48,7 +48,7 @@ class ModuleConnFlood final return user->GetClass() && !user->GetClass()->config->getBool("useconnflood", true); } - public: +public: ModuleConnFlood() : Module(VF_VENDOR, "Throttles excessive connections to the server.") { diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 0db6c00c3..fb2b58bd3 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -25,7 +25,7 @@ class CustomPrefixMode final : public PrefixMode { - public: +public: std::shared_ptr tag; CustomPrefixMode(Module* parent, const std::string& Name, char Letter, char Prefix, std::shared_ptr Tag) @@ -46,10 +46,10 @@ class CustomPrefixMode final class ModuleCustomPrefix final : public Module { - private: +private: std::vector modes; - public: +public: ModuleCustomPrefix() : Module(VF_VENDOR, "Allows the server administrator to configure custom channel prefix modes.") { diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 9833c70f7..a27a1d2d0 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -62,7 +62,7 @@ typedef std::multimap CustomVhostMap; class CommandTitle final : public Command { - public: +public: StringExtItem ctitle; CustomVhostMap configs; @@ -100,10 +100,10 @@ class ModuleCustomTitle final : public Module , public Whois::LineEventListener { - private: +private: CommandTitle cmd; - public: +public: ModuleCustomTitle() : Module(VF_VENDOR | VF_OPTCOMMON, "Allows the server administrator to define accounts which can grant a custom title in /WHOIS and an optional virtual host.") , Whois::LineEventListener(this) diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index 4c0d2555a..83b867c0e 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -31,7 +31,7 @@ class CommandCycle final : public SplitCommand { - public: +public: CommandCycle(Module* Creator) : SplitCommand(Creator, "CYCLE", 1) { @@ -82,10 +82,10 @@ class CommandCycle final class ModuleCycle final : public Module { - private: +private: CommandCycle cmd; - public: +public: ModuleCycle() : Module(VF_VENDOR, "Allows channel members to part and rejoin a channel without needing to worry about channel modes such as +i (inviteonly) which might prevent rejoining.") , cmd(this) diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 772103e33..46415164d 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -74,14 +74,14 @@ static const char* const helptext[] = class BannedFileList final { - public: +public: std::string filemask; std::string action; }; class DCCAllow final { - public: +public: std::string nickname; std::string hostmask; time_t set_on; @@ -108,7 +108,7 @@ bannedfilelist bfl; class DCCAllowExt final : public SimpleExtItem { - public: +public: unsigned long maxentries; DCCAllowExt(Module* Creator) @@ -183,7 +183,7 @@ class DCCAllowExt final class CommandDccallow final : public Command { - public: +public: DCCAllowExt& ext; unsigned long defaultlength; CommandDccallow(Module* parent, DCCAllowExt& Ext) @@ -375,13 +375,13 @@ class CommandDccallow final class ModuleDCCAllow final : public Module { - private: +private: DCCAllowExt ext; CommandDccallow cmd; bool blockchat = false; std::string defaultaction; - public: +public: ModuleDCCAllow() : Module(VF_VENDOR | VF_COMMON, "Allows the server administrator to configure what files are allowed to be sent via DCC SEND and allows users to configure who can send them DCC CHAT and DCC SEND requests.") , ext(this) diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 8559c359d..8fc42b942 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -32,7 +32,7 @@ class DeafMode final : public SimpleUserMode { - public: +public: DeafMode(Module* Creator) : SimpleUserMode(Creator, "deaf", 'd') { @@ -54,7 +54,7 @@ class DeafMode final class PrivDeafMode final : public SimpleUserMode { - public: +public: PrivDeafMode(Module* Creator) : SimpleUserMode(Creator, "privdeaf", 'D') { @@ -76,7 +76,7 @@ class ModuleDeaf final : public Module , public CTCTags::EventListener { - private: +private: DeafMode deafmode; PrivDeafMode privdeafmode; std::string deaf_bypasschars; @@ -124,7 +124,7 @@ class ModuleDeaf final return MOD_RES_ALLOW; } - public: +public: ModuleDeaf() : Module(VF_VENDOR, "Adds user mode d (deaf) which prevents users from receiving channel messages.") , CTCTags::EventListener(this) diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 8f5a080f1..d19e03d88 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -33,11 +33,11 @@ class DelayJoinMode final : public SimpleChannelMode { - private: +private: IntExtItem& unjoined; IRCv3::ServerTime::API servertime; - public: +public: DelayJoinMode(Module* Parent, IntExtItem& ext) : SimpleChannelMode(Parent, "delayjoin", 'D') , unjoined(ext) @@ -75,10 +75,10 @@ namespace class JoinHook final : public ClientProtocol::EventHook { - private: +private: const IntExtItem& unjoined; - public: +public: JoinHook(Module* mod, const IntExtItem& unjoinedref) : ClientProtocol::EventHook(mod, "JOIN", 10) , unjoined(unjoinedref) @@ -104,7 +104,7 @@ class ModuleDelayJoin final , public Names::EventListener , public Who::EventListener { - private: +private: IntExtItem unjoined; JoinHook joinhook; DelayJoinMode djm; @@ -122,7 +122,7 @@ class ModuleDelayJoin final } } - public: +public: ModuleDelayJoin() : Module(VF_VENDOR, "Adds channel mode D (delayjoin) which hides JOIN messages from users until they speak.") , CTCTags::EventListener(this) diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 3f1750632..af985e8da 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -26,7 +26,7 @@ class DelayMsgMode final : public ParamMode { - public: +public: IntExtItem jointime; DelayMsgMode(Module* Parent) : ParamMode(Parent, "delaymsg", 'd') @@ -54,12 +54,12 @@ class ModuleDelayMsg final : public Module , public CTCTags::EventListener { - private: +private: DelayMsgMode djm; bool allownotice; ModResult HandleMessage(User* user, const MessageTarget& target, bool notice); - public: +public: ModuleDelayMsg() : Module(VF_VENDOR, "Adds channel mode d (delaymsg) which prevents newly joined users from speaking until the specified number of seconds have passed.") , CTCTags::EventListener(this) diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index a2a64d15b..52da3b51f 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -55,13 +55,13 @@ typedef std::vector GoodChannels; class ModuleDenyChannels final : public Module { - private: +private: BadChannels badchannels; GoodChannels goodchannels; UserModeReference antiredirectmode; ChanModeReference redirectmode; - public: +public: ModuleDenyChannels() : Module(VF_VENDOR, "Allows the server administrator to prevent users from joining channels matching a glob.") , antiredirectmode(this, "antiredirect") diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp index 76fd0c991..32201cfe1 100644 --- a/src/modules/m_disable.cpp +++ b/src/modules/m_disable.cpp @@ -35,7 +35,7 @@ typedef std::bitset<64> ModeStatus; class ModuleDisable final : public Module { - private: +private: CommandList commands; ModeStatus chanmodes; bool fakenonexistent; @@ -75,7 +75,7 @@ class ModuleDisable final ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, buffer); } - public: +public: ModuleDisable() : Module(VF_VENDOR, "Allows commands, channel modes, and user modes to be disabled.") { diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 4f46c7c31..6e00b8ca4 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -159,7 +159,7 @@ public: class DNSBLResolver final : public DNS::Request { - private: +private: irc::sockets::sockaddrs theirsa; std::string theiruid; StringExtItem& nameExt; @@ -183,7 +183,7 @@ class DNSBLResolver final ServerInstance->XLines->ApplyLines(); } - public: +public: DNSBLResolver(DNS::Manager *mgr, Module *me, StringExtItem& match, IntExtItem& ctr, const std::string &hostname, LocalUser* u, std::shared_ptr conf) : DNS::Request(mgr, me, hostname, DNS::QUERY_A, true, conf->timeout) , theirsa(u->client_sa) @@ -355,13 +355,13 @@ class ModuleDNSBL final : public Module , public Stats::EventListener { - private: +private: dynamic_reference DNS; DNSBLEntries dnsbls; StringExtItem nameExt; IntExtItem countExt; - public: +public: ModuleDNSBL() : Module(VF_VENDOR, "Allows the server administrator to check the IP address of connecting users against a DNSBL.") , Stats::EventListener(this) diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index 457fadb75..5973b4433 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -34,7 +34,7 @@ enum class ExemptChanOps final : public ListModeBase { - public: +public: ExemptChanOps(Module* Creator) : ListModeBase(Creator, "exemptchanops", 'X', "End of channel exemptchanops list", RPL_EXEMPTIONLIST, RPL_ENDOFEXEMPTIONLIST, false) { @@ -116,7 +116,7 @@ class ExemptChanOps final class ExemptHandler final : public CheckExemption::EventListener { - public: +public: ExemptChanOps ec; ExemptHandler(Module* me) : CheckExemption::EventListener(me) @@ -157,10 +157,10 @@ class ExemptHandler final class ModuleExemptChanOps final : public Module { - private: +private: ExemptHandler eh; - public: +public: ModuleExemptChanOps() : Module(VF_VENDOR, "Adds channel mode X (exemptchanops) which allows channel operators to grant exemptions to various channel-level restrictions.") , eh(this) diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index dcb7063bf..7477d4db5 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -66,7 +66,7 @@ static Module* thismod; class FilterResult final { - public: +public: Regex::PatternPtr regex; std::string freeform; std::string reason; @@ -172,7 +172,7 @@ class FilterResult final class CommandFilter final : public Command { - public: +public: CommandFilter(Module* f) : Command(f, "FILTER", 1, 5) { @@ -204,7 +204,7 @@ class ModuleFilter final Regex::Engine* factory; void FreeFilters(); - public: +public: CommandFilter filtcommand; Regex::EngineReference RegexEngine; diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index 9b83d5b39..32d9c0ca3 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -40,11 +40,11 @@ typedef std::vector MaskList; // Encapsulates information about an ident host. class IdentHost final { - private: +private: MaskList hostmasks; std::string newident; - public: +public: IdentHost(const MaskList& masks, const std::string& ident) : hostmasks(masks) , newident(ident) @@ -77,14 +77,14 @@ class IdentHost final // Encapsulates information about a WebIRC host. class WebIRCHost final { - private: +private: MaskList hostmasks; std::string fingerprint; std::string password; std::string passhash; TokenList trustedflags; - public: +public: WebIRCHost(const MaskList& masks, const std::string& fp, const std::string& pass, const std::string& hash, const std::string& flags) : hostmasks(masks) , fingerprint(fp) @@ -129,7 +129,7 @@ class WebIRCHost final class CommandHexIP final : public SplitCommand { - public: +public: CommandHexIP(Module* Creator) : SplitCommand(Creator, "HEXIP", 1) { @@ -212,7 +212,7 @@ class CommandHexIP final class GatewayExtBan final : public ExtBan::MatchingBase { - public: +public: StringExtItem gateway; GatewayExtBan(Module* Creator) @@ -231,7 +231,7 @@ class GatewayExtBan final class CommandWebIRC final : public SplitCommand { - public: +public: std::vector hosts; GatewayExtBan extban; StringExtItem realhost; @@ -334,12 +334,12 @@ class ModuleGateway final , public WebIRC::EventListener , public Whois::EventListener { - private: +private: CommandHexIP cmdhexip; CommandWebIRC cmdwebirc; std::vector hosts; - public: +public: ModuleGateway() : Module(VF_VENDOR, "Adds the ability for IRC gateways to forward the real IP address of users connecting through them.") , WebIRC::EventListener(this) diff --git a/src/modules/m_geoban.cpp b/src/modules/m_geoban.cpp index fb1172ba6..ab3194cf2 100644 --- a/src/modules/m_geoban.cpp +++ b/src/modules/m_geoban.cpp @@ -26,10 +26,10 @@ class CountryExtBan final : public ExtBan::MatchingBase { - private: +private: Geolocation::API& geoapi; - public: +public: CountryExtBan(Module* Creator, Geolocation::API& api) : ExtBan::MatchingBase(Creator, "country", 'G') , geoapi(api) @@ -50,11 +50,11 @@ class ModuleGeoBan final : public Module , public Whois::EventListener { - private: +private: Geolocation::API geoapi; CountryExtBan extban; - public: +public: ModuleGeoBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban G: (country) which matches against two letter country codes.") , Whois::EventListener(this) diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp index 0fc60351d..f962750d3 100644 --- a/src/modules/m_geoclass.cpp +++ b/src/modules/m_geoclass.cpp @@ -25,10 +25,10 @@ class ModuleGeoClass final : public Module , public Stats::EventListener { - private: +private: Geolocation::API geoapi; - public: +public: ModuleGeoClass() : Module(VF_VENDOR, "Allows the server administrator to assign users to connect classes by the country they are connecting from.") , Stats::EventListener(this) diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 720e42d65..5dc4ef170 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -29,7 +29,7 @@ class CommandGLoadModule final : public Command { - public: +public: CommandGLoadModule(Module* Creator) : Command(Creator,"GLOADMODULE", 1) { @@ -69,7 +69,7 @@ class CommandGLoadModule final class CommandGUnloadModule final : public Command { - public: +public: CommandGUnloadModule(Module* Creator) : Command(Creator,"GUNLOADMODULE", 1) { @@ -121,7 +121,7 @@ class CommandGUnloadModule final class CommandGReloadModule final : public Command { - public: +public: CommandGReloadModule(Module* Creator) : Command(Creator, "GRELOADMODULE", 1) { @@ -163,12 +163,12 @@ class CommandGReloadModule final class ModuleGlobalLoad final : public Module { - private: +private: CommandGLoadModule cmdgloadmodule; CommandGUnloadModule cmdgunloadmodule; CommandGReloadModule cmdgreloadmodule; - public: +public: ModuleGlobalLoad() : Module(VF_VENDOR | VF_COMMON, "Adds the /GLOADMODULE, /GRELOADMODULE, and /GUNLOADMODULE commands which allows server operators to load, reload, and unload modules on remote servers.") , cmdgloadmodule(this) diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index 56d06a8a8..d34b1f931 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -31,7 +31,7 @@ class CommandGlobops final : public Command { - public: +public: CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1) { access_needed = CmdAccess::OPERATOR; @@ -54,10 +54,10 @@ class CommandGlobops final class ModuleGlobops final : public Module { - private: +private: CommandGlobops cmd; - public: +public: ModuleGlobops() : Module(VF_VENDOR, "Adds the /GLOBOPS command which allows server operators to send messages to all server operators with the g (globops) snomask.") , cmd(this) diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index e55a6fc70..db3da710b 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -110,10 +110,10 @@ struct HAProxyHeader final class HAProxyHookProvider final : public IOHookProvider { - private: +private: UserCertificateAPI sslapi; - public: +public: HAProxyHookProvider(Module* mod) : IOHookProvider(mod, "haproxy", IOHookProvider::IOH_UNKNOWN, true) , sslapi(mod) @@ -134,7 +134,7 @@ static constexpr char proxy_signature[13] = "\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x5 class HAProxyHook final : public IOHookMiddle { - private: +private: // The length of the address section. uint16_t address_length; @@ -376,7 +376,7 @@ class HAProxyHook final return ReadProxyAddress(sock, destrecvq); } - public: +public: HAProxyHook(std::shared_ptr Prov, StreamSocket* sock, UserCertificateAPI& api) : IOHookMiddle(Prov) , address_length(0) @@ -430,10 +430,10 @@ void HAProxyHookProvider::OnAccept(StreamSocket* sock, irc::sockets::sockaddrs* class ModuleHAProxy final : public Module { - private: +private: std::shared_ptr hookprov; - public: +public: ModuleHAProxy() : Module(VF_VENDOR, "Allows IRC connections to be made using reverse proxies that implement the HAProxy PROXY protocol.") , hookprov(std::make_shared(this)) diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 0984ac91c..19afb3228 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -58,10 +58,10 @@ typedef std::map HelpMap; class CommandHelpop final : public Command { - private: +private: const std::string startkey; - public: +public: HelpMap help; std::string nohelp; @@ -95,7 +95,7 @@ class ModuleHelpop final : public Module , public Whois::EventListener { - private: +private: CommandHelpop cmd; SimpleUserMode ho; diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index 28b41e180..d63da858b 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -31,7 +31,7 @@ class HideChans final : public SimpleUserMode { - public: +public: HideChans(Module* Creator) : SimpleUserMode(Creator, "hidechans", 'I') { @@ -42,11 +42,11 @@ class ModuleHideChans final : public Module , public Whois::LineEventListener { - private: +private: bool AffectsOpers; HideChans hm; - public: +public: ModuleHideChans() : Module(VF_VENDOR, "Adds user mode I (hidechans) which hides the channels users with it set are in from their /WHOIS response.") , Whois::LineEventListener(this) diff --git a/src/modules/m_hidelist.cpp b/src/modules/m_hidelist.cpp index 7dde09e97..a397264a7 100644 --- a/src/modules/m_hidelist.cpp +++ b/src/modules/m_hidelist.cpp @@ -27,7 +27,7 @@ class ListWatcher final // Minimum rank required to view the list const unsigned int minrank; - public: +public: ListWatcher(Module* mod, const std::string& modename, unsigned int rank) : ModeWatcher(mod, modename, MODETYPE_CHANNEL) , minrank(rank) @@ -59,7 +59,7 @@ class ModuleHideList final { std::vector watchers; - public: +public: void ReadConfig(ConfigStatus& status) override { std::vector> newconfigs; diff --git a/src/modules/m_hidemode.cpp b/src/modules/m_hidemode.cpp index b303b1841..b47b3a885 100644 --- a/src/modules/m_hidemode.cpp +++ b/src/modules/m_hidemode.cpp @@ -29,7 +29,7 @@ class Settings final typedef insp::flat_map RanksToSeeMap; RanksToSeeMap rankstosee; - public: +public: unsigned int GetRequiredRank(const ModeHandler& mh) const { RanksToSeeMap::const_iterator it = rankstosee.find(mh.name); @@ -172,7 +172,7 @@ class ModeHook final return HandleResult(finalmsgplist, messagelist); } - public: +public: Settings settings; ModeHook(Module* mod) @@ -185,10 +185,10 @@ class ModeHook final class ModuleHideMode final : public Module { - private: +private: ModeHook modehook; - public: +public: ModuleHideMode() : Module(VF_VENDOR, "Allows mode changes to be hidden from users without a prefix mode ranked equal to or higher than a defined level.") , modehook(this) diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index ae30221dc..27f717aac 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -36,7 +36,7 @@ class HideOper final : public SimpleUserMode { - public: +public: size_t opercount = 0; HideOper(Module* Creator) @@ -64,11 +64,11 @@ class ModuleHideOper final , public Who::EventListener , public Whois::LineEventListener { - private: +private: HideOper hm; bool active = false; - public: +public: ModuleHideOper() : Module(VF_VENDOR, "Adds user mode H (hideoper) which hides the server operator status of a user from unprivileged users.") , Stats::EventListener(this) diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 5016ed5c4..5fe705766 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -29,7 +29,7 @@ // Holds information about a rule. class HostRule final { - public: +public: enum HostChangeAction { // Add the user's account name to their hostname. @@ -42,7 +42,7 @@ class HostRule final HCA_SET }; - private: +private: HostChangeAction action; std::string host; std::string klass; @@ -66,7 +66,7 @@ class HostRule final } } - public: +public: HostRule(std::shared_ptr tag, const std::string& Mask, const std::string& Host) : action(HCA_SET) , host(Host) @@ -141,7 +141,7 @@ private: return buffer; } - public: +public: ModuleHostChange() : Module(VF_VENDOR, "Allows the server administrator to define custom rules for applying hostnames to users.") { diff --git a/src/modules/m_hostcycle.cpp b/src/modules/m_hostcycle.cpp index 6f0300c3d..12b38aa6a 100644 --- a/src/modules/m_hostcycle.cpp +++ b/src/modules/m_hostcycle.cpp @@ -91,7 +91,7 @@ class ModuleHostCycle final } } - public: +public: ModuleHostCycle() : Module(VF_VENDOR, "Sends a fake disconnection and reconnection when a user's username (ident) or hostname changes to allow clients to update their internal caches.") , chghostcap(this, "chghost") diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 78f208c94..6035c62d1 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -63,7 +63,7 @@ class HttpServerSocket final , public Timer , public insp::intrusive_list_node { - private: +private: friend class ModuleHttpServer; http_parser parser; @@ -206,7 +206,7 @@ class HttpServerSocket final return 0; } - public: +public: HttpServerSocket(int newfd, const std::string& IP, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server, unsigned long timeoutsec) : BufferedSocket(newfd) , Timer(timeoutsec) @@ -394,7 +394,7 @@ class HttpServerSocket final class HTTPdAPIImpl final : public HTTPdAPIBase { - public: +public: HTTPdAPIImpl(Module* parent) : HTTPdAPIBase(parent) { @@ -409,13 +409,13 @@ class HTTPdAPIImpl final class ModuleHttpServer final : public Module { - private: +private: HTTPdAPIImpl APIImpl; unsigned long timeoutsec; Events::ModuleEventProvider acleventprov; Events::ModuleEventProvider reqeventprov; - public: +public: ModuleHttpServer() : Module(VF_VENDOR, "Allows the server administrator to serve various useful resources over HTTP.") , APIImpl(this) diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 7510725fe..a9ca979ef 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -28,7 +28,7 @@ class HTTPACL final { - public: +public: std::string path; std::string username; std::string password; @@ -45,11 +45,11 @@ class ModuleHTTPAccessList final : public Module , public HTTPACLEventListener { - private: +private: std::vector acl_list; HTTPdAPI API; - public: +public: ModuleHTTPAccessList() : Module(VF_VENDOR, "Allows the server administrator to control who can access resources served over HTTP with the httpd module.") , HTTPACLEventListener(this) diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index f605d481e..a921aebc2 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -29,10 +29,10 @@ class ModuleHttpConfig final : public Module , public HTTPRequestEventListener { - private: +private: HTTPdAPI API; - public: +public: ModuleHttpConfig() : Module(VF_VENDOR, "Allows the server configuration to be viewed over HTTP via the /config path.") , HTTPRequestEventListener(this) diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 74f0ef8aa..cf9e5f662 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -378,12 +378,12 @@ class ModuleHttpStats final : public Module , public HTTPRequestEventListener { - private: +private: HTTPdAPI API; ISupport::EventProvider isupportevprov; bool enableparams = false; - public: +public: ModuleHttpStats() : Module(VF_VENDOR, "Provides XML-serialised statistics about the server, channels, and users over HTTP via the /stats path.") , HTTPRequestEventListener(this) diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index fec4f1c53..fa4b44930 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -103,7 +103,7 @@ enum class IdentRequestSocket final : public EventHandler { - public: +public: LocalUser *user; /* User we are attached to */ std::string result; /* Holds the ident string if done */ time_t age; @@ -276,7 +276,7 @@ class IdentRequestSocket final class ModuleIdent final : public Module { - private: +private: unsigned long timeout; bool prefixunqueried; SimpleExtItem socket; @@ -300,7 +300,7 @@ class ModuleIdent final user->ChangeIdent(newident); } - public: +public: ModuleIdent() : Module(VF_VENDOR, "Allows the usernames (idents) of users to be looked up using the RFC 1413 Identification Protocol.") , socket(this, "ident-socket", ExtensionType::USER) diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 2e1052577..ca20db943 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -36,7 +36,7 @@ enum class InviteException final : public ListModeBase { - public: +public: InviteException(Module* Creator) : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", RPL_INVEXLIST, RPL_ENDOFINVEXLIST, true) { @@ -48,11 +48,11 @@ class ModuleInviteException final : public Module , public ISupport::EventListener { - private: +private: bool invite_bypass_key; InviteException ie; - public: +public: ModuleInviteException() : Module(VF_VENDOR, "Adds channel mode I (invex) which allows channel operators to exempt user masks from channel mode i (inviteonly).") , ISupport::EventListener(this) diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index 4e50ea059..27663930e 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -27,7 +27,7 @@ class AwayMessage final : public ClientProtocol::Message { - public: +public: AwayMessage(User* user) : ClientProtocol::Message("AWAY", user) { @@ -53,7 +53,7 @@ class JoinHook final { ClientProtocol::Events::Join extendedjoinmsg; - public: +public: const std::string asterisk; ClientProtocol::EventProvider awayprotoev; AwayMessage awaymsg; @@ -118,12 +118,12 @@ class ModuleIRCv3 final , public AccountEventListener , public Away::EventListener { - private: +private: Cap::Capability cap_accountnotify; JoinHook joinhook; ClientProtocol::EventProvider accountprotoev; - public: +public: ModuleIRCv3() : Module(VF_VENDOR, "Provides the IRCv3 account-notify, away-notify, and extended-join client capabilities.") , AccountEventListener(this) diff --git a/src/modules/m_ircv3_accounttag.cpp b/src/modules/m_ircv3_accounttag.cpp index fe81de2cd..20044ebf8 100644 --- a/src/modules/m_ircv3_accounttag.cpp +++ b/src/modules/m_ircv3_accounttag.cpp @@ -26,7 +26,7 @@ class AccountTag final : public IRCv3::CapTag { - public: +public: const std::string* GetValue(const ClientProtocol::Message& msg) const { User* const user = msg.GetSourceUser(); @@ -49,11 +49,11 @@ class AccountTag final class AccountIdTag final : public ClientProtocol::MessageTagProvider { - private: +private: AccountTag& acctag; CTCTags::CapReference ctctagcap; - public: +public: AccountIdTag(Module* mod, AccountTag& tag) : ClientProtocol::MessageTagProvider(mod) , acctag(tag) @@ -79,11 +79,11 @@ class AccountIdTag final class ModuleIRCv3AccountTag final : public Module { - private: +private: AccountTag tag; AccountIdTag idtag; - public: +public: ModuleIRCv3AccountTag() : Module(VF_VENDOR, "Provides the IRCv3 account-tag client capability.") , tag(this) diff --git a/src/modules/m_ircv3_batch.cpp b/src/modules/m_ircv3_batch.cpp index a43066e65..7d81c60a5 100644 --- a/src/modules/m_ircv3_batch.cpp +++ b/src/modules/m_ircv3_batch.cpp @@ -25,7 +25,7 @@ class BatchMessage final : public ClientProtocol::Message { - public: +public: BatchMessage(const IRCv3::Batch::Batch& batch, bool start) : ClientProtocol::Message("BATCH", ServerInstance->Config->GetServerName()) { @@ -97,7 +97,7 @@ class IRCv3::Batch::ManagerImpl final return active_batches.back()->GetId()+1; } - public: +public: ManagerImpl(Module* mod) : Manager(mod) , cap(mod, "batch") @@ -183,10 +183,10 @@ class IRCv3::Batch::ManagerImpl final class ModuleIRCv3Batch final : public Module { - private: +private: IRCv3::Batch::ManagerImpl manager; - public: +public: ModuleIRCv3Batch() : Module(VF_VENDOR, "Provides the IRCv3 batch client capability.") , manager(this) diff --git a/src/modules/m_ircv3_capnotify.cpp b/src/modules/m_ircv3_capnotify.cpp index 519505ce5..4e2cf1863 100644 --- a/src/modules/m_ircv3_capnotify.cpp +++ b/src/modules/m_ircv3_capnotify.cpp @@ -41,7 +41,7 @@ class CapNotify final return true; } - public: +public: CapNotify(Module* mod) : Cap::Capability(mod, "cap-notify") { @@ -51,7 +51,7 @@ class CapNotify final class CapNotifyMessage final : public Cap::MessageBase { - public: +public: CapNotifyMessage(bool add, const std::string& capname) : Cap::MessageBase((add ? "NEW" : "DEL")) { @@ -65,7 +65,7 @@ class CapNotifyValueMessage final std::string s; const std::string::size_type pos; - public: +public: CapNotifyValueMessage(const std::string& capname) : Cap::MessageBase("NEW") , s(capname) @@ -127,7 +127,7 @@ class ModuleIRCv3CapNotify final } } - public: +public: ModuleIRCv3CapNotify() : Module(VF_VENDOR, "Provides the IRCv3 cap-notify client capability.") , Cap::EventListener(this) diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp index ae849855e..df706334f 100644 --- a/src/modules/m_ircv3_chghost.cpp +++ b/src/modules/m_ircv3_chghost.cpp @@ -40,7 +40,7 @@ class ModuleIRCv3ChgHost final IRCv3::WriteNeighborsWithCap(user, protoev, cap, true); } - public: +public: ModuleIRCv3ChgHost() : Module(VF_VENDOR, "Provides the IRCv3 chghost client capability.") , cap(this, "chghost") diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index ef9692d05..3437ed865 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -26,7 +26,7 @@ class CommandTagMsg final : public Command { - private: +private: Cap::Capability& cap; Events::ModuleEventProvider tagevprov; ClientProtocol::EventProvider msgevprov; @@ -202,7 +202,7 @@ class CommandTagMsg final return FirePostEvent(source, msgtarget, msgdetails); } - public: +public: CommandTagMsg(Module* Creator, Cap::Capability& Cap) : Command(Creator, "TAGMSG", 1) , cap(Cap) @@ -270,10 +270,10 @@ class CommandTagMsg final class C2CTags final : public ClientProtocol::MessageTagProvider { - private: +private: Cap::Capability& cap; - public: +public: bool allowclientonlytags; C2CTags(Module* Creator, Cap::Capability& Cap) : ClientProtocol::MessageTagProvider(Creator) @@ -309,7 +309,7 @@ class ModuleIRCv3CTCTags final , public CTCTags::EventListener , public ISupport::EventListener { - private: +private: Cap::Capability cap; CommandTagMsg cmd; C2CTags c2ctags; @@ -327,7 +327,7 @@ class ModuleIRCv3CTCTags final return MOD_RES_PASSTHRU; } - public: +public: ModuleIRCv3CTCTags() : Module(VF_VENDOR | VF_COMMON, "Provides the IRCv3 message-tags client capability.") , CTCTags::EventListener(this) diff --git a/src/modules/m_ircv3_echomessage.cpp b/src/modules/m_ircv3_echomessage.cpp index 4fd2abc59..94b78f930 100644 --- a/src/modules/m_ircv3_echomessage.cpp +++ b/src/modules/m_ircv3_echomessage.cpp @@ -27,11 +27,11 @@ class ModuleIRCv3EchoMessage final : public Module , public CTCTags::EventListener { - private: +private: Cap::Capability cap; ClientProtocol::EventProvider tagmsgprov; - public: +public: ModuleIRCv3EchoMessage() : Module(VF_VENDOR, "Provides the IRCv3 echo-message client capability.") , CTCTags::EventListener(this) diff --git a/src/modules/m_ircv3_invitenotify.cpp b/src/modules/m_ircv3_invitenotify.cpp index 9076599fa..f2f23b069 100644 --- a/src/modules/m_ircv3_invitenotify.cpp +++ b/src/modules/m_ircv3_invitenotify.cpp @@ -26,7 +26,7 @@ class ModuleIRCv3InviteNotify final { Cap::Capability cap; - public: +public: ModuleIRCv3InviteNotify() : Module(VF_VENDOR, "Provides the IRCv3 invite-notify client capability.") , cap(this, "invite-notify") diff --git a/src/modules/m_ircv3_labeledresponse.cpp b/src/modules/m_ircv3_labeledresponse.cpp index 8a249a68b..d4cbbbffe 100644 --- a/src/modules/m_ircv3_labeledresponse.cpp +++ b/src/modules/m_ircv3_labeledresponse.cpp @@ -24,10 +24,10 @@ class LabeledResponseTag final : public ClientProtocol::MessageTagProvider { - private: +private: const Cap::Capability& cap; - public: +public: LocalUser* labeluser = nullptr; std::string label; const std::string labeltag; @@ -68,7 +68,7 @@ class LabeledResponseTag final class ModuleIRCv3LabeledResponse final : public Module { - private: +private: Cap::Capability cap; LabeledResponseTag tag; IRCv3::Batch::API batchmanager; @@ -87,7 +87,7 @@ class ModuleIRCv3LabeledResponse final firstmsg->~Message(); } - public: +public: ModuleIRCv3LabeledResponse() : Module(VF_VENDOR, "Provides support for the IRCv3 Labeled Response specification.") , cap(this, "labeled-response") diff --git a/src/modules/m_ircv3_msgid.cpp b/src/modules/m_ircv3_msgid.cpp index 2a47a0dcb..0dacb91f0 100644 --- a/src/modules/m_ircv3_msgid.cpp +++ b/src/modules/m_ircv3_msgid.cpp @@ -23,10 +23,10 @@ class MsgIdTag final : public ClientProtocol::MessageTagProvider { - private: +private: CTCTags::CapReference ctctagcap; - public: +public: MsgIdTag(Module* mod) : ClientProtocol::MessageTagProvider(mod) , ctctagcap(mod) @@ -54,7 +54,7 @@ class MsgIdGenerator final std::string strid; const std::string::size_type baselen; - public: +public: MsgIdGenerator() : strid(InspIRCd::Format("%s~%lu~", ServerInstance->Config->GetSID().c_str(), ServerInstance->startup_time)) , baselen(strid.length()) @@ -73,7 +73,7 @@ class ModuleMsgId final : public Module , public CTCTags::EventListener { - private: +private: MsgIdTag tag; MsgIdGenerator generator; @@ -93,7 +93,7 @@ class ModuleMsgId final return MOD_RES_PASSTHRU; } - public: +public: ModuleMsgId() : Module(VF_VENDOR, "Provides support for the IRCv3 Message IDs specification.") , CTCTags::EventListener(this) diff --git a/src/modules/m_ircv3_servertime.cpp b/src/modules/m_ircv3_servertime.cpp index e41d02c76..1432114d3 100644 --- a/src/modules/m_ircv3_servertime.cpp +++ b/src/modules/m_ircv3_servertime.cpp @@ -46,7 +46,7 @@ class ServerTimeTag final } } - public: +public: ServerTimeTag(Module* mod) : IRCv3::ServerTime::Manager(mod) , IRCv3::CapTag(mod, "server-time", "time") @@ -74,10 +74,10 @@ class ServerTimeTag final class ModuleIRCv3ServerTime final : public Module { - private: +private: ServerTimeTag tag; - public: +public: ModuleIRCv3ServerTime() : Module(VF_VENDOR, "Provides the IRCv3 server-time client capability.") , tag(this) diff --git a/src/modules/m_ircv3_sts.cpp b/src/modules/m_ircv3_sts.cpp index 3b9794a96..cbfb45464 100644 --- a/src/modules/m_ircv3_sts.cpp +++ b/src/modules/m_ircv3_sts.cpp @@ -25,7 +25,7 @@ class STSCap final : public Cap::Capability { - private: +private: std::string host; std::string plaintextpolicy; std::string securepolicy; @@ -68,7 +68,7 @@ class STSCap final return SSLIOHook::IsSSL(&user->eh) ? &securepolicy : &plaintextpolicy; } - public: +public: STSCap(Module* mod) : Cap::Capability(mod, "sts") { @@ -128,7 +128,7 @@ class STSCap final class ModuleIRCv3STS final : public Module { - private: +private: STSCap cap; // The IRCv3 STS specification requires that the server is listening using TLS using a valid certificate. @@ -151,7 +151,7 @@ class ModuleIRCv3STS final return false; } - public: +public: ModuleIRCv3STS() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds support for the IRCv3 Strict Transport Security specification.") , cap(this) diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 2fff26377..ae78b4fe4 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -39,7 +39,7 @@ static unsigned int duration; */ class joinfloodsettings final { - public: +public: unsigned int secs; unsigned int joins; time_t reset; @@ -98,7 +98,7 @@ class joinfloodsettings final class JoinFlood final : public ParamMode> { - public: +public: JoinFlood(Module* Creator) : ParamMode >(Creator, "joinflood", 'j') { @@ -138,13 +138,13 @@ class ModuleJoinFlood final : public Module , public ServerProtocol::LinkEventListener { - private: +private: JoinFlood jf; time_t ignoreuntil; unsigned long bootwait; unsigned long splitwait; - public: +public: ModuleJoinFlood() : Module(VF_VENDOR, "Adds channel mode j (joinflood) which helps protect against spammers which mass-join channels.") , ServerProtocol::LinkEventListener(this) diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 15ff1cf71..0fcc55339 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -53,7 +53,7 @@ class KickRejoinData final mutable KickedList kicked; - public: +public: const unsigned int delay; KickRejoinData(unsigned int Delay) : delay(Delay) { } @@ -94,7 +94,7 @@ class KickRejoinData final class KickRejoin final : public ParamMode> { - public: +public: const unsigned int max = 60; KickRejoin(Module* Creator) diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index c04f7ca20..26d4e5a64 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -60,7 +60,7 @@ class CommandKnock final SimpleChannelMode& noknockmode; ChanModeReference inviteonlymode; - public: +public: int notify; CommandKnock(Module* Creator, SimpleChannelMode& Noknockmode) @@ -131,7 +131,7 @@ class ModuleKnock final SimpleChannelMode kn; CommandKnock cmd; - public: +public: ModuleKnock() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /KNOCK command which allows users to request access to an invite-only channel and channel mode K (noknock) which allows channels to disable usage of this command.") , kn(this, "noknock", 'K') diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index 96704e2e3..7d38250bd 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -99,7 +99,7 @@ class BindInterface final } } - public: +public: BindInterface(Module* c, const std::string& p, const std::string& u, const std::string& dn) : LDAPInterface(c) , provider(p) @@ -213,7 +213,7 @@ class SearchInterface final const std::string provider; const std::string uid; - public: +public: SearchInterface(Module* c, const std::string& p, const std::string& u) : LDAPInterface(c), provider(p), uid(u) { @@ -269,7 +269,7 @@ class AdminBindInterface final const std::string base; const std::string what; - public: +public: AdminBindInterface(Module* c, const std::string& p, const std::string& u, const std::string& b, const std::string& w) : LDAPInterface(c), provider(p), uuid(u), base(b), what(w) { diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index d6fb979a2..ef48d26e1 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -31,7 +31,7 @@ namespace class LDAPOperBase : public LDAPInterface { - protected: +protected: const std::string uid; const std::string opername; const std::string password; @@ -58,7 +58,7 @@ class LDAPOperBase Fallback(user); } - public: +public: LDAPOperBase(Module* mod, const std::string& uuid, const std::string& oper, const std::string& pass) : LDAPInterface(mod) , uid(uuid), opername(oper), password(pass) @@ -76,7 +76,7 @@ class LDAPOperBase class BindInterface final : public LDAPOperBase { - public: +public: BindInterface(Module* mod, const std::string& uuid, const std::string& oper, const std::string& pass) : LDAPOperBase(mod, uuid, oper, pass) { @@ -127,7 +127,7 @@ class SearchInterface final return true; } - public: +public: SearchInterface(Module* mod, const std::string& prov, const std::string &uuid, const std::string& oper, const std::string& pass) : LDAPOperBase(mod, uuid, oper, pass) , provider(prov) @@ -152,7 +152,7 @@ class AdminBindInterface final const std::string base; const std::string what; - public: +public: AdminBindInterface(Module* c, const std::string& p, const std::string& u, const std::string& o, const std::string& pa, const std::string& b, const std::string& w) : LDAPInterface(c) , provider(p) @@ -195,7 +195,7 @@ class ModuleLDAPOper final std::string base; std::string attribute; - public: +public: ModuleLDAPOper() : Module(VF_VENDOR, "Allows server operators to be authenticated against an LDAP database.") , LDAP(this, "LDAP") diff --git a/src/modules/m_maphide.cpp b/src/modules/m_maphide.cpp index a45dffa81..5e3e6aff8 100644 --- a/src/modules/m_maphide.cpp +++ b/src/modules/m_maphide.cpp @@ -27,10 +27,10 @@ class ModuleMapHide final : public Module { - private: +private: std::string url; - public: +public: ModuleMapHide() : Module(VF_VENDOR, "Allows the server administrator to replace the output of a /MAP and /LINKS with an URL.") { diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index a8d167699..dc627f0e3 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -44,7 +44,7 @@ typedef unsigned char byte; */ class MD5Context final { - public: +public: word32 buf[4]; word32 bytes[2]; word32 in[16]; @@ -237,7 +237,7 @@ class MD5Provider final MD5Final((unsigned char*)dest, &context); } - public: +public: std::string GenerateRaw(const std::string& data) override { char res[16]; @@ -251,10 +251,10 @@ class MD5Provider final class ModuleMD5 final : public Module { - private: +private: MD5Provider md5; - public: +public: ModuleMD5() : Module(VF_VENDOR, "Allows other modules to generate MD5 hashes.") , md5(this) diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 65d7dfba7..3eef2a9dc 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -32,7 +32,7 @@ */ class floodsettings final { - public: +public: bool ban; unsigned int secs; unsigned int lines; @@ -70,7 +70,7 @@ class floodsettings final class MsgFlood final : public ParamMode> { - public: +public: MsgFlood(Module* Creator) : ParamMode >(Creator, "flood", 'f') { @@ -122,7 +122,7 @@ private: double privmsg; double tagmsg; - public: +public: ModuleMsgFlood() : Module(VF_VENDOR, "Adds channel mode f (flood) which helps protect against spammers which mass-message channels.") , CTCTags::EventListener(this) diff --git a/src/modules/m_mlock.cpp b/src/modules/m_mlock.cpp index c6dfa1d2c..5c8f59255 100644 --- a/src/modules/m_mlock.cpp +++ b/src/modules/m_mlock.cpp @@ -33,7 +33,7 @@ class ModuleMLock final { StringExtItem mlock; - public: +public: ModuleMLock() : Module(VF_VENDOR, "Allows services to lock channel modes so that they can not be changed.") , mlock(this, "mlock", ExtensionType::CHANNEL, true) diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index 0972e369f..19f2b66a6 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -63,7 +63,7 @@ class IRCv3::Monitor::Manager final { Manager& manager; - public: + public: ExtItem(Module* mod, const std::string& extname, Manager& managerref) : ExtensionItem(mod, extname, ExtensionType::USER) , manager(managerref) @@ -105,7 +105,7 @@ class IRCv3::Monitor::Manager final } }; - public: +public: Manager(Module* mod, const std::string& extname) : ext(mod, extname, *this) { @@ -188,7 +188,7 @@ class IRCv3::Monitor::Manager final return NULL; } - private: +private: typedef std::unordered_map NickHash; Entry* Find(const std::string& nick) @@ -302,7 +302,7 @@ class CommandMonitor final manager.Unwatch(user, nick); } - public: +public: unsigned long maxmonitor; CommandMonitor(Module* mod, IRCv3::Monitor::Manager& managerref) @@ -368,7 +368,7 @@ class ModuleMonitor final : public Module , public ISupport::EventListener { - private: +private: IRCv3::Monitor::Manager manager; CommandMonitor cmd; @@ -382,7 +382,7 @@ class ModuleMonitor final curr->WriteNumeric(numeric, nick); } - public: +public: ModuleMonitor() : Module(VF_VENDOR, "Adds the /MONITOR command which allows users to find out when their friends are connected to the server.") , ISupport::EventListener(this) diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp index 643a01fcf..aea04ad83 100644 --- a/src/modules/m_muteban.cpp +++ b/src/modules/m_muteban.cpp @@ -30,11 +30,11 @@ class ModuleQuietBan final : public Module , public CTCTags::EventListener { - private: +private: ExtBan::Acting extban; bool notifyuser; - public: +public: ModuleQuietBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban m: (mute) which bans specific masks from speaking in a channel.") , CTCTags::EventListener(this) diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 13cd226f7..6cdc9c814 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -58,7 +58,7 @@ static void DisplayList(LocalUser* user, Channel* channel) class CommandProp final : public SplitCommand { - public: +public: CommandProp(Module* parent) : SplitCommand(parent, "PROP", 1) { @@ -110,7 +110,7 @@ class CommandProp final class DummyZ final : public ModeHandler { - public: +public: DummyZ(Module* parent) : ModeHandler(parent, "namebase", 'Z', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; @@ -128,11 +128,11 @@ class DummyZ final class ModuleNamedModes final : public Module { - private: +private: CommandProp cmd; DummyZ dummyZ; - public: +public: ModuleNamedModes() : Module(VF_VENDOR, "Provides support for adding and removing modes via their long names.") , cmd(this) diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 60bbbe813..ba5a43a0f 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -35,10 +35,10 @@ class ModuleNamesX final , public Who::EventListener , public Whois::LineEventListener { - private: +private: Cap::Capability cap; - public: +public: ModuleNamesX() : Module(VF_VENDOR, "Provides the IRCv3 multi-prefix client capability.") , Names::EventListener(this) diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index a51455248..0d6f5a637 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -39,7 +39,7 @@ class lwbNickHandler final { - public: +public: static bool Call(const std::string&); }; @@ -253,7 +253,7 @@ class ModuleNationalChars final RehashHashmap(ServerInstance->Channels.GetChans()); } - public: +public: ModuleNationalChars() : Module(VF_VENDOR | VF_COMMON, "Allows the server administrator to define what characters are allowed in nicknames and channel names and how those characters should be compared in a case insensitive way.") , rememberer(ServerInstance->IsNick) diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index 14c238947..a3520cb41 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -32,7 +32,7 @@ static unsigned int duration; */ class nickfloodsettings final { - public: +public: unsigned int secs; unsigned int nicks; time_t reset; @@ -86,7 +86,7 @@ class nickfloodsettings final class NickFlood final : public ParamMode> { - public: +public: NickFlood(Module* Creator) : ParamMode >(Creator, "nickflood", 'F') { @@ -126,11 +126,11 @@ class NickFlood final class ModuleNickFlood final : public Module { - private: +private: CheckExemption::EventProvider exemptionprov; NickFlood nf; - public: +public: ModuleNickFlood() : Module(VF_VENDOR, "Adds channel mode F (nickflood) which helps protect against spammers which mass-change nicknames.") , exemptionprov(this) diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index d02df562d..0e912c2ce 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -37,7 +37,7 @@ enum class CommandNicklock final : public Command { - public: +public: BoolExtItem& locked; CommandNicklock (Module* Creator, BoolExtItem& ext) : Command(Creator,"NICKLOCK", 2), locked(ext) @@ -96,7 +96,7 @@ class CommandNicklock final class CommandNickunlock final : public Command { - public: +public: BoolExtItem& locked; CommandNickunlock (Module* Creator, BoolExtItem& ext) : Command(Creator,"NICKUNLOCK", 1), locked(ext) @@ -143,12 +143,12 @@ class CommandNickunlock final class ModuleNickLock final : public Module { - private: +private: BoolExtItem locked; CommandNicklock cmd1; CommandNickunlock cmd2; - public: +public: ModuleNickLock() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /NICKLOCK command which allows server operators to change a user's nickname and prevent them from changing it again until they disconnect.") , locked(this, "nick-locked", ExtensionType::USER) diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 4909f6c65..1a77c3ff3 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -33,13 +33,13 @@ class ModuleNoCTCP final : public Module { - private: +private: CheckExemption::EventProvider exemptionprov; ExtBan::Acting extban; SimpleChannelMode nc; SimpleUserMode ncu; - public: +public: ModuleNoCTCP() : Module(VF_VENDOR, "Adds channel mode C (noctcp) which allows channels to block messages which contain CTCPs and user mode T (u_noctcp) which allows users to block private messages that contain CTCPs.") , exemptionprov(this) diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index a9a77ab10..ab11e9e47 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -31,11 +31,11 @@ class ModuleNoKicks final : public Module { - private: +private: ExtBan::Acting extban; SimpleChannelMode nk; - public: +public: ModuleNoKicks() : Module(VF_VENDOR, "Adds channel mode Q (nokick) which prevents privileged users from using the /KICK command.") , extban(this, "nokick", 'Q') diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index a82fd8365..69c26fc66 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -32,12 +32,12 @@ class ModuleNoNickChange final : public Module { - private: +private: CheckExemption::EventProvider exemptionprov; ExtBan::Acting extban; SimpleChannelMode nn; - public: +public: ModuleNoNickChange() : Module(VF_VENDOR, "Adds channel mode N (nonick) which prevents users from changing their nickname whilst in the channel.") , exemptionprov(this) diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 53fbc86c4..f814fcad9 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -32,12 +32,12 @@ class ModuleNoNotice final : public Module { - private: +private: ExtBan::Acting extban; CheckExemption::EventProvider exemptionprov; SimpleChannelMode nt; - public: +public: ModuleNoNotice() : Module(VF_VENDOR, "Adds channel mode T (nonotice) which allows channels to block messages sent with the /NOTICE command.") , extban(this, "nonotice", 'T') diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index 1474b65de..1319c92d0 100644 --- a/src/modules/m_nopartmsg.cpp +++ b/src/modules/m_nopartmsg.cpp @@ -29,10 +29,10 @@ class ModulePartMsgBan final : public Module { - private: +private: ExtBan::Acting extban; - public: +public: ModulePartMsgBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban p: (partmsg) which blocks the part message of matching users.") , extban(this, "partmsg", 'p') diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 7fc47d3e4..780f41360 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -27,7 +27,7 @@ class CommandOjoin final : public SplitCommand { - public: +public: bool active; bool notice; bool op; @@ -87,7 +87,7 @@ class CommandOjoin final class NetworkPrefix final : public PrefixMode { - public: +public: NetworkPrefix(Module* parent, char NPrefix) : PrefixMode(parent, "official-join", 'Y', NETWORK_VALUE, NPrefix) { @@ -108,11 +108,11 @@ class NetworkPrefix final class ModuleOjoin final : public Module { - private: +private: NetworkPrefix np; CommandOjoin mycommand; - public: +public: ModuleOjoin() : Module(VF_VENDOR, "Adds the /OJOIN command which allows server operators to join a channel and receive the server operator-only Y (official-join) channel prefix mode.") diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index ba4c48767..61e430633 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -35,11 +35,11 @@ enum class OperExtBan final : public ExtBan::MatchingBase { - private: +private: std::string space; std::string underscore; - public: +public: OperExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "oper", 'O') , space(" ") @@ -63,11 +63,11 @@ class OperExtBan final class ModuleOperChans final : public Module { - private: +private: SimpleChannelMode oc; OperExtBan extban; - public: +public: ModuleOperChans() : Module(VF_VENDOR, "Adds channel mode O (operonly) which prevents non-server operators from joining the channel.") , oc(this, "operonly", 'O', true) diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index 6477caa69..3d1ea889a 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -29,10 +29,10 @@ class ModuleOperLog final : public Module { - private: +private: bool tosnomask; - public: +public: ModuleOperLog() : Module(VF_VENDOR, "Allows the server administrator to make the server log when a server operator-only command is executed.") { diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 52fe8a207..7e5e9d45b 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -29,7 +29,7 @@ class ModuleModesOnOper final : public Module { - public: +public: ModuleModesOnOper() : Module(VF_VENDOR, "Allows the server administrator to set user modes on server operators when they log into their server operator account.") { diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index 975e79a0b..7f8680bb7 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -40,7 +40,7 @@ enum class CommandOpermotd final : public Command { - public: +public: file_cache opermotd; CommandOpermotd(Module* Creator) : Command(Creator,"OPERMOTD", 0, 1) @@ -82,11 +82,11 @@ class CommandOpermotd final class ModuleOpermotd final : public Module { - private: +private: CommandOpermotd cmd; bool onoper; - public: +public: ModuleOpermotd() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /OPERMOTD command which adds a special message of the day for server operators.") , cmd(this) diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp index 2336cc687..18100cd78 100644 --- a/src/modules/m_operprefix.cpp +++ b/src/modules/m_operprefix.cpp @@ -49,7 +49,7 @@ class HideOperWatcher final { ModuleOperPrefixMode* parentmod; - public: +public: HideOperWatcher(ModuleOperPrefixMode* parent); void AfterMode(User* source, User* dest, Channel* channel, const Modes::Change& change) override; }; @@ -57,12 +57,12 @@ class HideOperWatcher final class ModuleOperPrefixMode final : public Module { - private: +private: OperPrefixMode opm; HideOperWatcher hideoperwatcher; UserModeReference hideopermode; - public: +public: ModuleOperPrefixMode() : Module(VF_VENDOR, "Adds the server operator-only y (operprefix) channel prefix mode.") , opm(this) diff --git a/src/modules/m_opmoderated.cpp b/src/modules/m_opmoderated.cpp index 30135d19b..1ec279f26 100644 --- a/src/modules/m_opmoderated.cpp +++ b/src/modules/m_opmoderated.cpp @@ -25,7 +25,7 @@ class ModuleOpModerated final : public Module , public CTCTags::EventListener { - private: +private: CheckExemption::EventProvider exemptionprov; ExtBan::Acting extban; SimpleChannelMode mode; @@ -66,7 +66,7 @@ class ModuleOpModerated final return MOD_RES_PASSTHRU; } - public: +public: ModuleOpModerated() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the ability for IRC gateways to forward the real IP address of users connecting through them.") , CTCTags::EventListener(this) diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 15113a8f9..9a24b8966 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -39,7 +39,7 @@ class ModuleOverride final : public Module , public ISupport::EventListener { - private: +private: bool RequireKey; bool NoisyOverride; SimpleUserMode ou; @@ -74,7 +74,7 @@ class ModuleOverride final return MOD_RES_ALLOW; } - public: +public: ModuleOverride() : Module(VF_VENDOR, "Allows server operators to be given privileges that allow them to ignore various channel-level restrictions.") , ISupport::EventListener(this) diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index 6d19080bd..76cdbf64c 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -31,7 +31,7 @@ class ModulePassForward final { std::string nickrequired, forwardmsg, forwardcmd; - public: +public: ModulePassForward() : Module(VF_VENDOR, "Allows an account password to be forwarded to a services pseudoclient such as NickServ.") { diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index 73b2f9809..fcb1a9f2b 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -30,7 +30,7 @@ class CommandMkpasswd final : public Command { - public: +public: CommandMkpasswd(Module* Creator) : Command(Creator, "MKPASSWD", 2) { syntax = { " " }; @@ -87,10 +87,10 @@ class CommandMkpasswd final class ModulePasswordHash final : public Module { - private: +private: CommandMkpasswd cmd; - public: +public: ModulePasswordHash() : Module(VF_VENDOR, "Allows passwords to be hashed and adds the /MKPASSWD command which allows the generation of hashed passwords for use in the server configuration.") , cmd(this) diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp index f34d3ee1b..e6e01fbf9 100644 --- a/src/modules/m_pbkdf2.cpp +++ b/src/modules/m_pbkdf2.cpp @@ -29,7 +29,7 @@ // 10200:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB class PBKDF2Hash final { - public: +public: unsigned long iterations; size_t length; std::string salt; @@ -75,7 +75,7 @@ class PBKDF2Hash final class PBKDF2Provider final : public HashProvider { - public: +public: HashProvider* provider; unsigned long iterations; size_t dkey_length; @@ -202,7 +202,7 @@ class ModulePBKDF2 final ConfigureProviders(); } - public: +public: ModulePBKDF2() : Module(VF_VENDOR, "Allows other modules to generate PBKDF2 hashes.") { diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 2c50f6849..288451927 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -34,7 +34,7 @@ class PermChannel final : public SimpleChannelMode { - public: +public: PermChannel(Module* Creator) : SimpleChannelMode(Creator, "permanent", 'P', true) { diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index 80a76b6ea..b86113d4b 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -27,12 +27,12 @@ class ModuleRandQuote final : public Module { - private: +private: std::string prefix; std::string suffix; std::vector<std::string> quotes; - public: +public: ModuleRandQuote() : Module(VF_VENDOR, "Allows random quotes to be sent to users when they connect to the server.") { diff --git a/src/modules/m_realnameban.cpp b/src/modules/m_realnameban.cpp index be6e1bc39..093cff484 100644 --- a/src/modules/m_realnameban.cpp +++ b/src/modules/m_realnameban.cpp @@ -29,7 +29,7 @@ class RealMaskExtBan final : public ExtBan::MatchingBase { - public: +public: RealMaskExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "realmask", 'a') { @@ -54,7 +54,7 @@ class RealMaskExtBan final class RealNameExtBan final : public ExtBan::MatchingBase { - public: +public: RealNameExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "realname", 'r') { @@ -69,11 +69,11 @@ class RealNameExtBan final class ModuleGecosBan final : public Module { - private: +private: RealMaskExtBan maskextban; RealNameExtBan realextban; - public: +public: ModuleGecosBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended bans a: (realmask) and r:(realname) which checks whether users have a real name matching the specified glob pattern.") , maskextban(this) diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index ecd93bc8f..00f5823d7 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -33,7 +33,7 @@ class Redirect final : public ParamMode<Redirect, StringExtItem> { - public: +public: Redirect(Module* Creator) : ParamMode<Redirect, StringExtItem>(Creator, "redirect", 'L') { @@ -83,12 +83,12 @@ class Redirect final class ModuleRedirect final : public Module { - private: +private: Redirect re; SimpleUserMode antiredirectmode; ChanModeReference limitmode; - public: +public: ModuleRedirect() : Module(VF_VENDOR, "Allows users to be redirected to another channel when the user limit is reached.") , re(this) diff --git a/src/modules/m_regex_glob.cpp b/src/modules/m_regex_glob.cpp index 569a40731..54d287310 100644 --- a/src/modules/m_regex_glob.cpp +++ b/src/modules/m_regex_glob.cpp @@ -29,7 +29,7 @@ class GlobPattern final : public Regex::Pattern { - public: +public: GlobPattern(const Module* mod, const std::string& pattern, uint8_t options) : Regex::Pattern(pattern, options) { @@ -44,10 +44,10 @@ class GlobPattern final class ModuleRegexGlob final : public Module { - private: +private: Regex::SimpleEngine<GlobPattern> regex; - public: +public: ModuleRegexGlob() : Module(VF_VENDOR, "Provides the glob regular expression engine which uses the built-in glob matching system.") , regex(this, "glob") diff --git a/src/modules/m_regex_stdlib.cpp b/src/modules/m_regex_stdlib.cpp index 714ed05aa..0f2d31a61 100644 --- a/src/modules/m_regex_stdlib.cpp +++ b/src/modules/m_regex_stdlib.cpp @@ -28,10 +28,10 @@ class StdLibPattern final : public Regex::Pattern { - private: +private: std::regex regex; - public: +public: StdLibPattern(const Module* mod, const std::string& pattern, uint8_t options, std::regex::flag_type type) : Regex::Pattern(pattern, options) { @@ -59,7 +59,7 @@ class StdLibPattern final class StdLibEngine final : public Regex::Engine { - public: +public: std::regex::flag_type regextype; StdLibEngine(Module* Creator) @@ -76,10 +76,10 @@ class StdLibEngine final class ModuleRegexStdLib final : public Module { - private: +private: StdLibEngine regex; - public: +public: ModuleRegexStdLib() : Module(VF_VENDOR, "Provides the stdregex regular expression engine which uses the C++11 std::regex regular expression matching system.") , regex(this) diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 767073094..0369ec25b 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -45,7 +45,7 @@ class RemoveBase bool& supportnokicks; ChanModeReference& nokicksmode; - public: +public: unsigned long protectedrank; RemoveBase(Module* Creator, bool& snk, ChanModeReference& nkm, const char* cmdn) @@ -168,7 +168,7 @@ class RemoveBase class CommandRemove final : public RemoveBase { - public: +public: CommandRemove(Module* Creator, bool& snk, ChanModeReference& nkm) : RemoveBase(Creator, snk, nkm, "REMOVE") { @@ -185,7 +185,7 @@ class CommandRemove final class CommandFpart final : public RemoveBase { - public: +public: CommandFpart(Module* Creator, bool& snk, ChanModeReference& nkm) : RemoveBase(Creator, snk, nkm, "FPART") { @@ -203,13 +203,13 @@ class ModuleRemove final : public Module , public ISupport::EventListener { - private: +private: ChanModeReference nokicksmode; CommandRemove cmd1; CommandFpart cmd2; bool supportnokicks; - public: +public: ModuleRemove() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /FPART and /REMOVE commands which allows channel operators to force part users from a channel.") , ISupport::EventListener(this) diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 151304c66..bc760499a 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -30,7 +30,7 @@ class ChannelSettings final { - public: +public: enum RepeatAction { ACT_KICK, @@ -69,7 +69,7 @@ class ChannelSettings final class RepeatMode final : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings>> { - private: +private: struct RepeatItem final { time_t ts; @@ -126,7 +126,7 @@ class RepeatMode final return mx[0][l2]; } - public: +public: ModuleSettings ms; SimpleExtItem<MemberInfo> MemberInfoExt; @@ -265,7 +265,7 @@ class RepeatMode final chset->serialize(out); } - private: +private: bool ParseSettings(User* source, std::string& parameter, ChannelSettings& settings) { irc::sepstream stream(parameter, ':'); @@ -357,12 +357,12 @@ class RepeatMode final class RepeatModule final : public Module { - private: +private: ChanModeReference banmode; CheckExemption::EventProvider exemptionprov; RepeatMode rm; - public: +public: RepeatModule() : Module(VF_VENDOR | VF_COMMON, "Adds channel mode E (repeat) which helps protect against spammers which spam the same message repeatedly.") , banmode(this, "ban") diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp index 12c0de77c..661e7fd28 100644 --- a/src/modules/m_restrictchans.cpp +++ b/src/modules/m_restrictchans.cpp @@ -31,7 +31,7 @@ typedef insp::flat_set<std::string, irc::insensitive_swo> AllowChans; class ModuleRestrictChans final : public Module { - private: +private: AllowChans allowchans; bool allowregistered = false; @@ -53,7 +53,7 @@ class ModuleRestrictChans final return false; } - public: +public: ModuleRestrictChans() : Module(VF_VENDOR, "Prevents unprivileged users from creating new channels.") { diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index 10cb21382..ad52b8b51 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -30,7 +30,7 @@ class ModuleRestrictMsg final : public Module , public CTCTags::EventListener { - private: +private: ModResult HandleMessage(User* user, const MessageTarget& target) { if ((target.type == MessageTarget::TYPE_USER) && (IS_LOCAL(user))) @@ -53,7 +53,7 @@ class ModuleRestrictMsg final return MOD_RES_PASSTHRU; } - public: +public: ModuleRestrictMsg() : Module(VF_VENDOR, "Prevents users who are not server operators from messaging each other.") , CTCTags::EventListener(this) diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 52789ae06..026acd7fb 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -37,7 +37,7 @@ static bool added_zline = false; class RLine final : public XLine { - public: +public: RLine(time_t s_time, unsigned long d, const std::string& src, const std::string& re, const std::string& regexs, Regex::EngineReference& rxfactory) : XLine(s_time, d, src, re, "R") , matchtext(regexs) @@ -97,11 +97,11 @@ class RLine final class RLineFactory final : public XLineFactory { - private: +private: const Module* creator; Regex::EngineReference& rxfactory; - public: +public: RLineFactory(const Module* mod, Regex::EngineReference& rx) : XLineFactory("R") , creator(mod) @@ -129,7 +129,7 @@ class CommandRLine final std::string rxengine; RLineFactory& factory; - public: +public: CommandRLine(Module* Creator, RLineFactory& rlf) : Command(Creator,"RLINE", 1, 3), factory(rlf) { access_needed = CmdAccess::OPERATOR; @@ -206,7 +206,7 @@ class ModuleRLine final : public Module , public Stats::EventListener { - private: +private: Regex::EngineReference rxfactory; RLineFactory f; CommandRLine r; @@ -214,7 +214,7 @@ class ModuleRLine final bool initing = true; Regex::Engine* factory; - public: +public: ModuleRLine() : Module(VF_VENDOR | VF_COMMON, "Adds the /RLINE command which allows server operators to prevent users matching a nickname!username@hostname+realname regular expression from connecting to the server.") , Stats::EventListener(this) diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp index 9b3fc6cec..f4bddfe5c 100644 --- a/src/modules/m_rmode.cpp +++ b/src/modules/m_rmode.cpp @@ -26,7 +26,7 @@ class CommandRMode final : public Command { - public: +public: CommandRMode(Module* Creator) : Command(Creator,"RMODE", 2, 3) { allow_empty_last_param = false; @@ -98,10 +98,10 @@ class CommandRMode final class ModuleRMode final : public Module { - private: +private: CommandRMode cmd; - public: +public: ModuleRMode() : Module(VF_VENDOR, "Allows removal of channel list modes using glob patterns.") , cmd(this) diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index ab831f323..0e03bbfda 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -30,7 +30,7 @@ class CommandSajoin final : public Command { - public: +public: CommandSajoin(Module* Creator) : Command(Creator,"SAJOIN", 1) { allow_empty_last_param = false; @@ -116,10 +116,10 @@ class CommandSajoin final class ModuleSajoin final : public Module { - private: +private: CommandSajoin cmd; - public: +public: ModuleSajoin() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SAJOIN command which allows server operators to force users to join one or more channels.") , cmd(this) diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp index fa3665c65..5ba5710d9 100644 --- a/src/modules/m_sakick.cpp +++ b/src/modules/m_sakick.cpp @@ -27,7 +27,7 @@ class CommandSakick final : public Command { - public: +public: CommandSakick(Module* Creator) : Command(Creator,"SAKICK", 2, 3) { access_needed = CmdAccess::OPERATOR; @@ -86,10 +86,10 @@ class CommandSakick final class ModuleSakick final : public Module { - private: +private: CommandSakick cmd; - public: +public: ModuleSakick() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SAKICK command which allows server operators to kick users from a channel without having any privileges in the channel.") , cmd(this) diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index e51d8136f..3e312c835 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -31,7 +31,7 @@ class CommandSamode final { bool logged; - public: +public: bool active; CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2) { @@ -92,10 +92,10 @@ class CommandSamode final class ModuleSaMode final : public Module { - private: +private: CommandSamode cmd; - public: +public: ModuleSaMode() : Module(VF_VENDOR, "Adds the /SAMODE command which allows server operators to change the modes of a target (channel, user) that they would not otherwise have the privileges to change.") , cmd(this) diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index ef130d2d2..8854ec699 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -28,7 +28,7 @@ class CommandSanick final : public Command { - public: +public: CommandSanick(Module* Creator) : Command(Creator,"SANICK", 2) { allow_empty_last_param = false; @@ -90,10 +90,10 @@ class CommandSanick final class ModuleSanick final : public Module { - private: +private: CommandSanick cmd; - public: +public: ModuleSanick() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SANICK command which allows server operators to change the nickname of a user.") , cmd(this) diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index c1d41b27a..d40a58bc6 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -28,7 +28,7 @@ class CommandSapart final : public Command { - public: +public: CommandSapart(Module* Creator) : Command(Creator,"SAPART", 2, 3) { access_needed = CmdAccess::OPERATOR; @@ -91,10 +91,10 @@ class CommandSapart final class ModuleSapart final : public Module { - private: +private: CommandSapart cmd; - public: +public: ModuleSapart() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SAPART command which allows server operators to force part users from one or more channels without having any privileges in these channels.") , cmd(this) diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index d21dd3a62..6f1a6d687 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -30,7 +30,7 @@ class CommandSaquit final : public Command { - public: +public: CommandSaquit(Module* Creator) : Command(Creator, "SAQUIT", 2, 2) { access_needed = CmdAccess::OPERATOR; @@ -74,10 +74,10 @@ class CommandSaquit final class ModuleSaquit final : public Module { - private: +private: CommandSaquit cmd; - public: +public: ModuleSaquit() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SAQUIT command which allows server operators to disconnect users from the server.") , cmd(this) diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 122b34b43..b1fa82ecd 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -47,7 +47,7 @@ static std::string sasl_target; class ServerTracker final : public ServerProtocol::LinkEventListener { - private: +private: bool online; void Update(const Server* server, bool linked) @@ -72,7 +72,7 @@ class ServerTracker final Update(server, false); } - public: +public: ServerTracker(Module* mod) : ServerProtocol::LinkEventListener(mod) { @@ -107,7 +107,7 @@ class ServerTracker final class SASLCap final : public Cap::Capability { - private: +private: std::string mechlist; const ServerTracker& servertracker; UserCertificateAPI sslapi; @@ -137,7 +137,7 @@ class SASLCap final return &mechlist; } - public: +public: bool requiressl; SASLCap(Module* mod, const ServerTracker& tracker) : Cap::Capability(mod, "sasl") @@ -176,7 +176,7 @@ static ClientProtocol::EventProvider* g_protoev; */ class SaslAuthenticator final { - private: +private: std::string agent; LocalUser* user; SaslState state = SASL_INIT; @@ -194,7 +194,7 @@ class SaslAuthenticator final SendSASL(user, "*", 'H', params); } - public: +public: SaslAuthenticator(LocalUser* user_, const std::string& method, UserCertificateAPI& sslapi) : user(user_) { @@ -309,11 +309,11 @@ class SaslAuthenticator final class CommandAuthenticate final : public SplitCommand { - private: +private: // The maximum length of an AUTHENTICATE request. static constexpr size_t MAX_AUTHENTICATE_SIZE = 400; - public: +public: SimpleExtItem<SaslAuthenticator>& authExt; Cap::Capability& cap; UserCertificateAPI sslapi; @@ -359,7 +359,7 @@ class CommandAuthenticate final class CommandSASL final : public Command { - public: +public: SimpleExtItem<SaslAuthenticator>& authExt; CommandSASL(Module* Creator, SimpleExtItem<SaslAuthenticator>& ext) : Command(Creator, "SASL", 2), authExt(ext) { @@ -397,7 +397,7 @@ class CommandSASL final class ModuleSASL final : public Module { - private: +private: SimpleExtItem<SaslAuthenticator> authExt; ServerTracker servertracker; SASLCap cap; @@ -405,7 +405,7 @@ class ModuleSASL final CommandSASL sasl; ClientProtocol::EventProvider protoev; - public: +public: ModuleSASL() : Module(VF_VENDOR, "Provides the IRCv3 sasl client capability.") , authExt(this, "sasl-state", ExtensionType::USER) diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp index 8dac53c96..4a066e171 100644 --- a/src/modules/m_satopic.cpp +++ b/src/modules/m_satopic.cpp @@ -29,7 +29,7 @@ class CommandSATopic final : public Command { - public: +public: CommandSATopic(Module* Creator) : Command(Creator,"SATOPIC", 2, 2) { access_needed = CmdAccess::OPERATOR; @@ -68,10 +68,10 @@ class CommandSATopic final class ModuleSATopic final : public Module { - private: +private: CommandSATopic cmd; - public: +public: ModuleSATopic() : Module(VF_VENDOR, "Adds the /SATOPIC command which allows server operators to change the topic of a channel that they would not otherwise have the privileges to change.") , cmd(this) diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index 59b704362..cbab8835e 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -34,7 +34,7 @@ class ModuleSecureList final : public Module , public ISupport::EventListener { - private: +private: AllowList allowlist; bool exemptregistered; unsigned long fakechans; @@ -43,7 +43,7 @@ class ModuleSecureList final bool showmsg; unsigned long waittime; - public: +public: ModuleSecureList() : Module(VF_VENDOR, "Prevents users from using the /LIST command until a predefined period has passed.") , ISupport::EventListener(this) diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp index ac83f2213..208a16eb8 100644 --- a/src/modules/m_seenicks.cpp +++ b/src/modules/m_seenicks.cpp @@ -26,7 +26,7 @@ class ModuleSeeNicks final : public Module { - public: +public: ModuleSeeNicks() : Module(VF_VENDOR, "Sends a notice to snomasks n (local) and N (remote) when a user changes their nickname.") { diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp index 0043f0b3d..143084e3f 100644 --- a/src/modules/m_serverban.cpp +++ b/src/modules/m_serverban.cpp @@ -29,7 +29,7 @@ class ServerExtBan final : public ExtBan::MatchingBase { - public: +public: ServerExtBan(Module* Creator) : ExtBan::MatchingBase(Creator, "server", 's') { @@ -44,10 +44,10 @@ class ServerExtBan final class ModuleServerBan final : public Module { - private: +private: ServerExtBan extban; - public: +public: ModuleServerBan() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban s: (server) which check whether users are on a server matching the specified glob pattern.") , extban(this) diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index b5d5f22a6..fea831547 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -49,7 +49,7 @@ enum class RegisteredChannel final : public SimpleChannelMode { - public: +public: RegisteredChannel(Module* Creator) : SimpleChannelMode(Creator, "c_registered", 'r') { @@ -73,7 +73,7 @@ class RegisteredUser final : public SimpleUserMode { - public: +public: RegisteredUser(Module* Creator) : SimpleUserMode(Creator, "u_registered", 'r') { @@ -96,7 +96,7 @@ class AccountExtItemImpl final { Events::ModuleEventProvider eventprov; - public: +public: AccountExtItemImpl(Module* mod) : AccountExtItem(mod, "accountname", ExtensionType::USER, true) , eventprov(mod, "event/account") @@ -132,7 +132,7 @@ class AccountExtBan final private: AccountExtItemImpl& accountext; - public: +public: AccountExtBan(Module* Creator, AccountExtItemImpl& AccountExt) : ExtBan::MatchingBase(Creator, "account", 'R') , accountext(AccountExt) @@ -152,7 +152,7 @@ class UnauthedExtBan final private: AccountExtItemImpl& accountext; - public: +public: UnauthedExtBan(Module* Creator, AccountExtItemImpl& AccountExt) : ExtBan::MatchingBase(Creator, "unauthed", 'U') , accountext(AccountExt) @@ -171,7 +171,7 @@ class ModuleServicesAccount final , public CTCTags::EventListener , public Whois::EventListener { - private: +private: CallerID::API calleridapi; CheckExemption::EventProvider exemptionprov; SimpleChannelMode reginvitemode; @@ -184,7 +184,7 @@ class ModuleServicesAccount final AccountExtBan accountextban; UnauthedExtBan unauthedextban; - public: +public: ModuleServicesAccount() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds various channel and user modes relating to services accounts.") , CTCTags::EventListener(this) diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 3ed739212..8fa52b165 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -34,7 +34,7 @@ enum class ServProtectMode final : public SimpleUserMode { - public: +public: ServProtectMode(Module* Creator) : SimpleUserMode(Creator, "servprotect", 'k', true) { @@ -58,10 +58,10 @@ class ModuleServProtectMode final : public Module , public Whois::LineEventListener { - private: +private: ServProtectMode bm; - public: +public: ModuleServProtectMode() : Module(VF_VENDOR, "Adds user mode k (servprotect) which protects services pseudoclients from being kicked, being killed, or having their channel prefix modes changed.") , Whois::LineEventListener(this) diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 9bab93d99..e678cb3a3 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -28,7 +28,7 @@ class CommandSethost final : public Command { - public: +public: std::bitset<UCHAR_MAX + 1> hostmap; CommandSethost(Module* Creator) @@ -69,10 +69,10 @@ class CommandSethost final class ModuleSetHost final : public Module { - private: +private: CommandSethost cmd; - public: +public: ModuleSetHost() : Module(VF_VENDOR, "Adds the /SETHOST command which allows server operators to change their displayed hostname.") , cmd(this) diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 125440710..a8d89cc89 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -30,7 +30,7 @@ class CommandSetident final : public Command { - public: +public: CommandSetident(Module* Creator) : Command(Creator,"SETIDENT", 1) { allow_empty_last_param = false; @@ -62,10 +62,10 @@ class CommandSetident final class ModuleSetIdent final : public Module { - private: +private: CommandSetident cmd; - public: +public: ModuleSetIdent() : Module(VF_VENDOR, "Adds the /SETIDENT command which allows server operators to change their username (ident).") , cmd(this) diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 4945b92f5..ff420fe5e 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -37,7 +37,7 @@ enum class CommandSetidle final : public SplitCommand { - public: +public: CommandSetidle(Module* Creator) : SplitCommand(Creator,"SETIDLE", 1) { access_needed = CmdAccess::OPERATOR; @@ -66,10 +66,10 @@ class CommandSetidle final class ModuleSetIdle final : public Module { - private: +private: CommandSetidle cmd; - public: +public: ModuleSetIdle() : Module(VF_VENDOR, "Adds the /SETIDLE command which allows server operators to change their idle time.") , cmd(this) diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 33d6686d3..e2649aace 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -33,7 +33,7 @@ class CommandSetName final private: IRCv3::Replies::Fail fail; - public: +public: Cap::Capability cap; bool notifyopers; @@ -70,11 +70,11 @@ private: class ModuleSetName final : public Module { - private: +private: CommandSetName cmd; ClientProtocol::EventProvider setnameevprov; - public: +public: ModuleSetName() : Module(VF_VENDOR, "Adds the /SETNAME command which allows users to change their real name.") , cmd(this) diff --git a/src/modules/m_sha1.cpp b/src/modules/m_sha1.cpp index dca91a7cf..bdb9bca13 100644 --- a/src/modules/m_sha1.cpp +++ b/src/modules/m_sha1.cpp @@ -108,7 +108,7 @@ class SHA1Context final this->state[4] += e; } - public: +public: SHA1Context() { for (int i = 0; i < 5; ++i) @@ -166,7 +166,7 @@ class SHA1Context final class SHA1HashProvider final : public HashProvider { - public: +public: SHA1HashProvider(Module* mod) : HashProvider(mod, "sha1", 20, 64) { @@ -184,10 +184,10 @@ class SHA1HashProvider final class ModuleSHA1 final : public Module { - private: +private: SHA1HashProvider sha1; - public: +public: ModuleSHA1() : Module(VF_VENDOR, "Allows other modules to generate SHA-1 hashes.") , sha1(this) diff --git a/src/modules/m_sha2.cpp b/src/modules/m_sha2.cpp index a5cb35ea7..c68c579b9 100644 --- a/src/modules/m_sha2.cpp +++ b/src/modules/m_sha2.cpp @@ -45,7 +45,7 @@ template<void (*SHA)(const unsigned char*, unsigned int, unsigned char*)> class HashSHA2 final : public HashProvider { - public: +public: HashSHA2(Module* parent, const std::string& Name, unsigned int osize, unsigned int bsize) : HashProvider(parent, Name, osize, bsize) { @@ -62,13 +62,13 @@ class HashSHA2 final class ModuleSHA2 final : public Module { - private: +private: HashSHA2<sha224> sha224algo; HashSHA2<sha256> sha256algo; HashSHA2<sha384> sha384algo; HashSHA2<sha512> sha512algo; - public: +public: ModuleSHA2() : Module(VF_VENDOR, "Allows other modules to generate SHA-2 hashes.") , sha224algo(this, "sha224", SHA224_DIGEST_SIZE, SHA224_BLOCK_SIZE) diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index cb952e127..d2f380809 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -47,7 +47,7 @@ class CommandShowFile final file_cache contents; Method method; - public: +public: CommandShowFile(Module* parent, const std::string& cmdname) : Command(parent, cmdname) { @@ -101,7 +101,7 @@ class CommandShowFile final class ModuleShowFile final : public Module { - private: +private: std::vector<CommandShowFile*> cmds; void ReadTag(std::shared_ptr<ConfigTag> tag, std::vector<CommandShowFile*>& newcmds) @@ -141,7 +141,7 @@ class ModuleShowFile final newcmds.push_back(sfcmd); } - public: +public: ModuleShowFile() : Module(VF_VENDOR, "Adds support for showing the contents of files to users when they execute a command.") { diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 195d9ff28..5de3a3152 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -31,7 +31,7 @@ class SeeWhois final : public SimpleUserMode { - public: +public: SeeWhois(Module* Creator) : SimpleUserMode(Creator, "showwhois", 'W') { @@ -46,7 +46,7 @@ class SeeWhois final class WhoisNoticeCmd final : public Command { - public: +public: WhoisNoticeCmd(Module* Creator) : Command(Creator,"WHOISNOTICE", 2) { access_needed = CmdAccess::SERVER; @@ -78,12 +78,12 @@ class ModuleShowwhois final : public Module , public Whois::EventListener { - private: +private: bool ShowWhoisFromOpers; SeeWhois sw; WhoisNoticeCmd cmd; - public: +public: ModuleShowwhois() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds user mode W (showwhois) which allows users to be informed when someone does a /WHOIS query on their nick.") diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 85a367e21..0d5a85312 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -40,7 +40,7 @@ class ShunFactory final : public XLineFactory { - public: +public: ShunFactory() : XLineFactory("SHUN") { } XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override @@ -57,7 +57,7 @@ class ShunFactory final class CommandShun final : public Command { - public: +public: CommandShun(Module* Creator) : Command(Creator, "SHUN", 1, 3) { access_needed = CmdAccess::OPERATOR; @@ -143,7 +143,7 @@ class ModuleShun final : public Module , public Stats::EventListener { - private: +private: CommandShun cmd; ShunFactory shun; insp::flat_set<std::string, irc::insensitive_swo> cleanedcommands; @@ -166,7 +166,7 @@ class ModuleShun final return ServerInstance->XLines->MatchesLine("SHUN", user); } - public: +public: ModuleShun() : Module(VF_VENDOR | VF_COMMON, "Adds the /SHUN command which allows server operators to prevent users from executing commands.") , Stats::EventListener(this) diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index b988faee6..6a1a5cc07 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -37,7 +37,7 @@ enum class SilenceEntry final { - public: +public: enum SilenceFlags { // Does nothing; for internal use only. @@ -187,7 +187,7 @@ typedef insp::flat_set<SilenceEntry> SilenceList; class SilenceExtItem final : public SimpleExtItem<SilenceList> { - public: +public: unsigned long maxsilence; SilenceExtItem(Module* Creator) @@ -266,7 +266,7 @@ class SilenceExtItem final class SilenceMessage final : public ClientProtocol::Message { - public: +public: SilenceMessage(const std::string& mask, const std::string& flags) : ClientProtocol::Message("SILENCE") { @@ -278,7 +278,7 @@ class SilenceMessage final class CommandSilence final : public SplitCommand { - private: +private: ClientProtocol::EventProvider msgprov; CmdResult AddSilence(LocalUser* user, const std::string& mask, uint32_t flags) @@ -340,7 +340,7 @@ class CommandSilence final return CmdResult::SUCCESS; } - public: +public: SilenceExtItem ext; CommandSilence(Module* Creator) @@ -396,7 +396,7 @@ class ModuleSilence final , public CTCTags::EventListener , public ISupport::EventListener { - private: +private: bool exemptservice; CommandSilence cmd; @@ -435,7 +435,7 @@ class ModuleSilence final return true; } - public: +public: ModuleSilence() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SILENCE command which allows users to ignore other users on server-side.") , CTCTags::EventListener(this) diff --git a/src/modules/m_spanningtree/cachetimer.h b/src/modules/m_spanningtree/cachetimer.h index 0152e58c3..9345459db 100644 --- a/src/modules/m_spanningtree/cachetimer.h +++ b/src/modules/m_spanningtree/cachetimer.h @@ -29,7 +29,7 @@ class CacheRefreshTimer final : public Timer { - public: +public: CacheRefreshTimer(); bool Tick() override; }; diff --git a/src/modules/m_spanningtree/commandbuilder.h b/src/modules/m_spanningtree/commandbuilder.h index 36eebd9c2..6843c47d1 100644 --- a/src/modules/m_spanningtree/commandbuilder.h +++ b/src/modules/m_spanningtree/commandbuilder.h @@ -27,7 +27,7 @@ class TreeServer; class CmdBuilder { - protected: +protected: /** The raw message contents. */ std::string content; @@ -46,7 +46,7 @@ class CmdBuilder /** Updates the tag string within the buffer. */ void UpdateTags(); - public: +public: CmdBuilder(const char* cmd) : content(1, ':') { diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h index ad9335506..4c02e8689 100644 --- a/src/modules/m_spanningtree/commands.h +++ b/src/modules/m_spanningtree/commands.h @@ -46,7 +46,7 @@ using SpanningTree::CommandServer; class CommandRConnect final : public Command { - public: +public: CommandRConnect(Module* Creator); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -55,7 +55,7 @@ class CommandRConnect final class CommandRSQuit final : public Command { - public: +public: CommandRSQuit(Module* Creator); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -64,7 +64,7 @@ class CommandRSQuit final class CommandMap final : public Command { - public: +public: CommandMap(Module* Creator); CmdResult Handle(User* user, const Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -73,7 +73,7 @@ class CommandMap final class CommandSVSJoin final : public ServerCommand { - public: +public: CommandSVSJoin(Module* Creator) : ServerCommand(Creator, "SVSJOIN", 2) { } CmdResult Handle(User* user, Params& params) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -82,7 +82,7 @@ class CommandSVSJoin final class CommandSVSPart final : public ServerCommand { - public: +public: CommandSVSPart(Module* Creator) : ServerCommand(Creator, "SVSPART", 2) { } CmdResult Handle(User* user, Params& params) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -91,7 +91,7 @@ class CommandSVSPart final class CommandSVSNick final : public ServerCommand { - public: +public: CommandSVSNick(Module* Creator) : ServerCommand(Creator, "SVSNICK", 3) { } CmdResult Handle(User* user, Params& params) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -100,14 +100,14 @@ class CommandSVSNick final class CommandMetadata final : public ServerCommand { - public: +public: CommandMetadata(Module* Creator) : ServerCommand(Creator, "METADATA", 2) { } CmdResult Handle(User* user, Params& params) override; class Builder final : public CmdBuilder { - public: + public: Builder(const User* user, const std::string& key, const std::string& val); Builder(const Channel* chan, const std::string& key, const std::string& val); Builder(const Membership* memb, const std::string& key, const std::string& val); @@ -118,14 +118,14 @@ class CommandMetadata final class CommandUID final : public ServerOnlyServerCommand<CommandUID> { - public: +public: CommandUID(Module* Creator) : ServerOnlyServerCommand<CommandUID>(Creator, "UID", 10) { } CmdResult HandleServer(TreeServer* server, CommandBase::Params& params); class Builder final : public CmdBuilder { - public: + public: Builder(User* user); }; }; @@ -133,14 +133,14 @@ class CommandUID final class CommandOpertype final : public UserOnlyServerCommand<CommandOpertype> { - public: +public: CommandOpertype(Module* Creator) : UserOnlyServerCommand<CommandOpertype>(Creator, "OPERTYPE", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); class Builder final : public CmdBuilder { - public: + public: Builder(User* user); }; }; @@ -164,7 +164,7 @@ class CommandFJoin final */ static void LowerTS(Channel* chan, time_t TS, const std::string& newname); void ProcessModeUUIDPair(const std::string& item, TreeServer* sourceserver, Channel* chan, Modes::ChangeList* modechangelist, FwdFJoinBuilder& fwdfjoin); - public: +public: CommandFJoin(Module* Creator) : ServerCommand(Creator, "FJOIN", 3) { } CmdResult Handle(User* user, Params& params) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_LOCALONLY; } @@ -182,7 +182,7 @@ class CommandFJoin final protected: void add(Membership* memb, std::string::const_iterator mbegin, std::string::const_iterator mend); - public: + public: Builder(Channel* chan, TreeServer* source = Utils->TreeRoot); void add(Membership* memb) @@ -199,7 +199,7 @@ class CommandFJoin final class CommandFMode final : public ServerCommand { - public: +public: CommandFMode(Module* Creator) : ServerCommand(Creator, "FMODE", 3) { } CmdResult Handle(User* user, Params& params) override; }; @@ -207,14 +207,14 @@ class CommandFMode final class CommandFTopic final : public ServerCommand { - public: +public: CommandFTopic(Module* Creator) : ServerCommand(Creator, "FTOPIC", 4, 5) { } CmdResult Handle(User* user, Params& params) override; class Builder final : public CmdBuilder { - public: + public: Builder(Channel* chan); Builder(User* user, Channel* chan); }; @@ -223,7 +223,7 @@ class CommandFTopic final class CommandFHost final : public UserOnlyServerCommand<CommandFHost> { - public: +public: CommandFHost(Module* Creator) : UserOnlyServerCommand<CommandFHost>(Creator, "FHOST", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); }; @@ -231,7 +231,7 @@ class CommandFHost final class CommandFRHost final : public UserOnlyServerCommand<CommandFRHost> { - public: +public: CommandFRHost(Module* Creator) : UserOnlyServerCommand<CommandFRHost>(Creator, "FRHOST", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); }; @@ -239,7 +239,7 @@ class CommandFRHost final class CommandFIdent final : public UserOnlyServerCommand<CommandFIdent> { - public: +public: CommandFIdent(Module* Creator) : UserOnlyServerCommand<CommandFIdent>(Creator, "FIDENT", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); }; @@ -247,7 +247,7 @@ class CommandFIdent final class CommandFName final : public UserOnlyServerCommand<CommandFName> { - public: +public: CommandFName(Module* Creator) : UserOnlyServerCommand<CommandFName>(Creator, "FNAME", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); }; @@ -255,7 +255,7 @@ class CommandFName final class CommandIJoin final : public UserOnlyServerCommand<CommandIJoin> { - public: +public: CommandIJoin(Module* Creator) : UserOnlyServerCommand<CommandIJoin>(Creator, "IJOIN", 2) { } CmdResult HandleRemote(RemoteUser* user, Params& params); }; @@ -263,7 +263,7 @@ class CommandIJoin final class CommandResync final : public ServerOnlyServerCommand<CommandResync> { - public: +public: CommandResync(Module* Creator) : ServerOnlyServerCommand<CommandResync>(Creator, "RESYNC", 1) { } CmdResult HandleServer(TreeServer* server, Params& parameters); RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_LOCALONLY; } @@ -272,10 +272,10 @@ class CommandResync final class SpanningTree::CommandAway final : public UserOnlyServerCommand<SpanningTree::CommandAway> { - private: +private: Away::EventProvider awayevprov; - public: +public: CommandAway(Module* Creator) : UserOnlyServerCommand<SpanningTree::CommandAway>(Creator, "AWAY", 0, 2) , awayevprov(Creator) @@ -286,7 +286,7 @@ class SpanningTree::CommandAway final class Builder final : public CmdBuilder { - public: + public: Builder(User* user); }; }; @@ -295,14 +295,14 @@ class XLine; class CommandAddLine final : public ServerCommand { - public: +public: CommandAddLine(Module* Creator) : ServerCommand(Creator, "ADDLINE", 6, 6) { } CmdResult Handle(User* user, Params& parameters) override; class Builder final : public CmdBuilder { - public: + public: Builder(XLine* xline, User* user = ServerInstance->FakeClient); }; }; @@ -310,7 +310,7 @@ class CommandAddLine final class CommandDelLine final : public ServerCommand { - public: +public: CommandDelLine(Module* Creator) : ServerCommand(Creator, "DELLINE", 2, 2) { } CmdResult Handle(User* user, Params& parameters) override; }; @@ -318,7 +318,7 @@ class CommandDelLine final class CommandEncap final : public ServerCommand { - public: +public: CommandEncap(Module* Creator) : ServerCommand(Creator, "ENCAP", 2) { } CmdResult Handle(User* user, Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -327,7 +327,7 @@ class CommandEncap final class CommandIdle final : public UserOnlyServerCommand<CommandIdle> { - public: +public: CommandIdle(Module* Creator) : UserOnlyServerCommand<CommandIdle>(Creator, "IDLE", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& parameters); RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_UNICAST(parameters[0]); } @@ -336,7 +336,7 @@ class CommandIdle final class SpanningTree::CommandNick final : public UserOnlyServerCommand<SpanningTree::CommandNick> { - public: +public: CommandNick(Module* Creator) : UserOnlyServerCommand<SpanningTree::CommandNick>(Creator, "NICK", 2) { } CmdResult HandleRemote(::RemoteUser* user, Params& parameters); }; @@ -344,7 +344,7 @@ class SpanningTree::CommandNick final class SpanningTree::CommandPing final : public ServerCommand { - public: +public: CommandPing(Module* Creator) : ServerCommand(Creator, "PING", 1) { } CmdResult Handle(User* user, Params& parameters) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_UNICAST(parameters[0]); } @@ -353,7 +353,7 @@ class SpanningTree::CommandPing final class SpanningTree::CommandPong final : public ServerOnlyServerCommand<SpanningTree::CommandPong> { - public: +public: CommandPong(Module* Creator) : ServerOnlyServerCommand<SpanningTree::CommandPong>(Creator, "PONG", 1) { } CmdResult HandleServer(TreeServer* server, Params& parameters); RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_UNICAST(parameters[0]); } @@ -362,7 +362,7 @@ class SpanningTree::CommandPong final class DllExport CommandSave final : public ServerCommand { - public: +public: /** Timestamp of the uuid nick of all users who collided and got their nick changed to uuid */ static constexpr time_t SavedTimestamp = 100; @@ -376,7 +376,7 @@ class SpanningTree::CommandServer final { static void HandleExtra(TreeServer* newserver, Params& params); - public: +public: CommandServer(Module* Creator) : ServerOnlyServerCommand<SpanningTree::CommandServer>(Creator, "SERVER", 3) { } CmdResult HandleServer(TreeServer* server, Params& parameters); @@ -387,7 +387,7 @@ class SpanningTree::CommandServer final { push(key).push_raw('=').push_raw(val); } - public: + public: Builder(TreeServer* server); }; }; @@ -395,7 +395,7 @@ class SpanningTree::CommandServer final class CommandSQuit final : public ServerOnlyServerCommand<CommandSQuit> { - public: +public: CommandSQuit(Module* Creator) : ServerOnlyServerCommand<CommandSQuit>(Creator, "SQUIT", 2) { } CmdResult HandleServer(TreeServer* server, Params& parameters); }; @@ -403,7 +403,7 @@ class CommandSQuit final class CommandSNONotice final : public ServerCommand { - public: +public: CommandSNONotice(Module* Creator) : ServerCommand(Creator, "SNONOTICE", 2) { } CmdResult Handle(User* user, Params& parameters) override; }; @@ -411,7 +411,7 @@ class CommandSNONotice final class CommandEndBurst final : public ServerOnlyServerCommand<CommandEndBurst> { - public: +public: CommandEndBurst(Module* Creator) : ServerOnlyServerCommand<CommandEndBurst>(Creator, "ENDBURST") { } CmdResult HandleServer(TreeServer* server, Params& parameters); }; @@ -419,14 +419,14 @@ class CommandEndBurst final class CommandSInfo final : public ServerOnlyServerCommand<CommandSInfo> { - public: +public: CommandSInfo(Module* Creator) : ServerOnlyServerCommand<CommandSInfo>(Creator, "SINFO", 2) { } CmdResult HandleServer(TreeServer* server, Params& parameters); class Builder final : public CmdBuilder { - public: + public: Builder(TreeServer* server, const char* type, const std::string& value); }; }; @@ -434,7 +434,7 @@ class CommandSInfo final class CommandNum final : public ServerOnlyServerCommand<CommandNum> { - public: +public: CommandNum(Module* Creator) : ServerOnlyServerCommand<CommandNum>(Creator, "NUM", 3) { } CmdResult HandleServer(TreeServer* server, Params& parameters); RouteDescriptor GetRouting(User* user, const Params& parameters) override; @@ -442,7 +442,7 @@ class CommandNum final class Builder final : public CmdBuilder { - public: + public: Builder(SpanningTree::RemoteUser* target, const Numeric::Numeric& numeric); }; }; @@ -450,14 +450,14 @@ class CommandNum final class CommandLMode final : public ServerCommand { - public: +public: CommandLMode(Module* Creator) : ServerCommand(Creator, "LMODE", 3) { } CmdResult Handle(User* user, Params& params) override; }; class SpanningTreeCommands final { - public: +public: CommandSVSJoin svsjoin; CommandSVSPart svspart; CommandSVSNick svsnick; diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index bc7595eb6..47b6497a8 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -32,7 +32,7 @@ class FwdFJoinBuilder final : public CommandFJoin::Builder { - public: +public: FwdFJoinBuilder(Channel* chan, TreeServer* server) : CommandFJoin::Builder(chan, server) { diff --git a/src/modules/m_spanningtree/link.h b/src/modules/m_spanningtree/link.h index a4d7dc558..a10fba334 100644 --- a/src/modules/m_spanningtree/link.h +++ b/src/modules/m_spanningtree/link.h @@ -28,7 +28,7 @@ class Link final { - public: +public: std::shared_ptr<ConfigTag> tag; std::string Name; std::string IPAddr; @@ -50,7 +50,7 @@ class Link final class Autoconnect final { - public: +public: std::shared_ptr<ConfigTag> tag; std::vector<std::string> servers; unsigned long Period; diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index b7fa2bc20..4beabf967 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -90,7 +90,7 @@ class ModuleSpanningTree final */ Membership::Id currmembid = 0; - public: +public: /** The specialized ProtocolInterface that is assigned to ServerInstance->PI on load */ SpanningTreeProtocolInterface protocolinterface; diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index a02a42e0d..aa801dbfb 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -43,7 +43,7 @@ class FModeBuilder final unsigned int modes = 0; std::string::size_type startpos; - public: +public: FModeBuilder(Channel* chan) : CmdBuilder("FMODE") { diff --git a/src/modules/m_spanningtree/pingtimer.h b/src/modules/m_spanningtree/pingtimer.h index ac81f5bfd..3df0281c9 100644 --- a/src/modules/m_spanningtree/pingtimer.h +++ b/src/modules/m_spanningtree/pingtimer.h @@ -65,7 +65,7 @@ class PingTimer final */ bool Tick() override; - public: +public: /** Construct the timer. This doesn't schedule the timer. * @param server TreeServer to interact with */ diff --git a/src/modules/m_spanningtree/protocolinterface.h b/src/modules/m_spanningtree/protocolinterface.h index e0204c93e..7843c12f3 100644 --- a/src/modules/m_spanningtree/protocolinterface.h +++ b/src/modules/m_spanningtree/protocolinterface.h @@ -26,13 +26,13 @@ class SpanningTreeProtocolInterface final : public ProtocolInterface { - public: +public: class Server final : public ProtocolInterface::Server { TreeSocket* const sock; - public: + public: Server(TreeSocket* s) : sock(s) { } void SendMetaData(const std::string& key, const std::string& data) override; }; diff --git a/src/modules/m_spanningtree/remoteuser.h b/src/modules/m_spanningtree/remoteuser.h index fbf639be0..9c53b6894 100644 --- a/src/modules/m_spanningtree/remoteuser.h +++ b/src/modules/m_spanningtree/remoteuser.h @@ -27,7 +27,7 @@ namespace SpanningTree class SpanningTree::RemoteUser final : public ::RemoteUser { - public: +public: RemoteUser(const std::string& uid, Server* srv); void WriteRemoteNumeric(const Numeric::Numeric& numeric) override; }; diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h index 122b4b1db..dc82bd329 100644 --- a/src/modules/m_spanningtree/resolvers.h +++ b/src/modules/m_spanningtree/resolvers.h @@ -36,13 +36,13 @@ class SecurityIPResolver final : public DNS::Request { - private: +private: std::shared_ptr<Link> MyLink; Module* mine; std::string host; DNS::QueryType query; bool CheckIPv4(); - public: +public: SecurityIPResolver(Module* me, DNS::Manager* mgr, const std::string& hostname, std::shared_ptr<Link> x, DNS::QueryType qt); void OnLookupComplete(const DNS::Query *r) override; void OnError(const DNS::Query *q) override; @@ -57,12 +57,12 @@ class SecurityIPResolver final class ServernameResolver final : public DNS::Request { - private: +private: DNS::QueryType query; std::string host; std::shared_ptr<Link> MyLink; std::shared_ptr<Autoconnect> myautoconnect; - public: +public: ServernameResolver(DNS::Manager* mgr, const std::string& hostname, std::shared_ptr<Link> x, DNS::QueryType qt, std::shared_ptr<Autoconnect> myac); void OnLookupComplete(const DNS::Query *r) override; void OnError(const DNS::Query *q) override; diff --git a/src/modules/m_spanningtree/servercommand.h b/src/modules/m_spanningtree/servercommand.h index d530ad666..cac072cc2 100644 --- a/src/modules/m_spanningtree/servercommand.h +++ b/src/modules/m_spanningtree/servercommand.h @@ -26,7 +26,7 @@ class ProtocolException final : public ModuleException { - public: +public: ProtocolException(const std::string& msg) : ModuleException((Module*)Utils->Creator, "Protocol violation: " + msg) { @@ -38,7 +38,7 @@ class ProtocolException final class ServerCommand : public CommandBase { - public: +public: ServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0); /** Register this object in the ServerCommandManager @@ -65,7 +65,7 @@ template <class T> class UserOnlyServerCommand : public ServerCommand { - public: +public: UserOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0) : ServerCommand(Creator, Name, MinPara, MaxPara) { } @@ -85,7 +85,7 @@ template <class T> class ServerOnlyServerCommand : public ServerCommand { - public: +public: ServerOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0) : ServerCommand(Creator, Name, MinPara, MaxPara) { } @@ -103,7 +103,7 @@ class ServerCommandManager final typedef std::unordered_map<std::string, ServerCommand*> ServerCommandMap; ServerCommandMap commands; - public: +public: ServerCommand* GetHandler(const std::string& command) const; bool AddCommand(ServerCommand* cmd); }; diff --git a/src/modules/m_spanningtree/tags.h b/src/modules/m_spanningtree/tags.h index df9a37f72..89c5c3dc2 100644 --- a/src/modules/m_spanningtree/tags.h +++ b/src/modules/m_spanningtree/tags.h @@ -24,7 +24,7 @@ class ServerTags final : public ClientProtocol::MessageTagProvider { - public: +public: ServerTags(Module* Creator); ModResult OnProcessTag(User* user, const std::string& tagname, std::string& tagvalue) override; bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) override; @@ -33,10 +33,10 @@ class ServerTags final class ServiceTag final : public ClientProtocol::MessageTagProvider { - private: +private: CTCTags::CapReference ctctagcap; - public: +public: ServiceTag(Module* mod); void OnPopulateTags(ClientProtocol::Message& msg) override; bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) override; diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 966dbf9d1..bbb233380 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -86,7 +86,7 @@ class TreeServer final */ void RemoveHash(); - public: +public: typedef std::vector<TreeServer*> ChildServers; FakeUser* const ServerUser; /* User representing this server */ const time_t age; diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index fcdda2831..27e96d50e 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -180,7 +180,7 @@ class TreeSocket final */ void WriteLineInternal(const std::string& line); - public: +public: const time_t age; // The protocol version which has been negotiated with the remote server. diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 99a89d4e2..49c2bd197 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -50,7 +50,7 @@ class SpanningTreeUtilities final { CacheRefreshTimer RefreshTimer; - public: +public: typedef std::set<TreeSocket*> TreeSocketSet; typedef std::map<TreeSocket*, std::pair<std::string, unsigned int> > TimeoutList; diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 6355362e4..9c56fd9b9 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -38,7 +38,7 @@ enum AuthState { class AuthQuery final : public SQL::Query { - public: +public: const std::string uid; IntExtItem& pendingExt; bool verbose; @@ -135,7 +135,7 @@ class ModuleSQLAuth final std::string kdf; std::string pwcolumn; - public: +public: ModuleSQLAuth() : Module(VF_VENDOR, "Allows connecting users to be authenticated against an arbitrary SQL table.") , pendingExt(this, "sqlauth-wait", ExtensionType::USER) diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 787f97515..b6f770cee 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -31,7 +31,7 @@ class OperQuery final : public SQL::Query { - public: +public: // This variable will store all the OPER blocks from the DB std::vector<std::string>& my_blocks; /** We want to store the username and password if this is called during an /OPER, as we're responsible for /OPER post-DB fetch @@ -162,7 +162,7 @@ class OperQuery final class ModuleSQLOper final : public Module { - private: +private: // Whether OperQuery is running bool active = false; std::string query; diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 0c26ff728..9b87bc9c4 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -35,7 +35,7 @@ class SSLCertExt final : public ExtensionItem { - public: +public: SSLCertExt(Module* parent) : ExtensionItem(parent, "ssl_cert", ExtensionType::USER) { @@ -118,7 +118,7 @@ class SSLCertExt final class UserCertificateAPIImpl final : public UserCertificateAPIBase { - public: +public: BoolExtItem nosslext; SSLCertExt sslext; @@ -158,7 +158,7 @@ class UserCertificateAPIImpl final class CommandSSLInfo final : public SplitCommand { - private: +private: ChanModeReference sslonlymode; void HandleUserInternal(LocalUser* source, User* target, bool verbose) @@ -242,7 +242,7 @@ class CommandSSLInfo final return CmdResult::SUCCESS; } - public: +public: UserCertificateAPIImpl sslapi; bool operonlyfp; @@ -270,7 +270,7 @@ class ModuleSSLInfo final , public Whois::EventListener , public Who::EventListener { - private: +private: CommandSSLInfo cmd; std::string hash; @@ -279,7 +279,7 @@ class ModuleSSLInfo final return irc::spacesepstream(fp).Contains(cert->GetFingerprint()); } - public: +public: ModuleSSLInfo() : Module(VF_VENDOR, "Adds user facing TLS information, various TLS configuration options, and the /SSLINFO command to look up TLS certificate information for other users.") , WebIRC::EventListener(this) diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 353d6e485..dcb1999b6 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -43,10 +43,10 @@ enum class SSLFPExtBan final : public ExtBan::MatchingBase { - private: +private: UserCertificateAPI& sslapi; - public: +public: SSLFPExtBan(Module* Creator, UserCertificateAPI& api) : ExtBan::MatchingBase(Creator, "sslfp", 'z') , sslapi(api) @@ -65,10 +65,10 @@ class SSLFPExtBan final class SSLMode final : public ModeHandler { - private: +private: UserCertificateAPI& API; - public: +public: SSLMode(Module* Creator, UserCertificateAPI& api) : ModeHandler(Creator, "sslonly", 'z', PARAM_NONE, MODETYPE_CHANNEL) , API(api) @@ -130,10 +130,10 @@ class SSLMode final class SSLModeUser final : public ModeHandler { - private: +private: UserCertificateAPI& API; - public: +public: SSLModeUser(Module* Creator, UserCertificateAPI& api) : ModeHandler(Creator, "sslqueries", 'z', PARAM_NONE, MODETYPE_USER) , API(api) @@ -157,13 +157,13 @@ class ModuleSSLModes final : public Module , public CTCTags::EventListener { - private: +private: UserCertificateAPI api; SSLMode sslm; SSLModeUser sslquery; SSLFPExtBan sslfp; - public: +public: ModuleSSLModes() : Module(VF_VENDOR, "Adds channel mode z (sslonly) which prevents users who are not connecting using TLS from joining the channel and user mode z (sslqueries) to prevent messages from non-TLS users.") , CTCTags::EventListener(this) diff --git a/src/modules/m_starttls.cpp b/src/modules/m_starttls.cpp index c8f396dc3..fc80b3e68 100644 --- a/src/modules/m_starttls.cpp +++ b/src/modules/m_starttls.cpp @@ -37,7 +37,7 @@ class CommandStartTLS final { dynamic_reference_nocheck<IOHookProvider>& ssl; - public: +public: CommandStartTLS(Module* mod, dynamic_reference_nocheck<IOHookProvider>& s) : SplitCommand(mod, "STARTTLS") , ssl(s) @@ -85,7 +85,7 @@ class CommandStartTLS final class TLSCap final : public Cap::Capability { - private: +private: dynamic_reference_nocheck<IOHookProvider>& sslref; bool OnList(LocalUser* user) override @@ -98,7 +98,7 @@ class TLSCap final return sslref; } - public: +public: TLSCap(Module* mod, dynamic_reference_nocheck<IOHookProvider>& ssl) : Cap::Capability(mod, "tls") , sslref(ssl) @@ -109,12 +109,12 @@ class TLSCap final class ModuleStartTLS final : public Module { - private: +private: CommandStartTLS starttls; TLSCap tls; dynamic_reference_nocheck<IOHookProvider> ssl; - public: +public: ModuleStartTLS() : Module(VF_VENDOR, "Provides the IRCv3 tls client capability.") , starttls(this, ssl) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 8b609d136..c96b92a87 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -33,13 +33,13 @@ class ModuleStripColor final : public Module { - private: +private: CheckExemption::EventProvider exemptionprov; ExtBan::Acting extban; SimpleChannelMode csc; SimpleUserMode usc; - public: +public: ModuleStripColor() : Module(VF_VENDOR, "Adds channel mode S (stripcolor) which allows channels to strip IRC formatting codes from messages.") , exemptionprov(this) diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index bbf19d4dc..3a6fe8c0e 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -81,7 +81,7 @@ public: class SVSHoldFactory final : public XLineFactory { - public: +public: SVSHoldFactory() : XLineFactory("SVSHOLD") { } XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override @@ -98,7 +98,7 @@ class SVSHoldFactory final class CommandSvshold final : public Command { - public: +public: CommandSvshold(Module* Creator) : Command(Creator, "SVSHOLD", 1) { access_needed = CmdAccess::OPERATOR; @@ -179,11 +179,11 @@ class ModuleSVSHold final : public Module , public Stats::EventListener { - private: +private: CommandSvshold cmd; SVSHoldFactory s; - public: +public: ModuleSVSHold() : Module(VF_VENDOR | VF_COMMON, "Adds the /SVSHOLD command which allows services to reserve nicknames.") , Stats::EventListener(this) diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index e49ac63c7..f6d65cf87 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -30,7 +30,7 @@ class CommandSwhois final : public Command { - public: +public: BoolExtItem operblock; StringExtItem swhois; CommandSwhois(Module* Creator) @@ -82,11 +82,11 @@ class ModuleSWhois final : public Module , public Whois::LineEventListener { - private: +private: CommandSwhois cmd; UserModeReference hideopermode; - public: +public: ModuleSWhois() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /SWHOIS command which adds custom lines to a user's WHOIS response.") , Whois::LineEventListener(this) diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 65db00b88..d8320c58c 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -36,7 +36,7 @@ // Holds a timed ban class TimedBan final { - public: +public: std::string mask; std::string setter; time_t expire; @@ -70,7 +70,7 @@ class CommandTban final return false; } - public: +public: bool sendnotice; CommandTban(Module* Creator) @@ -169,7 +169,7 @@ class CommandTban final class BanWatcher final : public ModeWatcher { - public: +public: BanWatcher(Module* parent) : ModeWatcher(parent, "ban", MODETYPE_CHANNEL) { @@ -199,7 +199,7 @@ class ChannelMatcher final { Channel* const chan; - public: +public: ChannelMatcher(Channel* ch) : chan(ch) { @@ -214,12 +214,12 @@ class ChannelMatcher final class ModuleTimedBans final : public Module { - private: +private: ChanModeReference banmode; CommandTban cmd; BanWatcher banwatcher; - public: +public: ModuleTimedBans() : Module(VF_VENDOR | VF_COMMON, "Adds the /TBAN command which allows channel operators to add bans which will be expired after the specified period.") , banmode(this, "ban") diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index d641cc9b6..744de774a 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -28,7 +28,7 @@ class CommandTline final : public Command { - public: +public: CommandTline(Module* Creator) : Command(Creator,"TLINE", 1) { access_needed = CmdAccess::OPERATOR; @@ -74,10 +74,10 @@ class CommandTline final class ModuleTLine final : public Module { - private: +private: CommandTline cmd; - public: +public: ModuleTLine() : Module(VF_VENDOR, "Adds the /TLINE command which allows server operators to determine how many users would be affected by an X-line on a specified pattern.") , cmd(this) diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp index 46bb6cb5e..30b7ac3f5 100644 --- a/src/modules/m_topiclock.cpp +++ b/src/modules/m_topiclock.cpp @@ -28,7 +28,7 @@ enum class CommandSVSTOPIC final : public Command { - public: +public: CommandSVSTOPIC(Module* Creator) : Command(Creator, "SVSTOPIC", 1, 4) { @@ -78,11 +78,11 @@ class CommandSVSTOPIC final class ModuleTopicLock final : public Module { - private: +private: CommandSVSTOPIC cmd; BoolExtItem topiclock; - public: +public: ModuleTopicLock() : Module(VF_VENDOR | VF_COMMON, "Allows services to lock the channel topic so that it can not be changed.") , cmd(this) diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 7aa12c34b..73255ffab 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -31,10 +31,10 @@ class ModuleUHNames final : public Module , public Names::EventListener { - private: +private: Cap::Capability cap; - public: +public: ModuleUHNames() : Module(VF_VENDOR, "Provides the IRCv3 userhost-in-names client capability.") , Names::EventListener(this) diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index 6bca58d00..3188f51d2 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -39,7 +39,7 @@ class CommandUninvite final : public Command { Invite::API invapi; - public: +public: CommandUninvite(Module* Creator) : Command(Creator, "UNINVITE", 2) , invapi(Creator) @@ -120,10 +120,10 @@ class CommandUninvite final class ModuleUninvite final : public Module { - private: +private: CommandUninvite cmd; - public: +public: ModuleUninvite() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /UNINVITE command which allows users who have invited another user to a channel to withdraw their invite.") , cmd(this) diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 86785113c..54535bde1 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -30,7 +30,7 @@ class CommandUserip final : public Command { - public: +public: CommandUserip(Module* Creator) : Command(Creator,"USERIP", 1) { syntax = { "<nick> [<nick>]+" }; @@ -85,10 +85,10 @@ class ModuleUserIP final : public Module , public ISupport::EventListener { - private: +private: CommandUserip cmd; - public: +public: ModuleUserIP() : Module(VF_VENDOR, "Adds the /USERIP command which allows users to find out the IP address of one or more connected users.") , ISupport::EventListener(this) diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 5539ebb86..04419f893 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -52,7 +52,7 @@ typedef std::multimap<std::string, CustomVhost> CustomVhostMap; class CommandVhost final : public Command { - public: +public: CustomVhostMap vhosts; CommandVhost(Module* Creator) @@ -81,10 +81,10 @@ class CommandVhost final class ModuleVHost final : public Module { - private: +private: CommandVhost cmd; - public: +public: ModuleVHost() : Module(VF_VENDOR, "Allows the server administrator to define accounts which can grant a custom virtual host.") , cmd(this) diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 8408db834..e16588233 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -122,7 +122,7 @@ class CommandWatch final user->WriteNumeric(RPL_ENDOFWATCHLIST, "End of WATCH S"); } - public: +public: unsigned long maxwatch; CommandWatch(Module* mod, IRCv3::Monitor::Manager& managerref) @@ -181,7 +181,7 @@ class ModuleWatch final , public Away::EventListener , public ISupport::EventListener { - private: +private: IRCv3::Monitor::Manager manager; CommandWatch cmd; @@ -207,7 +207,7 @@ class ModuleWatch final SendAlert(user, nick, RPL_LOGOFF, "went offline", user->age); } - public: +public: ModuleWatch() : Module(VF_VENDOR, "Adds the /WATCH command which allows users to find out when their friends are connected to the server.") , Away::EventListener(this) diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index ef06c81b9..071c5c2f2 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -63,7 +63,7 @@ struct WebSocketConfig final class WebSocketHookProvider final : public IOHookProvider { - public: +public: WebSocketConfig config; WebSocketHookProvider(Module* mod) : IOHookProvider(mod, "websocket", IOHookProvider::IOH_UNKNOWN, true) @@ -82,11 +82,11 @@ class WebSocketHook final { class HTTPHeaderFinder final { - private: + private: std::string::size_type bpos; std::string::size_type len; - public: + public: bool Find(const std::string& req, const char* header, std::string::size_type headerlen, std::string::size_type maxpos) { // Skip the GET /wibble HTTP/1.1 line. @@ -480,7 +480,7 @@ class WebSocketHook final return 1; } - public: +public: WebSocketHook(std::shared_ptr<IOHookProvider> Prov, StreamSocket* sock, WebSocketConfig& cfg) : IOHookMiddle(Prov) , config(cfg) @@ -577,11 +577,11 @@ void WebSocketHookProvider::OnAccept(StreamSocket* sock, irc::sockets::sockaddrs class ModuleWebSocket final : public Module { - private: +private: dynamic_reference_nocheck<HashProvider> hash; std::shared_ptr<WebSocketHookProvider> hookprov; - public: +public: ModuleWebSocket() : Module(VF_VENDOR, "Allows WebSocket clients to connect to the IRC server.") , hash(this, "hash/sha1") diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 83d1a7bd2..f40c2729c 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -37,11 +37,11 @@ class ModuleXLineDB final : public Module , public Timer { - private: +private: bool dirty; std::string xlinedbpath; - public: +public: ModuleXLineDB() : Module(VF_VENDOR, "Allows X-lines to be saved and reloaded on restart.") , Timer(0, true) diff --git a/src/threadsocket.cpp b/src/threadsocket.cpp index f059b704e..ffe60e67a 100644 --- a/src/threadsocket.cpp +++ b/src/threadsocket.cpp @@ -29,7 +29,7 @@ class ThreadSignalSocket final : public EventHandler { SocketThread* parent; - public: +public: ThreadSignalSocket(SocketThread* p, int newfd) : parent(p) { SetFd(newfd); @@ -79,7 +79,7 @@ class ThreadSignalSocket final { SocketThread* parent; int send_fd; - public: +public: ThreadSignalSocket(SocketThread* p, int recvfd, int sendfd) : parent(p), send_fd(sendfd) { diff --git a/src/usermanager.cpp b/src/usermanager.cpp index b548bd7ba..b30335367 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -46,7 +46,7 @@ namespace user->Send(user->IsOper() ? operquitevent : quitevent); } - public: + public: WriteCommonQuit(User* user, const std::string& msg, const std::string& opermsg) : quitmsg(user, msg) , quitevent(ServerInstance->GetRFCEvents().quit, quitmsg) diff --git a/src/users.cpp b/src/users.cpp index 0f97c6de2..a02c3570f 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -882,7 +882,7 @@ namespace user->Send(ev); } - public: + public: WriteCommonRawHandler(ClientProtocol::Event& protoev) : ev(protoev) { diff --git a/src/xline.cpp b/src/xline.cpp index 5deba81c6..129b72958 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -36,7 +36,7 @@ class GLineFactory final : public XLineFactory { - public: +public: GLineFactory() : XLineFactory("G") { } /** Generate a GLine @@ -53,7 +53,7 @@ class GLineFactory final class ELineFactory final : public XLineFactory { - public: +public: ELineFactory() : XLineFactory("E") { } /** Generate an ELine @@ -70,7 +70,7 @@ class ELineFactory final class KLineFactory final : public XLineFactory { - public: +public: KLineFactory() : XLineFactory("K") { } /** Generate a KLine @@ -87,7 +87,7 @@ class KLineFactory final class QLineFactory final : public XLineFactory { - public: +public: QLineFactory() : XLineFactory("Q") { } /** Generate a QLine @@ -103,7 +103,7 @@ class QLineFactory final class ZLineFactory final : public XLineFactory { - public: +public: ZLineFactory() : XLineFactory("Z") { } /** Generate a ZLine