diff options
| author | 2022-09-29 12:01:29 +0100 | |
|---|---|---|
| committer | 2022-09-29 12:36:01 +0100 | |
| commit | 89537ed2ab22fcedb25e0378bd2c18e392911c0c (patch) | |
| tree | 4cdea30cb16c0a044d80ba4bab8ef9a645c90824 /src/modules/m_spanningtree | |
| parent | Use NOMINMAX on Windows and undefine error in the log header. (diff) | |
Fix various cases of the &* being next to the name instead of type.
Diffstat (limited to 'src/modules/m_spanningtree')
| -rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/hmac.cpp | 8 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 18 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/main.h | 18 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/precommand.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/protocolinterface.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/resolvers.cpp | 8 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/resolvers.h | 8 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/rsquit.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 14 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 6 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/utils.h | 8 |
14 files changed, 50 insertions, 50 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 08533f5a8..dd121d9f9 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -392,7 +392,7 @@ void TreeSocket::SendCapabilities(int phase) } /* Isolate and return the elements that are different between two comma separated lists */ -void TreeSocket::ListDifference(const std::string &one, const std::string &two, char sep, +void TreeSocket::ListDifference(const std::string& one, const std::string& two, char sep, std::string& mleft, std::string& mright) { std::set<std::string> values; diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index eac406184..bd3895c6b 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -37,7 +37,7 @@ const std::string& TreeSocket::GetOurChallenge() return capab->ourchallenge; } -void TreeSocket::SetOurChallenge(const std::string &c) +void TreeSocket::SetOurChallenge(const std::string& c) { capab->ourchallenge = c; } @@ -47,12 +47,12 @@ const std::string& TreeSocket::GetTheirChallenge() return capab->theirchallenge; } -void TreeSocket::SetTheirChallenge(const std::string &c) +void TreeSocket::SetTheirChallenge(const std::string& c) { capab->theirchallenge = c; } -std::string TreeSocket::MakePass(const std::string &password, const std::string &challenge) +std::string TreeSocket::MakePass(const std::string& password, const std::string& challenge) { /* This is a simple (maybe a bit hacky?) HMAC algorithm, thanks to jilles for * suggesting the use of HMAC to secure the password against various attacks. @@ -70,7 +70,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string return password; } -bool TreeSocket::ComparePass(const Link& link, const std::string &theirs) +bool TreeSocket::ComparePass(const Link& link, const std::string& theirs) { capab->auth_fingerprint = !link.Fingerprint.empty(); capab->auth_challenge = !capab->ourchallenge.empty() && !capab->theirchallenge.empty(); diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index c5fbcdce2..cc5a559ff 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -403,7 +403,7 @@ ModResult ModuleSpanningTree::OnPreTopicChange(User* user, Channel* chan, const return MOD_RES_PASSTHRU; } -void ModuleSpanningTree::OnPostTopicChange(User* user, Channel* chan, const std::string &topic) +void ModuleSpanningTree::OnPostTopicChange(User* user, Channel* chan, const std::string& topic) { // Drop remote events on the floor. if (!IS_LOCAL(user)) @@ -572,7 +572,7 @@ void ModuleSpanningTree::OnChangeRealName(User* user, const std::string& real) CmdBuilder(user, "FNAME").push_last(real).Broadcast(); } -void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident) +void ModuleSpanningTree::OnChangeIdent(User* user, const std::string& ident) { if ((user->registered != REG_ALL) || (!IS_LOCAL(user))) return; @@ -580,7 +580,7 @@ void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident) CmdBuilder(user, "FIDENT").push(ident).Broadcast(); } -void ModuleSpanningTree::OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts) +void ModuleSpanningTree::OnUserPart(Membership* memb, std::string& partmessage, CUList& excepts) { if (IS_LOCAL(memb->user)) { @@ -592,7 +592,7 @@ void ModuleSpanningTree::OnUserPart(Membership* memb, std::string &partmessage, } } -void ModuleSpanningTree::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) +void ModuleSpanningTree::OnUserQuit(User* user, const std::string& reason, const std::string& oper_message) { if (IS_LOCAL(user)) { @@ -619,7 +619,7 @@ void ModuleSpanningTree::OnUserQuit(User* user, const std::string &reason, const TreeServer::Get(user)->UserCount--; } -void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick) +void ModuleSpanningTree::OnUserPostNick(User* user, const std::string& oldnick) { if (IS_LOCAL(user)) { @@ -635,7 +635,7 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick) } } -void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts) +void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::string& reason, CUList& excepts) { if ((!IS_LOCAL(source)) && (source != ServerInstance->FakeClient)) return; @@ -650,7 +650,7 @@ void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::s params.Broadcast(); } -void ModuleSpanningTree::OnPreRehash(User* user, const std::string ¶meter) +void ModuleSpanningTree::OnPreRehash(User* user, const std::string& parameter) { ServerInstance->Logs.Debug(MODNAME, "OnPreRehash called with param %s", parameter.c_str()); @@ -782,7 +782,7 @@ void ModuleSpanningTree::OnOper(User* user) CommandOpertype::Builder(user).Broadcast(); } -void ModuleSpanningTree::OnAddLine(User* user, XLine *x) +void ModuleSpanningTree::OnAddLine(User* user, XLine* x) { if (!x->IsBurstable() || loopCall || (user && !IS_LOCAL(user))) return; @@ -793,7 +793,7 @@ void ModuleSpanningTree::OnAddLine(User* user, XLine *x) CommandAddLine::Builder(x, user).Broadcast(); } -void ModuleSpanningTree::OnDelLine(User* user, XLine *x) +void ModuleSpanningTree::OnDelLine(User* user, XLine* x) { if (!x->IsBurstable() || loopCall || (user && !IS_LOCAL(user))) return; diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 4b14352b9..dd2805557 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -181,7 +181,7 @@ public: void OnUserConnect(LocalUser* source) override; void OnUserInvite(User* source, User* dest, Channel* channel, time_t timeout, ModeHandler::Rank notifyrank, CUList& notifyexcepts) override; ModResult OnPreTopicChange(User* user, Channel* chan, const std::string& topic) override; - void OnPostTopicChange(User* user, Channel* chan, const std::string &topic) override; + void OnPostTopicChange(User* user, Channel* chan, const std::string& topic) override; void OnUserPostMessage(User* user, const MessageTarget& target, const MessageDetails& details) override; void OnUserPostTagMessage(User* user, const MessageTarget& target, const CTCTags::TagMessageDetails& details) override; void OnBackgroundTimer(time_t curtime) override; @@ -189,16 +189,16 @@ public: void OnChangeHost(User* user, const std::string& newhost) override; void OnChangeRealHost(User* user, const std::string& newhost) override; void OnChangeRealName(User* user, const std::string& real) override; - void OnChangeIdent(User* user, const std::string &ident) override; - void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts) override; - void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) override; - void OnUserPostNick(User* user, const std::string &oldnick) override; - void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts) override; - void OnPreRehash(User* user, const std::string ¶meter) override; + void OnChangeIdent(User* user, const std::string& ident) override; + void OnUserPart(Membership* memb, std::string& partmessage, CUList& excepts) override; + void OnUserQuit(User* user, const std::string& reason, const std::string& oper_message) override; + void OnUserPostNick(User* user, const std::string& oldnick) override; + void OnUserKick(User* source, Membership* memb, const std::string& reason, CUList& excepts) override; + void OnPreRehash(User* user, const std::string& parameter) override; void ReadConfig(ConfigStatus& status) override; void OnOper(User* user) override; - void OnAddLine(User *u, XLine *x) override; - void OnDelLine(User *u, XLine *x) override; + void OnAddLine(User* u, XLine* x) override; + void OnDelLine(User* u, XLine* x) override; ModResult OnStats(Stats::Context& stats) override; void OnUserAway(User* user) override; void OnUserBack(User* user) override; diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp index b9f745deb..0c60fbed4 100644 --- a/src/modules/m_spanningtree/precommand.cpp +++ b/src/modules/m_spanningtree/precommand.cpp @@ -25,7 +25,7 @@ #include "main.h" -ModResult ModuleSpanningTree::OnPreCommand(std::string &command, CommandBase::Params& parameters, LocalUser *user, bool validated) +ModResult ModuleSpanningTree::OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) { /* If the command doesnt appear to be valid, we dont want to mess with it. */ if (!validated) diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp index d8369089d..8f65bf4d7 100644 --- a/src/modules/m_spanningtree/protocolinterface.cpp +++ b/src/modules/m_spanningtree/protocolinterface.cpp @@ -102,7 +102,7 @@ void SpanningTreeProtocolInterface::Server::SendMetaData(const std::string& key, sock->WriteLine(CommandMetadata::Builder(key, data)); } -void SpanningTreeProtocolInterface::SendSNONotice(char snomask, const std::string &text) +void SpanningTreeProtocolInterface::SendSNONotice(char snomask, const std::string& text) { CmdBuilder("SNONOTICE").push(snomask).push_last(text).Broadcast(); } diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp index 6c4577be1..44e3e7dc6 100644 --- a/src/modules/m_spanningtree/resolvers.cpp +++ b/src/modules/m_spanningtree/resolvers.cpp @@ -46,7 +46,7 @@ ServernameResolver::ServernameResolver(DNS::Manager* mgr, const std::string& hos { } -void ServernameResolver::OnLookupComplete(const DNS::Query *r) +void ServernameResolver::OnLookupComplete(const DNS::Query* r) { const DNS::ResourceRecord* const ans_record = r->FindAnswerOfType(this->question.type); if (!ans_record) @@ -81,7 +81,7 @@ void ServernameResolver::OnLookupComplete(const DNS::Query *r) } } -void ServernameResolver::OnError(const DNS::Query *r) +void ServernameResolver::OnError(const DNS::Query* r) { if (r->error == DNS::ERROR_UNLOADED) { @@ -132,7 +132,7 @@ bool SecurityIPResolver::CheckIPv4() } } -void SecurityIPResolver::OnLookupComplete(const DNS::Query *r) +void SecurityIPResolver::OnLookupComplete(const DNS::Query* r) { for (std::shared_ptr<Link> L : Utils->LinkBlocks) { @@ -154,7 +154,7 @@ void SecurityIPResolver::OnLookupComplete(const DNS::Query *r) CheckIPv4(); } -void SecurityIPResolver::OnError(const DNS::Query *r) +void SecurityIPResolver::OnError(const DNS::Query* r) { // This can be called because of us being unloaded but we don't have to do anything differently if (CheckIPv4()) diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h index dc82bd329..c9e02f6cf 100644 --- a/src/modules/m_spanningtree/resolvers.h +++ b/src/modules/m_spanningtree/resolvers.h @@ -44,8 +44,8 @@ private: bool CheckIPv4(); public: SecurityIPResolver(Module* me, DNS::Manager* mgr, const std::string& hostname, std::shared_ptr<Link> x, DNS::QueryType qt); - void OnLookupComplete(const DNS::Query *r) override; - void OnError(const DNS::Query *q) override; + void OnLookupComplete(const DNS::Query* r) override; + void OnError(const DNS::Query* q) override; }; /** This class is used to resolve server hostnames during /connect and autoconnect. @@ -64,6 +64,6 @@ private: std::shared_ptr<Autoconnect> myautoconnect; public: ServernameResolver(DNS::Manager* mgr, const std::string& hostname, std::shared_ptr<Link> x, DNS::QueryType qt, std::shared_ptr<Autoconnect> myac); - void OnLookupComplete(const DNS::Query *r) override; - void OnError(const DNS::Query *q) override; + void OnLookupComplete(const DNS::Query* r) override; + void OnError(const DNS::Query* q) override; }; diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp index 52500f5f5..cdc3cce62 100644 --- a/src/modules/m_spanningtree/rsquit.cpp +++ b/src/modules/m_spanningtree/rsquit.cpp @@ -40,7 +40,7 @@ CommandRSQuit::CommandRSQuit(Module* Creator) CmdResult CommandRSQuit::Handle(User* user, const Params& parameters) { - TreeServer *server_target; // Server to squit + TreeServer* server_target; // Server to squit server_target = Utils->FindServerMask(parameters[0]); if (!server_target) diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 914123bf5..d31d978f3 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -209,7 +209,7 @@ public: /** Get challenge set in our CAPAB for challenge/response */ - void SetOurChallenge(const std::string &c); + void SetOurChallenge(const std::string& c); /** Get challenge set in their CAPAB for challenge/response */ @@ -217,11 +217,11 @@ public: /** Get challenge set in their CAPAB for challenge/response */ - void SetTheirChallenge(const std::string &c); + void SetTheirChallenge(const std::string& c); /** Compare two passwords based on authentication scheme */ - bool ComparePass(const Link& link, const std::string &theirs); + bool ComparePass(const Link& link, const std::string& theirs); /** Clean up information used only during server negotiation */ @@ -232,7 +232,7 @@ public: /** Construct a password, optionally hashed with the other side's * challenge string */ - static std::string MakePass(const std::string &password, const std::string &challenge); + static std::string MakePass(const std::string& password, const std::string& challenge); /** When an outbound connection finishes connecting, we receive * this event, and must send our SERVER string to the other @@ -249,7 +249,7 @@ public: /** Sends an error to the remote server, and displays it locally to show * that it was sent. */ - void SendError(const std::string &errormessage); + void SendError(const std::string& errormessage); /** Recursively send the server tree with distances as hops. * This is used during network burst to inform the other server @@ -273,7 +273,7 @@ public: void SendCapabilities(int phase); /* Isolate and return the elements that are different between two lists */ - static void ListDifference(const std::string &one, const std::string &two, char sep, + static void ListDifference(const std::string& one, const std::string& two, char sep, std::string& mleft, std::string& mright); bool Capab(const CommandBase::Params& params); @@ -323,7 +323,7 @@ public: /** Process complete line from buffer */ - void ProcessLine(std::string &line); + void ProcessLine(std::string& line); /** Process message tags received from a remote server. */ static void ProcessTag(User* source, const std::string& tag, ClientProtocol::TagMap& tags); diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index f66227084..af97b28ed 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -150,7 +150,7 @@ void TreeSocket::OnError(BufferedSocketError e) Close(); } -void TreeSocket::SendError(const std::string &errormessage) +void TreeSocket::SendError(const std::string& errormessage) { WriteLine("ERROR :"+errormessage); DoWrite(); diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index cacccf544..e78506a08 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -86,7 +86,7 @@ void TreeSocket::Split(const std::string& line, std::string& tags, std::string& params.push_back(token); } -void TreeSocket::ProcessLine(std::string &line) +void TreeSocket::ProcessLine(std::string& line) { std::string tags; std::string prefix; diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index b4e1fd0ef..aae4c4a07 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -55,7 +55,7 @@ ModResult ModuleSpanningTree::OnAcceptConnection(int newsock, ListenSocket* from return MOD_RES_DENY; } -TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName) +TreeServer* SpanningTreeUtilities::FindServer(const std::string& ServerName) { if (InspIRCd::IsSID(ServerName)) return this->FindServerID(ServerName); @@ -74,7 +74,7 @@ TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName) /** Find the first server matching a given glob mask. * We iterate over the list and match each one until we get a hit. */ -TreeServer* SpanningTreeUtilities::FindServerMask(const std::string &ServerName) +TreeServer* SpanningTreeUtilities::FindServerMask(const std::string& ServerName) { for (const auto& [name, server] : serverlist) { @@ -84,7 +84,7 @@ TreeServer* SpanningTreeUtilities::FindServerMask(const std::string &ServerName) return nullptr; } -TreeServer* SpanningTreeUtilities::FindServerID(const std::string &id) +TreeServer* SpanningTreeUtilities::FindServerID(const std::string& id) { server_hash::iterator iter = sidlist.find(id); if (iter != sidlist.end()) diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index dcf5b73c2..2b3dee08e 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -87,7 +87,7 @@ public: unsigned long PingWarnTime; /** This variable represents the root of the server tree */ - TreeServer *TreeRoot = nullptr; + TreeServer* TreeRoot = nullptr; /** IPs allowed to link to us */ std::vector<std::string> ValidIPs; @@ -147,11 +147,11 @@ public: /** Find a server by name or SID */ - TreeServer* FindServer(const std::string &ServerName); + TreeServer* FindServer(const std::string& ServerName); /** Find server by SID */ - TreeServer* FindServerID(const std::string &id); + TreeServer* FindServerID(const std::string& id); /** Find a server based on a target string. * @param target Target string where a command should be routed to. May be a server name, a sid, a nickname or a uuid. @@ -160,7 +160,7 @@ public: /** Find a server by glob mask */ - TreeServer* FindServerMask(const std::string &ServerName); + TreeServer* FindServerMask(const std::string& ServerName); /** Find a link tag from a server name */ |
