c3fc949c7899d10fbc828e24c096e94498a7ac17
[riece] / lisp / riece-globals.el
1 ;;; riece-globals.el --- global variables and constants.
2 ;; Copyright (C) 1998-2003 Daiki Ueno
3
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
5 ;; Created: 1998-09-28
6 ;; Keywords: IRC, riece
7
8 ;; This file is part of Riece.
9
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ;; GNU General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Code:
26
27 ;;; Constants:
28 (defconst riece-channel-regexp
29   "\\([+&#]\\|![A-Z0-9]\\{5\\}\\)[^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?")
30 (defconst riece-user-regexp
31   "[][\\\\`_^{|}A-Za-z][][\\\\`_^{|}A-Za-z0-9-]\\{0,8\\}")
32
33 ;;; Miscellaneous global variables:
34 (defvar riece-process-list nil
35   "List of processes opened in the current session.")
36
37 (defvar riece-current-channel nil
38   "The channel you currently have joined.")
39 (defvar riece-current-channels nil
40   "The channels you have currently joined.")
41 (defvar riece-join-channel-candidate nil
42   "The candidate for channel to be used with the next join command.")
43
44 (defvar riece-save-variables-are-dirty nil
45   "Non nil if the variables in `riece-saved-forms' are changed.")
46
47 (defvar riece-polling 0
48   "Interval for polling the server.")
49
50 (defvar riece-reconnect-with-password nil
51   "If non-nil, attempt to reconnect with password.")
52
53 (defvar riece-obarray-size 1327
54   "The size of obarray used by riece on channelname and username space.")
55
56 ;;; Variables local to the server buffers:
57 (defvar riece-server-name nil
58   "The name of the server.
59 Local to the server buffers.")
60 (defvar riece-real-nickname nil
61   "Your nickname the server offers.
62 Local to the server buffers.")
63 (defvar riece-last-nickname nil
64   "The last nickname you requested.
65 Local to the server buffers.")
66 (defvar riece-nick-accepted nil
67   "The flag your nickname is accepted by the server.
68 Possible values are nil, `ok', and `sent'.
69 Local to the server buffers.")
70 (defvar riece-real-server-name nil
71   "The server name offered by the server.
72 Local to the server buffers.")
73 (defvar riece-real-userhost nil
74   "Your hostname the server offers.
75 Local to the server buffers.")
76 (defvar riece-user-at-host ""
77   "The user@host for the current input.
78 Local to the server buffers.")
79 (defvar riece-user-at-host-type nil
80   "The authentication type of `riece-user-at-host'.
81 Possible values are 'ok 'not-verified 'fake or 'invalid.
82 Local to the server buffers.")
83 (defvar riece-supported-user-modes nil
84   "User modes supported by server.
85 Local to the server buffers.")
86 (defvar riece-supported-channel-modes nil
87   "Channel modes supported by server.
88 Local to the server buffers.")
89 (defvar riece-channel-filter ""
90   "Filter of the result of NAMES or LIST.
91 This enables us to use \\[universal-argument] with NAMES and TOPIC.
92 Local to the server buffers.")
93 (defvar riece-read-point nil
94   "Point at the last input was seen.
95 Local to the server buffers.")
96 (defvar riece-obarray nil
97   "Namespace of the IRC world.
98 Local to the server buffers.")
99 (defvar riece-coding-system nil
100   "Coding system for process I/O.
101 Local to the server buffers.")
102
103 ;;; Variables local to the channel buffers:
104 (defvar riece-freeze nil
105   "If t, channel window is not scrolled.
106 If 'own, channel window is not scrolled until you speak.
107 Local to the channel buffers.")
108
109 ;;; Modeline indicators:
110 (defvar riece-channel-indicator "None"
111   "A modeline indicator of the current channel.")
112 (defvar riece-channel-list-indicator "No channel"
113   "A modeline indicator of the current joined channels.")
114 (defvar riece-short-channel-indicator "None"
115   "A modeline indicator of the current channel.")
116 (defvar riece-user-indicator nil)
117
118 (defvar riece-away-indicator "-")
119 (defvar riece-operator-indicator "-")
120 (defvar riece-freeze-indicator "-")
121
122 ;;; Buffers:
123 (defvar riece-command-buffer "*Commands*"
124   "Name of command input buffer.")
125 (defvar riece-dialogue-buffer "*Dialogue*"
126   "Name of dialogue output buffer.")
127 (defvar riece-private-buffer "*Private*"
128   "Name of private message buffer.")
129 (defvar riece-others-buffer "*Others*"
130   "Name of others message buffer.")
131 (defvar riece-channel-buffer nil
132   "Name of channel message buffer.")
133 (defvar riece-channel-buffer-format "*Channel:%s*"
134   "Format of channel message buffer.")
135 (defvar riece-channel-list-buffer "*Channels*"
136   "Name of channel list buffer.")
137 (defvar riece-user-list-buffer " *Users*"
138   "Name of user list buffer.")
139 (defvar riece-wallops-buffer " *WALLOPS*")
140
141 (defvar riece-buffer-list nil)
142 (defvar riece-overriding-server-name nil)
143
144 (defconst riece-change-prefix "*** Change: ")
145 (defconst riece-notice-prefix "*** Notice: ")
146 (defconst riece-wallops-prefix "*** Notice: ")
147 (defconst riece-error-prefix "*** Error: ")
148 (defconst riece-info-prefix "*** Info: ")
149 (defconst riece-prefix-regexp "\\*\\*\\* \\([^:]+: \\)")
150
151 (defconst riece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] ")
152
153 (provide 'riece-globals)
154
155 ;;; riece-globals.el ends here