X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Finputwidget.cpp;h=d4ca8327a55ea3538e81eeab15c6d1173d3f199b;hp=3c7bec537a01dd78edcd153e55570428bc0d03f4;hb=00676d2c00f8dbc2806145b9c219c6e4ccbae0c1;hpb=68802b36b99d01431710dafb1bc03580851946d4 diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index 3c7bec53..d4ca8327 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -204,8 +204,11 @@ void InputWidget::updateNickSelector() const { return; IrcUser *me = net->me(); - if(me) - nicks[nickIdx] = net->myNick() + QString(" (+%1)").arg(me->userModes()); + if(me) { + nicks[nickIdx] = net->myNick(); + if(!me->userModes().isEmpty()) + nicks[nickIdx] += QString(" (+%1)").arg(me->userModes()); + } ui.ownNick->addItems(nicks); @@ -219,7 +222,11 @@ void InputWidget::changeNick(const QString &newNick) const { const Network *net = currentNetwork(); if(!net || net->isMyNick(newNick)) return; - emit userInput(currentBufferInfo(), QString("/nick %1").arg(newNick)); + + // we reset the nick selecter as we have no confirmation yet, that this will succeed. + // if the action succeeds it will be properly updated anyways. + updateNickSelector(); + emit userInput(BufferInfo::fakeStatusBuffer(net->networkId()), QString("/nick %1").arg(newNick)); } void InputWidget::sendText(QString text) {