
(provide (quote irc))

(defvar irc-server (or (getenv "IRCSERVER") "irc.mit.edu") "\
*A host running the IRC daemon.
IRC servers generally restrict which machines can maintain connexions with
them, so you'll probably have to find a server in your local domain.")

(defvar irc-port 6667 "\
*The port on which the IRC server responds.
Many sites don't have irc as a named service (ie, it has no entry in
/etc/inetd.conf) so you might have to set this to a number; the most
common configuration is to have IRC respond on port 6667.")

(defvar irc-oops "Oops ... please ignore that." "\
*The text to send to the original IRC message recipient when using /OOPS.")

(defvar irc-message-stamp (quote private) "\
Mark messages received in IRC with the time of their arrival if non-nil.")

(defvar irc-time-stamp 0 "\
How often, in minutes, to insert a time-stamp into *IRC* buffers.")

(make-variable-buffer-local (defvar irc-nick (or (getenv "IRCNICK") (user-login-name)) "The nickname with which to enter IRC.
The default value is set from your login name.  Using /NICKNAME changes it."))

(defvar irc-noglob nil "\
*If non-nil the nickname globbing will not be done.")

(defvar irc-spacebar-pages t "\
*When this variable is non-nil, the following keys are in effect when
point is in the output region.

SPC      scroll-forward    DEL           scroll-backward
TAB      previous-line     LFD or RET    next-line")

(defvar irc-maximum-size 20480 "\
*Maximum size that the *IRC* buffer can attain, in bytes.
The default value of 20k represents an average of about 512 lines, or roughly
22 screens on a standard 24 line monitor.  A nil value will make the size of
the buffer effectively unbounded as far as IRC is concerned; the real ceiling
is 8Meg-1K characters.")

(defvar irc-mode-hook nil "\
Hook to run after starting irc-mode but before connecting to the server.")

(defvar irc-no-auto-restart nil "\
*If non-nil, don't restart an IRC session if it exits abnormally.")

(defvar irc-silent-bell nil "\
*If non-nil, don't issue audible beeps for signal events.")

(defvar irc-pop-ratio 4 "\
*An integer value means to display the *IRC* buffer when a signal is issued.
The number represents roughly how much of the Emacs screen to use when
popping up the IRC window if only one window is visible.  The reciprocal
is used, so a value of 1 causes the window to appear full-screen, 2 makes
the window half of the screen, 3 makes it one third, et cetera.  If the value
is not an integer then no attempt is made to show the *IRC* buffer if it
is not already visible.")

(defvar irc-max-history 40 "\
*The maximum number of messages retained by irc-mode.
This limits messages sent, not messages received.  They are stored to be
easily recalled by irc-message-prev and irc-message-next (C-c C-p and C-c C-n
by default).")

(defvar irc-conserve-space nil "\
*If this variable is set non-nil then the C client will be partially
mimicked for message insertion.  Private messages will be prefixed by
\"*SENDER*\" and public messages will be prefixed by \"<SENDER>\".  No blank
lines are put in the buffer.")

(defvar irc-confirm t "\
If non-nil, provide confirmation for messages sent on IRC.
It should be noted that confirmation only indicates where irc-mode
tried to send the message, not whether it was actually received.
Use the /CONFIRM command to change.")

(defvar irc-no-motd nil "\
*If non-nil, don't ask for the message of the day when first connecting.")

(defvar irc-processes nil "\
All currently open streams to irc-servers are kept in this list.")

(make-variable-buffer-local (defvar irc-signals (quote ((private t) (invite t) (wall t) (public) (join) (nick) (topic) (user))) "Events in IRC that should get signalled when they occur."))

(make-variable-buffer-local (defvar irc-ignores nil "A list of users whose messages and events will be ignored."))

(make-variable-buffer-local (defvar irc-notifies (quote (join nick topic)) "Events in IRC that should get a message when they occur."))

(make-variable-buffer-local (defvar irc-message-history nil "A list of messages which irc-mode has processed."))

(make-variable-buffer-local (defvar irc-command-history nil "A list of commands which irc-mode has processed."))

(make-variable-buffer-local (defvar irc-default-to "*;" "The default recipient of a message if no : or ; is provided."))

(defvar irc-mode-map nil "\
The keymap which irc-mode uses.

Currently set to: \\{irc-mode-map}")

(defvar irc-alias-alist (quote (("QUERY" . "send") ("N" . "names") ("W" . "who") ("M" . "msg") ("?" . "help") ("TF" . "time tut.fi") ("WHAT" . "list") ("L" . "list") ("EXIT" . "quit") ("BYE" . "quit") ("STOP" . "quit"))) "\
An association list of command aliases used in irc-mode.")

(defconst irc-command-alist (quote (("WHO" . "who") ("HELP" . "help") ("INFO" . "info") ("LIST" . "list") ("MOTD" . "motd") ("OOPS" . "oops") ("OPER" . "oper") ("QUIT" . "quit") ("SEND" . "send") ("TIME" . "time") ("MSG" . "privmsg") ("ADMIN" . "admin") ("LINKS" . "links") ("NAMES" . "names") ("QUOTE" . "quote") ("TOPIC" . "topic") ("USERS" . "users") ("WHOIS" . "whois") ("STAMP" . "stamp") ("FINGER" . "finger") ("LUSERS" . "lusers") ("INVITE" . "invite") ("NOTIFY" . "notify") ("SIGNAL" . "signal") ("SUMMON" . "summon") ("NICKNAME" . "nick") ("CONFIRM" . "confirm") ("OPERWHO" . "operwho") ("VERSION" . "version") ("REDIRECT" . "redirect") ("AWAY" . "away") ("HERE" . "here") ("JOIN" . "join") ("LEAVE" . "leave") ("ALIAS" . "alias") ("UNALIAS" . "unalias") ("IGNORE" . "ignore") ("UNIGNORE" . "unignore"))) "\
An association list of the regular commands to which all users have access.
Form is (\"COMMAND\" . \"function\") where \"function\" is that last element in
an irc-do-* symbol.  See also irc-alias-alist and irc-operator-alist.")

(defconst irc-operator-alist (quote (("KILL" . "kill") ("WALL" . "wall") ("TRACE" . "trace") ("REHASH" . "rehash") ("CONNECT" . "connect"))) "\
As association list of commands which only an IRC Operator can use.")

(defconst irc-version "IRC-mode Version 2.1Beta" "\
The currently loaded version of irc-mode.")

(or irc-mode-map (progn (setq irc-mode-map (make-keymap)) (define-key irc-mode-map "
" (quote irc-process-input)) (define-key irc-mode-map "" (quote irc-process-input)) (define-key irc-mode-map "	" (quote irc-tab)) (define-key irc-mode-map "" (quote irc-do-alias)) (define-key irc-mode-map "" (quote irc-do-names)) (define-key irc-mode-map "" (quote irc-do-finger)) (define-key irc-mode-map "" (quote irc-do-help)) (define-key irc-mode-map "	" (quote irc-do-invite)) (define-key irc-mode-map "
" (quote irc-do-join)) (define-key irc-mode-map "" (quote irc-do-list)) (define-key irc-mode-map "" (quote irc-history-menu)) (define-key irc-mode-map "" (quote irc-message-next)) (define-key irc-mode-map "" (quote irc-do-oops)) (define-key irc-mode-map "" (quote irc-message-prev)) (define-key irc-mode-map "" (quote irc-do-quote)) (define-key irc-mode-map "" (quote irc-do-redirect)) (define-key irc-mode-map "" (quote irc-do-topic)) (define-key irc-mode-map "" (quote irc-do-send)) (define-key irc-mode-map "" (quote irc-kill-input)) (define-key irc-mode-map "" (quote irc-do-version)) (define-key irc-mode-map "" (quote irc-do-who)) (define-key irc-mode-map "" (quote irc-kill-input)) (define-key irc-mode-map "#" (quote irc-do-lusers)) (define-key irc-mode-map "a" (quote irc-do-admin)) (define-key irc-mode-map "c" (quote irc-do-connect)) (define-key irc-mode-map "k" (quote irc-do-quit)) (define-key irc-mode-map "l" (quote irc-do-links)) (define-key irc-mode-map "n" (quote irc-command-next)) (define-key irc-mode-map "o" (quote irc-do-operwho)) (define-key irc-mode-map "p" (quote irc-command-prev)) (define-key irc-mode-map "q" (quote irc-do-leave)) (define-key irc-mode-map "r" (quote irc-raw-mode)) (define-key irc-mode-map "s" (quote irc-do-summon)) (define-key irc-mode-map "t" (quote irc-toggle-glob)) (define-key irc-mode-map "u" (quote irc-do-users)) (define-key irc-mode-map "" (quote irc-del-backward-char)) (mapcar (function (lambda (key) (define-key irc-mode-map key (quote irc-self-insert)))) (where-is-internal (quote self-insert-command) nil nil))))

(defun irc-filter (proc str) "\
The filter for IRC streams." (byte-code "!qP! )\"S !A@!?@ ȂO 	H !!\" 
\"y 
!O!
!O
!T )
	U \"," [irc-ring-bell opoint npoint ibuf proc irc-scratch str irc-mark nil irc-silent-bell irc-finger-scratch process-buffer marker-position irc-check-time string-match "
" irc-parse-server-msg ding no-terminate minibuffer-message " [Bell in %s]" buffer-name "?
" irc-notice 0 match-beginning match-end irc-display] 17))

(defun irc-finger-filter (proc str) (byte-code "!q	
P)\"" [proc irc-finger-scratch str process-buffer irc-filter ""] 4))

(defun irc-parse-server-msg (str) (byte-code "

\"O	#+ 	!O	!OQ!T
 3 	!

\"TO͏B*" [loc line str irc-raw-mode 0 string-match "
" "%" match-end nil irc-insert aor (byte-code "\"   	\"  \"$ ! \"1 ! \"> ! \"K ! \"X ! \"e ! \"r ! \" ! \" ! \" ! \" ! \" ! \" ! \" ! \" ! \" ! \"" [line irc-raw-mode nil t string-match "^PING" irc-pong string= " Raw" "^:\\S +\\s +MSG" irc-parse-public "^:\\S +\\s +CHANNEL" irc-parse-channel "^:\\S +\\s +INVITE" irc-parse-invite "^:\\S +\\s +NICK" irc-parse-nick "^:\\S +\\s +WALL" irc-parse-wall "^:\\S +\\s +QUIT" irc-parse-quit "^:\\S +\\s +KILL" irc-parse-kill "^:\\S +\\s +TOPIC" irc-parse-topic "^:\\S *\\s +3[0-9]+" irc-parse-RPL "^:\\S *\\s +4[0-9]+" irc-parse-ERR "^\\(: \\)?NOTICE" irc-parse-notice "^\\(:\\S * +\\)?PRIVMSG" irc-parse-priv "^ERROR" irc-parse-error "^WHOREPLY" irc-parse-whoreply "^NAMREPLY" irc-parse-namreply "^LINREPLY" irc-parse-linreply signal args-out-of-range (0 0)] 38) ((args-out-of-range (byte-code "  
!!" [irc-raw-mode nil line irc-insert "(Please let tale@cs.rpi.edu know about this; it's a bug.)"] 3)))] 11))

(defun irc-parse-channel (str) (byte-code "		\"O	!!O#\"9 
\", \"0 
\"
łg #G >?N łg 
\"] #b 
#\"*" [user str channel irc-nick irc-channel nil irc-ignores irc-notifies 1 string-match "\\s CHANNEL\\s +\\([-0-9]+\\)" match-beginning match-end irc-maintain-list irc-wholist add string= "0" irc-insert "You have left channel %s." "You are now a member of channel %s." member-general join "*** %s has left channel %s ***" "*** %s has joined channel %s ***" irc-signal] 15))

(defun irc-parse-invite (str) (byte-code "		\"O	!	!#O	!O##3 Q!R 
!!\"E قF 
$\"+" [user str to channel irc-ignores irc-nick irc-last-invite 1 string-match "\\s +INVITE " match-end 0 "\\s +" nil irc-maintain-list irc-wholist add member-general string= irc-send "PRIVMSG " " :You are being ignored." irc-insert "*** %s invites %s to join channel %s ***" downcase "you" irc-signal invite] 16))

(defun irc-parse-public (str) (byte-code "		\"O	!O =?   Q! ##6 ƂX H 
%\"S 	$
!\"+" [user str msg time irc-message-stamp irc-ignores nil irc-conserve-space t irc-channel 1 string-match "\\s MSG :" match-end 0 private " (" irc-get-time ") " " " irc-maintain-list irc-wholist add member-general string= irc-insert-message concat "<" ">" irc-insert "
 ->%sFrom %s to %s:" irc-signal public] 12))

(defun irc-parse-priv (str) (byte-code "\"* \"O!!#O5 \"O!O?L 
!Ƃ	\"##u 
\"p Q!Ƃ~ 	 P	
  
=? ? 
=?  Q   Q # 	!!\" 	\"     
%\" 
!	Ă
\"-" [from to msg time public str nil irc-channel irc-ignores irc-last-private irc-message-stamp irc-conserve-space irc-nick t string-match "^:\\S +\\s +PRIVMSG\\s +" 1 "\\s +PRIVMSG\\s +" match-end 0 "\\s +:" 9 "\\s :" irc-insert string= irc-maintain-list irc-wholist add member-general "You are being ignored." irc-send "PRIVMSG " " :You are being ignored." ":" private " (" irc-get-time ") " " " "
 ->%sSemi-private from %s to " "
 >>%sPrivate message from %s:" downcase " (apparently to %s)" irc-insert-message concat "(" "*" ")" irc-signal] 26))

(defun irc-parse-quit (str) (byte-code "		\"O#
# Â# \"\")" [user str irc-ignores nil 1 string-match "\\s +QUIT" irc-maintain-list irc-wholist remove member-general string= irc-insert "*** %s has left IRC ***" irc-signal join] 7))

(defun irc-parse-wall (str) (byte-code "		\"O	!O#)  
&\"3  #
!\"*" [user str msg irc-conserve-space t 1 string-match "\\s +WALL\\s +:" match-end 0 nil irc-maintain-list irc-wholist add irc-insert-message concat "#" "# (" irc-get-time ") " irc-insert "
 ## Message from %s at %s to everyone:" irc-signal wall] 12))

(defun irc-parse-nick (str) (byte-code "		\"O	!O#
##3 #
#ĂP >?? 
\"F ĂP 
#\"*" [old str new irc-ignores nil irc-notifies irc-nick 1 string-match "\\s NICK " match-end 0 irc-maintain-list irc-wholist remove add member-general string= nick irc-insert "*** %s is now known as %s ***" irc-signal user] 12))

(defun irc-parse-error (str) (byte-code "\"!O!\"2 N ʉ !N/ ͂0 	\"" [str irc-nick nil string-match "\\s +:" irc-insert match-end 0 "Nickname\\s +\\S *\\s +\\(is \\)?\\(already\\|not\\s +chan\\|in use\\)" o-nick "NO NAME YET (/NICK to set one)" set-buffer-modified-p buffer-modified-p "Hmmm ... looks like you're still \"%s\"." "%s"] 9))

(defun irc-parse-notice (str) (byte-code "\"!O	!	\"& 	!!O#5 	\"5 Љ !)Ç" [str msg irc-operator nil string-match "\\s +:" match-end 0 irc-insert "^\\*\\*\\* Error: No such nickname (\\(.+\\))$" irc-maintain-list irc-wholist match-beginning 1 remove "^Good afternoon, gentleman\\. I am a HAL 9000" " Operator" set-buffer-modified-p buffer-modified-p] 11))

(defun irc-parse-topic (str) (byte-code "		\"O	!O#>?  Ă+ 
$\"*" [user str topic irc-notifies nil irc-channel 1 string-match "\\s +TOPIC\\s +" match-end 0 irc-maintain-list irc-wholist add irc-insert "*** %s has changed the topic of %s to \"%s\" ***" irc-signal] 8))

(defun irc-parse-kill (str) (byte-code "		\"O	!	!#O	!O#
#
!!\"? #ƉE 
$+" [oper str user path irc-nick irc-wanted-exit t 1 string-match "\\s +KILL\\s +" match-end 0 "\\s +:" nil irc-maintain-list irc-wholist add remove string= downcase irc-insert "*** Your session has been killed by %s via path %s ***" "*** %s has killed %s via path %s ***"] 16))

(defun irc-parse-whoreply (str) (byte-code "\"!O\"?4 \"O	B!O 	B	8\"H łO 	8#	8G	8G	@G$Vi l \\	8#} ݂ 	8\" ߂ 	8\"  	8\"  	8\"  	8\" ߂ 	8	8	8GZ\"	8!! 	8\"   	8\"	@O\"	8	8&	8\"
!
!,Ň" [str split wholine oper padlen nil irc-ignores t irc-operwho string-match "^WHOREPLY\\s +" match-end 0 "^:" "\\(\\s +\\|$\\)" string= 1 "S" irc-maintain-list irc-wholist 2 add - 61 5 4 77 concat member-general "#" "H" " " "H*" "*" "G" "-" "G*" "=" make-string 10 32 format "%4s " zerop string-to-int 6 "Chan" "" "<" "@" ">" "\\*\\|^S$" irc-insert] 32))

(defun irc-parse-linreply (str) (byte-code "\"!!O!O#" [str nil string-match "^LINREPLY\\s +\\(\\S +\\)\\s +" irc-insert "Server: %s (%s)" match-beginning 1 match-end 0] 10))

(defun irc-parse-namreply (str) (byte-code "\"!!O!O	\"\" Ђ# 	\"
\"h 
!O
!O#GG\\ ZXZ Qd !\"' !,Ň" [str channel users to-insert nick nil string-match "^NAMREPLY\\s +\\S +\\s +\\(\\S +\\)\\s +" match-beginning 1 match-end 0 format "%7s " string= "*" "Private" "^\\(\\S +\\)\\(\\s \\|$\\)" irc-maintain-list irc-wholist add window-width 2 " " irc-insert "         %s"] 16))

(defun irc-parse-ERR (str) (byte-code "\"!!O!!!O	UP 
\"
!!O\"< \"C ĂM #\"	Uk 
\"
!!ZO\"	U 
\"
!!O\"	U !	U !	U 
\"
!!O\"	U !	U !	U\"!!O#\"!!\" N  !!!U\"	U)!	U5!	UA!	UM!	UY!	Ugׁ@ !	A UwׁB !	C U
\"ׁD 
!!O\"	E UׁF !	G UׁH !ׁI !!+ć" [str num txt tmp1 nil irc-nick t string-match "^\\S +\\s +\\(4[0-9][0-9]\\)\\s \\S *\\s +\\(.*\\)$" string-to-int match-beginning 1 match-end 2 401 "^\\S *" 0 string= ":Hunting" "" irc-maintain-list irc-wholist remove irc-insert "'%s' is not on IRC." 402 "^.*\\s :" "'%s' is not a server on the IRCnet now." 403 "^\\S +" "Channel %s is not in use." 411 "The last message had no recipient." 412 "The last message had no text to send." 421 "^\\(.*\\) Unknown command$" "Unknown server command: '%s'." 431 "No nickname give to change to." 432 "Bad format for nickname change." 433 "^\\S + 433 \\(\\S *\\) \\(\\S +\\) " add "Nickname '%s' is already being used; please choose another." /= o-nick "NO NAME YET (/NICK to set one)" set-buffer-modified-p buffer-modified-p "%s" "Hmmm ... looks like you're still \"%s\"." 441 "You're not on any channel." 451 "You haven't checked in yet.  Choose a nickname." 461 "There weren't enough arguments for the last command." 462 "You've already registered." 463 "Your host isn't permitted." 464 "That password is incorrect." 465 "You've been banned from IRC." 471 "Channel %s is full." 481 "You must be an IRC Operator to do that." 491 "You can't be that IRC Operator from your host." "Unrecognized ERR message follows; please tell tale@cs.rpi.edu:"] 58))

(defun irc-parse-RPL (str) (byte-code "\"!!O!!!O	UW 
\"?7 
\"T 
!!O
!!O##	U 
\"
!!O
!!O
!!O
!!O
!!O\" 䂣 P&# Q!	U 
\"
!!O
!!O\" \" # ? !	U0
\"
!!O#\"'?-!	U<!	Ut
\"
!!O\"_`
!!O
!!O$	U!	U!	U
\"
!!O\"	U\"!!Oց@ !!O!!O$#	A U́B 
\"ցC 
!!O
!!O#	D U/
\"
!!OE #ցF \"	G U@
O!	H Us
\"e	XʂbI !ˉ	pʉ	
O!	J UK L M  !ցN !	O UցP !	Q U
\"ցR 
!!O
!!O#S 
\"ցT !!.ʇ" [str num txt tmp1 tmp2 tmp3 tmp4 irc-doing-finger irc-conserve-space irc-motd-bug nil t irc-operator string-match "^\\S +\\s +\\(3[0-9][0-9]\\)\\s \\S *\\s +\\(.*\\)$" string-to-int match-beginning 1 match-end 2 301 "^\\(\\S +\\) :\\(.*\\)$" irc-insert "Someone is away, \"%s\"." "%s is away, \"%s\"." irc-maintain-list irc-wholist add 311 "^\\(\\S +\\) \\(\\S +\\) \\(\\S +\\) \\(\\S +\\) :\\(.*\\)$" 3 "%s is %s <%s@%s> on %s." 5 string= 4 "*" "a private channel" "channel " irc-finger "@" 312 "^\\(\\S +\\) :?\\(.*\\)$" "On server %s (%s)." irc-notice "" 313 "^\\S +" 0 "%s is an IRC Operator." 321 "Channel  Users Topic" 322 "^\\(\\S +\\) \\(\\S +\\) :\\(.*\\)$" "%7s   %2s   %s" "Private" 323 "
" 331 "No topic is set." 332 "^:\\(.*\\)$" "The topic is %s." 341 "^:\\(\\S +\\) 341 \\S + \\(\\S +\\) \\(\\S +\\)" "Server %s inviting %s to channel %s" 351 "^\\(\\S +\\) \\(\\S +\\)" "%s is running IRC daemon version %s" 361 remove "%s has been removed from IRC." 371 372 "(Sorry; a server bug prevents you from seeing this message of the day.)" 381 " Operator" set-buffer-modified-p buffer-modified-p "Welcome to the Twilight Zone." 382 "Rereading local ircd configuration information." 391 "It is %s at %s." "Is is %s somewhere." "Unrecognized RPL message follows; please tell tale@cs.rpi.edu:"] 99))

(defun irc-pong nil (interactive) (byte-code " P!" [nil irc-send "PONG " system-name] 4))

(defun irc-notice (format &rest args) (byte-code "	B\"p!" [format args apply irc-insert irc-display] 4))

(defun irc-insert-message (msg &optional pure-first) (byte-code "
G ZVB 	T
 ZO
 ZO
\"A@6 	U?; P! K 	!?P 
P!*" [line lines msg pure-first nil 0 window-width 5 4 irc-fix-wordwrap irc-insert 1 " - " zerop] 9))

(defun irc-insert (format &rest args) (byte-code "	
#!	bG SVc  SO SO\"@\"E G AP@\"U W @P! P!)." [str format args prefix fix line irc-win cur-win irc-maximum-size irc-mark apply "   " nil irc-truncate-buffer window-width 0 irc-fix-wordwrap string= "" insert-before-markers "
"] 12))

(defun irc-fix-wordwrap (line1 line2) (byte-code "\" O; 	\"\" 	!O; 	\"; 	!TOP	!O	B" [line2 line1 string-match "^\\s +" 1 nil "\\s +$" 0 match-beginning "\\(\\s +\\)\\S +$"] 9))

(defun irc-self-insert (arg) "\
Normally just inserts the typed character in the input region.
If point is in the output region, irc-spacebar-pages is non-nil and a space
is typed, scroll-up (aka window-forward) otherwise point moves to end of input
region and inserts the character.

If the character to be inserted is a colon or semi-colon and it is the first
non-white space character on the line then the input region is updated to
begin with the last explicit sendlist, irc-last-explicit.

Inserts the character ARG times if self-inserting.  An argument is not
passed to scroll-up if paging with the spacebar." (interactive "p") (byte-code "Ȉ`	YU U! 	 ` d\"\"
?K 1 !H 8 UB ҏH db!p Q db	`\"Ub d cVp S!*" [in-region irc-mark expand-colon last-input-char arg irc-spacebar-pages irc-last-private irc-last-explicit nil 58 59 string-match "^\\s *$" buffer-substring self-insert-command 32 EOB (byte-code "!" [nil scroll-up] 2) ((end-of-buffer (byte-code "db" [] 1))) delete-region 1] 7))

(defun irc-del-backward-char (arg) "\
If in the input region, delete ARG characters before point, restricting
deletion to the input region.  If in the output region and irc-spacebar-pages
then scroll-down (aka window-back) otherwise do nothing." (interactive "p") (byte-code "È`V 	`ZV `\" 	!/ `W$ 
- !/  " [irc-mark arg irc-spacebar-pages nil delete-region delete-backward-char scroll-down ding] 5))

(defun irc-tab nil "\
If point is in the input region then tab-to-tab-stop.  If it is in the
output region, go to the previous line if irc-spacebar-pages; do nothing
otherwise." (interactive) (byte-code "`Y   	 !  " [irc-mark irc-spacebar-pages nil tab-to-tab-stop scroll-down 1 ding] 4))

(defun irc (new-buffer) "\
Enter the Internet Relay Chat conferencing system.
If no connexion to an irc-server is open, then one is started.  If no buffer
*IRC* exists then it is created otherwise the existing buffer is used.  If
a connexion is already active then the most recently started IRC session
is switched to in the current window.  This makes binding 'irc' to a key
much more convenient.

With prefix argument NEW-BUFFER, another *IRC* buffer is created and a
new IRC session is started.  This is provided so that multiple IRC
sessions can co-exist in one Emacs, which is sometimes a useful thing." (interactive "P") (byte-code "ǈ	 	! 	 ! !#  =.  !	?6 C @!!K !֏+" [buffer new-buffer nope irc-server irc-port proc irc-processes nil bufferp generate-new-buffer "*IRC*" get-buffer-create format "Sorry ... couldn't connect to %s at %s.

" selected-window minibuffer-window select-window next-window switch-to-buffer process-buffer NOT-IRCED (byte-code "db\"c 
$	\"	\"  !5 !5  %!P!F !	
 	B " [irc-version proc buffer irc-server irc-port irc-nick irc-no-motd irc-away nil irc-channel irc-message-index irc-operator irc-scratch irc-command-index irc-finger-scratch irc-wanted-exit irc-last-explicit irc-last-private irc-last-time irc-last-invite irc-processes format "%s for GNU Emacs.  Copyright (C) 1990 David C Lawrence.

" irc-mode open-network-stream "irc" set-process-filter irc-filter set-process-sentinel irc-sentinel irc-send "USER %s %s %s %s" user-login-name system-name getenv "IRCNAME" "NAME" user-full-name "NICK " "MOTD" "0" -1 "" "*;" "*:" irc-get-time irc-normalise-time-stamp] 17) ((error (byte-code "!" [nope irc-notice] 2)) (quit (byte-code "!" [nope irc-notice] 2)))] 14))

(defun irc-mode nil "\
To understand some documentation given with irc-mode variables and
functions, \"output region\" is defined as everything before the irc-mark.
irc-mark is a marker kept by irc-mode to know where to insert new text
from IRC.  Text in the output region cannot be modified by the most common
methods of typing a self-inserting character or pressing delete.

The input region is everything which follows irc-mark.  It is what
gets processed by irc-mode when you type LFD or RET.  If irc-spacebar-pages
is non-nil, the following keys are in effect when the cursor is in the
output region:

SPC             scroll-forward       DEL     scroll-backward
LFD or RET      next-line            TAB     previous-line

Local keys:
\\{irc-mode-map}" (interactive) (byte-code "Ĉ  Z!!!!!!!!!!!!!!!!!!!!!l  !L!L!!!!!&
L! Ld\"   !!" [major-mode mode-name fill-column irc-last-time nil irc-mode-map kill-all-local-variables irc-mode "IRC" window-width 5 make-local-variable irc-server irc-port irc-away irc-channel irc-wholist irc-operator irc-message-index irc-command-index irc-scratch irc-finger-scratch irc-operwho irc-last-explicit irc-last-private irc-last-invite irc-last-stamp irc-total-time irc-wanted-exit irc-doing-finger irc-motd-bug irc-raw-mode irc-get-time blink-matching-paren scroll-step 1 mode-line-format list purecopy "--- %14b" global-mode-string "  %[(" ")%]---" irc-nick "-%-" set-marker irc-mark make-marker buffer-enable-undo irc-wrap-display-time turn-on-auto-fill use-local-map run-hooks irc-mode-hook] 43))

(defun irc-sentinel (proc stat) (byte-code "\" 
	\"
!q \")$ Ă + !!; ! 
	p!\"e P!	t 	OP!	
.)p
!= db" [stat irc-processes proc irc-wanted-exit nil irc-silent-bell irc-no-auto-restart channel irc-channel away irc-away im irc-message-history ic irc-command-history ilp irc-last-private ili irc-last-invite string= "finished
" delq process-buffer irc-notice "
IRC session finished at %s.
" irc-get-time ding no-terminate message "IRC session finished." sleep-for 1 irc "0" irc-send "CHANNEL " "AWAY " 2 -1] 16))

(defun irc-process-input nil "\
If in the input region, parse it for messages and commands.
In the output region, next-line if irc-spacebar-pages, otherwise do nothing.

All of the lines in the input region are rejoined during processing to be
handled as one.  A command is any line starting with a / after leading
whitespace is stripped away; commands can not exceed 250 characters.  Messages
can be longer but they will be split into 250 character segments for IRC.  The
buffer will reflect how the message was sent if it needed to be broken; the
split(s) will be indicated by \" >>\" to mean that the message is continued." (interactive) (byte-code "ʈ`W 	 !  9 db#* `T+ `\"b!`\"ԉd\"\"U !8\"f !IU \" GW dbc`\"\"O!  !8\" \" !? 	d\"P\"GV)OO\"  	AP@PGZ\\b	\"!! `\"! dbc`\"!+" [irc-mark irc-spacebar-pages t irc-message-index irc-command-index txt send ass irc-last-explicit irc-default-to nil scroll-up 1 ding irc-check-time delete-region re-search-backward "[^ 	
]" re-search-forward "\\s *" -1 buffer-substring string= "" message "(nothing sent to the irc-server)" string-match "
" match-beginning 0 32 "^/" 250 set-marker irc-add-to-hist irc-command-history irc-do-command "IRC commands can't exceed 250 characters." irc-find-to explicit "^[^:;]" irc-message-history irc-fix-wordwrap " >>" 3 insert " >>
" looking-at "[ 	]" delete-char beginning-of-line irc-do-msg] 33))

(defun irc-do-command (str) (byte-code "\"O!O  	#\"
#
?1 ?? 	\"
#?N 
!\" @A#\\ AGVu 
!#\"# \"
#

 
@@\" 
@\"A\" Q! \"
#

 
@\"AP!\" 	\"
#

  
@	\"AP!\" 
@!\"-" [case-fold-search t cmd str text ambig irc-alias-alist irc-command-alist irc-operator irc-operator-alist matches 0 string-match "\\(\\s +\\|$\\)" match-end nil irc-check-list mapcar car append start-only irc-notice "Unknown command '/%s'.  Type /HELP for help." upcase member-general string= 1 "Ambiguous command '/%s'.  Could be %s." irc-subst-comma mapconcat (lambda (arg) (byte-code "P" [arg "/"] 2)) ", " "or" irc-do-command assoc string< "" " " funcall intern-soft "irc-do-" "Only IRC Operators can use the /%s command."] 34))

(defun irc-send (str) (byte-code " 	!p!	P\"	" [irc-raw-mode str irc-notice send-string get-buffer-process "
"] 6))

(defun irc-do-privmsg (str) "\
Usage: /MSG recipient(s) message

This command is provided simply for compatability with the C client.  It is
preferable instead to just type the name of the user followed by a semi-colon
or colon and then the message.  That is, \"tale;hi!\" will send the message
\"hi!\" to the user with the nickname which unambiguously matches \"tale\".
A semi-colon or colon at the beginning of the line means to send to the last
recipient explicity specified; typing a semi-colon at the beginning of a line
expands it to the last recipient(s) specified while typing a colon at the
beginning of the line automatically expands to the last person to have sent
you a private message.  The recipients for a message can be a comma separated
list of users and/or channels." (byte-code "		\"OP	!OP!\"" [irc-last-explicit str irc-add-to-hist irc-message-history irc-do-msg 0 string-match "\\s +\\|$" ";" match-end nil] 9))

(defun irc-do-msg (str) (byte-code "

\" 
!I 
\", 
OPE 
\"?E B 
PE !
\"w 
!GSO!
!
\"j 
HUt 
Ou 
\"\"  #\"\" ? !	," [tolist orig str icw confirm irc-last-explicit irc-default-to nil irc-confirm string-match "
" match-beginning 0 32 "^[;:]" 1 irc-find-to explicit irc-notice "You have no default sendlist." irc-burst-comma irc-find-message string< "" delq mapcar (lambda (to) (byte-code "!!?& 	\" 
P!# 
R! . ł3 \"\"V 	\"L !łS 
P!	 \"e !ł GUz @
R!@ ? #
R! #\"#Ň" [to irc-channel str icw irc-noglob nil irc-wholist t zerop string-to-int string= irc-send "MSG :" "PRIVMSG " " :" irc-check-list "*" "0" irc-notice "You are not on any channel." "You can't send to channel 0." 1 irc-maintain-list add "Ambiguous recipient \"%s\"; could be %s." irc-subst-comma mapconcat eval ", " "or"] 23)) "(message sent to %s)" irc-subst-comma mapconcat eval ", " "and" "(message not sent)"] 19))

(defun irc-do-oops (&optional newto) "\
Usage: /OOPS intended-recipient

Send irc-oops to recipient(s) of last message and resend message to
'intended-recipient'.  This command is handy when you've just sent a message
to the wrong place and you want the person/people who saw it to know that they
should just disregard it.  The message which was originally sent then gets
forwarded to its proper destination." (interactive) (byte-code "È@!	P!
 !" [irc-message-history irc-oops newto nil irc-do-msg irc-find-to irc-do-redirect ""] 4))

(defun irc-do-redirect (newto) "\
Usage: /REDIRECT additional-recipient

Send to 'additional-recipient' the last message which you sent.  This 
command can be fairly easily duplicated using the history mechanism by hand
but it is provided to make it even easier." (interactive (byte-code " GSOQ \"!C" [irc-default-to read-string format "New recipient(s)? %s" "[RET for " 0 "] " ""] 7)) (byte-code "ƈ
@!\"? \"s t?! \"* !s \"5 8 P	P	\"	GVo 	O	O	\"AP@P!F 	!*" [irc-default-to msg irc-message-history send newto irc-last-explicit nil irc-find-message string-match "^[a-zA-Z0-9-_,|{*]*$" irc-notice "%s is not a valid sendlist.  Message not resent." string= "" call-interactively irc-do-redirect ";" irc-add-to-hist 250 0 irc-fix-wordwrap " >>" irc-do-msg] 11))

(defun irc-do-quote (msg) "\
Usage: /QUOTE string

This command is used to send 'string' directly to the IRC server without
any local processing.  Warning: this has the potential to screw up some
things in irc-mode, particularly if it is used to change your nickname or
to switch channels." (interactive "sString to send to server: ") (byte-code "\" ! !" [msg nil string-match "^\\s *$" irc-notice "(nothing was sent to the IRC server)" irc-send] 4))

(defun irc-do-who (channel) "\
Usage: /WHO [ channel | user ]

Get a list of the users on IRC.  Optional argument 'channel' means to show
just the users on that channel, with * representing the current channel.

Each user is indicated on a separate line with their nickname, channel, login
name, host and real name.  The first column indicates their status --
' ' for here, '-' for away, '*' for an operator, '=' for an away operator
and '#' for someone being ignored.  Servers don't propogate the information
about who is away so you will probably only see people on your server
correctly marked regarding their presence.

Users who are either on a channel greater than 1000 or who are on no channel
have nothing listed in the Chan column.  Users who are on channels less than
zero do not appear in the list.

If a non-numeric argument 'user' is given then it is taken to be the nickname
of a user on IRC and more information, if available, is given about the person.

If this function is called interactively then the prefix argument is used
as the channel to query.  No argument means all of them and an argument of -
means the current channel." (interactive (byte-code " =  !!C Ň" [current-prefix-arg - ("*") int-to-string prefix-numeric-value ("0")] 3)) (byte-code "Ĉ	\" 
	\" ʉ	!@!?( 	!K 	!!3 ĉĉ	P!?E tK !" [current-prefix-arg channel irc-channel irc-wholist nil irc-operwho irc-conserve-space string-match "^\\s *\\*\\(\\s .*\\)?$" "^\\s *$" "0" numberp read-from-string irc-do-whois zerop string-to-int irc-send "WHO " irc-notice ""] 10))

(defun irc-do-operwho (&optional cruft) "\
Usage: /OPERWHO

Get a list of the operators who are visible on IRC.  The format is the same
as for /WHO.  Arguments to this command are ignored." (interactive) (byte-code "È!
? t !" [irc-operwho t irc-conserve-space nil irc-send "WHO" irc-notice ""] 3))

(defun irc-do-whois (user) "\
Usage: /WHOIS user

Get a two line description of who and where 'user' is.  If user is not
provided it is read from the minibuffer with a completing-read." (interactive (byte-code "" [("")] 1)) (byte-code "\"\" P!? t$ !" [user irc-doing-finger nil irc-conserve-space irc-read-user "Who is who? " string< "" irc-send "WHOIS " irc-notice] 5))

(defun irc-do-finger (user) "\
Usage: /FINGER { nickname | user@host }

Show more information about a user, using the Internet \"finger\" facility.
If the argument does not contain an `@' character then nickname globbing is 
done and /WHOIS is called to get the user@host.  The WHOIS data will also
be displayed." (interactive "sFinger who? ") (byte-code "È
\" t? !8 
\"% 
!8 
\"
\"8 
P!" [irc-doing-finger t user nil string= "" call-interactively irc-do-finger string-match "@" irc-finger irc-read-user "Finger who? " string< irc-send "WHOIS "] 9))

(defun irc-do-list (&optional channel) "\
Usage: /LIST [ channel ]

Get a list of the discussions that are on IRC.  The optional channel argument
is supposed to show just that channel but this is not currently supported
by most servers." (interactive) (byte-code "P!	? t !" [channel irc-conserve-space nil irc-send "LIST " irc-notice ""] 3))

(defun irc-do-links (&optional pattern) "\
Usage: /LINKS [ pattern ]

Show the names of all the servers which can communicate with your server.
If ``pattern'' is provided then all servers matching it will be displayed.
? and * act as Bourne shell wild-cards, matching one or any number of
characters respectively.  Example: \"/LINKS *.cs.*\" will display all servers
which have \"cs\" as one element of their domain name.

The links can go down isolating different parts of the IRC-net, so this
is a good way to find out how extensive it is at the moment." (interactive "sFind servers matching pattern: ") (byte-code "P!	? t !" [pattern irc-conserve-space nil irc-send "LINKS " irc-notice ""] 3))

(defun irc-do-lusers (&optional cruft) "\
Usage: /LUSERS

Get the number of users and servers on your IRC network.  Arguments to this
command are ignored." (interactive) (byte-code "!? t !" [irc-conserve-space nil irc-send "LUSERS" irc-notice ""] 3))

(defun irc-do-motd (&optional server) "\
Usage: /MOTD [ server ]

Get the message of the day for 'server'.  If server is not provided, the
local server is queried for its message of the day.  If invoked interactively
then a prefix argument means to prompt for the server to query." (interactive (byte-code " !C Ç" [current-prefix-arg read-string "Get message of the day at which server? " ("")] 2)) (byte-code "P!" [current-prefix-arg irc-motd-bug nil server irc-send "MOTD "] 3))

(defun irc-do-admin (server) "\
Usage: /ADMIN [ server ]

Get information about the IRC administrator for 'server'; if server is not
supplied just query for the server to which you are connected." (interactive "sAdministrative info about which server? ") (byte-code "P!	? t !" [server irc-conserve-space nil irc-send "ADMIN " irc-notice ""] 3))

(defun irc-do-time (&optional server) "\
Usage: /TIME [ server ]

Get the current time on 'server'; is no server is provided use the one to which
you are connected.  When called with a interactively with a prefix-argument
the server name is read using the minibuffer.

Querying other servers can be handy given that people on IRC are spread out
through North America, Europe and Asia.  The question \"What time is it in
Finland?\" comes up so frequently that an alias -- /TF -- has been provided
by default to get the answer.  This alias should work as long as tut.fi is
connected to your IRC-net." (interactive (byte-code " !C Ç" [current-prefix-arg read-string "Get time at which server? " ("")] 2)) (byte-code "	P!" [current-prefix-arg server nil irc-send "TIME "] 3))

(defun irc-do-join (channel) "\
Usage: /JOIN channel

Join 'channel' on IRC.  If channel is not provided it is requested in the
minibuffer; when called interactively channel is set to the prefix argument if
one is present.  Use /LEAVE to exit the channel." (interactive (byte-code " !!C Ç" [current-prefix-arg int-to-string prefix-numeric-value ("")] 3)) (byte-code "	\" !	\" * 	\"$ 	P!" [current-prefix-arg channel nil irc-last-invite string= "" read-string "Channel to join? " string-match "^\\s *$" "^\\s *\\.\\s *$" irc-send "CHANNEL "] 7))

(defun irc-do-leave (&optional cruft) "\
Usage: /LEAVE

Leave your current channel and join no other.  Any arguments to this command
are ignored." (interactive) (byte-code "!" [nil irc-send "CHANNEL 0"] 2))

(defun irc-do-nick (name) "\
Usage: /NICKNAME name

Change your nickname in IRC.  A nickname can contain alphanumeric characters,
underscores (_), hyphens (-) or the special characters vertical bar (|) and
left brace ({), which are alphabetic characters in Finnish.  The name cannot
start with a hyphen or number and only the first nine characters are used.

Unfortunately, due to the way confirmation from the servers work, it might be
falsely reported that your nickname was successfully changed when it was not.
The server will come back and say so and finally irc-mode will wise-up and
note that your nickname was not changed." (interactive "sNew nickname? ") (byte-code "\" t ! !\"?+ \"! GW7 T O#!M OP ĉ!\"b !{ \"
# !P!" [name nil irc-nick string= "" irc-notice "Nickname not changed." call-interactively irc-do-nick string-match "^\\([a-zA-Z|{_][a-zA-Z0-9-_|{]*\\)?$" read-string format "\"%s\" is not valid.  New nickname? " 10 y-or-n-p "\"%s\" is too long; shortened to \"%s\".  Okay? " 0 9 message "You will now be known as \"%s\"." put o-nick set-buffer-modified-p buffer-modified-p irc-send "NICK "] 18))

(defun irc-do-quit (&optional text) "\
Usage: /QUIT

Exit IRC.  The connexion is closed but the buffer is left behind.
Arguments to this command are not ignored; if any are present then
the session is not exited as a safety precaution against seemingly
unintentional use of the command." (interactive) (byte-code "È
 \" ! !" [text irc-wanted-exit t nil string< "" irc-notice "/QUIT takes no arguments." irc-send "QUIT"] 4))

(defun irc-do-away (&optional text) "\
Usage: /AWAY message

Mark yourself as away, giving TEXT to people who send you private messages.
Without any arguments it will just insert a message about your current status." (interactive "sReason for being away: ") (byte-code "\" 	 	\" !& P!Q !" [text irc-away nil string= "" irc-notice "You are marked as away: '%s'." "You are not currently marked as being away." irc-send "AWAY " " [" "]" set-buffer-modified-p buffer-modified-p] 7))

(defun irc-do-here (&optional cruft) "\
Usage: /HERE

Mark yourself as present (ie, not \"away\") on IRC.  Any arguments to this
command are ignored." (interactive) (byte-code "! !" [irc-away nil irc-send "AWAY" set-buffer-modified-p buffer-modified-p] 4))

(defun irc-do-topic (topic) "\
Usage: /TOPIC [ topic ]

Make 'topic' the description of the current channel; this description is
shown to people looking at the channel listing.  With no argument then
the topic of the current channel will be displayed.  When called interactively
then a prefix argument means to prompt for the new topic." (interactive (byte-code "?	 	\" Ă 	\"!C" [current-prefix-arg irc-channel string= "0" "" read-string format "Topic for channel %s? "] 5)) (byte-code "È	\" ! 
P!" [current-prefix-arg irc-channel topic nil string= "0" irc-notice "You aren't on any channel." irc-send "TOPIC :"] 5))

(defun irc-do-oper (oper) "\
Usage: /OPER name password

Attempt to become an IRC Operator.  Can take the name of the operator
and the password as arguments.  If name is missing then it will be read
from the minibuffer; if password is missing it will be read and hidden
in the minibuffer.

If you become an operator then the word \"Operator\" will appear in the
modeline along with the mode name." (interactive "sOperator name? ") (byte-code "Ĉ\"!!O!!O	\"t# * ĂK 4 !K 
\"C 	\"!	
R!+" [oper name passwd noname nil string-match "^\\s *\\(\\S *\\)\\s *\\(\\S *\\).*$" match-beginning 1 match-end 2 string= "" call-interactively irc-do-oper irc-read-passwd format "Password for operator %s? " irc-send "OPER " " "] 15))

(defun irc-do-summon (user) "\
Usage: /SUMMON user

Summon a user not on IRC to join IRC.  The argument provided may either be
a user name on the local machine or user@server, where server is another
machine on the IRC-net.  The user must be signed on to the specified server." (interactive "sUser to summon to IRC? ") (byte-code "	\"t  \"  !\" 	P!)" [nouser user nil string-match "^\\s *$" call-interactively irc-do-summon irc-send "SUMMON "] 5))

(defun irc-do-users (host) "\
Usage: /USERS [ server ]

Get a list of the users signed on to 'server'.  If no server name is provided
then the server to which you are connected is used.  When called interactively
a prefix argument means to prompt for the server to query." (interactive (byte-code " !C Ç" [current-prefix-arg read-string "List users on which host? " ("")] 2)) (byte-code "È	? t !
P!" [current-prefix-arg irc-conserve-space host nil irc-notice "" irc-send "USERS "] 4))

(defun irc-do-info (&optional cruft) "\
Usage: /INFO

Show some information about the programmer of IRC.  Arguments to this command
are ignored." (interactive) (byte-code "!" [nil irc-send "INFO"] 2))

(defun irc-do-invite (user) "\
Usage: /INVITE user [ channel ]

Ask 'user' on IRC to join 'channel'.  If channel is 0, * or not provided then
the invitation defaults to your current channel.  If you are not on any channel
and channel is 0 or not provided then no invitation is sent -- you can't
invite someone to go private.  When called interactively channel is set to
the prefix argument; with no argument or - the current channel is assumed." (interactive (byte-code " =? !! 	C" [current-prefix-arg irc-channel - int-to-string prefix-numeric-value] 3)) (byte-code "ǈt 	\" 
\" !
P
\"
!!O
!!O\"F !~ 	\"R !![ !~ \"\"k ӂl \"\"~ R!+" [current-prefix-arg irc-channel user name channel noname t nil string= "0" read-string "Invite to which channel? " ". " string-match "^\\s *\\(\\S *\\)\\s *\\([-0-9]*\\).*$" match-beginning 1 match-end 2 "" call-interactively irc-do-invite zerop string-to-int irc-notice "You are not on any channel.  No invitation sent." irc-read-user format "Invite whom to channel %s? " "." string< irc-send "INVITE " " "] 23))

(defun irc-do-names (channel) "\
Usage: /NAMES [ channel ]

Show which channels everyone is on.  Optional argument 'channel' (which can
be provided as a prefix argument if called interactively) means to show
just the users on that channel.  * or an interactive prefix argument of -
means to show people on the current channel.

Each line starts with a column for the channel number and is followed by the
nicknames of the people on that channel.  Users who are on private channels
or who are not on any channel are listed as \"Private\".  Users who are
on secret channels (channels less than 0) are not shown at all." (interactive (byte-code " =  !!C Ň" [current-prefix-arg - ("*") int-to-string prefix-numeric-value ("0")] 3)) (byte-code "Ĉ	\" 
	!! ʉ	P!?' t- !!" [current-prefix-arg channel irc-channel irc-wholist nil irc-conserve-space string-match "^\\s *\\*\\(\\s .*\\)?$" zerop string-to-int "" irc-send "NAMES " irc-notice "Channel  Users"] 7))

(defun irc-do-version (&optional server) "\
Usage: /VERSION [ server ]

Get the IRC daemon version of 'server'.  If server is not provided, the
local server is queried for its version and the current version of the Emacs
IRC client is also shown.  If invoked interactively then a prefix argument
means to prompt for the server to query.

Servers do not currently support remote querying of their version; in fact,
an argument of a valid server name to /VERSION will result in no output at
all.  The command accepts it, though, in vapid anticipation of the day when
it will have meaning." (interactive (byte-code " !C Ç" [current-prefix-arg read-string "Get message of the day at which server? " ("")] 2)) (byte-code "È	\" 
!	P!" [current-prefix-arg server irc-version nil string= "" irc-notice irc-send "VERSION "] 5))

(defun irc-do-connect (server) "\
Usage: /CONNECT server [ port ]

This operator command will attempt to force a connexion from your server to
SERVER.  If PORT is not provided (which can be given as a prefix argument when
called interactively) then it is assumed to be 6667." (interactive (byte-code "! !! !QC" [current-prefix-arg read-string "Connect to which server? " " " int-to-string prefix-numeric-value "At port (default 6667): "] 7)) (byte-code "Ĉ	\"	!!O	!!O
\"+ t?( != 
\": ҂; R!*" [current-prefix-arg server name port nil string-match "^\\s *\\(\\S *\\)\\s *\\([0-9]*\\).*$" match-beginning 1 match-end 2 string= "" call-interactively irc-do-connect irc-send "CONNECT " " " "6667"] 14))

(defun irc-do-kill (user) "\
Usage: /KILL user

Forcibly remove a user from IRC.  ``user'' must be specified exactly as the
nickname for the user to be removed appears; no nickname expansion is done.
This command is reserved for IRC Operators." (interactive "sNuke which user? ") (byte-code "\" P!" [user nil string= "" irc-send "KILL "] 4))

(defun irc-do-rehash (&optional cruft) "\
Usage: /REHASH

Force the server to which you are connected to reread its irc.conf file.
Arguments are ignored.  This command is only available to IRC Operators." (interactive) (byte-code "!" [nil irc-send "REHASH"] 2))

(defun irc-do-trace (server) "\
Usage: /TRACE [ server ]

Find the route from the server to which you are attached to 'server'; if the
server argument is not provided then the servers to which the current server
is directly connected are listed.  This command is only available to IRC
Operators." (interactive (byte-code "
 ! C" [current-prefix-arg read-string "Trace route to which server? " ""] 2)) (byte-code "	\"	!!OP!t !" [current-prefix-arg server nil string-match "^\\s *\\(\\S *\\).*$" irc-send "TRACE " match-beginning 1 match-end irc-notice ""] 8))

(defun irc-do-wall (msg) "\
Usage: /WALL message

Send 'message' to everyone on IRC.  This can only be done by IRC Operators." (interactive "sMessage for everyone: ") (byte-code "t? \" 	!  \"  P!" [msg irc-do-wall nil string= "" call-interactively string< irc-send "WALL "] 6))

(defun irc-do-send (slist) "\
Usage: /SEND [ sendlist | - ]

Set the default sendlist for IRC messages.  This is a comma separated list
of the intended recipient(s) of messages which do not have an explicit
sendlist.  '-' as an argument means to disable the default sendlist; every
message sent then must have an explicit recipient provided with the message.
Without any arguments this command just displays the current default sendlist.

Each item specified is checked to see whether you can send there; ambiguous
references to users are not allowed nor are channels which you are not on.
\"*\" is always allowed and means to send to the current channel.
If no item in the new list can be set then the sendlist is not changed." (interactive "sDefault recipient(s) for messages? ") (byte-code "È!\" É= !\"\"	3 	#P= \"= !
?I ![ 

GSO!#\"\")" [slist matches irc-default-to nil irc-nuke-whitespace string= "-" delq mapcar (lambda (arg) (byte-code "	
\"
\" 
b 
\"! !Âb 
!!?> 
\"5 
; 
\"Âb GUJ @b =T 
b 
#\"#Ç" [matches irc-wholist arg nil irc-channel t irc-check-list string= "*" "0" irc-notice "You can't send to channel 0." zerop string-to-int "You are not on channel %s." 1 "Ambiguous recipient \"%s\"; could be %s." irc-subst-comma mapconcat eval ", " "or"] 16)) irc-burst-comma mapconcat eval "," ";" "" irc-notice "(no matches -- sendlist not changed)" "Your default sendlist is disabled." irc-insert "You are sending to %s." irc-subst-comma 0 ", " "and"] 18))

(defun irc-do-notify (notify) "\
Usage: /NOTIFY [ [+]event | -event ] [...]

Set the list of events to notify you about with a message.  Notification
is a one-line message inserted when someone causes that event to occur.
Events are added with +event or simply event; they are removed with -event.
+ adds all supported events and - removes all supported events.  More than
one event can be specified in the arguments.  In case of conflict, the argument
which appears later overrides the argument with which it conflicts.

Currently supported by /NOTIFY are the 'join', 'nick' and 'topic' events.
Join happens whenever someone enters or leaves a channel which you are on.
Nick occurs when someone changes nicknames; recognition of this event is
currently limited to when the person making the change is on the same channel.
Topic is the result of someone changing the topic of the channel you are on." (interactive "sNotify for events: ") (byte-code "ƈ!\" \"O!O
\"
!!O\"
!!O\"O ƂW 	\"\"@\"b l Ɖ \"z 	 ? \"  \" >? B   #\"\" !-" [notify recog str sym off event nil irc-notifies t irc-nuke-whitespace (join nick topic) string< "" 0 string-match "\\s +\\|$" match-end "^\\([-+]?\\)\\(.*\\)$" string= "-" match-beginning 1 2 delq mapcar (lambda (arg) (byte-code "!P	!\" 	" [event arg string-match "^" regexp-quote prin1-to-string] 5)) irc-notice "Notify: Unknown argument '%s'." "Notification is currently enabled for %s." irc-subst-comma mapconcat prin1-to-string ", " "and" "Notification is currently disabled."] 24))

(defun irc-do-confirm (str) "\
Usage: /CONFIRM [ + | - ]

Turn on message confirmation with + or off with -.  Any other arguments or no
arguments just gives a message about the current setting.

Message confirmation is a line indicating to whom a message was sent.
Occasionally this will say that a message has been sent to someone who
was not present but another message soon after will set the record straight." (interactive "sSet confimation on (+) or off (-)? ") (byte-code "È\"!!O\" ) \") É	4 ΂5 \"" [str irc-confirm t nil string-match "^\\s *\\(\\S *\\).*$" match-beginning 1 match-end string= "+" "-" irc-notice "Message confirmation is %s." "on" "off"] 8))

(defun irc-do-ignore (user) "\
Usage: /IGNORE user

Ignore another user on IRC.  Any events by this person (except for WALL)
are not displayed.  With no arguments a list of all currently ignored people.

IRC-mode will track the ignored user across nickname changes if it notices the
change.  If the user sends either a private message or an invitation to you
while being ignored a message will be sent to that person saying \"You are
being ignored.\"  To undo this command, use /UNIGNORE." (interactive (byte-code "" [("")] 1)) (byte-code "t \"? \"\"4 	. 	#\"\"1 !> \"#" [user irc-ignores nil string= "" irc-read-user "Ignore which user? " irc-notice "You are currently ignoring %s." irc-subst-comma mapconcat eval ", " "and" "You are not ignoring anyone." "You are now ignoring %s." irc-maintain-list add] 12))

(defun irc-do-unignore (user) "\
Usage: /UNIGNORE user | + | -

Stop ignoring a user who has been /IGNOREd.  The special arguments + or -
mean to stop ignoring everyone who is being ignored." (interactive (byte-code "" [("")] 1)) (byte-code "? !; 	\" !; 	#	\"1 ; 	\"	#" [irc-ignores user nil irc-notice "You are not ignoring anyone." string-match "^\\s *\\([-+]\\)\\(\\s |$\\)" "You are no longer ignoring anyone." irc-read-user "Stop ignoring whom? " string= "" "You are no longer ignoring %s." irc-maintain-list remove] 10))

(defun irc-do-signal (sigs) "\
Usage: /SIGNAL [ + | - | [+]event | -event ] [...]

Set the events which will get signals (aks bells or dings) when they
occur.  Events supported are:

  private -- private messages      join   -- channel changes
  public  -- public messages       topic  -- channel topic changes
  wall    -- broadcast messages    nick   -- nickname changes
  invite  -- invitations

Without any arguments /SIGNAL simply prints a message about what signals
are currently enabled.  With event or +event turn on all signalling for that
event.  Remove all signals for an event with -event.  /SIGNAL + or /SIGNAL -
adds or removes all signals respectively.  Multiple arguments are accepted;
later ones take precedence over the ones which came before them.  For example,
'/SIGNAL - +w +i' would turn off all signals and then turn on signalling only
for wall messages and invitations." (interactive "sSet signal: ") (byte-code "ǈ!\" \"O!O
\"
!!O\"
!!O\"T ǂ\\ 	\"\"@\"h u 	\" \" 	\" ? \"  \"\" \"\" 	\"\" #\"Q! !." [sigs recog str sym on off event nil irc-signals t irc-nuke-whitespace (private public wall invite join nick topic) string< "" 0 string-match "\\s +\\|$" match-end "^\\([-+]?\\)\\(.*\\)$" string= "-" match-beginning 1 2 delq mapcar (lambda (arg) (byte-code "!P	!\" 	" [event arg string-match "^" regexp-quote prin1-to-string] 5)) list (lambda (arg) (byte-code "D" [arg t] 2)) irc-notice "Signal: Unknown argument '%s'." setcdr assoc (t) (lambda (arg) (byte-code "	\"8= " [arg irc-signals t 1 assoc] 4)) "Signalling is enabled for " irc-subst-comma mapconcat prin1-to-string ", " "and" "." "All signalling is currently disabled."] 31))

(defun irc-do-stamp (stamp) "\
Usage: /STAMP [ + | - | [+]event | -event | interval ] [...]

Set time-stamping for IRC.  + means to turn it on for all messages from users
and - means to turn it off for them.  +event or just event will turn it on for
that class of message and -event means to disable it for those messages.  An
integer interval means to insert a message indicating the time every N minutes,
where N is the interval.  With no arguments simply insert a message indicating
the current time-stamps.

The current time in HH:MM format can appear two different ways in IRC.  One is
to have it associate with 'event'; two events, 'private' and 'public' messages,
are supported this way.  The other is to have it as a stand-alone message
indicating the current time.  Both can be very useful in noting when someone
actually sent you a message or when another event happened if you happen to be
away for a while.  The accuracy of the interval timer is currently limited to
0-2 minutes beyond the interval if display-time is not running; accuracy is
greatly improved if it is.  It can be turned off by setting the interval to 0." (interactive "sSet time-stamp: ") (byte-code "ň!\" \"O!O	\"	!!O\"	!!O\"M łx !P\"\\ قx !P\"k ۂx !@!x !@\"  ŉ \" ǉ 
? \" 
! 
  
=  C\"@ ? 
 = 
=  ŉ ,=?!!!˂' \"#" [stamp str sym event off nil irc-message-stamp t irc-time-stamp irc-nuke-whitespace string< "" 0 string-match "\\s +\\|$" match-end "^\\([-+]?\\)\\(.*\\)$" string= "-" match-beginning 1 2 "^" regexp-quote "private" private "public" public natnump read-from-string irc-notice "Stamp: Unknown argument '%s'." delq (private public) "%s messages get time-stamps.%s" "Private and public" "No" capitalize prin1-to-string zerop irc-normalise-time-stamp format "  The time interval is %d minutes."] 33))

(defun irc-do-alias (alias) "\
Usage: /ALIAS [ alias [ command [ args for command ]]]

Allow 'alias' to be equivalent to 'command'.
For example, \"/ALIAS tf time tut.fi\" will make typing \"/tf\" be equivalent
to having issued the command \"/time tut.fi\".  Aliases can only be made
to existing commands not other aliases.  They are also only recognized when
in the command name position of a line.  If given with no arguments then
all aliases are displayed; if given with just an alias name then the alias
with that name will be shown.  Aliases can be removed with /UNALIAS." (interactive "sName for alias? ") (byte-code "ˈt \"!Q!\"!!O!!!O!!!O	\"b ^ @@@A#AH ) 
\" 	\"} @A# 	\") 	 
\"\"
#? 	? 	\"
#G\"  
#\"# 
\" 	@!\" ڂ Q#		\"A#," [alias new cmd arg match aliases irc-alias-alist t irc-command-alist irc-operator irc-operator-alist nil " " read-string format "Alias '%s' to which command? " irc-nuke-whitespace string-match "^/?\\(\\S *\\)\\s */?\\(\\S *\\)\\s *\\(.*\\)$" upcase match-beginning 1 match-end 2 3 string= "" irc-notice "\"/%s\" is aliased to \"/%s\"." assoc "\"/%s\" is not aliased." irc-check-list mapcar car append start-only /= "'/%s' is an ambiguous command.  Could be %s." irc-subst-comma mapconcat eval ", " "or" "Command not found: '/%s'." irc-change-alias downcase add "\"/%s\" has been aliased to \"/%s\"."] 37))

(defun irc-do-unalias (alias) "\
Usage: /UNALIAS alias

Remove the 'alias' for a command." (interactive (byte-code "
B$C)" [completion-ignore-case t irc-alias-alist nil completing-read "Unalias which command? " ("" . "")] 5)) (byte-code "È\"!!O\"$ t?! !` 
\"#G\"S J !#\"#P !\"_ @#@\")" [completion-ignore-case t irc-alias-alist nil alias match string-match "^\\s *\\(\\S *\\)\\s *$" match-beginning 1 match-end string= "" call-interactively irc-do-unalias irc-check-list mapcar car /= irc-notice "'%s' is an ambiguous alias.  Could be %s." upcase irc-subst-comma mapconcat eval ", " "or" "No alias found to match '%s'." irc-change-alias remove "'%s' is no longer aliased."] 18))

(defun irc-do-help (topic) "\
Usage: /HELP topic

Get the documentation for 'command'.  If no command is given then a list
of the possible topics is shown.  Note that commands for IRC Operators will
not appear in the help topics when not an IRC Operator." (interactive "sHelp for which command? ") (byte-code "Ȉ\"!!O\"f # \"\"
[ 	
8
88 
8? 
8F 
8M &P
\"' ܐ	!* p \"\"#? ? \"#G\"  !#\"# !\" @ܐ\"  \"AP!!!)" [topic str topics irc-command-alist irc-operator irc-operator-alist match t nil string-match "^\\s *\\(\\S *\\)\\s *$" match-beginning 1 match-end string= "" "Help is available for the following IRC-mode commands:
" mapcar car append format "
%14s%14s%14s%14s%14s" 0 2 3 4 nthcdr 5 "*Help*" princ irc-check-list start-only /= irc-notice "Ambiguous help topic '%s'; could be %s." upcase irc-subst-comma mapconcat eval ", " "or" "No help is available for '%s'." documentation intern-soft "irc-do-" assoc] 31))

(defun irc-truncate-buffer (size) (byte-code " # W 6 dZb `
W. `T\"5 p!#)" [size nil irc-mark * 1024 1023 8 buffer-size end-of-line delete-region 1 message "Warning: %s exceeding %s characters.  Couldn't truncate." buffer-name] 9))

(defun irc-display (buffer &optional force) (byte-code " \"		?_ 
! !qp
=4 `EBp=N  `YBBO 
\"
	= GU @@!GUz `W	 q \" \"@! GS8@!؉   GU ĉ	  !  \"V ĉ	 !!!!؉	!V ؉  \"Z\"! \"F=1`W=b \" F!!.	" [begin start next pop-up-windows t ircwins allwins done scroll split major-mode irc-mark buffer irc-pop-ratio force nil selected-window next-window no-mini select-window window-buffer irc-mode 1 rassq jump-max get-largest-window window-height / screen-height 2 display-buffer get-buffer-window natnump split-window other-window set-window-buffer set-window-start 0 pos-visible-in-window-p recenter -1] 35))

(defun irc-check-time nil (byte-code " 
O!O!! ł] 
\"& ł] 	W1 ͂2 \\	Z\\ZWN ł] \\\" +" [time old-minute irc-last-time new-minute irc-time-stamp nil irc-total-time irc-last-stamp irc-get-time string-to-int 3 zerop string= 60 0 irc-notice "*** It is now %s ***" irc-wrap-display-time] 8))

(defun irc-wrap-display-time nil "\
Set up a wrapper around the display-time-filter to hopefully provide a
little better accuracy for the time stamps." (byte-code "!
 !? KMM" [fboundp display-time-filter original-display-time-filter (lambda (proc str) "
The filter for the display-time-process.  This function has been modified
for IRC-mode to call irc-check-time before calling the original
display-time-filter." (byte-code "
	$ 	@!! q )	A *)\"" [buf procs irc-processes proc str nil buffer-name process-buffer irc-check-time original-display-time-filter] 6))] 4))

(defun irc-read-passwd (&optional prompt) (byte-code " \"rU U?W U) U> GV; GSOE !PS G\"P! _ !," [passwd echo-keystrokes cursor-in-echo-area t char prompt "" 0 nil message "%s" 13 10 8 127 char-to-string make-string 42] 8))

(defun irc-read-user (prompt user &optional list) (byte-code "\"!!O  ? \"3 ?: \"\"?K GWW \"W `  \"n тr Q	#\"%$  #@ -" [user completion-ignore-case t list irc-wholist done null-okay match irc-noglob prompt nil string-match "^\\s *\\(\\S *\\)" match-beginning 1 match-end string< "" irc-check-list string= 2 completing-read format "%s%s" "'" "' is ambiguous.  " mapcar irc-maintain-list add] 17))

(defun irc-nuke-whitespace (str) (byte-code "\"!\"O" [str string-match "^\\s *" match-end 0 "\\s *$"] 7))

(defun irc-subst-comma (str newsep) (byte-code "\" !O	!TOR " [str newsep string-match ", [^,]*$" 0 match-beginning " " nil] 9))

(defun irc-get-time nil (byte-code " O" [current-time-string 11 16] 4))

(defun irc-toggle-glob (arg) "\
Toggle globbing.  With positive ARG, enable globbing.  Negative disables.
ARG is the prefix argument when called interactively." (interactive "P") (byte-code "	 !! !  	?	) Ȃ* \"" [arg irc-noglob nil prefix-numeric-value natnump integerp message "IRC-mode globbing is now %s." "disabled" "enabled"] 7))

(defun irc-raw-mode (arg) "\
Toggle IRC raw mode.
This displays low level interaction between the client and the server and is
very useful when debugging a problem.  With prefix argument ARG positive, turn
it on; negative ARG means disable it.  With ARG of zero, turn on a similar
mode, \"Full\" mode.  When this latter is enabled then the server messages will
still be handed through the filters, otherwise they are not.  The ``This is
a bug'' messages are disabled when either mode is on.   No argument means to
toggle either mode off if enabled, or to turn on raw." (interactive "P") (byte-code "	 !! ł. ! ǂ. !( . 	?. ǉ !" [arg irc-raw-mode nil prefix-numeric-value zerop " Full" natnump " Raw" integerp set-buffer-modified-p buffer-modified-p] 7))

(defun irc-change-alias (alias cmd add) "\
Modify ALIAS for CMD in the irc-alias-alist.  ADD non-nil means to put the
alias in the list, nil (or the symbol `remove') means to clear it.  This
function does no hand-holding like /ALIAS; its intended use is in
irc-mode-hook." (byte-code "	!
\"? = 
\"/ & \"/ 	!B
B)" [entry alias irc-alias-alist add cmd assoc upcase remove delq setcdr] 7))

(defun irc-signal (user event) (byte-code "	
\"A> # 
\"A#)" [signal event irc-signals t user assoc member-general string=] 7))

(defun irc-check-list (list item &optional start-only) (byte-code "!\"\" 8 \"\"( 8 1 Ă8 \"\"+" [return case-fold-search t item nil list start-only regexp-quote delq mapcar (lambda (arg) (byte-code "Q	\" 	" [item arg string-match "^" "$"] 4)) (lambda (arg) (byte-code "P	\"
 	" [item arg string-match "^"] 3)) (lambda (arg) (byte-code "P	\"
 	" [item arg string-match "."] 3))] 10))

(defun irc-maintain-list (list item func) (byte-code ">D 	
!# ÂA 
!\"\"8 
@#A! 
	
!BL*U >U 

!\"\"L" [func item list nil case-fold-search t old (add t) member-general eval string= delq mapcar (lambda (arg) (byte-code "!Q	\" 	" [item arg string-match "^" regexp-quote "$"] 5)) irc-maintain-list remove (remove nil) (lambda (arg) (byte-code "	\"  	" [item arg nil string=] 3))] 14))

(defun irc-burst-comma (str) (byte-code "\"
#1 
!O\"?' 	B! G
\"C 
OBD +" [list sub beg str nil 0 string-match "" ",+\\|\\s +\\|,+\\s +" string= match-beginning match-end /=] 9))

(defun member-general (x l comparison) "\
Is X a member of L under COMPARISON?" (byte-code "
  
@#?
! ?)" [not-found t l comparison x funcall cdr-safe] 5))

(defun minibuffer-message (format &rest args) "\
Print a temporary message at the end of the Minibuffer.
After 2 seconds or when a key is typed, erase it." (byte-code " ! 	#.  SQqʎdb	#c!)))" [format args p zerop minibuffer-depth apply message nil " *Minibuf-" "*" ((byte-code "d\"" [p delete-region] 3)) sit-for 2] 8))

(defun irc-finger (who) "\
Display information about users." (interactive "sFinger: ") (byte-code "?  \"? P Ǐ" [who nil "@localhost" string-match "@" FINGER (byte-code "p		\"TO$\"\"	!OP\")" [stream who open-network-stream "finger" string-match "@" nil set-process-filter irc-finger-filter set-process-sentinel ignore send-string 0 match-beginning "
"] 10) ((error (byte-code "\"" [who irc-notice "Couldn't finger %s."] 3)))] 5))

(defun irc-find-to (str &optional explicit) (byte-code "	\" 
 Â 	!O# 
\" Ă# )" [matched str explicit t nil irc-default-to string-match "^[A-Za-z0-9-_|{,*]*[;:]" 0 match-end] 5))

(defun irc-find-message (string) (byte-code "!GO" [string irc-find-to nil] 4))

(defun irc-normalise-time-stamp nil (byte-code "	O!! ǂ& 
\\W$ 
\\ 
" [irc-total-time irc-last-time irc-last-stamp irc-time-stamp string-to-int 3 nil 0 zerop] 5))

(defun irc-add-to-hist (list str) (byte-code "	C!\"L!G
V !!A!L" [list str irc-max-history append eval reverse] 8))

(defun irc-fetch-history (list index order) (byte-code "
!!!( 8  
L% #r ?0 =X 	U@ \"U 
	SL	!O тS 	S8r 	TGYg \"r 
	TL	T8?| ǂ db\"cb+" [str eind index elist list order t nil irc-mark eval numberp message "No entry %d in %s." next -1 "No next entry in %s." zerop "" "No previous entry in %s." delete-region] 10))

(defun irc-message-prev (arg) "\
Select the previous message in the IRC history list.  ARG means
select that message out of the list (0 is the first)." (interactive "P") (byte-code "
 #" [arg nil irc-fetch-history irc-message-history irc-message-index prev] 4))

(defun irc-message-next (arg) "\
Select the next message in the IRC history list.  With prefix ARG
select that message out of the list (same as irc-message-prev if
called with a prefix arg)." (interactive "P") (byte-code "
 #" [arg nil irc-fetch-history irc-message-history irc-message-index next] 4))

(defun irc-command-prev (arg) "\
Select the previous command in the IRC history list.  ARG means
select that message out of the list (0 is the first)." (interactive "P") (byte-code "
 #" [arg nil irc-fetch-history irc-command-history irc-command-index prev] 4))

(defun irc-command-next (arg) "\
Select the next command in the IRC history list.  With prefix ARG
select that command out of the list (same as irc-command-prev if
called with a prefix arg)." (interactive "P") (byte-code "
 #" [arg nil irc-fetch-history irc-command-history irc-command-index next] 4))

(defun irc-kill-input nil "\
Delete the input region and start out fresh.  This function is recommended
over any other way of killing the input-region interactively because it
also resets the index for the history list." (interactive) (byte-code "Èdb\"ŉ" [irc-mark irc-message-index irc-command-index nil delete-region -1] 3))

(defun irc-history-menu (arg) "\
List in another buffer the history kept by irc-mode.  The history of
messages is shown by default, but a prefix argument means to show the
command history instead." (interactive "P") (byte-code "ǈ  !q  6 
@#cA
T 
!? c!eb)!+" [pop-up-windows t line hist arg irc-command-history irc-message-history nil 0 get-buffer-create "*IRC History*" fundamental-mode erase-buffer format "%2d: %s
" zerop "No messages have been sent to IRC yet." set-buffer-modified-p display-buffer] 8))
