-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathirchat-000.el
44 lines (38 loc) · 1.32 KB
/
irchat-000.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
41
42
43
44
;;; -*- 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))
;;;
;;; 000 replies -- what is the author of ircd thinking
;;;
(defun irchat-handle-000-msgs (number parsed-sender parsed-msg prefix rest)
(setq irchat-nick-accepted 'ok)
(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-000-buffer
(format "%s%s\n" irchat-info-prefix msg)))
((string-equal target2 "")
(irchat-w-insert irchat-000-buffer
(format "%s%s (%s)\n"
irchat-info-prefix msg target1)))
(t
(irchat-w-insert irchat-000-buffer
(format "%s%s %s (%s)\n" irchat-info-prefix
target1 msg target2)))))
(message "IRCHAT: Strange %s reply" number)))
(defun irchat-handle-004-msg (parsed-sender parsed-msg prefix rest)
(if (string-match "[^ ]* \\(.*\\)" rest)
(let ((msg (matching-substring rest 1)))
(irchat-w-insert irchat-000-buffer
(format "%s%s\n" irchat-info-prefix msg)))
(message "IRCHAT: Strange 004 reply")))
;;;
;;; eof
;;;