summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-02-11 10:01:34 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-02-11 10:01:34 (GMT)
commit4dde3a55c46c95d89a7564738e132ad23bc946ee (patch)
treef6dabc740ed12c1455251e33c061e220dbb6d02e /Swift/Controllers
parent61f24ccd90d2b7c48b2d5091c11964f455e8e9a8 (diff)
downloadswift-4dde3a55c46c95d89a7564738e132ad23bc946ee.zip
swift-4dde3a55c46c95d89a7564738e132ad23bc946ee.tar.bz2
Rejoin MUCs with the requested nick, not the one that was in previous use.
(e.g. don't try to rejoin as Kev_________ just because of some previous ghosts, try as Kev again). Resolves: #737
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp3
-rw-r--r--Swift/Controllers/Chat/MUCController.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 001251e..e4c13af 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -48,7 +48,7 @@ MUCController::MUCController (
bool useDelayForLatency,
TimerFactory* timerFactory,
EventController* eventController) :
- ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, muc->getJID(), presenceOracle, avatarManager, useDelayForLatency, uiEventStream, eventController, timerFactory), muc_(muc), nick_(nick) {
+ ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, muc->getJID(), presenceOracle, avatarManager, useDelayForLatency, uiEventStream, eventController, timerFactory), muc_(muc), nick_(nick), desiredNick_(nick) {
parting_ = true;
joined_ = false;
lastWasPresence_ = false;
@@ -296,6 +296,7 @@ void MUCController::setOnline(bool online) {
if (loginCheckTimer_) {
loginCheckTimer_->start();
}
+ nick_ = desiredNick_;
rejoin();
}
}
diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h
index 5ce799f..374ad79 100644
--- a/Swift/Controllers/Chat/MUCController.h
+++ b/Swift/Controllers/Chat/MUCController.h
@@ -83,6 +83,7 @@ namespace Swift {
MUC::ref muc_;
UIEventStream* events_;
String nick_;
+ String desiredNick_;
Roster* roster_;
TabComplete* completer_;
bool parting_;