From 74ff97c8ba523b04756e4fb76d78d5df9aa7b446 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 1 Sep 2004 05:31:19 +0000 Subject: [PATCH] * riece-channel.el (riece-channel-toggle-operator): Don't add ?o if it already appears in user's mode. (riece-channel-toggle-speaker): Don't add ?v if it already appears in user's mode. --- lisp/ChangeLog | 7 +++++++ lisp/riece-channel.el | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e95770e..54feb4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-09-01 Daiki Ueno + + * riece-channel.el (riece-channel-toggle-operator): Don't add ?o + if it already appears in user's mode. + (riece-channel-toggle-speaker): Don't add ?v if it already appears + in user's mode. + 2004-08-31 Daiki Ueno * riece.el (riece-command-mode): Set truncate-lines to nil. diff --git a/lisp/riece-channel.el b/lisp/riece-channel.el index da4b75d..a59b7ed 100644 --- a/lisp/riece-channel.el +++ b/lisp/riece-channel.el @@ -204,7 +204,8 @@ respectively." (setq user (riece-identity-assoc user users t)) (if flag (if user - (setcdr user (cons ?o (cdr user))) + (unless (memq ?o (cdr user)) + (setcdr user (cons ?o (cdr user)))) (riece-channel-set-users channel (cons (list user ?o) users))) (if user (setcdr user (delq ?o (cdr user))))))) @@ -216,7 +217,8 @@ respectively." (setq user (riece-identity-assoc user users t)) (if flag (if user - (setcdr user (cons ?v (cdr user))) + (unless (memq ?v (cdr user)) + (setcdr user (cons ?v (cdr user)))) (riece-channel-set-users channel (cons (list user ?v) users))) (if user (setcdr user (delq ?v (cdr user))))))) -- 1.7.10.4