From 81824b84ac00d0ddaff2027dbb8cace734c0bfde Mon Sep 17 00:00:00 2001 From: mrroach9 Date: Sun, 25 Jan 2015 23:17:53 -0800 Subject: [PATCH] Disconnect xmpp after logout. Version number changed to 0.3.3, ready to go! --- js/bbs/bbs_UI.js | 1 + js/bbs/bbs_xmpp.js | 3 +++ js/bbs/config.js | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/bbs/bbs_UI.js b/js/bbs/bbs_UI.js index 713e2e1..ba03e7c 100755 --- a/js/bbs/bbs_UI.js +++ b/js/bbs/bbs_UI.js @@ -564,6 +564,7 @@ function UI_login_finished(result) { function UI_logout() { removeSessionCookie(); Accounts9.removeSessionCookie(); + xmpp_disconnect(); bbs_topmost_stack.splice(0); $('#unlogged-navbar').show(); $('#unlogged-panel').show(); diff --git a/js/bbs/bbs_xmpp.js b/js/bbs/bbs_xmpp.js index 903d1f3..10438b9 100644 --- a/js/bbs/bbs_xmpp.js +++ b/js/bbs/bbs_xmpp.js @@ -85,7 +85,10 @@ function xmpp_connect() { onPresence: xmpp_presence, onError: xmpp_error }); +} +function xmpp_disconnect() { + $.xmpp.disconnect(null); } function xmpp_connected() { diff --git a/js/bbs/config.js b/js/bbs/config.js index befa37d..2a8052e 100755 --- a/js/bbs/config.js +++ b/js/bbs/config.js @@ -6,9 +6,9 @@ var bbs_string = { favboard_name : '收藏夹', allboard_name : '所有版面', mailbox_name : '站内信', - title : '9# BBS - Rowell v0.3.2', - version : '0.3.2', - send_source : '[Sent from Rowell v0.3.2]', + title : '9# BBS - Rowell v0.3.3', + version : '0.3.3', + send_source : '[Sent from Rowell v0.3.3]', unimpltd_title : '矮油', unimpltd_text : '此功能尚未实现,我们将在后续版本中添加,敬请谅解。', entry_folder : '[目录]',