diff options
author | Magnus Henoch <mange@freemail.hu> | 2008-06-09 22:47:48 +0000 |
---|---|---|
committer | Kirill A. Korinskiy <catap@catap.ru> | 2008-06-09 22:47:48 +0000 |
commit | a47ec38e8ff3c04fa3e6c2adaf3faac760b9de48 (patch) | |
tree | 2dc4c0c90cf9299e8f1e8aef0d2b024dbb35f184 /jabber-muc.el | |
parent | 34d8be71d693cd83fe89b626126e7eeaaa926e56 (diff) |
Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-523
Creator: Magnus Henoch <mange@freemail.hu>
"Services" chapter rewritten
Diffstat (limited to 'jabber-muc.el')
-rw-r--r-- | jabber-muc.el | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/jabber-muc.el b/jabber-muc.el index 64de966..17a6379 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -884,21 +884,28 @@ Return nil if X-MUC is nil." ;; error from room itself? or are we leaving? (if (or (null nickname) (string= nickname (gethash (jabber-jid-symbol group) jabber-pending-groupchats))) - (let ((message (cond - ((string= type "error") - (concat "Error entering room" - (when error-node - (concat ": " (jabber-parse-error error-node))))) - ((equal status-code "301") - (concat "You have been banned" - (when actor (concat " by " actor)) - (when reason (concat " - '" reason "'")))) - ((equal status-code "307") - (concat "You have been kicked" - (when actor (concat " by " actor)) - (when reason (concat " - '" reason "'")))) - (t - "You have left the chatroom")))) + ;; Assume that an error means that we were thrown out of the + ;; room... + (let* ((leavingp t) + (message (cond + ((string= type "error") + (cond + ;; ...except for certain cases. + ((equal status-code "406") + ;; XXX: were we already in the room? + (concat "Error entering room" + (when error-node + (concat ": " (jabber-parse-error error-node))))) + ((equal status-code "301") + (concat "You have been banned" + (when actor (concat " by " actor)) + (when reason (concat " - '" reason "'")))) + ((equal status-code "307") + (concat "You have been kicked" + (when actor (concat " by " actor)) + (when reason (concat " - '" reason "'")))) + (t + "You have left the chatroom")))) (jabber-muc-remove-groupchat group) ;; If there is no buffer for this groupchat, don't bother ;; creating one just to tell that user left the room. |