1 /***************************************************************************
2 * Copyright (C) 2005-08 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
22 #include "signalproxy.h"
24 #include "ircchannel.h"
31 QTextCodec *Network::_defaultCodecForServer = 0;
32 QTextCodec *Network::_defaultCodecForEncoding = 0;
33 QTextCodec *Network::_defaultCodecForDecoding = 0;
35 // ====================
37 // ====================
38 Network::Network(const NetworkId &networkid, QObject *parent) : SyncableObject(parent),
39 _networkId(networkid),
42 _networkName(QString("<not initialized>")),
43 _currentServer(QString()),
45 _connectionState(Disconnected),
47 _prefixModes(QString()),
49 _useRandomServer(false),
50 _useAutoIdentify(false),
51 _useAutoReconnect(false),
52 _autoReconnectInterval(60),
53 _autoReconnectRetries(10),
54 _unlimitedReconnectRetries(false),
59 setObjectName(QString::number(networkid.toInt()));
62 // I think this is unnecessary since IrcUsers have us as their daddy :)
65 emit aboutToBeDestroyed();
66 // QHashIterator<QString, IrcUser *> ircuser(_ircUsers);
67 // while (ircuser.hasNext()) {
69 // delete ircuser.value();
71 // qDebug() << "Destroying net" << networkName() << networkId();
75 NetworkId Network::networkId() const {
79 SignalProxy *Network::proxy() const {
83 void Network::setProxy(SignalProxy *proxy) {
85 //proxy->synchronize(this); // we should to this explicitly from the outside!
88 bool Network::isMyNick(const QString &nick) const {
89 return (myNick().toLower() == nick.toLower());
92 bool Network::isMe(IrcUser *ircuser) const {
93 return (ircuser->nick().toLower() == myNick().toLower());
96 bool Network::isChannelName(const QString &channelname) const {
97 if(channelname.isEmpty())
100 if(supports("CHANTYPES"))
101 return support("CHANTYPES").contains(channelname[0]);
103 return QString("#&!+").contains(channelname[0]);
106 bool Network::isConnected() const {
110 //Network::ConnectionState Network::connectionState() const {
111 int Network::connectionState() const {
112 return _connectionState;
115 NetworkInfo Network::networkInfo() const {
117 info.networkName = networkName();
118 info.networkId = networkId();
119 info.identity = identity();
120 info.codecForEncoding = codecForEncoding();
121 info.codecForDecoding = codecForDecoding();
122 info.serverList = serverList();
123 info.useRandomServer = useRandomServer();
124 info.perform = perform();
125 info.useAutoIdentify = useAutoIdentify();
126 info.autoIdentifyService = autoIdentifyService();
127 info.autoIdentifyPassword = autoIdentifyPassword();
128 info.useAutoReconnect = useAutoReconnect();
129 info.autoReconnectInterval = autoReconnectInterval();
130 info.autoReconnectRetries = autoReconnectRetries();
131 info.rejoinChannels = rejoinChannels();
135 void Network::setNetworkInfo(const NetworkInfo &info) {
136 // we don't set our ID!
137 if(!info.networkName.isEmpty() && info.networkName != networkName()) setNetworkName(info.networkName);
138 if(info.identity > 0 && info.identity != identity()) setIdentity(info.identity);
139 if(info.codecForServer != codecForServer()) setCodecForServer(QTextCodec::codecForName(info.codecForServer));
140 if(info.codecForEncoding != codecForEncoding()) setCodecForEncoding(QTextCodec::codecForName(info.codecForEncoding));
141 if(info.codecForDecoding != codecForDecoding()) setCodecForDecoding(QTextCodec::codecForName(info.codecForDecoding));
142 if(info.serverList.count()) setServerList(info.serverList); // FIXME compare components
143 if(info.useRandomServer != useRandomServer()) setUseRandomServer(info.useRandomServer);
144 if(info.perform != perform()) setPerform(info.perform);
145 if(info.useAutoIdentify != useAutoIdentify()) setUseAutoIdentify(info.useAutoIdentify);
146 if(info.autoIdentifyService != autoIdentifyService()) setAutoIdentifyService(info.autoIdentifyService);
147 if(info.autoIdentifyPassword != autoIdentifyPassword()) setAutoIdentifyPassword(info.autoIdentifyPassword);
148 if(info.useAutoReconnect != useAutoReconnect()) setUseAutoReconnect(info.useAutoReconnect);
149 if(info.autoReconnectInterval != autoReconnectInterval()) setAutoReconnectInterval(info.autoReconnectInterval);
150 if(info.autoReconnectRetries != autoReconnectRetries()) setAutoReconnectRetries(info.autoReconnectRetries);
151 if(info.unlimitedReconnectRetries != unlimitedReconnectRetries()) setUnlimitedReconnectRetries(info.unlimitedReconnectRetries);
152 if(info.rejoinChannels != rejoinChannels()) setRejoinChannels(info.rejoinChannels);
155 QString Network::prefixToMode(const QString &prefix) {
156 if(prefixes().contains(prefix))
157 return QString(prefixModes()[prefixes().indexOf(prefix)]);
162 QString Network::prefixToMode(const QCharRef &prefix) {
163 return prefixToMode(QString(prefix));
166 QString Network::modeToPrefix(const QString &mode) {
167 if(prefixModes().contains(mode))
168 return QString(prefixes()[prefixModes().indexOf(mode)]);
173 QString Network::modeToPrefix(const QCharRef &mode) {
174 return modeToPrefix(QString(mode));
177 QString Network::networkName() const {
181 QString Network::currentServer() const {
182 return _currentServer;
185 QString Network::myNick() const {
189 IdentityId Network::identity() const {
193 QStringList Network::nicks() const {
194 // we don't use _ircUsers.keys() since the keys may be
195 // not up to date after a nick change
197 foreach(IrcUser *ircuser, _ircUsers.values()) {
198 nicks << ircuser->nick();
203 QStringList Network::channels() const {
204 return _ircChannels.keys();
207 QVariantList Network::serverList() const {
211 bool Network::useRandomServer() const {
212 return _useRandomServer;
215 QStringList Network::perform() const {
219 bool Network::useAutoIdentify() const {
220 return _useAutoIdentify;
223 QString Network::autoIdentifyService() const {
224 return _autoIdentifyService;
227 QString Network::autoIdentifyPassword() const {
228 return _autoIdentifyPassword;
231 bool Network::useAutoReconnect() const {
232 return _useAutoReconnect;
235 quint32 Network::autoReconnectInterval() const {
236 return _autoReconnectInterval;
239 quint16 Network::autoReconnectRetries() const {
240 return _autoReconnectRetries;
243 bool Network::unlimitedReconnectRetries() const {
244 return _unlimitedReconnectRetries;
247 bool Network::rejoinChannels() const {
248 return _rejoinChannels;
251 QString Network::prefixes() {
252 if(_prefixes.isNull())
258 QString Network::prefixModes() {
259 if(_prefixModes.isNull())
265 bool Network::supports(const QString ¶m) const {
266 return _supports.contains(param);
269 QString Network::support(const QString ¶m) const {
270 QString support_ = param.toUpper();
271 if(_supports.contains(support_))
272 return _supports[support_];
277 IrcUser *Network::newIrcUser(const QString &hostmask) {
278 QString nick(nickFromMask(hostmask).toLower());
279 if(!_ircUsers.contains(nick)) {
280 IrcUser *ircuser = new IrcUser(hostmask, this);
281 // mark IrcUser as already initialized to keep the SignalProxy from requesting initData
282 //if(isInitialized())
283 // ircuser->setInitialized();
285 proxy()->synchronize(ircuser);
287 qWarning() << "unable to synchronize new IrcUser" << hostmask << "forgot to call Network::setProxy(SignalProxy *)?";
289 connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickChanged(QString)));
290 connect(ircuser, SIGNAL(initDone()), this, SLOT(ircUserInitDone()));
291 _ircUsers[nick] = ircuser;
292 emit ircUserAdded(hostmask);
293 emit ircUserAdded(ircuser);
295 return _ircUsers[nick];
298 IrcUser *Network::newIrcUser(const QByteArray &hostmask) {
299 return newIrcUser(decodeString(hostmask));
302 void Network::removeIrcUser(IrcUser *ircuser) {
303 QString nick = _ircUsers.key(ircuser);
307 _ircUsers.remove(nick);
308 disconnect(ircuser, 0, this, 0);
309 emit ircUserRemoved(nick);
310 emit ircUserRemoved(ircuser);
311 ircuser->deleteLater();
314 void Network::removeChansAndUsers() {
315 QList<IrcUser *> users = ircUsers();
316 foreach(IrcUser *user, users) {
319 QList<IrcChannel *> channels = ircChannels();
320 foreach(IrcChannel *channel, channels) {
321 removeIrcChannel(channel);
325 void Network::removeIrcUser(const QString &nick) {
327 if((ircuser = ircUser(nick)) != 0)
328 removeIrcUser(ircuser);
331 IrcUser *Network::ircUser(QString nickname) const {
332 nickname = nickname.toLower();
333 if(_ircUsers.contains(nickname))
334 return _ircUsers[nickname];
339 IrcUser *Network::ircUser(const QByteArray &nickname) const {
340 return ircUser(decodeString(nickname));
343 QList<IrcUser *> Network::ircUsers() const {
344 return _ircUsers.values();
347 quint32 Network::ircUserCount() const {
348 return _ircUsers.count();
351 IrcChannel *Network::newIrcChannel(const QString &channelname) {
352 if(!_ircChannels.contains(channelname.toLower())) {
353 IrcChannel *channel = new IrcChannel(channelname, this);
354 // mark IrcUser as already initialized to keep the SignalProxy from requesting initData
355 //if(isInitialized())
356 // channel->setInitialized();
359 proxy()->synchronize(channel);
361 qWarning() << "unable to synchronize new IrcChannel" << channelname << "forgot to call Network::setProxy(SignalProxy *)?";
363 connect(channel, SIGNAL(initDone()), this, SLOT(ircChannelInitDone()));
364 connect(channel, SIGNAL(destroyed()), this, SLOT(channelDestroyed()));
365 _ircChannels[channelname.toLower()] = channel;
366 emit ircChannelAdded(channelname);
367 emit ircChannelAdded(channel);
369 return _ircChannels[channelname.toLower()];
372 IrcChannel *Network::newIrcChannel(const QByteArray &channelname) {
373 return newIrcChannel(decodeString(channelname));
376 IrcChannel *Network::ircChannel(QString channelname) const {
377 channelname = channelname.toLower();
378 if(_ircChannels.contains(channelname))
379 return _ircChannels[channelname];
384 IrcChannel *Network::ircChannel(const QByteArray &channelname) const {
385 return ircChannel(decodeString(channelname));
389 QList<IrcChannel *> Network::ircChannels() const {
390 return _ircChannels.values();
393 quint32 Network::ircChannelCount() const {
394 return _ircChannels.count();
397 QByteArray Network::defaultCodecForServer() {
398 if(_defaultCodecForServer) return _defaultCodecForServer->name();
402 void Network::setDefaultCodecForServer(const QByteArray &name) {
403 _defaultCodecForServer = QTextCodec::codecForName(name);
406 QByteArray Network::defaultCodecForEncoding() {
407 if(_defaultCodecForEncoding) return _defaultCodecForEncoding->name();
411 void Network::setDefaultCodecForEncoding(const QByteArray &name) {
412 _defaultCodecForEncoding = QTextCodec::codecForName(name);
415 QByteArray Network::defaultCodecForDecoding() {
416 if(_defaultCodecForDecoding) return _defaultCodecForDecoding->name();
420 void Network::setDefaultCodecForDecoding(const QByteArray &name) {
421 _defaultCodecForDecoding = QTextCodec::codecForName(name);
424 QByteArray Network::codecForServer() const {
425 if(_codecForServer) return _codecForServer->name();
429 void Network::setCodecForServer(const QByteArray &name) {
430 setCodecForServer(QTextCodec::codecForName(name));
433 void Network::setCodecForServer(QTextCodec *codec) {
434 _codecForServer = codec;
435 emit codecForServerSet(codecForServer());
438 QByteArray Network::codecForEncoding() const {
439 if(_codecForEncoding) return _codecForEncoding->name();
443 void Network::setCodecForEncoding(const QByteArray &name) {
444 setCodecForEncoding(QTextCodec::codecForName(name));
447 void Network::setCodecForEncoding(QTextCodec *codec) {
448 _codecForEncoding = codec;
449 emit codecForEncodingSet(codecForEncoding());
452 QByteArray Network::codecForDecoding() const {
453 if(_codecForDecoding) return _codecForDecoding->name();
454 else return QByteArray();
457 void Network::setCodecForDecoding(const QByteArray &name) {
458 setCodecForDecoding(QTextCodec::codecForName(name));
461 void Network::setCodecForDecoding(QTextCodec *codec) {
462 _codecForDecoding = codec;
463 emit codecForDecodingSet(codecForDecoding());
466 // FIXME use server encoding if appropriate
467 QString Network::decodeString(const QByteArray &text) const {
468 if(_codecForDecoding) return ::decodeString(text, _codecForDecoding);
469 else return ::decodeString(text, _defaultCodecForDecoding);
472 QByteArray Network::encodeString(const QString string) const {
473 if(_codecForEncoding) {
474 return _codecForEncoding->fromUnicode(string);
476 if(_defaultCodecForEncoding) {
477 return _defaultCodecForEncoding->fromUnicode(string);
479 return string.toAscii();
482 // ====================
484 // ====================
485 void Network::setNetworkName(const QString &networkName) {
486 _networkName = networkName;
487 emit networkNameSet(networkName);
490 void Network::setCurrentServer(const QString ¤tServer) {
491 _currentServer = currentServer;
492 emit currentServerSet(currentServer);
495 void Network::setConnected(bool connected) {
496 _connected = connected;
498 removeChansAndUsers();
499 setCurrentServer(QString());
501 emit connectedSet(connected);
504 //void Network::setConnectionState(ConnectionState state) {
505 void Network::setConnectionState(int state) {
506 _connectionState = (ConnectionState)state;
507 //qDebug() << "netstate" << networkId() << networkName() << state;
508 emit connectionStateSet(state);
509 emit connectionStateSet(_connectionState);
512 void Network::setMyNick(const QString &nickname) {
514 emit myNickSet(nickname);
517 void Network::setIdentity(IdentityId id) {
519 emit identitySet(id);
522 void Network::setServerList(const QVariantList &serverList) {
523 _serverList = serverList;
524 emit serverListSet(serverList);
527 void Network::setUseRandomServer(bool use) {
528 _useRandomServer = use;
529 emit useRandomServerSet(use);
532 void Network::setPerform(const QStringList &perform) {
534 emit performSet(perform);
537 void Network::setUseAutoIdentify(bool use) {
538 _useAutoIdentify = use;
539 emit useAutoIdentifySet(use);
542 void Network::setAutoIdentifyService(const QString &service) {
543 _autoIdentifyService = service;
544 emit autoIdentifyServiceSet(service);
547 void Network::setAutoIdentifyPassword(const QString &password) {
548 _autoIdentifyPassword = password;
549 emit autoIdentifyPasswordSet(password);
552 void Network::setUseAutoReconnect(bool use) {
553 _useAutoReconnect = use;
554 emit useAutoReconnectSet(use);
557 void Network::setAutoReconnectInterval(quint32 interval) {
558 _autoReconnectInterval = interval;
559 emit autoReconnectIntervalSet(interval);
562 void Network::setAutoReconnectRetries(quint16 retries) {
563 _autoReconnectRetries = retries;
564 emit autoReconnectRetriesSet(retries);
567 void Network::setUnlimitedReconnectRetries(bool unlimited) {
568 _unlimitedReconnectRetries = unlimited;
569 emit unlimitedReconnectRetriesSet(unlimited);
572 void Network::setRejoinChannels(bool rejoin) {
573 _rejoinChannels = rejoin;
574 emit rejoinChannelsSet(rejoin);
577 void Network::addSupport(const QString ¶m, const QString &value) {
578 if(!_supports.contains(param)) {
579 _supports[param] = value;
580 emit supportAdded(param, value);
584 void Network::removeSupport(const QString ¶m) {
585 if(_supports.contains(param)) {
586 _supports.remove(param);
587 emit supportRemoved(param);
591 QVariantMap Network::initSupports() const {
592 QVariantMap supports;
593 QHashIterator<QString, QString> iter(_supports);
594 while(iter.hasNext()) {
596 supports[iter.key()] = iter.value();
601 QVariantList Network::initServerList() const {
605 QStringList Network::initIrcUsers() const {
606 QStringList hostmasks;
607 foreach(IrcUser *ircuser, ircUsers()) {
608 hostmasks << ircuser->hostmask();
613 QStringList Network::initIrcChannels() const {
614 return _ircChannels.keys();
617 void Network::initSetSupports(const QVariantMap &supports) {
618 QMapIterator<QString, QVariant> iter(supports);
619 while(iter.hasNext()) {
621 addSupport(iter.key(), iter.value().toString());
625 void Network::initSetServerList(const QVariantList & serverList) {
626 setServerList(serverList);
629 void Network::initSetIrcUsers(const QStringList &hostmasks) {
630 if(!_ircUsers.empty())
632 foreach(QString hostmask, hostmasks) {
633 newIrcUser(hostmask);
637 void Network::initSetChannels(const QStringList &channels) {
638 if(!_ircChannels.empty())
640 foreach(QString channel, channels)
641 newIrcChannel(channel);
644 IrcUser *Network::updateNickFromMask(const QString &mask) {
645 QString nick(nickFromMask(mask).toLower());
648 if(_ircUsers.contains(nick)) {
649 ircuser = _ircUsers[nick];
650 ircuser->updateHostmask(mask);
652 ircuser = newIrcUser(mask);
657 void Network::ircUserNickChanged(QString newnick) {
658 QString oldnick = _ircUsers.key(qobject_cast<IrcUser*>(sender()));
663 if(newnick.toLower() != oldnick) _ircUsers[newnick.toLower()] = _ircUsers.take(oldnick);
665 if(myNick().toLower() == oldnick)
669 void Network::ircUserInitDone() {
670 IrcUser *ircuser = static_cast<IrcUser *>(sender());
672 emit ircUserInitDone(ircuser);
675 void Network::ircChannelInitDone() {
676 IrcChannel *ircchannel = static_cast<IrcChannel *>(sender());
677 Q_ASSERT(ircchannel);
678 emit ircChannelInitDone(ircchannel);
681 void Network::removeIrcChannel(IrcChannel *channel) {
682 QString chanName = _ircChannels.key(channel);
683 if(chanName.isNull())
686 _ircChannels.remove(chanName);
687 disconnect(channel, 0, this, 0);
688 emit ircChannelRemoved(chanName);
689 emit ircChannelRemoved(channel);
690 channel->deleteLater();
693 void Network::removeIrcChannel(const QString &channel) {
695 if((chan = ircChannel(channel)) != 0)
696 removeIrcChannel(chan);
699 void Network::channelDestroyed() {
700 IrcChannel *channel = static_cast<IrcChannel *>(sender());
702 _ircChannels.remove(_ircChannels.key(channel));
703 emit ircChannelRemoved(channel);
706 void Network::requestConnect() const {
708 if(proxy()->proxyMode() == SignalProxy::Client) emit connectRequested(); // on the client this triggers calling this slot on the core
710 if(connectionState() != Disconnected) {
711 qWarning() << "Requesting connect while not being disconnected!";
714 emit connectRequested(networkId()); // and this is for CoreSession :)
718 void Network::requestDisconnect() const {
720 if(proxy()->proxyMode() == SignalProxy::Client) emit disconnectRequested(); // on the client this triggers calling this slot on the core
722 if(connectionState() == Disconnected) {
723 qWarning() << "Requesting disconnect while not being connected!";
726 emit disconnectRequested(networkId()); // and this is for CoreSession :)
730 void Network::emitConnectionError(const QString &errorMsg) {
731 emit connectionError(errorMsg);
734 // ====================
736 // ====================
737 void Network::determinePrefixes() {
738 // seems like we have to construct them first
739 QString PREFIX = support("PREFIX");
741 if(PREFIX.startsWith("(") && PREFIX.contains(")")) {
742 _prefixes = PREFIX.section(")", 1);
743 _prefixModes = PREFIX.mid(1).section(")", 0, 0);
745 QString defaultPrefixes("~&@%+");
746 QString defaultPrefixModes("qaohv");
748 // we just assume that in PREFIX are only prefix chars stored
749 for(int i = 0; i < defaultPrefixes.size(); i++) {
750 if(PREFIX.contains(defaultPrefixes[i])) {
751 _prefixes += defaultPrefixes[i];
752 _prefixModes += defaultPrefixModes[i];
756 if(!_prefixes.isNull())
759 // well... our assumption was obviously wrong...
760 // check if it's only prefix modes
761 for(int i = 0; i < defaultPrefixes.size(); i++) {
762 if(PREFIX.contains(defaultPrefixModes[i])) {
763 _prefixes += defaultPrefixes[i];
764 _prefixModes += defaultPrefixModes[i];
767 // now we've done all we've could...
771 /************************************************************************
773 ************************************************************************/
775 bool NetworkInfo::operator==(const NetworkInfo &other) const {
776 if(networkId != other.networkId) return false;
777 if(networkName != other.networkName) return false;
778 if(identity != other.identity) return false;
779 if(codecForServer != other.codecForServer) return false;
780 if(codecForEncoding != other.codecForEncoding) return false;
781 if(codecForDecoding != other.codecForDecoding) return false;
782 if(serverList != other.serverList) return false;
783 if(useRandomServer != other.useRandomServer) return false;
784 if(perform != other.perform) return false;
785 if(useAutoIdentify != other.useAutoIdentify) return false;
786 if(autoIdentifyService != other.autoIdentifyService) return false;
787 if(autoIdentifyPassword != other.autoIdentifyPassword) return false;
788 if(useAutoReconnect != other.useAutoReconnect) return false;
789 if(autoReconnectInterval != other.autoReconnectInterval) return false;
790 if(autoReconnectRetries != other.autoReconnectRetries) return false;
791 if(unlimitedReconnectRetries != other.unlimitedReconnectRetries) return false;
792 if(rejoinChannels != other.rejoinChannels) return false;
796 bool NetworkInfo::operator!=(const NetworkInfo &other) const {
797 return !(*this == other);
800 QDataStream &operator<<(QDataStream &out, const NetworkInfo &info) {
802 i["NetworkId"] = QVariant::fromValue<NetworkId>(info.networkId);
803 i["NetworkName"] = info.networkName;
804 i["Identity"] = QVariant::fromValue<IdentityId>(info.identity);
805 i["CodecForServer"] = info.codecForServer;
806 i["CodecForEncoding"] = info.codecForEncoding;
807 i["CodecForDecoding"] = info.codecForDecoding;
808 i["ServerList"] = info.serverList;
809 i["UseRandomServer"] = info.useRandomServer;
810 i["Perform"] = info.perform;
811 i["UseAutoIdentify"] = info.useAutoIdentify;
812 i["AutoIdentifyService"] = info.autoIdentifyService;
813 i["AutoIdentifyPassword"] = info.autoIdentifyPassword;
814 i["UseAutoReconnect"] = info.useAutoReconnect;
815 i["AutoReconnectInterval"] = info.autoReconnectInterval;
816 i["AutoReconnectRetries"] = info.autoReconnectRetries;
817 i["UnlimitedReconnectRetries"] = info.unlimitedReconnectRetries;
818 i["RejoinChannels"] = info.rejoinChannels;
823 QDataStream &operator>>(QDataStream &in, NetworkInfo &info) {
826 info.networkId = i["NetworkId"].value<NetworkId>();
827 info.networkName = i["NetworkName"].toString();
828 info.identity = i["Identity"].value<IdentityId>();
829 info.codecForServer = i["CodecForServer"].toByteArray();
830 info.codecForEncoding = i["CodecForEncoding"].toByteArray();
831 info.codecForDecoding = i["CodecForDecoding"].toByteArray();
832 info.serverList = i["ServerList"].toList();
833 info.useRandomServer = i["UseRandomServer"].toBool();
834 info.perform = i["Perform"].toStringList();
835 info.useAutoIdentify = i["UseAutoIdentify"].toBool();
836 info.autoIdentifyService = i["AutoIdentifyService"].toString();
837 info.autoIdentifyPassword = i["AutoIdentifyPassword"].toString();
838 info.useAutoReconnect = i["UseAutoReconnect"].toBool();
839 info.autoReconnectInterval = i["AutoReconnectInterval"].toUInt();
840 info.autoReconnectRetries = i["AutoReconnectRetries"].toInt();
841 info.unlimitedReconnectRetries = i["UnlimitedReconnectRetries"].toBool();
842 info.rejoinChannels = i["RejoinChannels"].toBool();