Abolish the infernal space before accessibility keywords.

This commit is contained in:
Sadie Powell 2022-01-25 13:59:42 +00:00
parent 94046d9eaf
commit d79147e7af
308 changed files with 1227 additions and 1227 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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;

View File

@ -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

View File

@ -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
@ -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".

View File

@ -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

View File

@ -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 };

View File

@ -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
*/

View File

@ -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
{
@ -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;

View File

@ -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,7 +138,7 @@ class RouteDescriptor final
class CoreExport CommandBase
: public ServiceProvider
{
public:
public:
/** Encapsulates parameters to a command. */
class Params : public std::vector<std::string>
{
@ -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;

View File

@ -28,11 +28,11 @@
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
{
@ -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); }

View File

@ -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.
*/

View File

@ -25,7 +25,7 @@
class CoreExport dynamic_reference_base
: public insp::intrusive_list_node<dynamic_reference_base>
{
public:
public:
class CaptureHook
{
public:
@ -34,15 +34,15 @@ class CoreExport dynamic_reference_base
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) {}
};

View File

@ -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

View File

@ -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.

View File

@ -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).

View File

@ -32,9 +32,9 @@
class CoreExport FileLogStream final
: public LogStream
{
private:
private:
FileWriter *f;
public:
public:
FileLogStream(LogLevel loglevel, FileWriter *fw);
~FileLogStream() override;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,7 +115,7 @@ class CoreExport SocketTimeout final
class CoreExport StreamSocket
: public EventHandler
{
public:
public:
/** Socket send queue
*/
class SendQueue
@ -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);
};

View File

@ -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>;
};

View File

@ -23,7 +23,7 @@ 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;
@ -152,7 +152,7 @@ class INSPIRCD_INTRUSIVE_LIST_NAME
listsize--;
}
private:
private:
T* listhead = nullptr;
#ifdef INSPIRCD_INTRUSIVE_LIST_HAS_TAIL
T* listtail = nullptr;

View File

@ -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
*/

View File

@ -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

View File

@ -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.
*/

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
};

View File

@ -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.

View File

@ -44,7 +44,7 @@ inline AccountExtItem* GetAccountIdExtItem()
class AccountEventListener
: public Events::ModuleEventListener
{
public:
public:
AccountEventListener(Module* mod)
: ModuleEventListener(mod, "event/account")
{

View File

@ -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")
{

View File

@ -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")
{

View File

@ -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

View File

@ -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")
{

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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")
{

View File

@ -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;

View File

@ -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.

View File

@ -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")
{

View File

@ -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.

View File

@ -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")
{

View File

@ -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")
{

View File

@ -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) { }

View File

@ -29,7 +29,7 @@ namespace Names
class Names::EventListener
: public Events::ModuleEventListener
{
public:
public:
EventListener(Module* mod)
: ModuleEventListener(mod, "event/names")
{

View File

@ -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;

View File

@ -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")
{

View File

@ -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;
};

View File

@ -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)
{

View File

@ -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")
{

View File

@ -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

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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)

View File

@ -41,7 +41,7 @@ class Numeric::Numeric
*/
Server* sourceserver = nullptr;
public:
public:
/** Constructor
* @param num Numeric number (RPL_*, ERR_*)
*/

View File

@ -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)
{

View File

@ -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;
/**

View File

@ -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,7 +38,7 @@ class ProtocolServer
class CoreExport ProtocolInterface
{
public:
public:
typedef ProtocolServer Server;
class ServerInfo

View File

@ -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
{

View File

@ -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)

View File

@ -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();

View File

@ -172,7 +172,7 @@ 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;

View File

@ -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
@ -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;

View File

@ -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;

View File

@ -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
*/

View File

@ -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();

View File

@ -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;

View File

@ -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.

View File

@ -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();

View File

@ -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,7 +267,7 @@ 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().
*/
@ -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)
{

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -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
*/

View File

@ -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)

View File

@ -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<ModeChannelKey, StringExtItem>
{
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<ModeChannelLimit, IntExtItem>
{
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)

View File

@ -29,7 +29,7 @@ class InviteExpireTimer final
bool Tick() override;
public:
public:
InviteExpireTimer(Invite::Invite* invite, time_t timeout);
};

View File

@ -47,7 +47,7 @@ template<typename T, ExtensionType ExtType>
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<LocalUser, ExtensionType::USER> userext;
ExtItem<Channel, ExtensionType::CHANNEL> chanext;
public:
public:
APIImpl(Module* owner);
void Create(LocalUser* user, Channel* chan, time_t timeout) override;

View File

@ -22,9 +22,9 @@
class CoreModClients final
: public Module
{
private:
private:
public:
public:
CoreModClients()
: Module(VF_CORE | VF_VENDOR, "Accepts connections to the server.")
{

View File

@ -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)

View File

@ -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::Manager> DNS;
public:
public:
ModuleHostnameLookup()
: Module(VF_CORE | VF_VENDOR, "Provides support for DNS lookups on connecting clients")
, dnsLookup(this, "dns-lookup", ExtensionType::USER)

View File

@ -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)

View File

@ -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<ConnectClass::Ptr, std::vector<Numeric::Numeric>> NumericMap;
NumericMap cachednumerics;
@ -50,7 +50,7 @@ class ISupportManager final
*/
void BuildNumerics(ISupport::TokenMap& tokens, std::vector<Numeric::Numeric>& 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;
};

View File

@ -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)

View File

@ -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)

View File

@ -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")

View File

@ -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)

View File

@ -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)

View File

@ -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)
{

View File

@ -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)

View File

@ -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;
};

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -28,7 +28,7 @@
class IsonReplyBuilder final
: public Numeric::Builder<' ', true>
{
public:
public:
IsonReplyBuilder(LocalUser* user)
: Numeric::Builder<' ', true>(user, RPL_ISON)
{

View File

@ -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)

Some files were not shown because too many files have changed in this diff Show More