diff --git a/src/providers/irc/IrcServer.cpp b/src/providers/irc/IrcServer.cpp index 2266996c6..e9a655a97 100644 --- a/src/providers/irc/IrcServer.cpp +++ b/src/providers/irc/IrcServer.cpp @@ -66,6 +66,7 @@ void IrcServer::initializeConnection(IrcConnection *connection, connection->setRealName(this->data_->real.isEmpty() ? this->data_->user : this->data_->nick); +#if 0 switch (this->data_->authType) { case IrcAuthType::Sasl: @@ -87,6 +88,7 @@ void IrcServer::initializeConnection(IrcConnection *connection, default: this->open(Both); } +#endif QObject::connect( connection, &Communi::IrcConnection::socketError, this, diff --git a/src/providers/twitch/TwitchIrcServer.cpp b/src/providers/twitch/TwitchIrcServer.cpp index de0e9efba..43981fb64 100644 --- a/src/providers/twitch/TwitchIrcServer.cpp +++ b/src/providers/twitch/TwitchIrcServer.cpp @@ -1,5 +1,8 @@ #include "TwitchIrcServer.hpp" +#include +#include + #include "Application.hpp" #include "common/Common.hpp" #include "controllers/accounts/AccountController.hpp" @@ -15,9 +18,6 @@ #include "providers/twitch/TwitchMessageBuilder.hpp" #include "util/PostToThread.hpp" -#include -#include - // using namespace Communi; using namespace std::chrono_literals; @@ -195,13 +195,40 @@ void TwitchIrcServer::writeConnectionMessageReceived( const QString &command = message->command(); auto &handler = IrcMessageHandler::getInstance(); - // Below commands enabled through the twitch.tv/commands CAP REQ if (command == "USERSTATE") { // Received USERSTATE upon PRIVMSGing handler.handleUserStateMessage(message); } + else if (command == "NOTICE") + { + static std::unordered_set 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", + + // 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", + + // Channel suspended notices + "msg_channel_suspended", + }; + + handler.handleNoticeMessage( + static_cast(message)); + } } void TwitchIrcServer::onReadConnected(IrcConnection *connection) diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index 79b637671..389ba94f8 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -31,12 +31,11 @@ #include #include #include +#include #include #include -#include - -#include #include +#include namespace chatterino { diff --git a/src/widgets/dialogs/SelectChannelDialog.cpp b/src/widgets/dialogs/SelectChannelDialog.cpp index e95c90340..0dff949cf 100644 --- a/src/widgets/dialogs/SelectChannelDialog.cpp +++ b/src/widgets/dialogs/SelectChannelDialog.cpp @@ -190,6 +190,8 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent) auto tab = notebook->addPage(obj.getElement()); tab->setCustomTitle("Irc (Beta)"); + tab->setEnable(false); + tab->setVisible(false); } layout->setStretchFactor(notebook.getElement(), 1); @@ -217,7 +219,11 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent) [=] { this->close(); }); // restore ui state + // fourtf: enable when releasing irc +#if 0 this->ui_.notebook->selectIndex(getSettings()->lastSelectChannelTab); +#endif + this->ui_.irc.servers->getTableView()->selectRow( getSettings()->lastSelectIrcConn); }