File: riece-globals.el

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 116,928 kB
  • ctags: 88,975
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,611; makefile: 4,036; asm: 3,007; perl: 839; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (214 lines) | stat: -rw-r--r-- 7,414 bytes parent folder | download | duplicates (9)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
;;; riece-globals.el --- global variables and constants.
;; Copyright (C) 1998-2003 Daiki Ueno

;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1998-09-28
;; Keywords: IRC, riece

;; This file is part of Riece.

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Code:

(require 'riece-compat)			;riece-make-interval-regexp

;;; Constants:
(defconst riece-strict-channel-regexp
  (concat "\\([+&#]\\|!"
	  (riece-make-interval-regexp "[A-Z0-9]" 5)
	  "\\|!!\\)[^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?"))

(defconst riece-strict-user-regexp
  (concat "[][\\\\`_^{|}A-Za-z]"
	  (riece-make-interval-regexp "[][\\\\`_^{|}A-Za-z0-9-]" 0 8)))

(defconst riece-laxed-channel-regexp
  "[+&#!][^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?")

(defconst riece-laxed-user-regexp
  "[][\\\\`_^{|}A-Za-z][][\\\\`_^{|}A-Za-z0-9-]*")

(defvar riece-channel-regexp riece-laxed-channel-regexp)
(defvar riece-user-regexp riece-laxed-user-regexp)

;;; Global variables:
(defvar riece-server-process-alist nil
  "An alist mapping server names to processes.")

(defvar riece-current-channel nil
  "The channel you currently have joined.")
(defvar riece-current-channels nil
  "The channels you have currently joined.")
(defvar riece-join-channel-candidate nil
  "The candidate for channel to be used with the next join command.")

(defvar riece-save-variables-are-dirty nil
  "Non nil if the variables in `riece-saved-forms' are changed.")

(defvar riece-polling 0
  "Interval for polling the server.")

(defvar riece-reconnect-with-password nil
  "If non-nil, attempt to reconnect with password.")

(defvar riece-user-obarray-size 1327
  "The size of obarray used by riece on user name space.")

(defvar riece-channel-obarray-size 103
  "The size of obarray used by riece on channel name space.")

(defvar riece-addon-dependencies nil)

;;; Variables local to the server buffers:
(defvar riece-server-name nil
  "The name of the server.
Local to the server buffers.")
(defvar riece-real-nickname nil
  "Your nickname the server offers.
Local to the server buffers.")
(defvar riece-last-nickname nil
  "The last nickname you requested.
Local to the server buffers.")
(defvar riece-nick-accepted nil
  "The flag your nickname is accepted by the server.
Possible values are nil, `ok', and `sent'.
Local to the server buffers.")
(defvar riece-real-server-name nil
  "The server name offered by the server.
Local to the server buffers.")
(defvar riece-real-userhost nil
  "Your hostname the server offers.
Local to the server buffers.")
(defvar riece-user-at-host ""
  "The user@host for the current input.
Local to the server buffers.")
(defvar riece-user-at-host-type nil
  "The authentication type of `riece-user-at-host'.
Possible values are 'ok 'not-verified 'fake or 'invalid.
Local to the server buffers.")
(defvar riece-supported-user-modes nil
  "User modes supported by server.
Local to the server buffers.")
(defvar riece-supported-channel-modes nil
  "Channel modes supported by server.
Local to the server buffers.")
(defvar riece-channel-filter ""
  "Filter of the result of NAMES or LIST.
This enables us to use \\[universal-argument] with NAMES and TOPIC.
Local to the server buffers.")
(defvar riece-read-point nil
  "Point at the last input was seen.
Local to the server buffers.")
(defvar riece-filter-running nil
  "Lock of the process filter; non-nil indicates the process filter is running.
Local to the server buffers.")
(defvar riece-send-queue nil
  "Send queue for avoiding client flood.
Local to the server buffers.")
(defvar riece-send-size nil
  "Size of the last send.
Local to the server buffers.")
(defvar riece-last-send-time nil
  "Timestamp of the last send.
Local to the server buffers.")
(defvar riece-user-obarray nil
  "USER namespace of the IRC world.
Local to the server buffers.")
(defvar riece-channel-obarray nil
  "Channel namespace of the IRC world.
Local to the server buffers.")
(defvar riece-coding-system nil
  "Coding system for process I/O.
Local to the server buffers.")
(defvar riece-channel-cache nil
  "Cache of channel names.
Local to the server buffers.")
(defvar riece-user-cache nil
  "Cache of user names.
Local to the server buffers.")

;;; Variables local to the channel buffers:
(defvar riece-freeze nil
  "If t, channel window is locked and will not be scrolled.
If 'own, channel window is locked until the user begins to speak.
Local to the channel buffers.")

(defvar riece-freeze-indicator nil
  "String displayed on the modeline to allow the user to tell if the
channel buffer is locked.
Local to the channel buffers.")

(defvar riece-channel-buffer-window-point nil
  "Last value of point in window which displayed the channel buffer.
Local to the channel buffers.")

;;; Modeline indicators:
(defvar riece-mode-line-buffer-identification nil)
(defvar riece-channel-indicator "None"
  "String displayed on the modeline to indicate the current channel.")
(defvar riece-long-channel-indicator "None"
  "String displayed on the modeline to indicate the current channel.
Generally, this string will contain more information than
riece-channel-indicator.")
(defvar riece-channel-list-indicator "No channel"
  "String displayed on the modeline to show the joined channels.")
(defvar riece-user-indicator nil
  "String displayed on the modeline to show the current nickname.")

(defvar riece-away-indicator "-"
  "String displayed on the modeline to allow the user to tell if the
user is away.")
(defvar riece-operator-indicator "-"
  "String displayed on the modeline to allow the user to tell if the
user is an operator.")
(defvar riece-channel-status-indicator "-"
  "String displayed on the modeline to allow the user to tell if the
user's status on the current channel.")

;;; Buffers:
(defvar riece-command-buffer nil
  "The command buffer.")
(defvar riece-dialogue-buffer nil
  "Buffer for whole conversation.")
(defvar riece-others-buffer nil
  "Buffer for other messages.")
(defvar riece-channel-list-buffer nil
  "Buffer for channel list.")
(defvar riece-user-list-buffer nil
  "Buffer for user list.")
(defvar riece-channel-buffer nil
  "Buffer for messages arrived in the current channel.")
(defvar riece-temp-buffer nil
  "Buffer for temporally use.")
(defvar riece-debug-buffer nil
  "Buffer for debug output.")

(defvar riece-buffer-list nil)
(defvar riece-overriding-server-name nil)

(defconst riece-change-prefix "*** Change: ")
(defconst riece-notice-prefix "*** Notice: ")
(defconst riece-wallops-prefix "*** Notice: ")
(defconst riece-error-prefix "*** Error: ")
(defconst riece-info-prefix "*** Info: ")
(defconst riece-prefix-regexp "\\*\\*\\* \\([^:]+: \\)")

(defconst riece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] ")

(provide 'riece-globals)

;;; riece-globals.el ends here