- } else {
- Server *server = new Server(userId(), net);
- connect(this, SIGNAL(serverStateRequested()), server, SLOT(sendState()));
- connect(this, SIGNAL(connectToIrc(QString)), server, SLOT(connectToIrc(QString)));
- connect(this, SIGNAL(disconnectFromIrc(QString)), server, SLOT(disconnectFromIrc(QString)));
- connect(this, SIGNAL(msgFromGui(QString, QString, QString)), server, SLOT(userInput(QString, QString, QString)));
-
- connect(server, SIGNAL(connected(QString)), this, SLOT(serverConnected(QString)));
- connect(server, SIGNAL(disconnected(QString)), this, SLOT(serverDisconnected(QString)));
- connect(server, SIGNAL(displayMsg(Message::Type, QString, QString, QString, quint8)), this, SLOT(recvMessageFromServer(Message::Type, QString, QString, QString, quint8)));
- connect(server, SIGNAL(displayStatusMsg(QString)), this, SLOT(recvStatusMsgFromServer(QString)));
-
- SignalProxy *p = signalProxy();
- p->attachSignal(server, SIGNAL(serverState(QString, QVariantMap)), SIGNAL(networkState(QString, QVariantMap)));
- p->attachSignal(server, SIGNAL(modeSet(QString, QString, QString)));
- p->attachSignal(server, SIGNAL(nickAdded(QString, QString, QVariantMap)));
- p->attachSignal(server, SIGNAL(nickRenamed(QString, QString, QString)));
- p->attachSignal(server, SIGNAL(nickRemoved(QString, QString)));
- p->attachSignal(server, SIGNAL(nickUpdated(QString, QString, QVariantMap)));
- p->attachSignal(server, SIGNAL(ownNickSet(QString, QString)));
- p->attachSignal(server, SIGNAL(queryRequested(QString, QString)));
- // TODO add error handling
- p->attachSignal(server, SIGNAL(connected(QString)), SIGNAL(networkConnected(QString)));
- p->attachSignal(server, SIGNAL(disconnected(QString)), SIGNAL(networkDisconnected(QString)));
-
- server->start();
- servers[net] = server;