1 ;;; liece-500.el --- Handler routines for 500 numeric reply.
2 ;; Copyright (C) 1998-2000 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
7 ;; Keywords: IRC, liece
9 ;; This file is part of Liece.
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
33 (require 'liece-inlines)
35 (require 'liece-misc))
37 (defun* liece-handle-500-messages (number prefix rest)
38 (or (string-match "[^ ]* \\([^ :]*\\) *\\([^ :]*\\) *:\\(.*\\)" rest)
39 (return-from liece-handle-500-messages))
40 (let ((target1 (match-string 1 rest)) (target2 (match-string 2 rest))
41 (msg (match-string 3 rest)))
42 (cond ((string-equal target1 "")
43 (liece-insert-error liece-500-buffer (concat msg "\n")))
44 ((string-equal target2 "")
45 (liece-insert-error liece-500-buffer
46 (concat msg " (" target1 ")\n")))
48 (liece-insert-error liece-500-buffer
49 (format "%s %s (%s)\n"
50 target1 msg target2))))))
54 ;;; liece-500.el ends here