From 31cf429ff1ffbc1cf1dea04935744f0ce0fb9829 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 15 Nov 2008 21:51:37 +0100 Subject: [PATCH] Display rather than clear the channel topic on /topic without params This has been discussed in BR #113 as well as #BR 289. User feedback has shown that this is the expected behavior, moreover users have complained about accidentally clearing the topic. This requires a core restart. --- src/core/userinputhandler.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/core/userinputhandler.cpp b/src/core/userinputhandler.cpp index fcb879ea..5315768b 100644 --- a/src/core/userinputhandler.cpp +++ b/src/core/userinputhandler.cpp @@ -343,13 +343,11 @@ void UserInputHandler::handleSay(const BufferInfo &bufferInfo, const QString &ms void UserInputHandler::handleTopic(const BufferInfo &bufferInfo, const QString &msg) { if(bufferInfo.bufferName().isEmpty()) return; - if(!msg.isEmpty()) { - QList params; - params << serverEncode(bufferInfo.bufferName()) << channelEncode(bufferInfo.bufferName(), msg); - emit putCmd("TOPIC", params); - } else { - emit networkConnection()->putRawLine("TOPIC " + serverEncode(bufferInfo.bufferName()) + " :"); - } + QList params; + params << serverEncode(bufferInfo.bufferName()); + if(!msg.isEmpty()) + params << channelEncode(bufferInfo.bufferName(), msg); + emit putCmd("TOPIC", params); } void UserInputHandler::handleVoice(const BufferInfo &bufferInfo, const QString &msg) { -- 2.20.1