2003-08-04 Daiki Ueno <ueno@unixuser.org>
+ * riece-server.el (riece-find-server-name): Abolish.
+
+ * riece-alias.el: Add usage.
+
+2003-08-04 Daiki Ueno <ueno@unixuser.org>
+
* riece-mini.el (riece-mini-send-message): Use
riece-completing-read-identity; don't use riece-own-channel-message.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
+;; This add-on allows you to define aliases for IRC names.
+
+;; To use, add the following line to your ~/.riece/init.el:
+;; (add-to-list 'riece-addons 'riece-alias)
+
+;; For example, if you want to define an alias `#l' for `#Liece', you
+;; can customize riece-alias-alist as follows:
+;; (setq riece-alias-alist '(("#Liece" . "#l")))
+
;;; Code:
(defgroup riece-alias nil
riece-save-variables-are-dirty t))
(cdr entry)))
-(defun riece-find-server-name ()
- (or riece-overriding-server-name
- ;already in the server buffer
- (if (local-variable-p 'riece-server-name (current-buffer))
- riece-server-name
- (if riece-current-channel
- (riece-identity-server riece-current-channel)
- (if (riece-server-opened "")
- "")))))
-
(defun riece-server-process-name (server-name)
(if (equal server-name "")
"IRC"
(process-send-string process (riece-encode-coding-string string))))
(defun riece-send-string (string)
- (let ((process (riece-server-process (riece-find-server-name))))
+ (let* ((server-name
+ (or riece-overriding-server-name
+ ;already in the server buffer
+ (if (local-variable-p 'riece-server-name (current-buffer))
+ riece-server-name
+ (if riece-current-channel
+ (riece-identity-server riece-current-channel)
+ (if (riece-server-opened "")
+ "")))))
+ (process (riece-server-process server-name)))
(unless process
(error "%s" (substitute-command-keys
"Type \\[riece-command-open-server] to open server.")))