summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/Chat/MUCController.cpp')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 5788465..c9936c0 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -133,11 +133,14 @@ MUCController::MUCController (
133 muc_->onConfigurationFormReceived.connect(boost::bind(&MUCController::handleConfigurationFormReceived, this, _1)); 133 muc_->onConfigurationFormReceived.connect(boost::bind(&MUCController::handleConfigurationFormReceived, this, _1));
134 highlighter_->setMode(isImpromptu_ ? Highlighter::ChatMode : Highlighter::MUCMode); 134 highlighter_->setMode(isImpromptu_ ? Highlighter::ChatMode : Highlighter::MUCMode);
135 highlighter_->setNick(nick_); 135 highlighter_->setNick(nick_);
136 if (timerFactory) { 136 if (timerFactory && stanzaChannel_->isAvailable()) {
137 loginCheckTimer_ = boost::shared_ptr<Timer>(timerFactory->createTimer(MUC_JOIN_WARNING_TIMEOUT_MILLISECONDS)); 137 loginCheckTimer_ = boost::shared_ptr<Timer>(timerFactory->createTimer(MUC_JOIN_WARNING_TIMEOUT_MILLISECONDS));
138 loginCheckTimer_->onTick.connect(boost::bind(&MUCController::handleJoinTimeoutTick, this)); 138 loginCheckTimer_->onTick.connect(boost::bind(&MUCController::handleJoinTimeoutTick, this));
139 loginCheckTimer_->start(); 139 loginCheckTimer_->start();
140 } 140 }
141 else {
142 chatWindow_->addSystemMessage(chatMessageParser_->parseMessageBody(QT_TRANSLATE_NOOP("", "You are currently offline. You will enter this room when you are connected.")), ChatWindow::DefaultDirection);
143 }
141 if (isImpromptu) { 144 if (isImpromptu) {
142 muc_->onUnlocked.connect(boost::bind(&MUCController::handleRoomUnlocked, this)); 145 muc_->onUnlocked.connect(boost::bind(&MUCController::handleRoomUnlocked, this));
143 chatWindow_->convertToMUC(ChatWindow::ImpromptuMUC); 146 chatWindow_->convertToMUC(ChatWindow::ImpromptuMUC);
@@ -147,7 +150,9 @@ MUCController::MUCController (
147 chatWindow_->convertToMUC(ChatWindow::StandardMUC); 150 chatWindow_->convertToMUC(ChatWindow::StandardMUC);
148 chatWindow_->setName(muc->getJID().getNode()); 151 chatWindow_->setName(muc->getJID().getNode());
149 } 152 }
150 setOnline(true); 153 if (stanzaChannel->isAvailable()) {
154 setOnline(true);
155 }
151 if (avatarManager_ != NULL) { 156 if (avatarManager_ != NULL) {
152 avatarChangedConnection_ = (avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1))); 157 avatarChangedConnection_ = (avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1)));
153 } 158 }