summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-07-24 19:51:52 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-07-24 19:54:18 (GMT)
commit545f20b9051caad8d0223bd332a094c2ffbe8435 (patch)
tree03e7cff7c353436f44c92b29bd4390288c5242f1 /Swift/Controllers/Chat
parent649b6f713a48e1b65b3032e15326269d7fec3d27 (diff)
downloadswift-545f20b9051caad8d0223bd332a094c2ffbe8435.zip
swift-545f20b9051caad8d0223bd332a094c2ffbe8435.tar.bz2
Improvements and further testing to tab completion.
Resolves: #506 Resolves: #498
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 92ff7a9..4abab99 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -207,10 +207,11 @@ void MUCController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> mes
if (joined_ && messageTargetsMe(message) && !message->getPayload<Delay>()) {
eventController_->handleIncomingEvent(messageEvent);
}
- String nick = message->getFrom().getResource();
- if (nick != nick_) {
- completer_->removeWord(nick);
- completer_->addWord(nick);
+ if (joined_) {
+ String nick = message->getFrom().getResource();
+ if (nick != nick_) {
+ completer_->addWord(nick);
+ }
}
/*Buggy implementations never send the status code, so use an incoming message as a hint that joining's done (e.g. the old ejabberd on psi-im.org).*/
receivedActivity();