#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; using namespace Command::IRC;
if (command == CTCP || command == CTCPREPLY) { 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()) if (!connection.isOnline())
print_notConnectedToServer(command); print_notConnectedToServer(command);
else if (!argv[0] || !argv[1]) else if (!argv[0] || !argv[1])
print_notEnoughParameters(command); print_notEnoughParameters(command);
else { else {
if (command == CTCP) 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 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; return true;
} }

Loading…
Cancel
Save