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 ***************************************************************************/
27 QTextCodec *Network::_defaultCodecForServer = 0;
28 QTextCodec *Network::_defaultCodecForEncoding = 0;
29 QTextCodec *Network::_defaultCodecForDecoding = 0;
30 // ====================
32 // ====================
33 Network::Network(const NetworkId &networkid, QObject *parent)
34 : SyncableObject(parent),
36 _networkId(networkid),
39 _networkName(QString("<not initialized>")),
40 _currentServer(QString()),
42 _connectionState(Disconnected),
44 _prefixModes(QString()),
45 _useRandomServer(false),
46 _useAutoIdentify(false),
47 _useAutoReconnect(false),
48 _autoReconnectInterval(60),
49 _autoReconnectRetries(10),
50 _unlimitedReconnectRetries(false),
55 setObjectName(QString::number(networkid.toInt()));
59 emit aboutToBeDestroyed();
62 bool Network::isChannelName(const QString &channelname) const {
63 if(channelname.isEmpty())
66 if(supports("CHANTYPES"))
67 return support("CHANTYPES").contains(channelname[0]);
69 return QString("#&!+").contains(channelname[0]);
72 NetworkInfo Network::networkInfo() const {
74 info.networkName = networkName();
75 info.networkId = networkId();
76 info.identity = identity();
77 info.codecForServer = codecForServer();
78 info.codecForEncoding = codecForEncoding();
79 info.codecForDecoding = codecForDecoding();
80 info.serverList = serverList();
81 info.useRandomServer = useRandomServer();
82 info.perform = perform();
83 info.useAutoIdentify = useAutoIdentify();
84 info.autoIdentifyService = autoIdentifyService();
85 info.autoIdentifyPassword = autoIdentifyPassword();
86 info.useAutoReconnect = useAutoReconnect();
87 info.autoReconnectInterval = autoReconnectInterval();
88 info.autoReconnectRetries = autoReconnectRetries();
89 info.unlimitedReconnectRetries = unlimitedReconnectRetries();
90 info.rejoinChannels = rejoinChannels();
94 void Network::setNetworkInfo(const NetworkInfo &info) {
95 // we don't set our ID!
96 if(!info.networkName.isEmpty() && info.networkName != networkName()) setNetworkName(info.networkName);
97 if(info.identity > 0 && info.identity != identity()) setIdentity(info.identity);
98 if(info.codecForServer != codecForServer()) setCodecForServer(QTextCodec::codecForName(info.codecForServer));
99 if(info.codecForEncoding != codecForEncoding()) setCodecForEncoding(QTextCodec::codecForName(info.codecForEncoding));
100 if(info.codecForDecoding != codecForDecoding()) setCodecForDecoding(QTextCodec::codecForName(info.codecForDecoding));
101 if(info.serverList.count()) setServerList(info.serverList); // FIXME compare components
102 if(info.useRandomServer != useRandomServer()) setUseRandomServer(info.useRandomServer);
103 if(info.perform != perform()) setPerform(info.perform);
104 if(info.useAutoIdentify != useAutoIdentify()) setUseAutoIdentify(info.useAutoIdentify);
105 if(info.autoIdentifyService != autoIdentifyService()) setAutoIdentifyService(info.autoIdentifyService);
106 if(info.autoIdentifyPassword != autoIdentifyPassword()) setAutoIdentifyPassword(info.autoIdentifyPassword);
107 if(info.useAutoReconnect != useAutoReconnect()) setUseAutoReconnect(info.useAutoReconnect);
108 if(info.autoReconnectInterval != autoReconnectInterval()) setAutoReconnectInterval(info.autoReconnectInterval);
109 if(info.autoReconnectRetries != autoReconnectRetries()) setAutoReconnectRetries(info.autoReconnectRetries);
110 if(info.unlimitedReconnectRetries != unlimitedReconnectRetries()) setUnlimitedReconnectRetries(info.unlimitedReconnectRetries);
111 if(info.rejoinChannels != rejoinChannels()) setRejoinChannels(info.rejoinChannels);
114 QString Network::prefixToMode(const QString &prefix) {
115 if(prefixes().contains(prefix))
116 return QString(prefixModes()[prefixes().indexOf(prefix)]);
121 QString Network::modeToPrefix(const QString &mode) {
122 if(prefixModes().contains(mode))
123 return QString(prefixes()[prefixModes().indexOf(mode)]);
128 QStringList Network::nicks() const {
129 // we don't use _ircUsers.keys() since the keys may be
130 // not up to date after a nick change
132 foreach(IrcUser *ircuser, _ircUsers.values()) {
133 nicks << ircuser->nick();
138 QString Network::prefixes() {
139 if(_prefixes.isNull())
145 QString Network::prefixModes() {
146 if(_prefixModes.isNull())
152 // example Unreal IRCD: CHANMODES=beI,kfL,lj,psmntirRcOAQKVCuzNSMTG
153 Network::ChannelModeType Network::channelModeType(const QString &mode) {
155 return NOT_A_CHANMODE;
157 QString chanmodes = support("CHANMODES");
158 if(chanmodes.isEmpty())
159 return NOT_A_CHANMODE;
161 ChannelModeType modeType = A_CHANMODE;
162 for(int i = 0; i < chanmodes.count(); i++) {
163 if(chanmodes[i] == mode[0])
165 else if(chanmodes[i] == ',')
166 modeType = (ChannelModeType)(modeType << 1);
168 if(modeType > D_CHANMODE) {
169 qWarning() << "Network" << networkId() << "supplied invalid CHANMODES:" << chanmodes;
170 modeType = NOT_A_CHANMODE;
175 QString Network::support(const QString ¶m) const {
176 QString support_ = param.toUpper();
177 if(_supports.contains(support_))
178 return _supports[support_];
183 IrcUser *Network::newIrcUser(const QString &hostmask) {
184 QString nick(nickFromMask(hostmask).toLower());
185 if(!_ircUsers.contains(nick)) {
186 IrcUser *ircuser = new IrcUser(hostmask, this);
189 proxy()->synchronize(ircuser);
191 qWarning() << "unable to synchronize new IrcUser" << hostmask << "forgot to call Network::setProxy(SignalProxy *)?";
193 connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickChanged(QString)));
194 connect(ircuser, SIGNAL(initDone()), this, SLOT(ircUserInitDone()));
195 connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));
196 _ircUsers[nick] = ircuser;
197 emit ircUserAdded(hostmask);
198 emit ircUserAdded(ircuser);
200 return _ircUsers[nick];
203 void Network::ircUserDestroyed() {
204 IrcUser *ircUser = static_cast<IrcUser *>(sender());
208 QHash<QString, IrcUser *>::iterator ircUserIter = _ircUsers.begin();
209 while(ircUserIter != _ircUsers.end()) {
210 if(ircUser == *ircUserIter) {
211 emit deletedIrcUserRemoved(ircUserIter.key());
212 ircUserIter = _ircUsers.erase(ircUserIter);
219 void Network::removeDeletedIrcUser(const QString &username) {
220 // DO NOT CALL THIS SLOT EVER!!!
222 // this slots purpose is only to remove deleted users that haven't been synced yet.
224 // as a user parting a channel results in it's deletion if it is no longer in any known channel
225 // this action can only be communicated if the slaves are allready in sync.
226 // so if such a deleted user isn't synced in slave mode, we kill and remove it.
230 if(!_ircUsers.contains(username))
233 IrcUser *ircUser = _ircUsers[username];
235 if(ircUser->isInitialized())
238 _ircUsers.remove(username);
239 emit ircUserRemoved(username);
240 emit ircUserRemoved(ircUser);
243 void Network::removeIrcUser(IrcUser *ircuser) {
244 QString nick = _ircUsers.key(ircuser);
248 _ircUsers.remove(nick);
249 disconnect(ircuser, 0, this, 0);
250 emit ircUserRemoved(nick);
251 emit ircUserRemoved(ircuser);
252 ircuser->deleteLater();
255 void Network::removeIrcUser(const QString &nick) {
257 if((ircuser = ircUser(nick)) != 0)
258 removeIrcUser(ircuser);
261 void Network::removeChansAndUsers() {
262 QList<IrcUser *> users = ircUsers();
263 foreach(IrcUser *user, users) {
266 QList<IrcChannel *> channels = ircChannels();
267 foreach(IrcChannel *channel, channels) {
268 removeIrcChannel(channel);
272 IrcUser *Network::ircUser(QString nickname) const {
273 nickname = nickname.toLower();
274 if(_ircUsers.contains(nickname))
275 return _ircUsers[nickname];
280 IrcChannel *Network::newIrcChannel(const QString &channelname) {
281 if(!_ircChannels.contains(channelname.toLower())) {
282 IrcChannel *channel = new IrcChannel(channelname, this);
285 proxy()->synchronize(channel);
287 qWarning() << "unable to synchronize new IrcChannel" << channelname << "forgot to call Network::setProxy(SignalProxy *)?";
289 connect(channel, SIGNAL(initDone()), this, SLOT(ircChannelInitDone()));
290 connect(channel, SIGNAL(destroyed()), this, SLOT(channelDestroyed()));
291 _ircChannels[channelname.toLower()] = channel;
292 emit ircChannelAdded(channelname);
293 emit ircChannelAdded(channel);
295 return _ircChannels[channelname.toLower()];
298 IrcChannel *Network::ircChannel(QString channelname) const {
299 channelname = channelname.toLower();
300 if(_ircChannels.contains(channelname))
301 return _ircChannels[channelname];
306 QByteArray Network::defaultCodecForServer() {
307 if(_defaultCodecForServer)
308 return _defaultCodecForServer->name();
312 void Network::setDefaultCodecForServer(const QByteArray &name) {
313 _defaultCodecForServer = QTextCodec::codecForName(name);
316 QByteArray Network::defaultCodecForEncoding() {
317 if(_defaultCodecForEncoding)
318 return _defaultCodecForEncoding->name();
322 void Network::setDefaultCodecForEncoding(const QByteArray &name) {
323 _defaultCodecForEncoding = QTextCodec::codecForName(name);
326 QByteArray Network::defaultCodecForDecoding() {
327 if(_defaultCodecForDecoding)
328 return _defaultCodecForDecoding->name();
332 void Network::setDefaultCodecForDecoding(const QByteArray &name) {
333 _defaultCodecForDecoding = QTextCodec::codecForName(name);
336 QByteArray Network::codecForServer() const {
338 return _codecForServer->name();
342 void Network::setCodecForServer(const QByteArray &name) {
343 setCodecForServer(QTextCodec::codecForName(name));
346 void Network::setCodecForServer(QTextCodec *codec) {
347 _codecForServer = codec;
348 emit codecForServerSet(codecForServer());
351 QByteArray Network::codecForEncoding() const {
352 if(_codecForEncoding)
353 return _codecForEncoding->name();
357 void Network::setCodecForEncoding(const QByteArray &name) {
358 setCodecForEncoding(QTextCodec::codecForName(name));
361 void Network::setCodecForEncoding(QTextCodec *codec) {
362 _codecForEncoding = codec;
363 emit codecForEncodingSet(codecForEncoding());
366 QByteArray Network::codecForDecoding() const {
367 if(_codecForDecoding)
368 return _codecForDecoding->name();
369 else return QByteArray();
372 void Network::setCodecForDecoding(const QByteArray &name) {
373 setCodecForDecoding(QTextCodec::codecForName(name));
376 void Network::setCodecForDecoding(QTextCodec *codec) {
377 _codecForDecoding = codec;
378 emit codecForDecodingSet(codecForDecoding());
381 // FIXME use server encoding if appropriate
382 QString Network::decodeString(const QByteArray &text) const {
383 if(_codecForDecoding)
384 return ::decodeString(text, _codecForDecoding);
385 else return ::decodeString(text, _defaultCodecForDecoding);
388 QByteArray Network::encodeString(const QString &string) const {
389 if(_codecForEncoding) {
390 return _codecForEncoding->fromUnicode(string);
392 if(_defaultCodecForEncoding) {
393 return _defaultCodecForEncoding->fromUnicode(string);
395 return string.toAscii();
398 QString Network::decodeServerString(const QByteArray &text) const {
400 return ::decodeString(text, _codecForServer);
402 return ::decodeString(text, _defaultCodecForServer);
405 QByteArray Network::encodeServerString(const QString &string) const {
406 if(_codecForServer) {
407 return _codecForServer->fromUnicode(string);
409 if(_defaultCodecForServer) {
410 return _defaultCodecForServer->fromUnicode(string);
412 return string.toAscii();
415 // ====================
417 // ====================
418 void Network::setNetworkName(const QString &networkName) {
419 _networkName = networkName;
420 emit networkNameSet(networkName);
423 void Network::setCurrentServer(const QString ¤tServer) {
424 _currentServer = currentServer;
425 emit currentServerSet(currentServer);
428 void Network::setConnected(bool connected) {
429 if(_connected == connected)
432 _connected = connected;
434 setMyNick(QString());
435 setCurrentServer(QString());
436 removeChansAndUsers();
438 emit connectedSet(connected);
441 //void Network::setConnectionState(ConnectionState state) {
442 void Network::setConnectionState(int state) {
443 _connectionState = (ConnectionState)state;
444 //qDebug() << "netstate" << networkId() << networkName() << state;
445 emit connectionStateSet(state);
446 emit connectionStateSet(_connectionState);
449 void Network::setMyNick(const QString &nickname) {
451 if(!_myNick.isEmpty() && !ircUser(myNick())) {
452 newIrcUser(myNick());
454 emit myNickSet(nickname);
457 void Network::setIdentity(IdentityId id) {
459 emit identitySet(id);
462 void Network::setServerList(const QVariantList &serverList) {
463 _serverList = serverList;
464 emit serverListSet(serverList);
467 void Network::setUseRandomServer(bool use) {
468 _useRandomServer = use;
469 emit useRandomServerSet(use);
472 void Network::setPerform(const QStringList &perform) {
474 emit performSet(perform);
477 void Network::setUseAutoIdentify(bool use) {
478 _useAutoIdentify = use;
479 emit useAutoIdentifySet(use);
482 void Network::setAutoIdentifyService(const QString &service) {
483 _autoIdentifyService = service;
484 emit autoIdentifyServiceSet(service);
487 void Network::setAutoIdentifyPassword(const QString &password) {
488 _autoIdentifyPassword = password;
489 emit autoIdentifyPasswordSet(password);
492 void Network::setUseAutoReconnect(bool use) {
493 _useAutoReconnect = use;
494 emit useAutoReconnectSet(use);
497 void Network::setAutoReconnectInterval(quint32 interval) {
498 _autoReconnectInterval = interval;
499 emit autoReconnectIntervalSet(interval);
502 void Network::setAutoReconnectRetries(quint16 retries) {
503 _autoReconnectRetries = retries;
504 emit autoReconnectRetriesSet(retries);
507 void Network::setUnlimitedReconnectRetries(bool unlimited) {
508 _unlimitedReconnectRetries = unlimited;
509 emit unlimitedReconnectRetriesSet(unlimited);
512 void Network::setRejoinChannels(bool rejoin) {
513 _rejoinChannels = rejoin;
514 emit rejoinChannelsSet(rejoin);
517 void Network::addSupport(const QString ¶m, const QString &value) {
518 if(!_supports.contains(param)) {
519 _supports[param] = value;
520 emit supportAdded(param, value);
524 void Network::removeSupport(const QString ¶m) {
525 if(_supports.contains(param)) {
526 _supports.remove(param);
527 emit supportRemoved(param);
531 QVariantMap Network::initSupports() const {
532 QVariantMap supports;
533 QHashIterator<QString, QString> iter(_supports);
534 while(iter.hasNext()) {
536 supports[iter.key()] = iter.value();
541 QStringList Network::initIrcUsers() const {
542 QStringList hostmasks;
543 foreach(IrcUser *ircuser, ircUsers()) {
544 hostmasks << ircuser->hostmask();
549 QStringList Network::initIrcChannels() const {
550 QStringList channels;
551 QHash<QString, IrcChannel *>::const_iterator iter = _ircChannels.constBegin();
552 while(iter != _ircChannels.constEnd()) {
553 channels << iter.value()->name();
559 void Network::initSetSupports(const QVariantMap &supports) {
560 QMapIterator<QString, QVariant> iter(supports);
561 while(iter.hasNext()) {
563 addSupport(iter.key(), iter.value().toString());
567 void Network::initSetIrcUsers(const QStringList &hostmasks) {
568 if(!_ircUsers.empty())
570 foreach(QString hostmask, hostmasks) {
571 newIrcUser(hostmask);
575 void Network::initSetIrcChannels(const QStringList &channels) {
576 if(!_ircChannels.empty())
578 foreach(QString channel, channels)
579 newIrcChannel(channel);
582 IrcUser *Network::updateNickFromMask(const QString &mask) {
583 QString nick(nickFromMask(mask).toLower());
586 if(_ircUsers.contains(nick)) {
587 ircuser = _ircUsers[nick];
588 ircuser->updateHostmask(mask);
590 ircuser = newIrcUser(mask);
595 void Network::ircUserNickChanged(QString newnick) {
596 QString oldnick = _ircUsers.key(qobject_cast<IrcUser*>(sender()));
601 if(newnick.toLower() != oldnick) _ircUsers[newnick.toLower()] = _ircUsers.take(oldnick);
603 if(myNick().toLower() == oldnick)
607 void Network::ircUserInitDone() {
608 IrcUser *ircuser = static_cast<IrcUser *>(sender());
610 emit ircUserInitDone(ircuser);
613 void Network::ircChannelInitDone() {
614 IrcChannel *ircchannel = static_cast<IrcChannel *>(sender());
615 Q_ASSERT(ircchannel);
616 emit ircChannelInitDone(ircchannel);
619 void Network::removeIrcChannel(IrcChannel *channel) {
620 QString chanName = _ircChannels.key(channel);
621 if(chanName.isNull())
624 _ircChannels.remove(chanName);
625 disconnect(channel, 0, this, 0);
626 emit ircChannelRemoved(chanName);
627 emit ircChannelRemoved(channel);
628 channel->deleteLater();
631 void Network::removeIrcChannel(const QString &channel) {
633 if((chan = ircChannel(channel)) != 0)
634 removeIrcChannel(chan);
637 void Network::channelDestroyed() {
638 IrcChannel *channel = static_cast<IrcChannel *>(sender());
640 _ircChannels.remove(_ircChannels.key(channel));
641 emit ircChannelRemoved(channel);
644 void Network::emitConnectionError(const QString &errorMsg) {
645 emit connectionError(errorMsg);
648 // ====================
650 // ====================
651 void Network::determinePrefixes() {
652 // seems like we have to construct them first
653 QString PREFIX = support("PREFIX");
655 if(PREFIX.startsWith("(") && PREFIX.contains(")")) {
656 _prefixes = PREFIX.section(")", 1);
657 _prefixModes = PREFIX.mid(1).section(")", 0, 0);
659 QString defaultPrefixes("~&@%+");
660 QString defaultPrefixModes("qaohv");
662 if(PREFIX.isEmpty()) {
663 _prefixes = defaultPrefixes;
664 _prefixModes = defaultPrefixModes;
668 // we just assume that in PREFIX are only prefix chars stored
669 for(int i = 0; i < defaultPrefixes.size(); i++) {
670 if(PREFIX.contains(defaultPrefixes[i])) {
671 _prefixes += defaultPrefixes[i];
672 _prefixModes += defaultPrefixModes[i];
676 if(!_prefixes.isNull())
679 // well... our assumption was obviously wrong...
680 // check if it's only prefix modes
681 for(int i = 0; i < defaultPrefixes.size(); i++) {
682 if(PREFIX.contains(defaultPrefixModes[i])) {
683 _prefixes += defaultPrefixes[i];
684 _prefixModes += defaultPrefixModes[i];
687 // now we've done all we've could...
691 /************************************************************************
693 ************************************************************************/
695 bool NetworkInfo::operator==(const NetworkInfo &other) const {
696 if(networkId != other.networkId) return false;
697 if(networkName != other.networkName) return false;
698 if(identity != other.identity) return false;
699 if(codecForServer != other.codecForServer) return false;
700 if(codecForEncoding != other.codecForEncoding) return false;
701 if(codecForDecoding != other.codecForDecoding) return false;
702 if(serverList != other.serverList) return false;
703 if(useRandomServer != other.useRandomServer) return false;
704 if(perform != other.perform) return false;
705 if(useAutoIdentify != other.useAutoIdentify) return false;
706 if(autoIdentifyService != other.autoIdentifyService) return false;
707 if(autoIdentifyPassword != other.autoIdentifyPassword) return false;
708 if(useAutoReconnect != other.useAutoReconnect) return false;
709 if(autoReconnectInterval != other.autoReconnectInterval) return false;
710 if(autoReconnectRetries != other.autoReconnectRetries) return false;
711 if(unlimitedReconnectRetries != other.unlimitedReconnectRetries) return false;
712 if(rejoinChannels != other.rejoinChannels) return false;
716 bool NetworkInfo::operator!=(const NetworkInfo &other) const {
717 return !(*this == other);
720 QDataStream &operator<<(QDataStream &out, const NetworkInfo &info) {
722 i["NetworkId"] = QVariant::fromValue<NetworkId>(info.networkId);
723 i["NetworkName"] = info.networkName;
724 i["Identity"] = QVariant::fromValue<IdentityId>(info.identity);
725 i["CodecForServer"] = info.codecForServer;
726 i["CodecForEncoding"] = info.codecForEncoding;
727 i["CodecForDecoding"] = info.codecForDecoding;
728 i["ServerList"] = info.serverList;
729 i["UseRandomServer"] = info.useRandomServer;
730 i["Perform"] = info.perform;
731 i["UseAutoIdentify"] = info.useAutoIdentify;
732 i["AutoIdentifyService"] = info.autoIdentifyService;
733 i["AutoIdentifyPassword"] = info.autoIdentifyPassword;
734 i["UseAutoReconnect"] = info.useAutoReconnect;
735 i["AutoReconnectInterval"] = info.autoReconnectInterval;
736 i["AutoReconnectRetries"] = info.autoReconnectRetries;
737 i["UnlimitedReconnectRetries"] = info.unlimitedReconnectRetries;
738 i["RejoinChannels"] = info.rejoinChannels;
743 QDataStream &operator>>(QDataStream &in, NetworkInfo &info) {
746 info.networkId = i["NetworkId"].value<NetworkId>();
747 info.networkName = i["NetworkName"].toString();
748 info.identity = i["Identity"].value<IdentityId>();
749 info.codecForServer = i["CodecForServer"].toByteArray();
750 info.codecForEncoding = i["CodecForEncoding"].toByteArray();
751 info.codecForDecoding = i["CodecForDecoding"].toByteArray();
752 info.serverList = i["ServerList"].toList();
753 info.useRandomServer = i["UseRandomServer"].toBool();
754 info.perform = i["Perform"].toStringList();
755 info.useAutoIdentify = i["UseAutoIdentify"].toBool();
756 info.autoIdentifyService = i["AutoIdentifyService"].toString();
757 info.autoIdentifyPassword = i["AutoIdentifyPassword"].toString();
758 info.useAutoReconnect = i["UseAutoReconnect"].toBool();
759 info.autoReconnectInterval = i["AutoReconnectInterval"].toUInt();
760 info.autoReconnectRetries = i["AutoReconnectRetries"].toInt();
761 info.unlimitedReconnectRetries = i["UnlimitedReconnectRetries"].toBool();
762 info.rejoinChannels = i["RejoinChannels"].toBool();
766 QDebug operator<<(QDebug dbg, const NetworkInfo &i) {
767 dbg.nospace() << "(id = " << i.networkId << " name = " << i.networkName << " identity = " << i.identity
768 << " codecForServer = " << i.codecForServer << " codecForEncoding = " << i.codecForEncoding << " codecForDecoding = " << i.codecForDecoding
769 << " serverList = " << i.serverList << " useRandomServer = " << i.useRandomServer << " perform = " << i.perform
770 << " useAutoIdentify = " << i.useAutoIdentify << " autoIdentifyService = " << i.autoIdentifyService << " autoIdentifyPassword = " << i.autoIdentifyPassword
771 << " useAutoReconnect = " << i.useAutoReconnect << " autoReconnectInterval = " << i.autoReconnectInterval
772 << " autoReconnectRetries = " << i.autoReconnectRetries << " unlimitedReconnectRetries = " << i.unlimitedReconnectRetries
773 << " rejoinChannels = " << i.rejoinChannels << ")";