Browse Source

Removed "sync" command

pull/3/head
Jessica James 9 years ago
parent
commit
f51e7c86e3
  1. 33
      CoreCommands/CoreCommands.cpp
  2. 1
      CoreCommands/CoreCommands.h

33
CoreCommands/CoreCommands.cpp

@ -148,39 +148,6 @@ GENERIC_COMMAND_INIT(VersionGenericCommand)
GENERIC_COMMAND_AS_CONSOLE_COMMAND(VersionGenericCommand) GENERIC_COMMAND_AS_CONSOLE_COMMAND(VersionGenericCommand)
GENERIC_COMMAND_AS_IRC_COMMAND_NO_CREATE(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 &parameters)
{
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 // Rehash Command
RehashGenericCommand::RehashGenericCommand() RehashGenericCommand::RehashGenericCommand()

1
CoreCommands/CoreCommands.h

@ -30,7 +30,6 @@ class CoreCommandsPlugin : public Jupiter::Plugin
GENERIC_CONSOLE_COMMAND(HelpConsoleCommand) GENERIC_CONSOLE_COMMAND(HelpConsoleCommand)
GENERIC_IRC_COMMAND(HelpIRCCommand) GENERIC_IRC_COMMAND(HelpIRCCommand)
GENERIC_GENERIC_COMMAND(VersionGenericCommand) GENERIC_GENERIC_COMMAND(VersionGenericCommand)
GENERIC_GENERIC_COMMAND(SyncGenericCommand)
GENERIC_GENERIC_COMMAND(RehashGenericCommand) GENERIC_GENERIC_COMMAND(RehashGenericCommand)
#endif // _CORECOMMANDS_H_HEADER #endif // _CORECOMMANDS_H_HEADER
Loading…
Cancel
Save