mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
disabled irc and fixed notice messages in write conn not showing
This commit is contained in:
parent
f27c8eb1b4
commit
fc049d8f45
4 changed files with 41 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "TwitchIrcServer.hpp"
|
||||
|
||||
#include <IrcCommand>
|
||||
#include <cassert>
|
||||
|
||||
#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 <IrcCommand>
|
||||
#include <cassert>
|
||||
|
||||
// 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<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",
|
||||
|
||||
// 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<Communi::IrcNoticeMessage *>(message));
|
||||
}
|
||||
}
|
||||
|
||||
void TwitchIrcServer::onReadConnected(IrcConnection *connection)
|
||||
|
|
|
@ -31,12 +31,11 @@
|
|||
#include <QApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QHeaderView>
|
||||
#include <QMenuBar>
|
||||
#include <QPalette>
|
||||
#include <QShortcut>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <QMenuBar>
|
||||
#include <QStandardItemModel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue