* riece-display.el (riece-display-connect-signals): Connect some
authorueno <ueno>
Sat, 28 Feb 2004 21:33:37 +0000 (21:33 +0000)
committerueno <ueno>
Sat, 28 Feb 2004 21:33:37 +0000 (21:33 +0000)
signals.

* riece-naming.el (riece-naming-assert-join): Don't change the
current channel manually.
(riece-naming-assert-part): Ditto.
(riece-naming-assert-rename): Ditto.
(riece-naming-assert-channel-users): Ditto.

lisp/ChangeLog
lisp/riece-display.el
lisp/riece-naming.el

index fccfd0c..3748ff3 100644 (file)
@@ -1,3 +1,14 @@
+2004-02-28  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-display.el (riece-display-connect-signals): Connect some
+       signals.
+
+       * riece-naming.el (riece-naming-assert-join): Don't change the
+       current channel manually.
+       (riece-naming-assert-part): Ditto.
+       (riece-naming-assert-rename): Ditto.
+       (riece-naming-assert-channel-users): Ditto.
+
 2004-02-27  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-display.el (riece-emit-signal): Create signal object
index abaac35..9e65095 100644 (file)
@@ -154,6 +154,15 @@ This function is for internal use only."
          (not (riece-identity-equal (car (riece-signal-args signal))
                                     (riece-current-nickname))))))
   (riece-connect-signal
+   'riece-naming-assert-join
+   (lambda (signal handback)
+     (riece-join-channel (nth 1 (riece-signal-args signal)))
+     (riece-switch-to-channel (nth 1 (riece-signal-args signal)))
+     (setq riece-join-channel-candidate nil))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+                          riece-current-nickname)))
+  (riece-connect-signal
    'riece-naming-assert-part
    (lambda (signal handback)
      (save-excursion
@@ -165,6 +174,13 @@ This function is for internal use only."
          (not (riece-identity-equal (car (riece-signal-args signal))
                                     (riece-current-nickname))))))
   (riece-connect-signal
+   'riece-naming-assert-part
+   (lambda (signal handback)
+     (riece-part-channel (nth 1 (riece-signal-args signal)))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+                          riece-current-nickname))))
+  (riece-connect-signal
    'riece-naming-assert-rename
    (lambda (signal handback)
      (save-excursion
@@ -190,6 +206,13 @@ This function is for internal use only."
      (riece-identity-equal (nth 1 (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
+   'riece-naming-assert-rename
+   (lambda (signal handback)
+     (riece-switch-to-channel (nth 1 (riece-signal-args signal))))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+                          riece-current-channel)))
+  (riece-connect-signal
    'riece-user-toggle-away
    (lambda (signal handback)
      (riece-update-status-indicators)
index 044e4f9..7093938 100644 (file)
 (defun riece-naming-assert-join (user-name channel-name)
   (riece-user-toggle-channel user-name channel-name t)
   (riece-channel-toggle-user channel-name user-name t)
-  (let ((user-identity (riece-make-identity user-name
-                                           riece-server-name))
-       (channel-identity (riece-make-identity channel-name
-                                              riece-server-name)))
-    (when (riece-identity-equal-no-server user-name riece-real-nickname)
-      (riece-join-channel channel-identity)
-      (riece-switch-to-channel channel-identity)
-      (setq riece-join-channel-candidate nil))
-    (riece-emit-signal 'riece-naming-assert-join
-                      user-identity channel-identity)))
+  (riece-emit-signal 'riece-naming-assert-join
+                    (riece-make-identity user-name
+                                         riece-server-name)
+                    (riece-make-identity channel-name
+                                         riece-server-name)))
 
 (defun riece-naming-assert-part (user-name channel-name)
   (riece-user-toggle-channel user-name channel-name nil)
   (riece-channel-toggle-user channel-name user-name nil)
   (riece-channel-toggle-operator channel-name user-name nil)
   (riece-channel-toggle-speaker channel-name user-name nil)
-  (let ((user-identity (riece-make-identity user-name
-                                           riece-server-name))
-       (channel-identity (riece-make-identity channel-name
-                                              riece-server-name)))
-    (if (riece-identity-equal-no-server user-name riece-real-nickname)
-       (riece-part-channel channel-identity))
-    (riece-emit-signal 'riece-naming-assert-part
-                      user-identity channel-identity)))
+  (riece-emit-signal 'riece-naming-assert-part
+                    (riece-make-identity user-name
+                                         riece-server-name)
+                    (riece-make-identity channel-name
+                                         riece-server-name)))
 
 (defun riece-naming-assert-rename (old-name new-name)
   (if (riece-identity-equal-no-server old-name riece-real-nickname)
@@ -83,9 +75,7 @@
              (cons (cons new-identity (current-buffer))
                    (delq (riece-identity-assoc old-identity
                                                riece-channel-buffer-alist)
-                         riece-channel-buffer-alist))))
-      (if (riece-identity-equal old-identity riece-current-channel)
-         (riece-switch-to-channel new-identity)))
+                         riece-channel-buffer-alist)))))
     (riece-emit-signal 'riece-naming-assert-rename
                       old-identity new-identity)))
 
            (cons (cons (riece-make-identity (car (car users))
                                             riece-server-name)
                        (cdr (car users)))
-                 user-identity-list))
-      (when (riece-identity-equal-no-server (car (car users))
-                                           riece-real-nickname)
-       (riece-join-channel channel-identity)
-       (riece-switch-to-channel channel-identity)
-       (setq riece-join-channel-candidate nil))
-      (setq users (cdr users)))
+                 user-identity-list)
+           users (cdr users)))
     (riece-emit-signal 'riece-naming-assert-channel-users
                       (nreverse user-identity-list) channel-identity)))