/***************************************************************************
- * 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 *
// 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);
+ }
+ }
}
}
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));
}