From f51e7c86e3c010753a3f0d43757c275395ee5008 Mon Sep 17 00:00:00 2001 From: JAJames Date: Fri, 17 Jun 2016 21:04:21 -0400 Subject: [PATCH] Removed "sync" command --- CoreCommands/CoreCommands.cpp | 33 --------------------------------- CoreCommands/CoreCommands.h | 1 - 2 files changed, 34 deletions(-) diff --git a/CoreCommands/CoreCommands.cpp b/CoreCommands/CoreCommands.cpp index bc5ee5a..8fbe3a0 100644 --- a/CoreCommands/CoreCommands.cpp +++ b/CoreCommands/CoreCommands.cpp @@ -148,39 +148,6 @@ GENERIC_COMMAND_INIT(VersionGenericCommand) GENERIC_COMMAND_AS_CONSOLE_COMMAND(VersionGenericCommand) GENERIC_COMMAND_AS_IRC_COMMAND_NO_CREATE(VersionGenericCommand) -// Sync Command - -SyncGenericCommand::SyncGenericCommand() -{ - this->addTrigger(STRING_LITERAL_AS_REFERENCE("sync")); -} - -GenericCommand::ResponseLine *SyncGenericCommand::trigger(const Jupiter::ReadableString ¶meters) -{ - if (Jupiter::IRC::Client::Config == nullptr) - return new GenericCommand::ResponseLine(STRING_LITERAL_AS_REFERENCE("Unable to find Config data."), GenericCommand::DisplayType::PublicError); - else - { - bool r; - if (parameters.isNotEmpty()) - r = Jupiter::IRC::Client::Config->sync(parameters); - else r = Jupiter::IRC::Client::Config->sync(); - if (r) - return new GenericCommand::ResponseLine(STRING_LITERAL_AS_REFERENCE("Config data synced to file successfully."), GenericCommand::DisplayType::PublicSuccess); - return new GenericCommand::ResponseLine(STRING_LITERAL_AS_REFERENCE("Unable to sync Config data."), GenericCommand::DisplayType::PublicError); - } -} - -const Jupiter::ReadableString &SyncGenericCommand::getHelp(const Jupiter::ReadableString &) -{ - static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Syncs the configuration data to a file. Syntax: sync [file]"); - return defaultHelp; -} - -GENERIC_COMMAND_INIT(SyncGenericCommand) -GENERIC_COMMAND_AS_CONSOLE_COMMAND(SyncGenericCommand) -GENERIC_COMMAND_AS_IRC_COMMAND_ACCESS_CREATE(SyncGenericCommand, 4) - // Rehash Command RehashGenericCommand::RehashGenericCommand() diff --git a/CoreCommands/CoreCommands.h b/CoreCommands/CoreCommands.h index 451f07d..29967d2 100644 --- a/CoreCommands/CoreCommands.h +++ b/CoreCommands/CoreCommands.h @@ -30,7 +30,6 @@ class CoreCommandsPlugin : public Jupiter::Plugin GENERIC_CONSOLE_COMMAND(HelpConsoleCommand) GENERIC_IRC_COMMAND(HelpIRCCommand) GENERIC_GENERIC_COMMAND(VersionGenericCommand) -GENERIC_GENERIC_COMMAND(SyncGenericCommand) GENERIC_GENERIC_COMMAND(RehashGenericCommand) #endif // _CORECOMMANDS_H_HEADER \ No newline at end of file