X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=dbb8a5e2244258854f1102fa6d4128e705fbd3e9;hb=e497bef2a6bd36874192ebef7fd1899ce28f7c9c;hp=c11aee843bbee660f24e73c9499313ad9f151ff6;hpb=dbef809f160236d05e93256d8309085225b8b928;p=quassel.git diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index c11aee84..dbb8a5e2 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -106,12 +106,16 @@ public slots: Server usedServer() const; - inline void resetPingTimeout() { _lastPingTime = 0; } + inline void resetPingTimeout() { _pingCount = 0; } + + inline void displayMsg(Message::Type msgType, BufferInfo::Type bufferType, const QString &target, const QString &text, const QString &sender = "", Message::Flags flags = Message::None) { + emit displayMsg(networkId(), msgType, bufferType, target, text, sender, flags); + } signals: void recvRawServerMsg(QString); void displayStatusMsg(QString); - void displayMsg(Message::Type, BufferInfo::Type, QString target, QString text, QString sender = "", Message::Flags flags = Message::None); + void displayMsg(NetworkId, Message::Type, BufferInfo::Type, const QString &target, const QString &text, const QString &sender = "", Message::Flags flags = Message::None); void disconnected(NetworkId networkId); void connectionError(const QString &errorMsg); @@ -178,6 +182,8 @@ private: QTimer _pingTimer; uint _lastPingTime; + uint _maxPingCount; + uint _pingCount; bool _autoWhoEnabled; QStringList _autoWhoQueue;