mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Adds support for /user
This commit is contained in:
parent
74d55941a0
commit
99045e42da
|
@ -29,7 +29,7 @@
|
|||
"/unban", "/timeout", "/untimeout", "/slow", "/slowoff", \
|
||||
"/r9kbeta", "/r9kbetaoff", "/emoteonly", "/emoteonlyoff", \
|
||||
"/clear", "/subscribers", "/subscribersoff", "/followers", \
|
||||
"/followersoff" \
|
||||
"/followersoff", "/user" \
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -461,6 +461,27 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
|||
logs->show();
|
||||
return "";
|
||||
}
|
||||
else if (commandName == "/user")
|
||||
{
|
||||
if (words.size() < 2)
|
||||
{
|
||||
channel->addMessage(
|
||||
makeSystemMessage("Usage /user [user] (channel)"));
|
||||
return "";
|
||||
}
|
||||
QString channelName = channel->getName();
|
||||
if (words.size() > 2)
|
||||
{
|
||||
channelName = words[2];
|
||||
if (channelName[0] == '#')
|
||||
{
|
||||
channelName.remove(0, 1);
|
||||
}
|
||||
}
|
||||
QDesktopServices::openUrl("https://www.twitch.tv/popout/" +
|
||||
channelName + "/viewercard/" + words[1]);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue