X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=c123353b0a96b94da8c6ded03762afdc7c92be3e;hb=81215de4f00d0044f1dbe0d1c81d1b7081e5405d;hp=7998d9cc3a982f0f71732a2f7dfe4af2b831e9f3;hpb=bd1471bc08be28bc2554d35fdaeb078338b14266;p=user%2Fhenk%2Fcode%2Finspircd.git 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())