diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-12-02 13:30:24 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-12-02 13:30:24 +0100 |
commit | 860f5cbf1ea159d7d1c3fce2364747a822c50461 (patch) | |
tree | cc4f7e8bb3efc944b8ce101c5db46162b31f2834 /src/command_parse.cpp | |
parent | 44b5a8fa89d8c2bda767c0d5fe77c4d31061ce2b (diff) | |
parent | 90ab8cf4258a25e8403465ed86296fc74405620d (diff) |
Merge branch 'master+serviceinit'
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 6 |
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()) |