-void Network::ircUserInitDone() {
- IrcUser *ircuser = static_cast<IrcUser *>(sender());
- Q_ASSERT(ircuser);
- emit ircUserInitDone(ircuser);
-}
-
-void Network::ircChannelInitDone() {
- IrcChannel *ircchannel = static_cast<IrcChannel *>(sender());
- Q_ASSERT(ircchannel);
- emit ircChannelInitDone(ircchannel);
-}
-
-void Network::removeIrcChannel(IrcChannel *channel) {
- QString chanName = _ircChannels.key(channel);
- if(chanName.isNull())
- return;
-
- _ircChannels.remove(chanName);
- disconnect(channel, 0, this, 0);
- emit ircChannelRemoved(chanName);
- emit ircChannelRemoved(channel);
- channel->deleteLater();
-}
-
-void Network::removeIrcChannel(const QString &channel) {
- IrcChannel *chan;
- if((chan = ircChannel(channel)) != 0)
- removeIrcChannel(chan);
-}
-
-void Network::channelDestroyed() {
- IrcChannel *channel = static_cast<IrcChannel *>(sender());
- Q_ASSERT(channel);
- _ircChannels.remove(_ircChannels.key(channel));
- emit ircChannelRemoved(channel);
-}
-
-void Network::requestConnect() const {
- if(!proxy()) return;
- if(proxy()->proxyMode() == SignalProxy::Client) emit connectRequested(); // on the client this triggers calling this slot on the core
- else {
- if(connectionState() != Disconnected) {
- qWarning() << "Requesting connect while already being connected!";
- return;
- }
- emit connectRequested(networkId()); // and this is for CoreSession :)
- }
-}
-
-void Network::requestDisconnect() const {
- if(!proxy()) return;
- if(proxy()->proxyMode() == SignalProxy::Client) emit disconnectRequested(); // on the client this triggers calling this slot on the core
- else {
- if(connectionState() == Disconnected) {
- qWarning() << "Requesting disconnect while not being connected!";
- return;
- }
- emit disconnectRequested(networkId()); // and this is for CoreSession :)
- }
-}
-