X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreuserinputhandler.cpp;h=8878340824c53b1187c7cacae575ca8782894b25;hp=8d35fec94793b5dc9d9de1cef213176c06ecbe0d;hb=092e6b212637ffbf68800584b7c1f32d1931b602;hpb=f5abb30ac6ec8089901d686d9c2ec3387f97aaef diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp index 8d35fec9..88783408 100644 --- a/src/core/coreuserinputhandler.cpp +++ b/src/core/coreuserinputhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -476,15 +476,16 @@ void CoreUserInputHandler::handleMode(const BufferInfo &bufferInfo, const QStrin QStringList params = msg.split(' ', QString::SkipEmptyParts); // if the first argument is neither a channel nor us (user modes are only to oneself) the current buffer is assumed to be the target if (!params.isEmpty()) { - if (!network()->isChannelName(params[0]) && !network()->isMyNick(params[0])) - params.prepend(bufferInfo.bufferName()); - if (network()->isMyNick(params[0]) && params.count() == 2) - network()->updateIssuedModes(params[1]); if (params[0] == "-reset" && params.count() == 1) { - // FIXME: give feedback to the user (I don't want to add new strings right now) network()->resetPersistentModes(); + emit displayMsg(Message::Info, BufferInfo::StatusBuffer, "", + tr("Your persistent modes have been reset.")); return; } + if (!network()->isChannelName(params[0]) && !network()->isMyNick(params[0])) + params.prepend(bufferInfo.bufferName()); + if (network()->isMyNick(params[0]) && params.count() == 2) + network()->updateIssuedModes(params[1]); } // TODO handle correct encoding for buffer modes (channelEncode())