aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-05-26 12:07:22 +0200
committerGravatar Attila Molnar2014-05-26 12:07:22 +0200
commit0b3f568a7506fb7ddc9a24d6ab12a969befb923d (patch)
tree3351ce34fb05378f5d0269ce505de2a4c7498d82 /src/modules.cpp
parentPrefix all definitions in config.h to avoid potential collisions. (diff)
downloadinspircd++-0b3f568a7506fb7ddc9a24d6ab12a969befb923d.tar.gz
inspircd++-0b3f568a7506fb7ddc9a24d6ab12a969befb923d.tar.bz2
inspircd++-0b3f568a7506fb7ddc9a24d6ab12a969befb923d.zip
Switch to std::string::compare() from substr() in a couple of places
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 839686657..78b00e95e 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -611,7 +611,7 @@ void ModuleManager::AddService(ServiceProvider& item)
case SERVICE_DATA:
case SERVICE_IOHOOK:
{
- if ((item.name.substr(0, 5) == "mode/") || (item.name.substr(0, 6) == "umode/"))
+ if ((!item.name.compare(0, 5, "mode/", 5)) || (!item.name.compare(0, 6, "umode/", 6)))
throw ModuleException("The \"mode/\" and the \"umode\" service name prefixes are reserved.");
DataProviders.insert(std::make_pair(item.name, &item));