X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=772601f54c928231916cfbf7496e0d5e028ed180;hp=ecfc109276809891fe26682a337efcd5f6fd593d;hb=e7696b65e76e50137b8bab0ec3e43ce66a94f190;hpb=59912f14782c193a2394a2b0d044902a59c96870 diff --git a/src/client/client.cpp b/src/client/client.cpp index ecfc1092..772601f5 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -65,6 +65,7 @@ Client::Client(QObject *parent) _connectedToCore(false), _syncedToCore(false) { + _monitorBuffer = new Buffer(BufferInfo(), this); } Client::~Client() { @@ -105,13 +106,13 @@ void Client::init() { p->attachSignal(this, SIGNAL(requestRemoveIdentity(IdentityId)), SIGNAL(removeIdentity(IdentityId))); p->attachSlot(SIGNAL(identityCreated(const Identity &)), this, SLOT(coreIdentityCreated(const Identity &))); p->attachSlot(SIGNAL(identityRemoved(IdentityId)), this, SLOT(coreIdentityRemoved(IdentityId))); - +/* p->attachSignal(this, SIGNAL(requestCreateNetwork(const NetworkInfo &)), SIGNAL(createNetwork(const NetworkInfo &))); p->attachSignal(this, SIGNAL(requestUpdateNetwork(const NetworkInfo &)), SIGNAL(updateNetwork(const NetworkInfo &))); p->attachSignal(this, SIGNAL(requestRemoveNetwork(NetworkId)), SIGNAL(removeNetwork(NetworkId))); p->attachSlot(SIGNAL(networkCreated(const NetworkInfo &)), this, SLOT(coreNetworkCreated(const NetworkInfo &))); p->attachSlot(SIGNAL(networkRemoved(NetworkId)), this, SLOT(coreNetworkRemoved(NetworkId))); - +*/ connect(p, SIGNAL(disconnected()), this, SLOT(disconnectFromCore())); //connect(mainUi, SIGNAL(connectToCore(const QVariantMap &)), this, SLOT(connectToCore(const QVariantMap &))); @@ -165,6 +166,10 @@ Buffer *Client::buffer(BufferInfo id) { return buff; } +Buffer *Client::monitorBuffer() { + return instance()->_monitorBuffer; +} + NetworkModel *Client::networkModel() { return instance()->_networkModel; @@ -419,6 +424,13 @@ void Client::recvMessage(const Message &msg) { Buffer *b = buffer(msg.buffer()); b->appendMsg(msg); networkModel()->updateBufferActivity(msg); + + if(msg.type() == Message::Plain || msg.type() == Message::Notice || msg.type() == Message::Action) { + QString sender = msg.buffer().network() + ":" + msg.buffer().buffer() + ":" + msg.sender(); + Message mmsg = Message(msg.timestamp(), msg.buffer(), msg.type(), msg.text(), sender, msg.flags()); + monitorBuffer()->appendMsg(mmsg); + } + } void Client::recvStatusMsg(QString /*net*/, QString /*msg*/) {