From fb0cdf78cbfda5fb2243318149803effbaf0ab18 Mon Sep 17 00:00:00 2001 From: apa420 <17131426+apa420@users.noreply.github.com> Date: Thu, 12 Jul 2018 18:57:11 +0200 Subject: [PATCH] Added description when typing /follow (#606) * Added description when typing /follow * syntax fix of 1364e0e707dd6f0989291e1f399460c5a114dbb5 --- src/controllers/commands/CommandController.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index c85d6e14..595643cc 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -206,7 +206,11 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel, }); return ""; - } else if (commandName == "/follow" && words.size() >= 2) { + } else if (commandName == "/follow") { + if (words.size() < 2) { + channel->addMessage(Message::createSystemMessage("Usage: /follow [user]")); + return ""; + } auto app = getApp(); auto user = app->accounts->twitch.getCurrent(); @@ -231,7 +235,11 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel, }); return ""; - } else if (commandName == "/unfollow" && words.size() >= 2) { + } else if (commandName == "/unfollow") { + if (words.size() < 2) { + channel->addMessage(Message::createSystemMessage("Usage: /unfollow [user]")); + return ""; + } auto app = getApp(); auto user = app->accounts->twitch.getCurrent();