From 1bc974a5214915624d2a2fd744b1ed26bd14ddd8 Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 29 May 2003 09:20:52 +0000 Subject: [PATCH] * riece-300.el (riece-handle-341-message): New handler. (riece-handle-352-message): New handler. --- lisp/ChangeLog | 3 ++ lisp/riece-300.el | 91 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 88 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55cd77d..5b750a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2003-05-29 Daiki Ueno + * riece-300.el (riece-handle-341-message): New handler. + (riece-handle-352-message): New handler. + * riece-commands.el (riece-command-invite): Don't accept channel argument; throw an error when user is not on a channel. (riece-command-kick): New command. diff --git a/lisp/riece-300.el b/lisp/riece-300.el index 771a416..bab3204 100644 --- a/lisp/riece-300.el +++ b/lisp/riece-300.el @@ -132,8 +132,6 @@ (match-string 2 string))) "\n")))) -(defun riece-handle-318-message (prefix number name string)) - (defun riece-handle-351-message (prefix number name string) (if (string-match "\\([^ ]+\\.[^ ]+\\) \\([^ ]+\\) :" string) (riece-insert-info @@ -146,8 +144,6 @@ (substring string (match-end 0)))) "\n")))) -(defun riece-handle-315-message (prefix number name string)) - (defun riece-handle-353-message (prefix number name string) "RPL_NAMREPLY \" :[[@|+] [[@|+] [...]]]\"." (if (string-match "^[=\*@] *\\([^ ]+\\) +:" string) @@ -172,8 +168,6 @@ (setq users (cdr users))) (riece-redisplay-buffers)))) -(defun riece-handle-366-message (prefix number name string)) - (defun riece-handle-324-message (prefix number name string) (if (string-match "^\\([^ ]+\\) \\([^ ]+\\) " string) (let* ((channel (match-string 1 string)) @@ -225,6 +219,91 @@ (defun riece-handle-332-message (prefix number name string) (riece-handle-set-topic prefix name name string nil)) +(defun riece-handle-341-message (prefix number name string) + (if (string-match "^\\([^ ]+\\) " string) + (let* ((channel (match-string 1 string)) + (user (substring string (match-end 0))) + (buffer (cdr (riece-identity-assoc-no-server + (riece-make-identity channel) + riece-channel-buffer-alist)))) + (riece-insert-info buffer (concat "Inviting " user "\n")) + (riece-insert-info + (if (and riece-channel-buffer-mode + (not (eq buffer riece-channel-buffer))) + (list riece-dialogue-buffer riece-others-buffer) + riece-dialogue-buffer) + (concat + (riece-concat-server-name + (format "Inviting %s to %s" user channel)) + "\n"))))) + +(defun riece-handle-352-message (prefix number name string) + (if (string-match "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([HG]\\)\\(\\*\\)?\\([@+]\\)? :\\([0-9]+\\) " string) + (let* ((channel (match-string 1 string)) + (user (match-string 2 string)) + (host (match-string 3 string)) + (server (match-string 4 string)) + (nick (match-string 5 string)) + (away (match-string 6 string)) + (operator (match-string 7 string)) + (flag (match-string 8 string)) + (hops (match-string 9 string)) + (name (substring string (match-end 0))) + (buffer (cdr (riece-identity-assoc-no-server + (riece-make-identity channel) + riece-channel-buffer-alist)))) + (riece-naming-assert-join nick channel) + (riece-insert-info + buffer + (format "%10s = %s (%s) [%s, %s, %s hops, on %s]\n" + (concat + (if (memq flag '(?@ ?+)) + (char-to-string flag) + " ") + nick) + name + (riece-strip-user-at-host + (concat user "@" host)) + (if operator + "operator" + "not operator") + (if away + "away" + "not away") + hops + server)) + (riece-insert-info + (if (and riece-channel-buffer-mode + (not (eq buffer riece-channel-buffer))) + (list riece-dialogue-buffer riece-others-buffer) + riece-dialogue-buffer) + (concat + (riece-concat-server-name + (format "%s %10s = %s (%s) [%s, %s, %s hops, on %s]\n" + channel + (concat + (if (memq flag '(?@ ?+)) + (char-to-string flag) + " ") + nick) + name + (riece-strip-user-at-host + (concat user "@" host)) + (if operator + "operator" + "not operator") + (if (equal away "G") + "away" + "not away") + hops + server)) + "\n")) + (riece-redisplay-buffers)))) + +(defun riece-handle-315-message (prefix number name string)) +(defun riece-handle-318-message (prefix number name string)) +(defun riece-handle-366-message (prefix number name string)) + (provide 'riece-300) ;;; riece-300.el ends here -- 1.7.10.4