summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-07-15 12:26:45 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-18 15:11:02 +0200
commit153179b574dccd6df9c5c5f3e68f3c1725e26843 (patch)
tree06b56255d8a45a476089e772cc30d11f2dde19fa /src/command_parse.cpp
parentb395c59997debe3827a39ec23cba54465d2aaf6a (diff)
Create the CommandBase class from Command
The Handle() method is not part of CommandBase, making it possible to provide a different Handle() in each class derived from CommandBase
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 51358519b..d1ae98729 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -327,6 +327,10 @@ void CommandParser::RemoveCommand(Command* x)
cmdlist.erase(n);
}
+CommandBase::~CommandBase()
+{
+}
+
Command::~Command()
{
ServerInstance->Parser->RemoveCommand(this);
@@ -357,7 +361,7 @@ CommandParser::CommandParser()
{
}
-std::string CommandParser::TranslateUIDs(const std::vector<TranslateType>& to, const std::vector<std::string>& source, bool prefix_final, Command* custom_translator)
+std::string CommandParser::TranslateUIDs(const std::vector<TranslateType>& to, const std::vector<std::string>& source, bool prefix_final, CommandBase* custom_translator)
{
std::vector<TranslateType>::const_iterator types = to.begin();
std::string dest;
@@ -386,7 +390,7 @@ std::string CommandParser::TranslateUIDs(const std::vector<TranslateType>& to, c
return dest;
}
-void CommandParser::TranslateSingleParam(TranslateType to, const std::string& item, std::string& dest, Command* custom_translator, unsigned int paramnumber)
+void CommandParser::TranslateSingleParam(TranslateType to, const std::string& item, std::string& dest, CommandBase* custom_translator, unsigned int paramnumber)
{
switch (to)
{