return _ircChannels.keys();
}
+QStringList Network::initPersistentChannels() const {
+ QStringList list;
+ foreach(QString chan, _persistentChannels.keys()) {
+ list << QString("%1/%2").arg(chan).arg(_persistentChannels.value(chan));
+ }
+ return list;
+}
+
void Network::initSetSupports(const QVariantMap &supports) {
QMapIterator<QString, QVariant> iter(supports);
while(iter.hasNext()) {
}
}
-void Network::initSetChannels(const QStringList &channels) {
+void Network::initSetIrcChannels(const QStringList &channels) {
+ // FIXME This does not work correctly, "received data for unknown User" triggers
+ // So we disable this for now
+ return;
+
if(!_ircChannels.empty())
return;
foreach(QString channel, channels)
newIrcChannel(channel);
}
+void Network::initSetPersistentChannels(const QStringList &channels) {
+ foreach(QString chan, channels) {
+ QStringList l = chan.split("/");
+ _persistentChannels[l[0]] = l[1];
+ }
+}
+
+void Network::addPersistentChannel(const QString &channel, const QString &key) {
+ _persistentChannels[channel.toLower()] = key;
+ emit persistentChannelAdded(channel, key);
+}
+
+void Network::removePersistentChannel(const QString &channel) {
+ _persistentChannels.remove(channel.toLower());
+ emit persistentChannelRemoved(channel);
+}
+
+void Network::setPersistentChannelKey(const QString &channel, const QString &key) {
+ _persistentChannels[channel.toLower()] = key;
+ emit persistentChannelKeySet(channel, key);
+}
+
IrcUser *Network::updateNickFromMask(const QString &mask) {
QString nick(nickFromMask(mask).toLower());
IrcUser *ircuser;
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 not being disconnected!";
+ qWarning() << "Requesting connect while already being connected!";
return;
}
emit connectRequested(networkId()); // and this is for CoreSession :)
return in;
}
-
-
-
-
-
+QDebug operator<<(QDebug dbg, const NetworkInfo &i) {
+ dbg.nospace() << "(id = " << i.networkId << " name = " << i.networkName << " identity = " << i.identity
+ << " codecForServer = " << i.codecForServer << " codecForEncoding = " << i.codecForEncoding << " codecForDecoding = " << i.codecForDecoding
+ << " serverList = " << i.serverList << " useRandomServer = " << i.useRandomServer << " perform = " << i.perform
+ << " useAutoIdentify = " << i.useAutoIdentify << " autoIdentifyService = " << i.autoIdentifyService << " autoIdentifyPassword = " << i.autoIdentifyPassword
+ << " useAutoReconnect = " << i.useAutoReconnect << " autoReconnectInterval = " << i.autoReconnectInterval
+ << " autoReconnectRetries = " << i.autoReconnectRetries << " unlimitedReconnectRetries = " << i.unlimitedReconnectRetries
+ << " rejoinChannels = " << i.rejoinChannels << ")";
+ return dbg.space();
+}