From: ueno Date: Thu, 20 May 2004 09:14:25 +0000 (+0000) Subject: * riece-doctor.el (riece-doctor-buffer-name): Assume that the 1st X-Git-Tag: riece-1_0_0~40 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=731ec360df1df1b30b7263e16442306b912f7cd1;p=elisp%2Friece.git * riece-doctor.el (riece-doctor-buffer-name): Assume that the 1st argument is nickname rather than identity object. (riece-doctor-after-privmsg-hook): Don't send formatted identity as a patient's nickname. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8a82aed..c0d97c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2004-05-20 Daiki Ueno + * riece-doctor.el (riece-doctor-buffer-name): Assume that the 1st + argument is nickname rather than identity object. + (riece-doctor-after-privmsg-hook): Don't send formatted identity + as a patient's nickname. + +2004-05-20 Daiki Ueno + * riece-hangman.el (riece-hangman-player-context-alist): Renamed from riece-hangman-players. (riece-hangman-make-context): Add doc. diff --git a/lisp/riece-doctor.el b/lisp/riece-doctor.el index 7232d1d..07ebb1b 100644 --- a/lisp/riece-doctor.el +++ b/lisp/riece-doctor.el @@ -56,7 +56,9 @@ (autoload 'doctor-read-print "doctor") (defun riece-doctor-buffer-name (user) - (concat " *riece-doctor*" (riece-format-identity user))) + (concat " *riece-doctor*" + (riece-format-identity + (riece-make-identity user riece-server-name)))) (defun riece-doctor-reply (target string) (riece-display-message @@ -67,17 +69,15 @@ (riece-send-string (format "NOTICE %s :%s\r\n" target string))) (defun riece-doctor-after-privmsg-hook (prefix string) - (let* ((user (riece-make-identity (riece-prefix-nickname prefix) - riece-server-name)) + (let* ((user (riece-prefix-nickname prefix)) (parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters))) (if (string-match riece-doctor-hello-regexp message) - (if (riece-identity-member user riece-doctor-patients) + (if (riece-identity-member user riece-doctor-patients t) (riece-doctor-reply (car targets) - (format "%s: You are already talking with me." - (riece-format-identity user t))) + (format "%s: You are already talking with me." user)) (save-excursion (set-buffer (get-buffer-create (riece-doctor-buffer-name user))) (erase-buffer) @@ -87,17 +87,17 @@ (car targets) (format "%s: I am the psychotherapist. Please, describe your problems." - (riece-format-identity user t)))) + user))) (if (string-match riece-doctor-bye-regexp message) - (let ((pointer (riece-identity-member user riece-doctor-patients))) + (let ((pointer (riece-identity-member user riece-doctor-patients t))) (when pointer (kill-buffer (riece-doctor-buffer-name user)) (setq riece-doctor-patients (delq (car pointer) riece-doctor-patients)) (riece-doctor-reply (car targets) - (format "%s: Good bye." (riece-format-identity user t))))) - (if (riece-identity-member user riece-doctor-patients) + (format "%s: Good bye." user)))) + (if (riece-identity-member user riece-doctor-patients t) (let (string) (save-excursion (set-buffer (get-buffer (riece-doctor-buffer-name user))) @@ -112,7 +112,7 @@ (setq string (buffer-string)))) (riece-doctor-reply (car targets) - (format "%s: %s" (riece-format-identity user t) string)))))))) + (format "%s: %s" user string)))))))) (defun riece-doctor-insinuate () (add-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook))