From b4a174ee9c32d62ea6bf010e837e8c5b1c3d36a3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 27 Apr 2021 16:36:40 +0100 Subject: [PATCH] Fix a bunch of weird indentation and spacing issues. --- include/channels.h | 26 +++++++++---------- include/clientprotocol.h | 2 +- include/command_parse.h | 2 +- include/cull_list.h | 2 +- include/inspsocket.h | 4 +-- include/iohook.h | 2 +- include/message.h | 2 +- include/mode.h | 4 +-- include/modules/callerid.h | 2 +- include/modules/dns.h | 4 +-- include/modules/regex.h | 8 +++--- include/modules/ssl.h | 4 +-- include/parammode.h | 2 +- include/serialize.h | 2 +- include/threadengines/threadengine_win32.h | 10 +++---- include/users.h | 6 ++--- src/configparser.cpp | 2 +- src/configreader.cpp | 4 +-- src/coremods/core_info/cmd_modules.cpp | 2 +- src/coremods/core_reloadmodule.cpp | 8 +++--- src/coremods/core_serialize_rfc.cpp | 2 +- src/coremods/core_stub.cpp | 2 +- src/coremods/core_whois.cpp | 4 +-- src/helperfuncs.cpp | 2 +- src/mode.cpp | 4 +-- src/modules.cpp | 4 +-- src/modules/extra/m_pgsql.cpp | 2 +- src/modules/extra/m_ssl_gnutls.cpp | 2 +- src/modules/extra/m_ssl_mbedtls.cpp | 2 +- src/modules/m_callerid.cpp | 2 +- src/modules/m_cban.cpp | 4 +-- src/modules/m_clones.cpp | 2 +- src/modules/m_dccallow.cpp | 2 +- src/modules/m_haproxy.cpp | 2 +- src/modules/m_hidemode.cpp | 2 +- src/modules/m_httpd.cpp | 2 +- src/modules/m_httpd_acl.cpp | 2 +- src/modules/m_ircv3.cpp | 4 +-- src/modules/m_ircv3_batch.cpp | 4 +-- src/modules/m_ldapauth.cpp | 2 +- src/modules/m_monitor.cpp | 8 +++--- src/modules/m_nationalchars.cpp | 8 +++--- src/modules/m_remove.cpp | 4 +-- src/modules/m_repeat.cpp | 2 +- src/modules/m_sasl.cpp | 20 +++++++------- src/modules/m_sha1.cpp | 2 +- src/modules/m_shun.cpp | 2 +- src/modules/m_spanningtree/main.cpp | 2 +- src/modules/m_spanningtree/nickcollide.cpp | 3 +-- src/modules/m_spanningtree/override_squit.cpp | 2 +- src/modules/m_spanningtree/treesocket.h | 4 +-- src/modules/m_spanningtree/utils.h | 2 +- src/modules/m_svshold.cpp | 2 +- src/modules/m_xline_db.cpp | 8 +++--- src/xline.cpp | 2 +- win/win32service.cpp | 2 +- 56 files changed, 111 insertions(+), 112 deletions(-) diff --git a/include/channels.h b/include/channels.h index 0b38958cc..aa025d4e7 100644 --- a/include/channels.h +++ b/include/channels.h @@ -42,7 +42,7 @@ class CoreExport Channel : public Extensible public: /** A map of Memberships on a channel keyed by User pointers */ - typedef std::map > MemberMap; + typedef std::map > MemberMap; private: /** Set default modes for the channel on creation @@ -117,23 +117,23 @@ class CoreExport Channel : public Extensible void SetMode(ModeHandler* mode, bool value); /** Returns true if a mode is set on a channel - * @param mode The mode character you wish to query - * @return True if the custom mode is set, false if otherwise - */ + * @param mode The mode character you wish to query + * @return True if the custom mode is set, false if otherwise + */ bool IsModeSet(ModeHandler* mode) { return ((mode->GetId() != ModeParser::MODEID_MAX) && (modes[mode->GetId()])); } bool IsModeSet(ModeHandler& mode) { return IsModeSet(&mode); } bool IsModeSet(ChanModeReference& mode); /** Returns the parameter for a custom mode on a channel. - * @param mode The mode character you wish to query - * - * For example if "+L #foo" is set, and you pass this method - * 'L', it will return '\#foo'. If the mode is not set on the - * channel, or the mode has no parameters associated with it, - * it will return an empty string. - * - * @return The parameter for this mode is returned, or an empty string - */ + * @param mode The mode character you wish to query + * + * For example if "+L #foo" is set, and you pass this method + * 'L', it will return '\#foo'. If the mode is not set on the + * channel, or the mode has no parameters associated with it, + * it will return an empty string. + * + * @return The parameter for this mode is returned, or an empty string + */ std::string GetModeParameter(ModeHandler* mode); std::string GetModeParameter(ChanModeReference& mode); std::string GetModeParameter(ParamModeBase* pm); diff --git a/include/clientprotocol.h b/include/clientprotocol.h index 29035250d..decb2fcf4 100644 --- a/include/clientprotocol.h +++ b/include/clientprotocol.h @@ -249,7 +249,7 @@ class ClientProtocol::Message : public ClientProtocol::MessageSource : ptr(NULL) , owned(true) { - new(str) std::string(s); + new(str) std::string(s); } Param(const Param& other) diff --git a/include/command_parse.h b/include/command_parse.h index d1a9d5e03..64981c634 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -34,7 +34,7 @@ class CoreExport CommandParser { public: - typedef TR1NS::unordered_map CommandMap; + typedef TR1NS::unordered_map CommandMap; private: /** Process a command from a user. diff --git a/include/cull_list.h b/include/cull_list.h index d29b7b267..41dab5187 100644 --- a/include/cull_list.h +++ b/include/cull_list.h @@ -49,7 +49,7 @@ class CoreExport CullList class CoreExport ActionBase : public classbase { public: - /** Executes this action. */ + /** Executes this action. */ virtual void Call() = 0; }; diff --git a/include/inspsocket.h b/include/inspsocket.h index f9cc87b1d..45fa46a5b 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -216,7 +216,7 @@ class CoreExport StreamSocket : public EventHandler } private: - /** Private send queue. Note that individual strings may be shared. + /** Private send queue. Note that individual strings may be shared. */ Container data; @@ -276,7 +276,7 @@ class CoreExport StreamSocket : public EventHandler * @param hook Next IOHook in the chain, can be NULL * @param rq Receive queue to put incoming data into * @return < 0 on error or close, 0 if no new data is ready (but the socket is still connected), > 0 if data was read from - the socket and put into the recvq + * the socket and put into the recvq */ int HookChainRead(IOHook* hook, std::string& rq); diff --git a/include/iohook.h b/include/iohook.h index dd5acda12..1985ea891 100644 --- a/include/iohook.h +++ b/include/iohook.h @@ -24,7 +24,7 @@ class StreamSocket; class IOHookProvider : public refcountbase, public ServiceProvider { - const bool middlehook; + const bool middlehook; public: enum Type diff --git a/include/message.h b/include/message.h index 068f31246..ed44868ee 100644 --- a/include/message.h +++ b/include/message.h @@ -42,7 +42,7 @@ class CoreExport MessageDetails /** Whether to update the source user's idle time. */ bool update_idle; - /** The users who are exempted from receiving this message. */ + /** The users who are exempted from receiving this message. */ CUList exemptions; /* The original message as sent by the user. */ diff --git a/include/mode.h b/include/mode.h index 82dd75770..940ed2144 100644 --- a/include/mode.h +++ b/include/mode.h @@ -99,7 +99,7 @@ class ParamModeBase; class CoreExport ModeHandler : public ServiceProvider { public: - typedef size_t Id; + typedef size_t Id; enum Class { @@ -579,7 +579,7 @@ class CoreExport ModeParser : public fakederef private: /** Type of the container that maps mode names to ModeWatchers */ - typedef insp::flat_multimap ModeWatcherMap; + typedef insp::flat_multimap ModeWatcherMap; /** Last item in the ModeType enum */ diff --git a/include/modules/callerid.h b/include/modules/callerid.h index eda930d28..989a5918c 100644 --- a/include/modules/callerid.h +++ b/include/modules/callerid.h @@ -28,7 +28,7 @@ namespace CallerID class CallerID::APIBase : public DataProvider { public: - APIBase(Module* parent) + APIBase(Module* parent) : DataProvider(parent, "m_callerid_api") { } diff --git a/include/modules/dns.h b/include/modules/dns.h index bce842bd8..aa6092788 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -162,8 +162,8 @@ namespace DNS /* Use result cache if available */ bool use_cache; /* Request id */ - RequestId id; - /* Creator of this request */ + RequestId id; + /* Creator of this request */ Module* const creator; Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true, unsigned int timeout = 0) diff --git a/include/modules/regex.h b/include/modules/regex.h index 5a0ea4903..6d036e148 100644 --- a/include/modules/regex.h +++ b/include/modules/regex.h @@ -59,9 +59,9 @@ class RegexFactory : public DataProvider class RegexException : public ModuleException { public: - RegexException(const std::string& regex, const std::string& error) - : ModuleException("Error in regex '" + regex + "': " + error) { } + RegexException(const std::string& regex, const std::string& error) + : ModuleException("Error in regex '" + regex + "': " + error) { } - RegexException(const std::string& regex, const std::string& error, int offset) - : ModuleException("Error in regex '" + regex + "' at offset " + ConvToStr(offset) + ": " + error) { } + RegexException(const std::string& regex, const std::string& error, int offset) + : ModuleException("Error in regex '" + regex + "' at offset " + ConvToStr(offset) + ": " + error) { } }; diff --git a/include/modules/ssl.h b/include/modules/ssl.h index c9229cf9d..ec16a56c3 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -250,7 +250,7 @@ class SSLIOHook : public IOHook class SSLClientCert { 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 (SSL) * @return The TLS (SSL) client certificate information, NULL if the peer is not using TLS (SSL) @@ -283,7 +283,7 @@ class SSLClientCert class UserCertificateAPIBase : public DataProvider { public: - UserCertificateAPIBase(Module* parent) + UserCertificateAPIBase(Module* parent) : DataProvider(parent, "m_sslinfo_api") { } diff --git a/include/parammode.h b/include/parammode.h index 06f127e11..002246d9b 100644 --- a/include/parammode.h +++ b/include/parammode.h @@ -23,7 +23,7 @@ class CoreExport ParamModeBase : public ModeHandler { private: - virtual void OnUnsetInternal(User* source, Channel* chan) = 0; + virtual void OnUnsetInternal(User* source, Channel* chan) = 0; public: ParamModeBase(Module* Creator, const std::string& Name, char modeletter, ParamSpec ps) diff --git a/include/serialize.h b/include/serialize.h index 192fd29d3..df0cbd5d5 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -44,7 +44,7 @@ class CoreExport Serializable EntryMap entries; public: - /** Retrieves the child elements. */ + /** Retrieves the child elements. */ const ChildMap& GetChildren() const { return children; } ChildMap& GetChildren() { return children; } diff --git a/include/threadengines/threadengine_win32.h b/include/threadengines/threadengine_win32.h index 77999e541..1b88179b6 100644 --- a/include/threadengines/threadengine_win32.h +++ b/include/threadengines/threadengine_win32.h @@ -51,11 +51,11 @@ class CoreExport ThreadEngine static DWORD WINAPI Entry(void* parameter); /** Create a new thread. This takes an already allocated - * Thread* pointer and initializes it to use this threading - * engine. On failure, this function may throw a CoreException. - * @param thread_to_init Pointer to a newly allocated Thread - * derived object. - */ + * Thread* pointer and initializes it to use this threading + * engine. On failure, this function may throw a CoreException. + * @param thread_to_init Pointer to a newly allocated Thread + * derived object. + */ void Start(Thread* thread_to_init); /** Stop a thread gracefully. diff --git a/include/users.h b/include/users.h index 8045d5705..1283d9fb3 100644 --- a/include/users.h +++ b/include/users.h @@ -61,8 +61,8 @@ enum RegistrationState { REG_USER = 1, /* Has sent USER */ REG_NICK = 2, /* Has sent NICK */ - REG_NICKUSER = 3, /* Bitwise combination of REG_NICK and REG_USER */ - REG_ALL = 7 /* REG_NICKUSER plus next bit along */ + REG_NICKUSER = 3, /* Bitwise combination of REG_NICK and REG_USER */ + REG_ALL = 7 /* REG_NICKUSER plus next bit along */ }; enum UserType { @@ -712,7 +712,7 @@ class CoreExport User : public Extensible class CoreExport UserIOHandler : public StreamSocket { private: - size_t checked_until; + size_t checked_until; public: LocalUser* const user; UserIOHandler(LocalUser* me) diff --git a/src/configparser.cpp b/src/configparser.cpp index 9f5a49f1d..32b705e8b 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -535,7 +535,7 @@ bool ConfigTag::readString(const std::string& key, std::string& value, bool allo if(j->first != key) continue; value = j->second; - if (!allow_lf && (value.find('\n') != std::string::npos)) + if (!allow_lf && (value.find('\n') != std::string::npos)) { ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() + " contains a linefeed, and linefeeds in this value are not permitted -- stripped to spaces."); diff --git a/src/configreader.cpp b/src/configreader.cpp index 2d3ecc3de..a739bf5b5 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -506,8 +506,8 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) ConfigTagList binds = ConfTags("bind"); if (binds.first == binds.second) - errstr << "Possible configuration error: you have not defined any blocks." << std::endl - << "You will need to do this if you want clients to be able to connect!" << std::endl; + errstr << "Possible configuration error: you have not defined any blocks." << std::endl + << "You will need to do this if you want clients to be able to connect!" << std::endl; if (old && valid) { diff --git a/src/coremods/core_info/cmd_modules.cpp b/src/coremods/core_info/cmd_modules.cpp index 7624ce05f..76ec6db7d 100644 --- a/src/coremods/core_info/cmd_modules.cpp +++ b/src/coremods/core_info/cmd_modules.cpp @@ -63,7 +63,7 @@ CmdResult CommandModules::Handle(User* user, const Params& parameters) const ModuleManager::ModuleMap& mods = ServerInstance->Modules->GetModules(); - for (ModuleManager::ModuleMap::const_iterator i = mods.begin(); i != mods.end(); ++i) + for (ModuleManager::ModuleMap::const_iterator i = mods.begin(); i != mods.end(); ++i) { Module* m = i->second; Version V = m->GetVersion(); diff --git a/src/coremods/core_reloadmodule.cpp b/src/coremods/core_reloadmodule.cpp index f3299db90..ce1f63667 100644 --- a/src/coremods/core_reloadmodule.cpp +++ b/src/coremods/core_reloadmodule.cpp @@ -31,10 +31,10 @@ static ClientProtocol::Serializer* dummyserializer; class DummySerializer : public ClientProtocol::Serializer { - bool Parse(LocalUser* user, const std::string& line, ClientProtocol::ParseOutput& parseoutput) CXX11_OVERRIDE - { - return false; - } + bool Parse(LocalUser* user, const std::string& line, ClientProtocol::ParseOutput& parseoutput) CXX11_OVERRIDE + { + return false; + } ClientProtocol::SerializedMessage Serialize(const ClientProtocol::Message& msg, const ClientProtocol::TagSelection& tagwl) const CXX11_OVERRIDE { diff --git a/src/coremods/core_serialize_rfc.cpp b/src/coremods/core_serialize_rfc.cpp index dcd67d49e..23d7b4aff 100644 --- a/src/coremods/core_serialize_rfc.cpp +++ b/src/coremods/core_serialize_rfc.cpp @@ -43,7 +43,7 @@ class RFCSerializer : public ClientProtocol::Serializer { } - bool Parse(LocalUser* user, const std::string& line, ClientProtocol::ParseOutput& parseoutput) CXX11_OVERRIDE; + bool Parse(LocalUser* user, const std::string& line, ClientProtocol::ParseOutput& parseoutput) CXX11_OVERRIDE; ClientProtocol::SerializedMessage Serialize(const ClientProtocol::Message& msg, const ClientProtocol::TagSelection& tagwl) const CXX11_OVERRIDE; }; diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index 460068da5..0695e4d99 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -167,7 +167,7 @@ class CommandUsers class CoreModStub : public Module { private: - CommandCapab cmdcapab; + CommandCapab cmdcapab; CommandConnect cmdconnect; CommandLinks cmdlinks; CommandSquit cmdsquit; diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp index c1c4777ef..b342f723f 100644 --- a/src/coremods/core_whois.cpp +++ b/src/coremods/core_whois.cpp @@ -80,10 +80,10 @@ class CommandWhois : public SplitCommand void SendChanList(WhoisContextImpl& whois); public: - /** If true then all opers are shown with a generic 'is a server operator' line rather than the oper type. */ + /** If true then all opers are shown with a generic 'is a server operator' line rather than the oper type. */ bool genericoper; - /** How to handle private/secret channels in the WHOIS response. */ + /** How to handle private/secret channels in the WHOIS response. */ SplitWhoisState splitwhois; diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 800d147eb..795f858fa 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -338,7 +338,7 @@ bool InspIRCd::IsSID(const std::string &str) */ return ((str.length() == 3) && isdigit(str[0]) && ((str[1] >= 'A' && str[1] <= 'Z') || isdigit(str[1])) && - ((str[2] >= 'A' && str[2] <= 'Z') || isdigit(str[2]))); + ((str[2] >= 'A' && str[2] <= 'Z') || isdigit(str[2]))); } /** A lookup table of values for multiplier characters used by diff --git a/src/mode.cpp b/src/mode.cpp index 3ce7ee10f..3538052b7 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -575,7 +575,7 @@ void ModeParser::CleanMask(std::string &mask) else if ((pos_of_pling == std::string::npos) && (pos_of_at != std::string::npos)) { /* Has an @ but no !, its a user@host */ - mask = "*!" + mask; + mask = "*!" + mask; } else if ((pos_of_pling != std::string::npos) && (pos_of_at == std::string::npos)) { @@ -759,9 +759,9 @@ std::string ModeParser::GiveModeList(ModeType mt) for (unsigned char mode = 'A'; mode <= 'z'; mode++) { ModeHandler* mh = modehandlers[mt][mode-65]; - /* One parameter when adding */ if (mh) { + /* One parameter when adding */ if (mh->NeedsParam(true)) { PrefixMode* pm = mh->IsPrefixMode(); diff --git a/src/modules.cpp b/src/modules.cpp index 6bb789753..f940a0fd8 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -138,13 +138,13 @@ void Module::OnChangeIdent(User*, const std::string&) { DetachEvent(I_OnChangeI void Module::OnAddLine(User*, XLine*) { DetachEvent(I_OnAddLine); } void Module::OnDelLine(User*, XLine*) { DetachEvent(I_OnDelLine); } void Module::OnExpireLine(XLine*) { DetachEvent(I_OnExpireLine); } -void Module::OnCleanup(ExtensionItem::ExtensibleType, Extensible*) { } +void Module::OnCleanup(ExtensionItem::ExtensibleType, Extensible*) { } ModResult Module::OnChannelPreDelete(Channel*) { DetachEvent(I_OnChannelPreDelete); return MOD_RES_PASSTHRU; } void Module::OnChannelDelete(Channel*) { DetachEvent(I_OnChannelDelete); } void Module::OnBuildNeighborList(User*, IncludeChanList&, std::map&) { DetachEvent(I_OnBuildNeighborList); } void Module::OnGarbageCollect() { DetachEvent(I_OnGarbageCollect); } ModResult Module::OnSetConnectClass(LocalUser* user, ConnectClass* myclass) { DetachEvent(I_OnSetConnectClass); return MOD_RES_PASSTHRU; } -void Module::OnUserMessage(User*, const MessageTarget&, const MessageDetails&) { DetachEvent(I_OnUserMessage); } +void Module::OnUserMessage(User*, const MessageTarget&, const MessageDetails&) { DetachEvent(I_OnUserMessage); } ModResult Module::OnNumeric(User*, const Numeric::Numeric&) { DetachEvent(I_OnNumeric); return MOD_RES_PASSTHRU; } ModResult Module::OnAcceptConnection(int, ListenSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { DetachEvent(I_OnAcceptConnection); return MOD_RES_PASSTHRU; } void Module::OnSetUserIP(LocalUser*) { DetachEvent(I_OnSetUserIP); } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 36156013d..e1db996c8 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -186,7 +186,7 @@ class SQLConn : public SQL::Provider, public EventHandler public: reference conf; /* The entry */ std::deque queue; - PGconn* sql; /* PgSQL database connection handle */ + PGconn* sql; /* PgSQL database connection handle */ SQLstatus status; /* PgSQL database connection status */ QueueItem qinprog; /* If there is currently a query in progress */ diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 5dadda184..e02c4a697 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -1248,7 +1248,7 @@ class GnuTLSIOHookProvider : public SSLIOHookProvider GnuTLS::Profile profile; public: - GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config) + GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) { diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 5c768ce3c..c3d040ad0 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -822,7 +822,7 @@ class mbedTLSIOHookProvider : public SSLIOHookProvider mbedTLS::Profile profile; public: - mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config) + mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) { diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 14f7012b6..ec1114cb9 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -45,7 +45,7 @@ enum class callerid_data { public: - typedef insp::flat_set UserSet; + typedef insp::flat_set UserSet; typedef std::vector CallerIdDataSet; time_t lastnotify; diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 1cf6c29bf..c7960c836 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -83,7 +83,7 @@ class CBanFactory : public XLineFactory CBanFactory() : XLineFactory("CBAN") { } /** Generate a CBAN - */ + */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) CXX11_OVERRIDE { return new CBan(set_time, duration, source, reason, xline_specific_mask); @@ -218,7 +218,7 @@ class ModuleCBan : public Module, public Stats::EventListener // Channel is banned. user->WriteNumeric(ERR_BADCHANNEL, cname, InspIRCd::Format("Channel %s is CBANed: %s", cname.c_str(), rl->reason.c_str())); ServerInstance->SNO->WriteGlobalSno('a', "%s tried to join %s which is CBANed (%s)", - user->nick.c_str(), cname.c_str(), rl->reason.c_str()); + user->nick.c_str(), cname.c_str(), rl->reason.c_str()); return MOD_RES_DENY; } diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp index 1210c7c12..3336b1817 100644 --- a/src/modules/m_clones.cpp +++ b/src/modules/m_clones.cpp @@ -39,7 +39,7 @@ class CommandClones : public SplitCommand IRCv3::Batch::Batch batch; public: - CommandClones(Module* Creator) + CommandClones(Module* Creator) : SplitCommand(Creator,"CLONES", 1) , batchmanager(Creator) , batch("inspircd.org/clones") diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 98bcbf4cd..007f0efef 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -352,7 +352,7 @@ class CommandDccallow : public Command void DisplayDCCAllowList(User* user) { - // display current DCCALLOW list + // display current DCCALLOW list user->WriteNumeric(RPL_DCCALLOWSTART, "Users on your DCCALLOW list:"); dl = ext.get(user); diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index cf551d545..f7ef52213 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -110,7 +110,7 @@ struct HAProxyHeader class HAProxyHookProvider : public IOHookProvider { private: - UserCertificateAPI sslapi; + UserCertificateAPI sslapi; public: HAProxyHookProvider(Module* mod) diff --git a/src/modules/m_hidemode.cpp b/src/modules/m_hidemode.cpp index 66e70fb89..3f041344f 100644 --- a/src/modules/m_hidemode.cpp +++ b/src/modules/m_hidemode.cpp @@ -91,7 +91,7 @@ class ModeHook : public ClientProtocol::EventHook const Modes::Change& curr = *i; if (settings.GetRequiredRank(*curr.mh) <= rank) { - // No restriction on who can see this mode or there is one but the member's rank is sufficient + // No restriction on who can see this mode or there is one but the member's rank is sufficient if (modechangelist) modechangelist->push(curr); diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index eefb3ed93..f3ec3298b 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -359,7 +359,7 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru { if (pathsegment == ".") { - // Stay at the current level. + // Stay at the current level. continue; } diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 197bf589e..270e8b007 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -48,7 +48,7 @@ class ModuleHTTPAccessList : public Module, public HTTPACLEventListener HTTPdAPI API; public: - ModuleHTTPAccessList() + ModuleHTTPAccessList() : HTTPACLEventListener(this) , API(this) { diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index 54163f2b1..e23999045 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -51,10 +51,10 @@ class JoinHook : public ClientProtocol::EventHook ClientProtocol::Events::Join extendedjoinmsg; public: - const std::string asterisk; + const std::string asterisk; ClientProtocol::EventProvider awayprotoev; AwayMessage awaymsg; - Cap::Capability extendedjoincap; + Cap::Capability extendedjoincap; Cap::Capability awaycap; JoinHook(Module* mod) diff --git a/src/modules/m_ircv3_batch.cpp b/src/modules/m_ircv3_batch.cpp index aa464f9fe..e280339e4 100644 --- a/src/modules/m_ircv3_batch.cpp +++ b/src/modules/m_ircv3_batch.cpp @@ -59,12 +59,12 @@ struct IRCv3::Batch::BatchInfo class IRCv3::Batch::ManagerImpl : public Manager { - typedef std::vector BatchList; + typedef std::vector BatchList; Cap::Capability cap; ClientProtocol::EventProvider protoevprov; LocalIntExt batchbits; - BatchList active_batches; + BatchList active_batches; bool unloading; bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) CXX11_OVERRIDE diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index 4885bc0e5..8d4b956e7 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -325,7 +325,7 @@ public: whitelistedcidrs.clear(); requiredattributes.clear(); - base = tag->getString("baserdn"); + base = tag->getString("baserdn"); attribute = tag->getString("attribute"); killreason = tag->getString("killreason"); vhost = tag->getString("host"); diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index ea631b2e8..823a6fe5d 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -190,7 +190,7 @@ class IRCv3::Monitor::Manager } private: - typedef TR1NS::unordered_map NickHash; + typedef TR1NS::unordered_map NickHash; Entry* Find(const std::string& nick) { @@ -239,9 +239,9 @@ class IRCv3::Monitor::Manager return &extdata->list; } - NickHash nicks; - ExtItem ext; - WatchedList emptywatchedlist; + NickHash nicks; + ExtItem ext; + WatchedList emptywatchedlist; }; void IRCv3::Monitor::Manager::ExtItem::FromInternal(Extensible* container, const std::string& value) diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 3b9afd5bd..91293573f 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -40,7 +40,6 @@ class lwbNickHandler static bool Call(const std::string&); }; - /*,m_reverse_additionalUp[256];*/ static unsigned char m_reverse_additional[256],m_additionalMB[256],m_additionalUtf8[256],m_additionalUtf8range[256],m_additionalUtf8interval[256]; char utf8checkrest(unsigned char * mb, unsigned char cnt) @@ -417,7 +416,7 @@ class ModuleNationalChars : public Module if (*p == '0') { if (p[1] == 'x') - /* hex with the leading "0x" */ + /* hex with the leading "0x" */ chartable[i] = symtoi(p + 2, 16); else chartable[i] = symtoi(p + 1, 8); @@ -426,12 +425,13 @@ class ModuleNationalChars : public Module else if (*p == 'x') { chartable[i] = symtoi(p + 1, 16); - }else /* decimal form */ + } + else /* decimal form */ { chartable[i] = symtoi(p, 10); } } - else /* plain-text char between '' */ + else /* plain-text char between '' */ { if (*(p + 1) == '\\') { diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index e0dbabf42..cd59f07bc 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -44,7 +44,7 @@ class RemoveBase : public Command ChanModeReference& nokicksmode; public: - unsigned int protectedrank; + unsigned int protectedrank; RemoveBase(Module* Creator, bool& snk, ChanModeReference& nkm, const char* cmdn) : Command(Creator, cmdn, 2, 3) @@ -108,7 +108,7 @@ class RemoveBase : public Command { /* We'll let everyone remove their level and below, eg: * ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) - a ulined target will get a higher level than it's possible for a /remover to get..so they're safe. + * a ulined target will get a higher level than it's possible for a /remover to get..so they're safe. * Nobody may remove people with >= protectedrank rank. */ unsigned int ulevel = channel->GetPrefixValue(user); diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 5a532389a..33ca5b057 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -30,7 +30,7 @@ class ChannelSettings { public: - enum RepeatAction + enum RepeatAction { ACT_KICK, ACT_BLOCK, diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index e202bae45..57e605d61 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -235,11 +235,11 @@ class SaslAuthenticator { switch (this->state) { - case SASL_INIT: + case SASL_INIT: this->agent = msg[0]; this->state = SASL_COMM; /* fall through */ - case SASL_COMM: + case SASL_COMM: if (msg[0] != this->agent) return this->state; @@ -267,9 +267,9 @@ class SaslAuthenticator ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Services sent an unknown SASL message \"%s\" \"%s\"", msg[2].c_str(), msg[3].c_str()); break; - case SASL_DONE: + case SASL_DONE: break; - default: + default: ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WTF: SaslState is not a known state (%d)", this->state); break; } @@ -301,16 +301,16 @@ class SaslAuthenticator switch (this->result) { - case SASL_OK: + case SASL_OK: this->user->WriteNumeric(RPL_SASLSUCCESS, "SASL authentication successful"); break; - case SASL_ABORT: + case SASL_ABORT: this->user->WriteNumeric(ERR_SASLABORTED, "SASL authentication aborted"); break; - case SASL_FAIL: + case SASL_FAIL: this->user->WriteNumeric(ERR_SASLFAIL, "SASL authentication failed"); break; - default: + default: break; } @@ -321,8 +321,8 @@ class SaslAuthenticator class CommandAuthenticate : public SplitCommand { private: - // The maximum length of an AUTHENTICATE request. - static const size_t MAX_AUTHENTICATE_SIZE = 400; + // The maximum length of an AUTHENTICATE request. + static const size_t MAX_AUTHENTICATE_SIZE = 400; public: SimpleExtItem& authExt; diff --git a/src/modules/m_sha1.cpp b/src/modules/m_sha1.cpp index 2d8ce635c..69af2eba6 100644 --- a/src/modules/m_sha1.cpp +++ b/src/modules/m_sha1.cpp @@ -166,7 +166,7 @@ class SHA1Context class SHA1HashProvider : public HashProvider { public: - SHA1HashProvider(Module* mod) + SHA1HashProvider(Module* mod) : HashProvider(mod, "sha1", 20, 64) { } diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index d63b721a0..c68afc494 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -43,7 +43,7 @@ class ShunFactory : public XLineFactory ShunFactory() : XLineFactory("SHUN") { } /** Generate a shun - */ + */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) CXX11_OVERRIDE { return new Shun(set_time, duration, source, reason, xline_specific_mask); diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 01387c753..507897a4e 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -128,7 +128,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) { if (user->IsOper()) { - ShowLinks(server, user, hops+1); + ShowLinks(server, user, hops+1); } } else diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp index 80b4e87c7..bef739ed0 100644 --- a/src/modules/m_spanningtree/nickcollide.cpp +++ b/src/modules/m_spanningtree/nickcollide.cpp @@ -78,8 +78,7 @@ bool SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remo * if ident@ip is equal, and theirs is newer, or * ident@ip differ, and ours is newer */ - if((SamePerson && remotets < localts) || - (!SamePerson && remotets > localts)) + if ((SamePerson && remotets < localts) || (!SamePerson && remotets > localts)) { // Only remote needs to change bChangeLocal = false; diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp index 32f8caf04..64c02e149 100644 --- a/src/modules/m_spanningtree/override_squit.cpp +++ b/src/modules/m_spanningtree/override_squit.cpp @@ -54,7 +54,7 @@ ModResult ModuleSpanningTree::HandleSquit(const CommandBase::Params& parameters, } else { - user->WriteNotice("*** SQUIT: The server \002" + parameters[0] + "\002 does not exist on the network."); + user->WriteNotice("*** SQUIT: The server \002" + parameters[0] + "\002 does not exist on the network."); } return MOD_RES_DENY; } diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index f705887b7..5d0fc9f2d 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -55,10 +55,10 @@ * CONNECTING: indicates an outbound socket which is * waiting to be writeable. * WAIT_AUTH_1: indicates the socket is outbound and - * has successfully connected, but has not + * has successfully connected, but has not * yet sent and received SERVER strings. * WAIT_AUTH_2: indicates that the socket is inbound - * but has not yet sent and received + * but has not yet sent and received * SERVER strings. * CONNECTED: represents a fully authorized, fully * connected server. diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 889cd182e..26e6e7c22 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -50,7 +50,7 @@ class SpanningTreeUtilities : public classbase CacheRefreshTimer RefreshTimer; public: - typedef std::set TreeSocketSet; + typedef std::set TreeSocketSet; typedef std::map > TimeoutList; /** Creator module diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index ec7fb1a11..48dad2ca4 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -82,7 +82,7 @@ class SVSHoldFactory : public XLineFactory SVSHoldFactory() : XLineFactory("SVSHOLD") { } /** Generate an SVSHOLD - */ + */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) CXX11_OVERRIDE { return new SVSHold(set_time, duration, source, reason, xline_specific_mask); diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 6928e43d7..9db277164 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -48,9 +48,9 @@ class ModuleXLineDB { /* Load the configuration * Note: - * This is on purpose not changed on a rehash. It would be non-trivial to change the database on-the-fly. - * Imagine a scenario where the new file already exists. Merging the current XLines with the existing database is likely a bad idea - * ...and so is discarding all current in-memory XLines for the ones in the database. + * This is on purpose not changed on a rehash. It would be non-trivial to change the database on-the-fly. + * Imagine a scenario where the new file already exists. Merging the current XLines with the existing database is likely a bad idea + * ...and so is discarding all current in-memory XLines for the ones in the database. */ ConfigTag* Conf = ServerInstance->Config->ConfValue("xlinedb"); xlinedbpath = ServerInstance->Config->Paths.PrependData(Conf->getString("filename", "xline.db", 1)); @@ -119,7 +119,7 @@ class ModuleXLineDB * xline types may not have a conf tag, so let's just write them. * In addition, let's use a file version, so we can maintain some * semblance of backwards compatibility for reading on startup.. - * -- w00t + * -- w00t */ stream << "VERSION 1" << std::endl; diff --git a/src/xline.cpp b/src/xline.cpp index 8b61ab684..4e18a0dea 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -400,7 +400,7 @@ XLine* XLineManager::MatchesLine(const std::string &type, const std::string &pat const time_t current = ServerInstance->Time(); - LookupIter safei; + LookupIter safei; for (LookupIter i = x->second.begin(); i != x->second.end(); ) { diff --git a/win/win32service.cpp b/win/win32service.cpp index 45aba7268..846cc3273 100644 --- a/win/win32service.cpp +++ b/win/win32service.cpp @@ -120,7 +120,7 @@ VOID ServiceMain(DWORD argc, LPCSTR *argv) g_ServiceData.argc = argc; // Note: since this memory is going to stay allocated for the rest of the execution, - // it doesn't make sense to free it, as it's going to be "freed" on process termination + // it doesn't make sense to free it, as it's going to be "freed" on process termination try { g_ServiceData.argv = new char*[argc]; -- 2.39.2