Fixes #225 fix am/pm for timestamps

This commit is contained in:
fourtf
2018-01-17 18:36:12 +01:00
parent 4ddb4616ee
commit f3357cf0f4
12 changed files with 77 additions and 11 deletions
+12 -1
View File
@@ -123,7 +123,18 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
void IrcMessageHandler::handleUserStateMessage(Communi::IrcMessage *message)
{
// TODO: Implement
QVariant _mod = message->tag("mod");
if (_mod.isValid()) {
auto rawChannelName = message->parameters().at(0);
auto trimmedChannelName = rawChannelName.mid(1);
auto c = this->channelManager.getTwitchChannel(trimmedChannelName);
twitch::TwitchChannel *tc = dynamic_cast<twitch::TwitchChannel *>(c.get());
if (tc != nullptr) {
tc->setMod(_mod == "1");
}
}
}
void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
+2
View File
@@ -188,6 +188,8 @@ void IrcManager::beginConnecting()
this->writeConnection->open();
this->readConnection->open();
this->connected();
}
void IrcManager::disconnect()
+1
View File
@@ -50,6 +50,7 @@ public:
pajlada::Signals::Signal<Communi::IrcPrivateMessage *> onPrivateMessage;
void privateMessageReceived(Communi::IrcPrivateMessage *message);
boost::signals2::signal<void()> connected;
Communi::IrcConnection *getReadConnection();