summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-23 12:24:14 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-23 12:24:14 +0100
commit5a64433015f5a25af133a136468093a140595bc5 (patch)
treed9486e1384201441e77ad522534f6225326f3664 /src/modules.cpp
parent3c9e626d3f497af384b3248065221bf0af3631c5 (diff)
Throw an exception if ModeParser::AddMode() fails
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 88d89a35b..3723b09c3 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -594,8 +594,7 @@ void ModuleManager::AddService(ServiceProvider& item)
case SERVICE_MODE:
{
ModeHandler* mh = static_cast<ModeHandler*>(&item);
- if (!ServerInstance->Modes->AddMode(mh))
- throw ModuleException("Mode "+std::string(item.name)+" already exists.");
+ ServerInstance->Modes->AddMode(mh);
DataProviders.insert(std::make_pair((mh->GetModeType() == MODETYPE_CHANNEL ? "mode/" : "umode/") + item.name, &item));
dynamic_reference_base::reset_all();
return;