Version: 0.7.3 (using KDE 3.1.4) Installed from: SuSE Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.4.21-166-athlon The program falsely claims that there were no channels starting with '+', but that all channels must start with '#', and refuses to connect to the given '+' channel, e.g. "+bonn".
Oh what network can channels start with a +?
Subject: kdenetwork/kopete/protocols/irc CVS commit by brunes: Accept channels with non # identifiers. Note this is still not fully resolved since the strings are now wrong, and I am not handling error code 403 when you try to join a chan type on a netowrk that doesn't have them. But at least now people can join these channel types. CCMAIL:72391@bugs.kde.org M +8 -6 ircprotocol.cpp 1.141 --- kdenetwork/kopete/protocols/irc/ircprotocol.cpp #1.140:1.141 @@ -39,4 +39,6 @@ typedef KGenericFactory<IRCProtocol> IRC K_EXPORT_COMPONENT_FACTORY( kopete_irc, IRCProtocolFactory( "kopete_irc" ) ); +static QRegExp isChannelRegex( QString::fromLatin1("^[#!+&][^\\s,:]+$") ); + IRCProtocol *IRCProtocol::s_protocol = 0L; @@ -325,10 +327,10 @@ void IRCProtocol::slotJoinCommand( const if( !args.isEmpty() ) { - QStringList argsList = KopeteCommandHandler::parseArguments( args ); - if( argsList.front().startsWith( QString::fromLatin1("#") ) ) - static_cast<IRCAccount*>( manager->account() )->findChannel( argsList.front() )->startChat(); + QString chan = KopeteCommandHandler::parseArguments( args ).front(); + if( isChannelRegex.search( chan ) != -1 ) + static_cast<IRCAccount*>( manager->account() )->findChannel( chan )->startChat(); else { - KopeteMessage msg(manager->user(), manager->members(), i18n("\"%1\" is an invalid channel. Channels must start with '#'.").arg(argsList.front()), KopeteMessage::Internal, KopeteMessage::PlainText, KopeteMessage::Chat); + KopeteMessage msg(manager->user(), manager->members(), i18n("\"%1\" is an invalid channel. Channels must start with '#'.").arg(chan), KopeteMessage::Internal, KopeteMessage::PlainText, KopeteMessage::Chat); manager->appendMessage(msg); } @@ -370,5 +372,5 @@ void IRCProtocol::slotQueryCommand( cons QString rest = args.section( ' ', 1 ); - if( !user.startsWith( QString::fromLatin1("#") ) ) + if( !isChannelRegex.search( user ) != -1 ) { IRCUserContact *c = static_cast<IRCAccount*>( manager->account() )->findUser( user ); @@ -442,5 +444,5 @@ void IRCProtocol::slotKickCommand( const KopeteContactPtrList members = manager->members(); QString channel = static_cast<IRCContact*>( members.first() )->nickName(); - if( channel.startsWith( QString::fromLatin1("#")) ) + if( isChannelRegex.search( channel ) != -1 ) static_cast<IRCAccount*>( manager->account() )->engine()->kickUser( nick, channel, reason ); }
A couple of networks, but I think those modeless channels have fallen into disuse. The three different prefix characters for channels are #, & and +. I know of no network using different types. Anyways, some networks send the CHANTYPES capability during logon which list the available types.
*** Bug 72412 has been marked as a duplicate of this bug. ***
Strings updated in HEAD. closing.