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