# This is my .ircrc, put here as an example. This used to be the fnet
# updated for 2.2.2
# script.
#
#		- Troy
# for ircII2.2   the tabkey script is needed in conjunction with this script.

set NOVICE off
window level NOTICE,MSG
alias -join
alias -channel
set suppress_server_motd on
set command_mode off
set show_channel_names off
set hold_mode on
alias 437 set TRANSLATION CP437
alias ASC set TRANSLATION ASCII
alias return @ function_return = [$*]
alias GRP2CHAN {
	if ( [A] > [$0] )
		{ return $0 }
		{ return #$0 }
}
alias CHAN2GRP {
	if ( [#] != [$[1]0] )
		{ return $0 }
		{ return $MID(1 512 $0) }
}
alias M {
	if ( RMATCH($0 $TROY.BIGMOUTHS) )
		{ MSG $0 Copyright 1992 $NAME: $1- }
		{ MSG $* }
}
@ TROY.BIGMOUTHS = [Waftam Ireshi]
alias Q QUIT $()
alias HERE WHO * $()
alias ! EXEC $*
alias DISPLAY LASTLOG $*
alias SC MSG $GRP2CHAN($0) $1-
alias BOOT KICK $C $*
alias STATUS STATUS_$0
bind ^W QUOTE_CHARACTER
alias GROUP channel $GRP2CHAN($0)
set CLOCK off
set CONTINUED_LINE       
set SCROLL on
set STATUS_QUERY (Q:%Q)
set STATUS_DQUERY (D:%D)
set STATUS_MAIL (M:%M)
set STATUS_CHANNEL %C
set STATUS_NOTIFY (A:%F)
set STATUS_AWAY (G)
set STATUS_FORMAT *%R* %H%N%*%#%S%B %@%C%+%Q%D %A%M%F%T%W ***
alias w names -min 2
on ^TOPIC * echo [Status] $0 has changed the topic on channel $1 to "$2-"
load columns
^set display off
load ~/irc/connects
^set display off
on ^KICK * doonkick $*
on ^SEND_NOTICE * :
#
# The following are channels which regularly exist and are in foreign
# languages. Mask them out completely  - they cause the /w list to be
# too cluttered without telling you anything useful.
#
on ^NAMES #T.P.D : $()
on ^NAMES +Nippon : $()
on ^NAMES 42 : $()
on ^NAMES #Nippon : $()
on ^NAMES #* : $()
on ^NAMES #fj.* : $()

# Mask out these things too - Twilight_Zone status messages aren't
# really useful

on ^join "* #Twilight_Zone" :
on ^leave "* #Twilight_Zone" :
on ^mode "* #Twilight_Zone" :
on ^channel_nick #Twilight_Zone :
on ^channel_signoff #Twilight_Zone :

# window new channel #Twilight_Zone level WALLOPS,OPNOTE,WALLS hide

on ^INVITE * echo    [Invite] $0 has invited you to join group $CHAN2GRP($1)
on ^NOTIFY_SIGNON * echo       [Spy] $0 has signed on <$STIME($TIME())>
on ^NOTIFY_SIGNOFF * echo       [Spy] $0 has signed off <$STIME($TIME())>
on ^NOTIFY_CHANGE * echo       [Spy] $0 has changed groups to $CHAN2GRP($1) <$STIME($TIME())>
on ^LEAVE * DO_LEAVE $*
on ^JOIN * DO_JOIN $*
alias DO_JOIN {
	if ( [$0] == N )
		{ echo    [Change] You are now in group $CHAN2GRP($1) }
		{ echo    [Status] $0 \($USERHOST()) has entered group $CHAN2GRP($1) }
}
alias DO_LEAVE {
	if ( [$0] == N )
		{ echo    [Change] You have left group $CHAN2GRP($1) }
		{ echo    [Status] $0 has left group $CHAN2GRP($1) }
}
alias DOonKICK {
	if ( [$0] == N )
		{ echo    [Change] You have been forcibly removed from group $CHAN2GRP($2) by $1 }
		{ echo    [Status] $0 has been forcibly removed from group $CHAN2GRP($2) by $1 }
on ^SIGNOFF * echo   [Signoff] $0 has signed off \($1-)
on ^CHANNEL_SIGNoff * echo   [Signoff] $1 has signed off group $CHAN2GRP($0) \($2-)
}
on ^NICKNAME * echo      [Nick] $0 has changed his or her nickname to $1
on ^CHANNEL_NICK * echo      [Nick] $1 has changed his or her nickname to $2 on group $CHAN2GRP($0)
on ^MODE * echo      [Mode] for $CHAN2GRP($1) changed \($2-) by $0
on ^IDLE 60 away Long gone, by the looks of things
alias PASS MODE $C +o $0
set LASTLOG_LEVEL ALL -CRAP
set HISTORY 20
set LASTLOG 250

# This has been revised. Now, instead of rotating the list on tab,
# it seeks through the list. If an entry is used, it is removed from
# its old position and placed at the head of the list. Thus if you
# are currently talking to just two people, it cycles between them
# without having to go back through the entire list.
#
# This has been changed to just load the 'tabkey' script.
load tabkey

alias HList nicklist

alias NickServ msg NickServ@Service.de $*
alias NoteServ msg NoteServ@Service.de $*
set SHOW_NUMERICS on
# 311 312 313 314 316 317 318 319 353 401 changed for 2.2.2 (server == $0)
on ^481 * echo [Error] You are not moderator of group $CHAN2GRP($1)
on ^403 * echo [Error] There is no group $CHAN2GRP($1)
on ^421 * comm
on ^391 * echo [Info] Date at $0 is $2-
on ^442 * echo [Error] $1 is not in group $CHAN2GRP($0)
on ^401 * echo [Error] $1: No such nickname
on ^311 * echo [Info] $1 is $2@$3 \($5-) on group $CHAN2GRP($4)
on ^312 * echo [Info] Connected to $1 \($2-)
on ^317 * echo [Info] Last command: $2-6
on ^314 * echo [Info] $1 was $2@$3 \($5-)
on ^313 * echo [Info] $1 is an IRC god
on ^316 * echo [Info] $1 is a group moderator
on ^341 * echo    [Invite] Invitation message sent to $0
on ^332 * echo     [Topic] The topic is "$1-"
on ^324 * echo      [Mode] Group mode on $CHAN2GRP($1) is $2-
on ^406 * echo [Error] There was no $1
on ^301 * echo [Info] $0 is away \($1-)
on ^315 "* * End * /WHO *" :
on ^473 * echo [Error] $CHAN2GRP($1): You must have an invitation to enter a restricted group
# The following is now set up as a default because there are people
# on IRC who will attempt to get around a /ignore (IRC's /hush).
# This makes life difficult for such antisocial creatures by neglecting
# to tell them that they are IGNOREd.

set SEND_IGNORE_MSG off

# The following alias allows you to send a message to a user and WALLOPS at
# the same time. It formats the messages in such a way as to inform each
# side that the message has been sent to the other.

alias mw msg $0 !! $1-;wallops -> *$0* $1-

# Some binds to make IRC windows look like screen windows
bind meta2-1 PARSE_COMMAND window SWAP 1
bind meta2-2 PARSE_COMMAND window SWAP 2
bind meta2-3 PARSE_COMMAND window SWAP 3
bind meta2-4 PARSE_COMMAND window SWAP 4
bind meta2-5 PARSE_COMMAND window SWAP 5
bind meta2-6 PARSE_COMMAND window SWAP 6
bind meta2-7 PARSE_COMMAND window SWAP 7
bind meta2-8 PARSE_COMMAND window SWAP 8
bind meta2-9 PARSE_COMMAND window SWAP 9
bind meta2-0 PARSE_COMMAND window SWAP 10
bind meta2-^C PARSE_COMMAND window NEW HIDE_OTHERS
bind meta2-^W PARSE_COMMAND window LIST
bind meta2-^M PARSE_COMMAND window NOTIFY
bind meta2-^L REFRESH_SCREEN
bind meta2-, PARSE_COMMAND input "Window to preview: " window SHOW $*
bind meta2-^H PARSE_COMMAND set LOG TOGGLE
bind meta2-. PARSE_COMMAND window HIDE

# And some to give me cursor keys

bind meta3-A BACKWARD_HISTORY
bind meta3-B FORWARD_HISTORY
bind meta3-C FORWARD_CHARACTER
bind meta3-D BACKWARD_CHARACTER
bind meta3-H BEGINNING_OF_LINE
bind meta3-K END_OF_LINE
bind meta3-O meta3

# And the function keys on my terminal at home

bind meta3-P SCROLL_BACKWARD
bind meta3-Q SCROLL_FORWARD
bind meta3-R SCROLL_END
bind meta3-S PARSE_COMMAND input "Join Channel: " JOIN $*

bind meta3-T PARSE_COMMAND INPUT "Kick who: " KICK $C $*
bind meta3-U PARSE_COMMAND INPUT "Send to: " "Filename" DCC SEND $*

on ^SERVER_NOTICE "% \*\*\* Notice -- Received KILL *" echo [KILL] $7 by $MID($RINDEX(+! $9) 512 $9) $10- 
on ^SERVER_NOTICE "% \*\*\* Notice -- Received KILL % % % % % Path: *" echo [KILL] $7 by $MID($RINDEX(+! $11) 512 $11) $12- 
on ^SERVER_NOTICE "% \*\*\* Notice -- Hack: *"
on ^DISCONNECT * server 0
set MAIL 2
# End of user inserted commands
#
