moved chatters to ChannelChatters

This commit is contained in:
fourtf
2019-09-17 12:10:38 +02:00
parent 13c9aabf29
commit 96dac0fd3d
11 changed files with 142 additions and 117 deletions
-14
View File
@@ -359,20 +359,6 @@ void AbstractIrcServer::privateMessageReceived(
void AbstractIrcServer::readConnectionMessageReceived(
Communi::IrcMessage *message)
{
/* XXX: only print this message once
if (message->type() == Communi::IrcMessage::Join)
{
auto x = static_cast<Communi::IrcJoinMessage *>(message);
if (auto it = this->channels.find(this->cleanChannelName(x->channel()));
it != this->channels.end())
{
if (auto shared = it->lock())
shared->addMessage(
MessageBuilder(systemMessage, "joined").release());
}
}
*/
}
void AbstractIrcServer::forEachChannel(std::function<void(ChannelPtr)> func)
+1
View File
@@ -8,6 +8,7 @@ namespace chatterino {
IrcChannel::IrcChannel(const QString &name, IrcServer *server)
: Channel(name, Channel::Type::Irc)
, ChannelChatters(*static_cast<Channel *>(this))
, server_(server)
{
}
+2 -1
View File
@@ -1,13 +1,14 @@
#pragma once
#include "common/Channel.hpp"
#include "common/ChannelChatters.hpp"
namespace chatterino {
class Irc;
class IrcServer;
class IrcChannel : public Channel
class IrcChannel : public Channel, public ChannelChatters
{
public:
explicit IrcChannel(const QString &name, IrcServer *server);