diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index 078cf1a2f..c2970d384 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -28,17 +28,43 @@ #include #include -#define TWITCH_DEFAULT_COMMANDS \ - "/help", "/w", "/me", "/disconnect", "/mods", "/vips", "/color", \ - "/commercial", "/mod", "/unmod", "/vip", "/unvip", "/ban", "/unban", \ - "/timeout", "/untimeout", "/slow", "/slowoff", "/r9kbeta", \ - "/r9kbetaoff", "/emoteonly", "/emoteonlyoff", "/clear", \ - "/subscribers", "/subscribersoff", "/followers", "/followersoff", \ - "/host", "/unhost", "/raid", "/unraid" - namespace { using namespace chatterino; +static const QStringList twitchDefaultCommands{ + "/help", + "/w", + "/me", + "/disconnect", + "/mods", + "/vips", + "/color", + "/commercial", + "/mod", + "/unmod", + "/vip", + "/unvip", + "/ban", + "/unban", + "/timeout", + "/untimeout", + "/slow", + "/slowoff", + "/r9kbeta", + "/r9kbetaoff", + "/emoteonly", + "/emoteonlyoff", + "/clear", + "/subscribers", + "/subscribersoff", + "/followers", + "/followersoff", + "/host", + "/unhost", + "/raid", + "/unraid", +}; + static const QStringList whisperCommands{"/w", ".w"}; void sendWhisperMessage(const QString &text) @@ -177,7 +203,7 @@ namespace chatterino { void CommandController::initialize(Settings &, Paths &paths) { - this->commandAutoCompletions_ = QStringList{TWITCH_DEFAULT_COMMANDS}; + this->commandAutoCompletions_ = twitchDefaultCommands; // Update commands map when the vector of commands has been updated auto addFirstMatchToMap = [this](auto args) {