X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fircserverhandler.cpp;h=3b58903c4fd19b564d081cd61aa4f3746bbc130a;hp=fd7e0554a54d92031a509d9cf917abe45e92d0be;hb=da3aa4136fe01e142238f0f42fe1273481037b9d;hpb=bd1a18355495899b5ce3003599a67e1ea7ca01cc diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index fd7e0554..3b58903c 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -136,7 +136,7 @@ void IrcServerHandler::defaultHandler(QString cmd, const QString &prefix, const break; } // Server error messages which will be displayed with a colon between the first param and the rest - case 413: case 414: case 423: case 441: case 444: case 461: + case 413: case 414: case 423: case 441: case 444: case 461: // FIXME see below for the 47x codes case 467: case 471: case 473: case 474: case 475: case 476: case 477: case 478: case 482: case 436: // ERR_NICKCOLLISION { QString p = params.takeFirst(); @@ -168,6 +168,7 @@ void IrcServerHandler::handleJoin(const QString &prefix, const QList emit displayMsg(Message::Join, BufferInfo::ChannelBuffer, channel, channel, prefix); //qDebug() << "IrcServerHandler::handleJoin()" << prefix << params; ircuser->joinChannel(channel); + if(network()->isMe(ircuser)) network()->addPersistentChannel(channel, networkConnection()->channelKey(channel)); } void IrcServerHandler::handleKick(const QString &prefix, const QList ¶ms) { @@ -185,6 +186,7 @@ void IrcServerHandler::handleKick(const QString &prefix, const QList msg = victim->nick(); emit displayMsg(Message::Kick, BufferInfo::ChannelBuffer, channel, msg, prefix); + //if(network()->isMe(victim)) networkConnection()->setKickedFromChannel(channel); } void IrcServerHandler::handleMode(const QString &prefix, const QList ¶ms) { @@ -276,6 +278,7 @@ void IrcServerHandler::handlePart(const QString &prefix, const QList msg = userDecode(ircuser->nick(), params[1]); emit displayMsg(Message::Part, BufferInfo::ChannelBuffer, channel, msg, prefix); + if(network()->isMe(ircuser)) network()->removePersistentChannel(channel); } void IrcServerHandler::handlePing(const QString &prefix, const QList ¶ms) { @@ -608,6 +611,13 @@ void IrcServerHandler::handle433(const QString &prefix, const QList tryNextNick(errnick); } +/* */ + +// FIXME networkConnection()->setChannelKey("") for all ERR replies indicating that a JOIN went wrong +// mostly, these are codes in the 47x range + +/* */ + void IrcServerHandler::tryNextNick(const QString &errnick) { QStringList desiredNicks = networkConnection()->coreSession()->identity(network()->identity())->nicks(); int nextNick = desiredNicks.indexOf(errnick) + 1;