- if (!info.networkName.isEmpty() && info.networkName != networkName()) setNetworkName(info.networkName);
- if (info.identity > 0 && info.identity != identity()) setIdentity(info.identity);
- if (info.codecForServer != codecForServer()) setCodecForServer(QTextCodec::codecForName(info.codecForServer));
- if (info.codecForEncoding != codecForEncoding()) setCodecForEncoding(QTextCodec::codecForName(info.codecForEncoding));
- if (info.codecForDecoding != codecForDecoding()) setCodecForDecoding(QTextCodec::codecForName(info.codecForDecoding));
- if (info.serverList.count()) setServerList(toVariantList(info.serverList)); // FIXME compare components
- if (info.useRandomServer != useRandomServer()) setUseRandomServer(info.useRandomServer);
- if (info.perform != perform()) setPerform(info.perform);
- if (info.useAutoIdentify != useAutoIdentify()) setUseAutoIdentify(info.useAutoIdentify);
- if (info.autoIdentifyService != autoIdentifyService()) setAutoIdentifyService(info.autoIdentifyService);
- if (info.autoIdentifyPassword != autoIdentifyPassword()) setAutoIdentifyPassword(info.autoIdentifyPassword);
- if (info.useSasl != useSasl()) setUseSasl(info.useSasl);
- if (info.saslAccount != saslAccount()) setSaslAccount(info.saslAccount);
- if (info.saslPassword != saslPassword()) setSaslPassword(info.saslPassword);
- if (info.useAutoReconnect != useAutoReconnect()) setUseAutoReconnect(info.useAutoReconnect);
- if (info.autoReconnectInterval != autoReconnectInterval()) setAutoReconnectInterval(info.autoReconnectInterval);
- if (info.autoReconnectRetries != autoReconnectRetries()) setAutoReconnectRetries(info.autoReconnectRetries);
- if (info.unlimitedReconnectRetries != unlimitedReconnectRetries()) setUnlimitedReconnectRetries(info.unlimitedReconnectRetries);
- if (info.rejoinChannels != rejoinChannels()) setRejoinChannels(info.rejoinChannels);
-}
-
-
-QString Network::prefixToMode(const QString &prefix) const
+ if (!info.networkName.isEmpty() && info.networkName != networkName())
+ setNetworkName(info.networkName);
+ if (info.identity > 0 && info.identity != identity())
+ setIdentity(info.identity);
+ if (info.codecForServer != codecForServer())
+ setCodecForServer(QTextCodec::codecForName(info.codecForServer));
+ if (info.codecForEncoding != codecForEncoding())
+ setCodecForEncoding(QTextCodec::codecForName(info.codecForEncoding));
+ if (info.codecForDecoding != codecForDecoding())
+ setCodecForDecoding(QTextCodec::codecForName(info.codecForDecoding));
+ if (info.serverList.count())
+ setServerList(toVariantList(info.serverList)); // FIXME compare components
+ if (info.useRandomServer != useRandomServer())
+ setUseRandomServer(info.useRandomServer);
+ if (info.perform != perform())
+ setPerform(info.perform);
+ if (info.useAutoIdentify != useAutoIdentify())
+ setUseAutoIdentify(info.useAutoIdentify);
+ if (info.autoIdentifyService != autoIdentifyService())
+ setAutoIdentifyService(info.autoIdentifyService);
+ if (info.autoIdentifyPassword != autoIdentifyPassword())
+ setAutoIdentifyPassword(info.autoIdentifyPassword);
+ if (info.useSasl != useSasl())
+ setUseSasl(info.useSasl);
+ if (info.saslAccount != saslAccount())
+ setSaslAccount(info.saslAccount);
+ if (info.saslPassword != saslPassword())
+ setSaslPassword(info.saslPassword);
+ if (info.useAutoReconnect != useAutoReconnect())
+ setUseAutoReconnect(info.useAutoReconnect);
+ if (info.autoReconnectInterval != autoReconnectInterval())
+ setAutoReconnectInterval(info.autoReconnectInterval);
+ if (info.autoReconnectRetries != autoReconnectRetries())
+ setAutoReconnectRetries(info.autoReconnectRetries);
+ if (info.unlimitedReconnectRetries != unlimitedReconnectRetries())
+ setUnlimitedReconnectRetries(info.unlimitedReconnectRetries);
+ if (info.rejoinChannels != rejoinChannels())
+ setRejoinChannels(info.rejoinChannels);
+ // Custom rate limiting
+ if (info.useCustomMessageRate != useCustomMessageRate())
+ setUseCustomMessageRate(info.useCustomMessageRate);
+ if (info.messageRateBurstSize != messageRateBurstSize())
+ setMessageRateBurstSize(info.messageRateBurstSize);
+ if (info.messageRateDelay != messageRateDelay())
+ setMessageRateDelay(info.messageRateDelay);
+ if (info.unlimitedMessageRate != unlimitedMessageRate())
+ setUnlimitedMessageRate(info.unlimitedMessageRate);
+}
+
+QString Network::prefixToMode(const QString& prefix) const