* riece-commands.el (riece-command-invite): Don't accept channel
[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 ;;; Miscellaneous global variables:
28 (defvar riece-server-process nil
29   "Primary server process.")
30 (defvar riece-server-process-alist nil
31   "An alist mapping secondary server name to opened processes.")
32
33 (defvar riece-current-channel nil
34   "The channel you currently have joined.")
35 (defvar riece-current-channels nil
36   "The channels you have currently joined.")
37
38 (defvar riece-save-variables-are-dirty nil
39   "Non nil if the variables in `riece-saved-forms' are changed.")
40
41 (defvar riece-polling 0
42   "Interval for polling the server.")
43
44 (defvar riece-reconnect-with-password nil
45   "If non-nil, attempt to reconnect with password.")
46
47 (defvar riece-obarray-size 1327
48   "The size of obarray used by riece on channelname and username space.")
49
50 ;;; Variables local to the server buffers:
51 (defvar riece-server-name nil
52   "The name of the server.
53 Local to the server buffers.")
54 (defvar riece-real-nickname nil
55   "Your nickname the server offers.
56 Local to the server buffers.")
57 (defvar riece-last-nickname nil
58   "The last nickname you requested.
59 Local to the server buffers.")
60 (defvar riece-nick-accepted nil
61   "The flag your nickname is accepted by the server.
62 Possible values are nil, `ok', and `sent'.
63 Local to the server buffers.")
64 (defvar riece-real-server-name nil
65   "The server name offered by the server.
66 Local to the server buffers.")
67 (defvar riece-real-userhost nil
68   "Your hostname the server offers.
69 Local to the server buffers.")
70 (defvar riece-user-at-host ""
71   "The user@host for the current input.
72 Local to the server buffers.")
73 (defvar riece-user-at-host-type nil
74   "The authentication type of `riece-user-at-host'.
75 Possible values are 'ok 'not-verified 'fake or 'invalid.
76 Local to the server buffers.")
77 (defvar riece-supported-user-modes nil
78   "User modes supported by server.
79 Local to the server buffers.")
80 (defvar riece-supported-channel-modes nil
81   "Channel modes supported by server.
82 Local to the server buffers.")
83 (defvar riece-channel-filter ""
84   "Filter of the result of NAMES or LIST.
85 This enables us to use \\[universal-argument] with NAMES and TOPIC.
86 Local to the server buffers.")
87 (defvar riece-read-point nil
88   "Point at the last input was seen.
89 Local to the server buffers.")
90 (defvar riece-obarray nil
91   "Namespace of the IRC world.
92 Local to the server buffers.")
93 (defvar riece-coding-system nil
94   "Coding system for process I/O.
95 Local to the server buffers.")
96
97 ;;; Variables local to the command buffer:
98 (defvar riece-default-channel-candidate nil
99   "A channel name used as completion candidate.
100 Local to the command buffer.")
101 (defvar riece-last-channel nil
102   "The channel you joined the last time.")
103 (defvar riece-command-buffer-mode 'channel
104   "Command buffer mode.
105 Possible values are `chat' and `channel'.
106 Local to the command buffer.")
107
108 ;;; Variables local to the channel buffers:
109 (defvar riece-freeze nil
110   "If non-nil, channel window is not scrolled.
111 Local to the channel buffers.")
112 (defvar riece-own-freeze nil
113   "If non-nil, channel window is not scrolled until you input.
114 Local to the channel buffers.")
115
116 ;;; Modeline indicators:
117 (defvar riece-channel-indicator "None"
118   "A modeline indicator of the current channel.")
119 (defvar riece-channel-list-indicator "No channel"
120   "The current joined channels, \"pretty-printed.\".")
121
122 (defvar riece-away-indicator "-")
123 (defvar riece-freeze-indicator nil)
124 (defvar riece-own-freeze-indicator nil)
125
126 ;;; Buffers:
127 (defvar riece-command-buffer "*Commands*"
128   "Name of command input buffer.")
129 (defvar riece-dialogue-buffer "*Dialogue*"
130   "Name of dialogue output buffer.")
131 (defvar riece-private-buffer "*Private*"
132   "Name of private message buffer.")
133 (defvar riece-others-buffer "*Others*"
134   "Name of others message buffer.")
135 (defvar riece-channel-buffer nil
136   "Name of channel message buffer.")
137 (defvar riece-channel-buffer-format "*Channel:%s*"
138   "Format of channel message buffer.")
139 (defvar riece-channel-list-buffer " *Channels*"
140   "Name of channel list buffer.")
141 (defvar riece-user-list-buffer nil
142   "Name of user list buffer.")
143 (defvar riece-user-list-buffer-format " *Users:%s*"
144   "Format of user list buffer.")
145 (defvar riece-wallops-buffer " *WALLOPS*")
146
147 (defvar riece-channel-buffer-alist nil)
148 (defvar riece-user-list-buffer-alist nil)
149 (defvar riece-buffer-list nil)
150 (defvar riece-overriding-server-name nil)
151
152 (defconst riece-change-prefix "*** Change: ")
153 (defconst riece-notice-prefix "*** Notice: ")
154 (defconst riece-wallops-prefix "*** Notice: ")
155 (defconst riece-error-prefix "*** Error: ")
156 (defconst riece-info-prefix "*** Info: ")
157 (defconst riece-prefix-regexp "\\*\\*\\* \\([^:]+: \\)")
158
159 (defconst riece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] ")
160
161 (provide 'riece-globals)
162
163 ;;; riece-globals.el ends here