X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.cpp;h=71619ef1c1767e4e720c22c204c9a59471e4ed09;hp=b5981dd15cc46e55ae01437afd17a03732213427;hb=620cd1aa35e05099b3f84400dd33afc207c98244;hpb=4aea5769f4c155234394957aa55360f111c12cbb diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index b5981dd1..71619ef1 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -942,8 +942,22 @@ void CoreSessionEventProcessor::processIrcEvent352(IrcEvent *e) // Some IRC servers decide to not follow the spec, returning only -some- of the user // modes in WHO despite listing them all in NAMES. For now, assume it can only add // and not take away. *sigh* - if (!validModes.isEmpty()) - ircuser->addUserModes(validModes); + if (!validModes.isEmpty()) { + if (channel != "*") { + // Channel-specific modes received, apply to given channel only + IrcChannel *ircChan = e->network()->ircChannel(channel); + if (ircChan) { + // Do one mode at a time + // TODO Better way of syncing this without breaking protocol? + for (int i = 0; i < validModes.count(); ++i) { + ircChan->addUserMode(ircuser, validModes.at(i)); + } + } + } else { + // Modes apply to the user everywhere + ircuser->addUserModes(validModes); + } + } } } @@ -1265,7 +1279,7 @@ void CoreSessionEventProcessor::handleCtcpDcc(CtcpEvent *e) } // TODO: check if target is the right thing to use for the partner - CoreTransfer *transfer = new CoreTransfer(Transfer::Receive, e->target(), filename, address, port, size, this); + CoreTransfer *transfer = new CoreTransfer(Transfer::Direction::Receive, e->target(), filename, address, port, size, this); coreSession()->signalProxy()->synchronize(transfer); coreSession()->transferManager()->addTransfer(transfer); } @@ -1292,5 +1306,5 @@ void CoreSessionEventProcessor::handleCtcpTime(CtcpEvent *e) void CoreSessionEventProcessor::handleCtcpVersion(CtcpEvent *e) { e->setReply(QString("Quassel IRC %1 (built on %2) -- http://www.quassel-irc.org") - .arg(Quassel::buildInfo().plainVersionString).arg(Quassel::buildInfo().buildDate)); + .arg(Quassel::buildInfo().plainVersionString).arg(Quassel::buildInfo().commitDate)); }