summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 7998d9cc3..c123353b0 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -379,6 +379,12 @@ Command::~Command()
ServerInstance->Parser.RemoveCommand(this);
}
+void Command::RegisterService()
+{
+ if (!ServerInstance->Parser.AddCommand(this))
+ throw ModuleException("Command already exists: " + name);
+}
+
void CommandParser::ProcessBuffer(std::string &buffer,LocalUser *user)
{
if (buffer.empty())