#139 Re-ordered /CTCP arguments: /CTCP command target message

1_2_0_dev
Tomatix 11 months ago
parent 0c7ece7d1d
commit 11f120d7ca
  1. 6
      ICommand/ICommand.cpp

@ -478,16 +478,16 @@ bool ICommand::tryParseInternal(QString cmdLine)
using namespace Command::IRC;
if (command == CTCP || command == CTCPREPLY) {
CommandData argv(cmdLine, { &ICommand::prd_AnyWord, &ICommand::prd_AnyWordToUpper, &ICommand::prd_Message });
CommandData argv(cmdLine, { &ICommand::prd_AnyWordToUpper, &ICommand::prd_AnyWord, &ICommand::prd_Message });
if (!connection.isOnline())
print_notConnectedToServer(command);
else if (!argv[0] || !argv[1])
print_notEnoughParameters(command);
else {
if (command == CTCP)
mp->cmd_ctcp(*argv[0], *argv[1], argv[2].value_or(""));
mp->cmd_ctcp(*argv[1], *argv[0], argv[2].value_or(""));
else
mp->cmd_ctcpreply(*argv[0], *argv[1], argv[2].value_or(""));
mp->cmd_ctcpreply(*argv[1], *argv[0], argv[2].value_or(""));
}
return true;
}

Loading…
Cancel
Save