diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-26 12:41:25 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-26 12:41:25 +0200 |
commit | 3c11bda15af1f9d1eb74f561a5a00949efe813d6 (patch) | |
tree | 3aea46a1006032dd384d9b85f4e1eed9e1aa0c6a /src | |
parent | 23e803f104d59503dc2a37e458eb4daedc44ccfc (diff) |
m_spanningtree Drop unnecessary c_str() call when passing Link::Name to methods expecting std::string
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/override_stats.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/resolvers.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index fda420434..56cc78cd2 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -334,7 +334,7 @@ ModResult ModuleSpanningTree::HandleConnect(const std::vector<std::string>& para return MOD_RES_DENY; } - TreeServer* CheckDupe = Utils->FindServer(x->Name.c_str()); + TreeServer* CheckDupe = Utils->FindServer(x->Name); if (!CheckDupe) { user->WriteRemoteNotice(InspIRCd::Format("*** CONNECT: Connecting to server: \002%s\002 (%s:%d)", x->Name.c_str(), (x->HiddenFromStats ? "<hidden>" : x->IPAddr.c_str()), x->Port)); diff --git a/src/modules/m_spanningtree/override_stats.cpp b/src/modules/m_spanningtree/override_stats.cpp index b28c2d984..9b73837cb 100644 --- a/src/modules/m_spanningtree/override_stats.cpp +++ b/src/modules/m_spanningtree/override_stats.cpp @@ -38,9 +38,9 @@ ModResult ModuleSpanningTree::OnStats(Stats::Context& stats) ipaddr.append(L->IPAddr); const std::string hook = (L->Hook.empty() ? "plaintext" : L->Hook); - stats.AddRow(213, stats.GetSymbol(), ipaddr, '*', L->Name.c_str(), L->Port, hook); + stats.AddRow(213, stats.GetSymbol(), ipaddr, '*', L->Name, L->Port, hook); if (stats.GetSymbol() == 'c') - stats.AddRow(244, 'H', '*', '*', L->Name.c_str()); + stats.AddRow(244, 'H', '*', '*', L->Name); } return MOD_RES_DENY; } diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp index 1228e375f..6d5875af2 100644 --- a/src/modules/m_spanningtree/resolvers.cpp +++ b/src/modules/m_spanningtree/resolvers.cpp @@ -53,7 +53,7 @@ void ServernameResolver::OnLookupComplete(const DNS::Query *r) * Passing a hostname directly to BufferedSocket causes it to * just bail and set its FD to -1. */ - TreeServer* CheckDupe = Utils->FindServer(MyLink->Name.c_str()); + TreeServer* CheckDupe = Utils->FindServer(MyLink->Name); if (!CheckDupe) /* Check that nobody tried to connect it successfully while we were resolving */ { TreeSocket* newsocket = new TreeSocket(MyLink, myautoconnect, ans_record->rdata); |