summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/compat.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-05-26 12:07:22 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-05-26 12:07:22 +0200
commit0b3f568a7506fb7ddc9a24d6ab12a969befb923d (patch)
tree3351ce34fb05378f5d0269ce505de2a4c7498d82 /src/modules/m_spanningtree/compat.cpp
parente3bcf95ee996c058c73879c12ac5a487f8dcdf46 (diff)
Switch to std::string::compare() from substr() in a couple of places
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
-rw-r--r--src/modules/m_spanningtree/compat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp
index 1d573b8b4..857e95da9 100644
--- a/src/modules/m_spanningtree/compat.cpp
+++ b/src/modules/m_spanningtree/compat.cpp
@@ -114,7 +114,7 @@ void TreeSocket::WriteLine(const std::string& original_line)
// We're sending channel metadata
line.erase(c, d-c);
}
- else if (line.substr(c, d-c) == " operquit")
+ else if (!line.compare(c, d-c, " operquit", 9))
{
// ":22D METADATA 22DAAAAAX operquit :message" -> ":22DAAAAAX OPERQUIT :message"
line = ":" + line.substr(b+1, c-b) + "OPERQUIT" + line.substr(d);