Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index c8d7869..d87ff80 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -137,16 +137,18 @@ void IRCSession::updateNickname(const QString &oldNickname, const QString &newNi | |||
137 | output = IRCOutput(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg(oldNickname).arg(newNickname)); | 137 | output = IRCOutput(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg(oldNickname).arg(newNickname)); |
138 | } | 138 | } |
139 | 139 | ||
140 | QListIterator<IRCChannel> it(channels); | 140 | QListIterator<IRCChannel> it(channels); |
141 | for (;it.current(); ++it) { | 141 | for (;it.current(); ++it) { |
142 | IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); | 142 | IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); |
143 | if (chanperson) { | ||
143 | it.current()->removePerson(chanperson); | 144 | it.current()->removePerson(chanperson); |
144 | chanperson->setNick(newNickname); | 145 | chanperson->setNick(newNickname); |
145 | it.current()->addPerson(chanperson); | 146 | it.current()->addPerson(chanperson); |
146 | } | 147 | } |
148 | } | ||
147 | 149 | ||
148 | emit updateChannels(); | 150 | emit updateChannels(); |
149 | output.addParam(new QString(newNickname)); | 151 | output.addParam(new QString(newNickname)); |
150 | emit outputReady(output); | 152 | emit outputReady(output); |
151 | } | 153 | } |
152 | 154 | ||