;;; Code:
+(require 'riece-compat) ;riece-make-interval-regexp
+
;;; Constants:
-(defconst riece-channel-regexp
- "\\([+&#]\\|![A-Z0-9]\\{5\\}\\)[^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?")
-(defconst riece-user-regexp
- "[][\\\\`_^{|}A-Za-z][][\\\\`_^{|}A-Za-z0-9-]\\{0,8\\}")
+(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-]*")
-;;; Miscellaneous global variables:
-(defvar riece-process-list nil
- "List of processes opened in the current session.")
+(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-last-channel nil
- "The channel you had joined the last time.")
+(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.")
;;; Variables local to the channel buffers:
(defvar riece-freeze nil
- &nb