- connect(network(), SIGNAL(currentServerSet(const QString &)), this, SLOT(sendPerform()));
- network()->setCodecForEncoding("ISO-8859-15"); // FIXME
- network()->setCodecForDecoding("ISO-8859-15"); // FIXME
- network()->setNetworkName(net);
- network()->setProxy(coreSession()->signalProxy());
+ _autoReconnectTimer.setSingleShot(true);
+ connect(&_autoReconnectTimer, SIGNAL(timeout()), this, SLOT(doAutoReconnect()));
+
+ connect(network, SIGNAL(currentServerSet(const QString &)), this, SLOT(networkInitialized(const QString &)));
+ connect(network, SIGNAL(useAutoReconnectSet(bool)), this, SLOT(autoReconnectSettingsChanged()));
+ connect(network, SIGNAL(autoReconnectIntervalSet(quint32)), this, SLOT(autoReconnectSettingsChanged()));
+ connect(network, SIGNAL(autoReconnectRetriesSet(quint16)), this, SLOT(autoReconnectSettingsChanged()));
+
+ connect(&socket, SIGNAL(connected()), this, SLOT(socketConnected()));
+ connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
+ connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
+ connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
+ connect(&socket, SIGNAL(readyRead()), this, SLOT(socketHasData()));
+
+ connect(_ircServerHandler, SIGNAL(nickChanged(const QString &, const QString &)),
+ this, SLOT(nickChanged(const QString &, const QString &)));