Fix crash when using /unstable-set-user-color without any arguments (#4574)
I told you it was unstable
This commit is contained in:
@@ -3190,14 +3190,16 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||
"works in Twitch channels"));
|
||||
return "";
|
||||
}
|
||||
auto userID = ctx.words.at(1);
|
||||
if (ctx.words.size() < 2)
|
||||
{
|
||||
ctx.channel->addMessage(
|
||||
makeSystemMessage(QString("Usage: %1 <TwitchUserID> [color]")
|
||||
.arg(ctx.words.at(0))));
|
||||
return "";
|
||||
}
|
||||
|
||||
auto userID = ctx.words.at(1);
|
||||
|
||||
auto color = ctx.words.value(2);
|
||||
|
||||
getIApp()->getUserData()->setUserColor(userID, color);
|
||||
|
||||
Reference in New Issue
Block a user