blob: ac417684a3e90b55231d09c092ecf09fe9fb8675 (
plain)
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
45
46
47
48
49
|
$NetBSD: patch-aa,v 1.3 2003/10/10 14:13:29 uebayasi Exp $
--- src/zenicb.el.orig Mon Jul 20 07:37:51 1998
+++ src/zenicb.el
@@ -143,6 +143,7 @@ line separately.")
;(defvar zenicb-command-bcount-hook 'zenicb-command-bcount) ; byte count
(defvar zenicb-command-beep-hook 'zenicb-command-beep) ; beep someone
(defvar zenicb-command-boot-hook 'zenicb-command-boot) ; boot off group
+(defvar zenicb-command-brick-hook 'zenicb-command-brick) ; brick someone
(defvar zenicb-command-cancel-hook 'zenicb-command-cancel) ; cancel invite
(defvar zenicb-command-drop-hook 'zenicb-command-drop) ; drop nick
(defvar zenicb-command-echo-hook 'zenicb-command-echo) ; echoback
@@ -211,6 +212,9 @@ line separately.")
(if (not zenicb-process)
()
(set-marker (process-mark zenicb-process) (point-max))
+ (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil))
+ (if (fboundp 'set-process-coding-system)
+ (set-process-coding-system zenicb-process 'binary 'binary))
(set-process-buffer zenicb-process zenicb-buffer)
(set-process-filter zenicb-process 'zenicb-filter)
(set-process-sentinel zenicb-process 'zenicb-sentinel)
@@ -279,8 +283,12 @@ line separately.")
(set-buffer orig-buffer)
(store-match-data data))))
+(if (not (fboundp 'char-int))
+ (defun char-int (a)
+ a))
+
(defun zenicb-parselines (proc string)
- (while (let ((length (+ (aref string 0))))
+ (while (let ((length (+ (char-int (aref string 0)))))
(and (> (length string) length)
(let ((type (aref string 1))
(line (substring string 2 length)))
@@ -753,6 +761,12 @@ list of hooks to run in HOOK, then nothi
;;
(defun zenicb-command-boot (proc parsedcmd)
(zenicb-send-string proc ?h (concat "boot\C-a" (cdr parsedcmd))))
+;;
+;; Brick someone
+;; /brick [victim]
+;;
+(defun zenicb-command-brick (proc parsedcmd)
+ (zenicb-send-string proc ?h (concat "brick\C-a" (cdr parsedcmd))))
;;
;; Cancel an invitation
;;
|