summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/compat.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp2
2 files changed, 2 insertions, 2 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);
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 51f7026dd..e9e3e217d 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -37,7 +37,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st
const std::string& modestr = params[8];
/* Is this a valid UID, and not misrouted? */
- if (params[0].length() != UIDGenerator::UUID_LENGTH || params[0].substr(0, 3) != remoteserver->GetID())
+ if (params[0].length() != UIDGenerator::UUID_LENGTH || params[0].compare(0, 3, remoteserver->GetID()))
throw ProtocolException("Bogus UUID");
/* Check parameters for validity before introducing the client, discovered by dmb */
if (modestr[0] != '+')