X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fnetworkconnection.cpp;h=6768095167c757968319d1d476adea08f8452e43;hp=f5e6a367b04a3d58973b03a3c7a209a8bfd9b8c9;hb=257ca0d5f944a8f63d002e1dcaaa3902258d85e0;hpb=5c5d13eed99c43a4dff477ac736f98b5d7569837 diff --git a/src/core/networkconnection.cpp b/src/core/networkconnection.cpp index f5e6a367..67680951 100644 --- a/src/core/networkconnection.cpp +++ b/src/core/networkconnection.cpp @@ -64,7 +64,10 @@ NetworkConnection::NetworkConnection(Network *network, CoreSession *session) _autoReconnectTimer.setSingleShot(true); _socketCloseTimer.setSingleShot(true); connect(&_socketCloseTimer, SIGNAL(timeout()), this, SLOT(socketCloseTimeout())); - + + _pingTimer.setInterval(60000); + connect(&_pingTimer, SIGNAL(timeout()), this, SLOT(sendPing())); + _autoWhoTimer.setInterval(_autoWhoDelay * 1000); _autoWhoCycleTimer.setInterval(_autoWhoInterval * 1000); @@ -215,6 +218,8 @@ void NetworkConnection::networkInitialized(const QString ¤tServer) { network()->setConnected(true); emit connected(networkId()); + _pingTimer.start(); + if(_autoWhoEnabled) { _autoWhoCycleTimer.start(); _autoWhoTimer.start(); @@ -502,6 +507,10 @@ void NetworkConnection::putCmd(const QString &cmd, const QList ¶ putRawLine(msg); } +void NetworkConnection::sendPing() { + userInputHandler()->handlePing(BufferInfo(), QString()); +} + void NetworkConnection::sendAutoWho() { while(!_autoWhoQueue.isEmpty()) { QString chan = _autoWhoQueue.takeFirst();