Run clang-format-all.sh
This commit is contained in:
@@ -37,11 +37,11 @@ void BTTVEmotes::loadGlobalEmotes()
|
||||
|
||||
EmoteData emoteData;
|
||||
emoteData.image1x = new Image(getEmoteLink(urlTemplate, id, "1x"), 1, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image2x = new Image(getEmoteLink(urlTemplate, id, "2x"), 0.5,
|
||||
code, code + "<br />Global BTTV Emote");
|
||||
emoteData.image3x = new Image(getEmoteLink(urlTemplate, id, "3x"), 0.25,
|
||||
code, code + "<br />Global BTTV Emote");
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image2x = new Image(getEmoteLink(urlTemplate, id, "2x"), 0.5, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.image3x = new Image(getEmoteLink(urlTemplate, id, "3x"), 0.25, code,
|
||||
code + "<br />Global BTTV Emote");
|
||||
emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id;
|
||||
|
||||
this->globalEmotes.insert(code, emoteData);
|
||||
@@ -89,19 +89,16 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<Emo
|
||||
EmoteData emoteData;
|
||||
QString link = linkTemplate;
|
||||
link.detach();
|
||||
emoteData.image1x =
|
||||
new Image(link.replace("{{id}}", id).replace("{{image}}", "1x"), 1,
|
||||
code, code + "<br />Channel BTTV Emote");
|
||||
emoteData.image1x = new Image(link.replace("{{id}}", id).replace("{{image}}", "1x"),
|
||||
1, code, code + "<br />Channel BTTV Emote");
|
||||
link = linkTemplate;
|
||||
link.detach();
|
||||
emoteData.image2x =
|
||||
new Image(link.replace("{{id}}", id).replace("{{image}}", "2x"),
|
||||
0.5, code, code + "<br />Channel BTTV Emote");
|
||||
emoteData.image2x = new Image(link.replace("{{id}}", id).replace("{{image}}", "2x"),
|
||||
0.5, code, code + "<br />Channel BTTV Emote");
|
||||
link = linkTemplate;
|
||||
link.detach();
|
||||
emoteData.image3x =
|
||||
new Image(link.replace("{{id}}", id).replace("{{image}}", "3x"),
|
||||
0.25, code, code + "<br />Channel BTTV Emote");
|
||||
emoteData.image3x = new Image(link.replace("{{id}}", id).replace("{{image}}", "3x"),
|
||||
0.25, code, code + "<br />Channel BTTV Emote");
|
||||
emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id;
|
||||
|
||||
return emoteData;
|
||||
|
||||
@@ -260,8 +260,8 @@ void Emojis::loadEmojiSet()
|
||||
urlPrefix = it->second;
|
||||
}
|
||||
QString url = urlPrefix + code + ".png";
|
||||
emoji->emoteData.image1x = new Image(
|
||||
url, 0.35, emoji->value, ":" + emoji->shortCodes[0] + ":<br/>Emoji");
|
||||
emoji->emoteData.image1x =
|
||||
new Image(url, 0.35, emoji->value, ":" + emoji->shortCodes[0] + ":<br/>Emoji");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -253,8 +253,7 @@ void IrcMessageHandler::handleUserNoticeMessage(Communi::IrcMessage *message, Tw
|
||||
auto it = tags.find("system-msg");
|
||||
|
||||
if (it != tags.end()) {
|
||||
auto newMessage =
|
||||
Message::createSystemMessage(parseTagString(it.value().toString()));
|
||||
auto newMessage = Message::createSystemMessage(parseTagString(it.value().toString()));
|
||||
|
||||
newMessage->flags |= Message::Subscription;
|
||||
|
||||
@@ -322,12 +321,22 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
|
||||
void IrcMessageHandler::handleWriteConnectionNoticeMessage(Communi::IrcNoticeMessage *message)
|
||||
{
|
||||
static std::unordered_set<std::string> readConnectionOnlyIDs{
|
||||
"host_on", "host_off", "host_target_went_offline", "emote_only_on", "emote_only_off",
|
||||
"slow_on", "slow_off", "subs_on", "subs_off", "r9k_on", "r9k_off",
|
||||
"host_on",
|
||||
"host_off",
|
||||
"host_target_went_offline",
|
||||
"emote_only_on",
|
||||
"emote_only_off",
|
||||
"slow_on",
|
||||
"slow_off",
|
||||
"subs_on",
|
||||
"subs_off",
|
||||
"r9k_on",
|
||||
"r9k_off",
|
||||
|
||||
// Display for user who times someone out. This implies you're a moderator, at which point
|
||||
// you will be connected to PubSub and receive a better message from there
|
||||
"timeout_success", "ban_success",
|
||||
"timeout_success",
|
||||
"ban_success",
|
||||
};
|
||||
|
||||
QVariant v = message->tag("msg-id");
|
||||
|
||||
@@ -194,8 +194,7 @@ void TwitchServer::onMessageSendRequested(TwitchChannel *channel, const QString
|
||||
// check if you are sending messages too fast
|
||||
if (!lastMessage.empty() && lastMessage.back() + minMessageOffset > now) {
|
||||
if (this->lastErrorTimeSpeed_ + 30s < now) {
|
||||
auto errorMessage =
|
||||
Message::createSystemMessage("sending messages too fast");
|
||||
auto errorMessage = Message::createSystemMessage("sending messages too fast");
|
||||
|
||||
channel->addMessage(errorMessage);
|
||||
|
||||
@@ -212,8 +211,7 @@ void TwitchServer::onMessageSendRequested(TwitchChannel *channel, const QString
|
||||
// check if you are sending too many messages
|
||||
if (lastMessage.size() >= maxMessageCount) {
|
||||
if (this->lastErrorTimeAmount_ + 30s < now) {
|
||||
auto errorMessage =
|
||||
Message::createSystemMessage("sending too many messages");
|
||||
auto errorMessage = Message::createSystemMessage("sending too many messages");
|
||||
|
||||
channel->addMessage(errorMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user