diff options
| author | 2022-01-25 13:59:42 +0000 | |
|---|---|---|
| committer | 2022-01-25 14:02:36 +0000 | |
| commit | d79147e7afe2eca34780c607f78b11f8b3dd017d (patch) | |
| tree | a3f9a145dd53f9c1c268ac9b521ac907b802eab0 /include | |
| parent | Fix a few Doxygen comment errors. (diff) | |
Abolish the infernal space before accessibility keywords.
Diffstat (limited to 'include')
81 files changed, 361 insertions, 361 deletions
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 <typename T> class reference final { T* value = nullptr; - public: +public: reference() = default; reference(T* v) : value(v) { if (value) value->refcount_inc(); } reference(const reference<T>& v) : value(v.value) { if (value) value->refcount_inc(); } @@ -123,7 +123,7 @@ class reference final inline bool operator<(const reference<T>& other) const { return value < other.value; } inline bool operator>(const reference<T>& 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<std::string, Channel*, irc::insensitive, irc::StrHash /** Manages state relating to channels. */ class CoreExport ChannelManager final { - private: +private: /** A map of channel names to the channel object. */ ChannelMap channels; - public: +public: /** Determines whether an channel name is valid. */ std::function<bool(const std::string&)> 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<User*, insp::aligned_storage<Membership> > 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<Param> ParamList; - private: +private: typedef std::vector<std::pair<SerializedInfo, SerializedMessage> > 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<Message*> modemsgplist; const Modes::ChangeList& modechanges; - public: +public: static void BuildMessages(User* source, Channel* Chantarget, User* Usertarget, const Modes::ChangeList& changelist, std::list<ClientProtocol::Messages::Mode>& modelist, std::vector<Message*>& 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<std::string, Command*, irc::insensitive, irc::StrHashComp> 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<std::string, std::string, irc::insensitive_swo> Items; - private: +private: Items items; - public: +public: /** The name of the configuration tag (e.g. "foo" for \<foo bar="baz">). */ 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<std::string> { - 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<Cullable*> list; std::vector<LocalUser*> 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<ActionBase*> 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<dynamic_reference_base> { - 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<typename T> 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<typename T> 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<ModeHandler> { - public: +public: ChanModeReference(Module* mod, const std::string& modename) : dynamic_reference_nocheck<ModeHandler>(mod, "mode/" + modename) {} }; @@ -136,7 +136,7 @@ class ChanModeReference final class UserModeReference final : public dynamic_reference_nocheck<ModeHandler> { - public: +public: UserModeReference(Module* mod, const std::string& modename) : dynamic_reference_nocheck<ModeHandler>(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<typename Class, typename... FunArgs, typename... FwdArgs> 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<ExtensionItem*, void*> ExtensibleStore; @@ -157,10 +157,10 @@ class CoreExport Extensible */ void UnhookExtensions(const std::vector<ExtensionItem*>& 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<std::string, ExtensionItem*> 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 <typename T, typename Del = std::default_delete<T>> class SimpleExtItem : public ExtensionItem { - protected: +protected: /** Whether to sync this extension across the network. */ bool synced; - public: +public: /** Initializes an instance of the SimpleExtItem<T,Del> 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<std::string> { - 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 <typename Val, typename Comp> 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 <typename T, typename Comp, typename Key = T, typename ElementComp = Comp> class flat_map_base { - protected: +protected: typedef std::vector<T> 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<iterator, bool> insert_single(const value_type& x) { bool inserted = false; @@ -208,7 +208,7 @@ class flat_set { typedef detail::flat_map_base<T, Comp, T, ElementComp> 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<T, Comp, T, ElementComp> 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<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, 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<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, 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<T, Tag>; friend class intrusive_list_tail<T, Tag>; }; 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 <typename T, typename Tag> class INSPIRCD_INTRUSIVE_LIST_NAME { - public: +public: class iterator : public std::iterator<std::bidirectional_iterator_tag, T*> { 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<ListItem> 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<ChanData> 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<FileWriter*, int> 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<Membership> { - 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<std::string, ModeHandler*, irc::insensitive, irc::StrHashComp> ModeHandlerMap; - private: +private: /** Type of the container that maps mode names to ModeWatchers */ typedef insp::flat_multimap<std::string, ModeWatcher*> ModeWatcherMap; @@ -631,7 +631,7 @@ class CoreExport ModeParser final */ ModeHandler::Id AllocateModeId(ModeHandler* mh); - public: +public: typedef std::vector<ListModeBase*> ListModeList; typedef std::vector<PrefixMode*> 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<Change> 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<std::string, std::string, irc::insensitive_swo> LinkData; @@ -1020,11 +1020,11 @@ class CoreExport Module */ class CoreExport ModuleManager final { - public: +public: typedef std::multimap<std::string, ServiceProvider*, irc::insensitive_swo> DataProviderMap; typedef std::vector<ServiceProvider*> 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<std::string, Module*> 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<CallerID::APIBase> { - public: +public: API(Module* parent) : dynamic_reference<CallerID::APIBase>(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<Capability> 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<unsigned char, ExtBan::Base*> 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<Geolocation::APIBase> { - public: +public: API(Module* parent) : dynamic_reference<Geolocation::APIBase>(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<std::string, std::string> { - 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<std::string,std::string> 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<HTTPdAPIBase> { - public: +public: HTTPdAPI(Module* parent) : dynamic_reference<HTTPdAPIBase>(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<APIBase> { - public: +public: API(Module* parent) : dynamic_reference<APIBase>(parent, "core_channel_invite") { @@ -90,7 +90,7 @@ class Invite::API final class Invite::Invite final : public insp::intrusive_list_node<Invite, LocalUser>, public insp::intrusive_list_node<Invite, Channel> { - 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 <typename T> 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<Manager> { - public: +public: API(Module* mod) : dynamic_reference_nocheck<Manager>(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<Manager> { - public: +public: API(Module* mod) : dynamic_reference_nocheck<Manager>(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<typename PatternClass> 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<Engine> { - 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<Data> 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<UserCertificateAPIBase> { - public: +public: UserCertificateAPI(Module* parent) : dynamic_reference<UserCertificateAPIBase>(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<UCHAR_MAX + 1> 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 <char Sep, bool SendEmpty> class Numeric::Builder : public GenericBuilder<Sep, SendEmpty, WriteNumericSink> { - public: +public: Builder(LocalUser* user, unsigned int num, bool addparam = true, size_t additionalsize = 0) : ::Numeric::GenericBuilder<Sep, SendEmpty, WriteNumericSink>(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 <unsigned int NumStaticParams, bool SendEmpty> class Numeric::ParamBuilder : public GenericParamBuilder<NumStaticParams, SendEmpty, WriteNumericSink> { - public: +public: ParamBuilder(LocalUser* user, unsigned int num) : ::Numeric::GenericParamBuilder<NumStaticParams, SendEmpty, WriteNumericSink>(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 <typename T, typename ExtItemT> 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<FailedPort> FailedPortList; class CoreExport ListenSocket final : public EventHandler { - public: +public: std::shared_ptr<ConfigTag> bind_tag; const irc::sockets::sockaddrs bind_sa; class IOHookProvRef : public dynamic_reference_nocheck<IOHookProvider> { - public: + public: IOHookProvRef() : dynamic_reference_nocheck<IOHookProvider>(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<EventHandler*> 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<std::string, irc::insensitive_swo> 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<LocalUser> 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<ModeParser::MODEID_MAX> 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<LocalUser> { - 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 <typename T> class insp::aligned_storage final { - private: +private: /** The underlying aligned storage block. */ mutable typename std::aligned_storage<sizeof(T), std::alignment_of<T>::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 <typename Iterator> 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<XLine *> pending_lines; @@ -400,7 +400,7 @@ class CoreExport XLineManager final */ XLineContainer lookup_lines; - public: +public: /** Constructor */ |
