-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathirchat-500.el
42 lines (37 loc) · 1014 Bytes
/
irchat-500.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
;;; -*- emacs-lisp -*-
;;;
;;; see file irchat-copyright.el for change log and copyright info
(eval-when-compile
(require 'irchat-inlines))
(eval-and-compile
(require 'irchat-filter)
(require 'irchat-vars))
;;;
;;; 500 replies -- ERRORS
;;;
(defun irchat-handle-500-msgs (number parsed-sender parsed-msg prefix rest)
(if (string-match "[^ ]* \\([^ :]*\\) *\\([^ :]*\\) *:\\(.*\\)" rest)
(let ((target1 (matching-substring rest 1))
(target2 (matching-substring rest 2))
(msg (matching-substring rest 3)))
(cond ((string-equal target1 "")
(irchat-w-insert
irchat-500-buffer
(format "%s%s\n" irchat-error-prefix msg)))
((string-equal target2 "")
(irchat-w-insert
irchat-500-buffer
(format "%s%s (%s)\n" irchat-error-prefix msg target1)))
(t
(irchat-w-insert
irchat-500-buffer
(format "%s%s %s (%s)\n"
irchat-error-prefix
target1
msg
target2))))
)
(message "IRCHAT: Strange %s reply" number)))
;;;
;;; eof
;;;