Skip to content

Commit

Permalink
Added missing periods at mod-related messages and some system messages (
Browse files Browse the repository at this point in the history
#5061)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
  • Loading branch information
fraxxio and pajlada authored Jan 3, 2024
1 parent a32b962 commit 4a0ef08
Show file tree
Hide file tree
Showing 23 changed files with 52 additions and 50 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Minor: Add a new completion API for experimental plugins feature. (#5000, #5047)
- Minor: Re-enabled _Restart on crash_ option on Windows. (#5012)
- Minor: The whisper highlight color can now be configured through the settings. (#5053)
- Minor: Added missing periods at various moderator messages and commands. (#5061)
- Bugfix: Fixed an issue where certain emojis did not send to Twitch chat correctly. (#4840)
- Bugfix: Fixed capitalized channel names in log inclusion list not being logged. (#4848)
- Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834)
Expand Down
6 changes: 3 additions & 3 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void Application::initPubSub()
}

QString text =
QString("%1 cleared the chat").arg(action.source.login);
QString("%1 cleared the chat.").arg(action.source.login);

auto msg = makeSystemMessage(text);
postToThread([chan, msg] {
Expand All @@ -369,7 +369,7 @@ void Application::initPubSub()
}

QString text =
QString("%1 turned %2 %3 mode")
QString("%1 turned %2 %3 mode.")
.arg(action.source.login)
.arg(action.state == ModeChangedAction::State::On ? "on"
: "off")
Expand Down Expand Up @@ -397,7 +397,7 @@ void Application::initPubSub()

QString text;

text = QString("%1 %2 %3")
text = QString("%1 %2 %3.")
.arg(action.source.login,
(action.modded ? "modded" : "unmodded"),
action.target.login);
Expand Down
10 changes: 5 additions & 5 deletions src/controllers/commands/builtin/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ QString uptime(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /uptime command only works in Twitch Channels"));
"The /uptime command only works in Twitch Channels."));
return "";
}

Expand Down Expand Up @@ -188,14 +188,14 @@ QString clip(const CommandContext &ctx)
type != Channel::Type::Twitch && type != Channel::Type::TwitchWatching)
{
ctx.channel->addMessage(makeSystemMessage(
"The /clip command only works in Twitch Channels"));
"The /clip command only works in Twitch Channels."));
return "";
}

if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /clip command only works in Twitch Channels"));
"The /clip command only works in Twitch Channels."));
return "";
}

Expand All @@ -214,7 +214,7 @@ QString marker(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /marker command only works in Twitch channels"));
"The /marker command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -520,7 +520,7 @@ QString unstableSetUserClientSideColor(const CommandContext &ctx)
{
ctx.channel->addMessage(
makeSystemMessage("The /unstable-set-user-color command only "
"works in Twitch channels"));
"works in Twitch channels."));
return "";
}
if (ctx.words.size() < 2)
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/AddModerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QString addModerator(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /mod command only works in Twitch channels"));
"The /mod command only works in Twitch channels."));
return "";
}
if (ctx.words.size() < 2)
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/AddVIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QString addVIP(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /vip command only works in Twitch channels"));
"The /vip command only works in Twitch channels."));
return "";
}
if (ctx.words.size() < 2)
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/Announce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ QString sendAnnouncement(const CommandContext &ctx)
if (user->isAnon())
{
ctx.channel->addMessage(makeSystemMessage(
"You must be logged in to use the /announce command"));
"You must be logged in to use the /announce command."));
return "";
}

Expand Down
6 changes: 3 additions & 3 deletions src/controllers/commands/builtin/twitch/Ban.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ QString sendBan(const CommandContext &ctx)
if (twitchChannel == nullptr)
{
channel->addMessage(makeSystemMessage(
QString("The /ban command only works in Twitch channels")));
QString("The /ban command only works in Twitch channels.")));
return "";
}

Expand Down Expand Up @@ -196,7 +196,7 @@ QString sendBanById(const CommandContext &ctx)
if (twitchChannel == nullptr)
{
channel->addMessage(makeSystemMessage(
QString("The /banid command only works in Twitch channels")));
QString("The /banid command only works in Twitch channels.")));
return "";
}

Expand Down Expand Up @@ -241,7 +241,7 @@ QString sendTimeout(const CommandContext &ctx)
if (twitchChannel == nullptr)
{
channel->addMessage(makeSystemMessage(
QString("The /timeout command only works in Twitch channels")));
QString("The /timeout command only works in Twitch channels.")));
return "";
}
const auto *usageStr =
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ QString blockUser(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /block command only works in Twitch channels"));
"The /block command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -101,7 +101,7 @@ QString unblockUser(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /unblock command only works in Twitch channels"));
"The /unblock command only works in Twitch channels."));
return "";
}

Expand Down
20 changes: 10 additions & 10 deletions src/controllers/commands/builtin/twitch/ChatSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QString emoteOnly(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /emoteonly command only works in Twitch channels"));
"The /emoteonly command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -140,7 +140,7 @@ QString emoteOnlyOff(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /emoteonlyoff command only works in Twitch channels"));
"The /emoteonlyoff command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -170,7 +170,7 @@ QString subscribers(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /subscribers command only works in Twitch channels"));
"The /subscribers command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -200,7 +200,7 @@ QString subscribersOff(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /subscribersoff command only works in Twitch channels"));
"The /subscribersoff command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -230,7 +230,7 @@ QString slow(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /slow command only works in Twitch channels"));
"The /slow command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -277,7 +277,7 @@ QString slowOff(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /slowoff command only works in Twitch channels"));
"The /slowoff command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -307,7 +307,7 @@ QString followers(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /followers command only works in Twitch channels"));
"The /followers command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -355,7 +355,7 @@ QString followersOff(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /followersoff command only works in Twitch channels"));
"The /followersoff command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -385,7 +385,7 @@ QString uniqueChat(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /uniquechat command only works in Twitch channels"));
"The /uniquechat command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -415,7 +415,7 @@ QString uniqueChatOff(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /uniquechatoff command only works in Twitch channels"));
"The /uniquechatoff command only works in Twitch channels."));
return "";
}

Expand Down
6 changes: 3 additions & 3 deletions src/controllers/commands/builtin/twitch/Chatters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ QString chatters(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /chatters command only works in Twitch Channels"));
"The /chatters command only works in Twitch Channels."));
return "";
}

Expand All @@ -80,7 +80,7 @@ QString chatters(const CommandContext &ctx)
getApp()->accounts->twitch.getCurrent()->getUserId(), 1,
[channel{ctx.channel}](auto result) {
channel->addMessage(
makeSystemMessage(QString("Chatter count: %1")
makeSystemMessage(QString("Chatter count: %1.")
.arg(localizeNumbers(result.total))));
},
[channel{ctx.channel}](auto error, auto message) {
Expand All @@ -101,7 +101,7 @@ QString testChatters(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /test-chatters command only works in Twitch Channels"));
"The /test-chatters command only works in Twitch Channels."));
return "";
}

Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/DeleteMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QString deleteAllMessages(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /clear command only works in Twitch channels"));
"The /clear command only works in Twitch channels."));
return "";
}

Expand All @@ -121,7 +121,7 @@ QString deleteOneMessage(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /delete command only works in Twitch channels"));
"The /delete command only works in Twitch channels."));
return "";
}

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/GetModerators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ QString getModerators(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /mods command only works in Twitch Channels"));
"The /mods command only works in Twitch Channels."));
return "";
}

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/GetVIPs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ QString getVIPs(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /vips command only works in Twitch channels"));
"The /vips command only works in Twitch channels."));
return "";
}

Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/Raid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ QString startRaid(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /raid command only works in Twitch channels"));
"The /raid command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -183,7 +183,7 @@ QString cancelRaid(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /unraid command only works in Twitch channels"));
"The /unraid command only works in Twitch channels."));
return "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QString removeModerator(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /unmod command only works in Twitch channels"));
"The /unmod command only works in Twitch channels."));
return "";
}
if (ctx.words.size() < 2)
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/commands/builtin/twitch/RemoveVIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QString removeVIP(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /unvip command only works in Twitch channels"));
"The /unvip command only works in Twitch channels."));
return "";
}
if (ctx.words.size() < 2)
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/SendReply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ QString sendReply(const CommandContext &ctx)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
"The /reply command only works in Twitch channels"));
"The /reply command only works in Twitch channels."));
return "";
}

Expand Down Expand Up @@ -55,7 +55,7 @@ QString sendReply(const CommandContext &ctx)
}

ctx.channel->addMessage(
makeSystemMessage("A message from that user wasn't found"));
makeSystemMessage("A message from that user wasn't found."));

return "";
}
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/ShieldMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ QString toggleShieldMode(const CommandContext &ctx, bool isActivating)
if (ctx.twitchChannel == nullptr)
{
ctx.channel->addMessage(makeSystemMessage(
QStringLiteral("The %1 command only works in Twitch channels")
QStringLiteral("The %1 command only works in Twitch channels.")
.arg(command)));
return {};
}
Expand All @@ -29,7 +29,7 @@ QString toggleShieldMode(const CommandContext &ctx, bool isActivating)
if (user->isAnon())
{
ctx.channel->addMessage(makeSystemMessage(
QStringLiteral("You must be logged in to use the %1 command")
QStringLiteral("You must be logged in to use the %1 command.")
.arg(command)));
return {};
}
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/commands/builtin/twitch/Shoutout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ QString sendShoutout(const CommandContext &ctx)
if (twitchChannel == nullptr)
{
channel->addMessage(makeSystemMessage(
"The /shoutout command only works in Twitch channels"));
"The /shoutout command only works in Twitch channels."));
return "";
}

auto currentUser = getApp()->accounts->twitch.getCurrent();
if (currentUser->isAnon())
{
channel->addMessage(
makeSystemMessage("You must be logged in to send shoutout"));
makeSystemMessage("You must be logged in to send shoutout."));
return "";
}

Expand Down
Loading

0 comments on commit 4a0ef08

Please sign in to comment.