Home
|
UNIX
|
Practical
The original terminal IRC client : ircII
The first IRC client may be fun to experience, beside idling with irssi. Note the autoop feature which eventually makes ircII act like a bot. Here's a few tweeking hints,
vi ~/.ircrc
For example,
#set display off
nick YOUR_NICKNAME
msg nickserv identify YOUR_NICKSERV_PASSWORD
#sleep 1
join #YOUR_DEFAULT_CHANNEL
#set display on
alias c clear
alias j join
alias p leave
alias m msg
alias , msg ,
alias . msg .
alias q query
load events
load msg
load commander
load alias
set novice off
set beep off
set beep_max 0
set continued_line
set scroll_lines 1
set log on
set suppress_server_motd on
set auto_whowas on
set auto_away off
set show_away_once off
set auto_unmark_away on
set show_channel_names on
set show_status_all on
set status_user ircII
#set status_format %M %@%*%N %C %R %W %+ %Q %I %I %S %F %O %A %T %H %# %B %>%Uv%V
set verbose_ctcp on
set clock_24hour on
set indent on
set insert_mode on
set realname YOUR_REALNAME
set user_information YOUR_USERINFO
set history_file ~/IrcHistory
set dcc_store_path ~/
set contiuned_line
set lastlog 1000
set lastlog_level ALL -CRAP
window level ALL log on logfile ~/.irclogs.status name Status scroll on hide
window new level MSG log on logfile ~/.irclogs.messages name msgs scroll on hide
window new level NONE log on logfile ~/irclogs.win3 name win3 scroll on channel #YOUR_DEFAULT_CHANNEL hide
#window new level NONE log on logfile ~/irclogs.win3 name win3 scroll on channel #ircII channel #Pine channel #YOUR_DEFAULT_CHANNEL hide
window new level NONE log on logfile ~/irclogs.win4 name win4 scroll on hide
window new level NONE log on logfile ~/irclogs.win5 name win5 scroll on hide
#window new level NONE log on logfile ~/irclogs.win6 name win6 scroll on hide
#window new level NONE log on logfile ~/irclogs.win7 name win7 scroll on hide
#window new level NONE log on logfile ~/irclogs.win8 name win8 scroll on hide
#window new level NONE log on logfile ~/irclogs.win9 name win9 scroll on hide
window swap 3
#bind ^g help_caracter
bind ^f forward_caracter
bind ^b backward_caracter
bind ^p previous_window
bind ^n next_window
bind ^a beginning_of_line
bind ^e end_of_line
bind ^v backward_history
bind ^y forward_history
##bind ^w WHEREIS
#bind ^l refresh_screen
#bind ^l clear_screen
#bind ^d delete_caracter
##bind ^^ MARK
#bind ^k erease_line
#bind ^u yank_from_cutbuffer
#bind ^i command_completion
##TODO nick_completion...
##bind ^j
##bind ^t
#bind ^C clear_screen
##bind ^r
#bind ^o parse_command window new level NONE log on logfile IrcLogs/new_window name New_window scroll on hide; window swap last
##bind ^x meta2_character
#bind ^h stop_screen
##bind ^x-x quote_caracter
#bind ^z stop_irc
#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
#parse_command window kill
# or "window delete"
# $eterna: times,v 1.5 2001/11/29 23:03:10 mrg Exp $
#
# prefix messages with the time
# this is our hook into the `columns' script.
assign ircii.loaded_times 1
on ^msg * echo $Z *$0* $1-
on ^send_msg * echo $Z -> *$0* $1-
on ^dcc * echo $Z =$0= $1-
on ^send_dcc * echo $Z -> =$0= $1-
on ^public * echo $Z <$0> $2-
on ^public_other * echo $Z <$0:$1> $2-
on ^send_public * echo $Z > $1-
# if we did this, we want to refresh it, with ircii.loaded_times=1
if (ircii.loaded_columns) {load columns}
# $eterna: flood,v 1.2 2001/08/12 15:57:11 mrg Exp $
#
# Activate flood protection
on ^flood *
on flood ^irciihelp
on flood ^nickserv
on flood ^noteserv
on flood ^msgserv
# $eterna: autoop,v 1.4 2002/01/22 02:46:44 mrg Exp $
#
# AutoOp by Ian Frechette 12-10-92
# Written for ircII2.2pre8 and beyond
# initial list of trusted chan ops..
# format is nickname!username@hostname wildcards can be used in
# any of the three fields
# in the following list the first name would autoop anyone with the
# nickname 'example_nick'
# the second example will autoop anyone with the username
# 'bob' coming from any machine in the .nocolorado.edu domain
eval if (op_list == []) {@ op_list = [*!*@*nethence.com *!*@*.club-internet.fr *!*@fortas.ktu.lt *!*@gorby.net1.nerim.net *!*@main.kbi.lt]}
# People will only be opped on the following channels..
# wildcards are allowed and thus just * means every channel. Use
# delchan to remove stuff from the list, addchan to add
eval if (chan_list == []) {@chan_list = [#Nethence #ircII #Pine]}
# Show the the people currently in the autoop list
alias showop
{
@ ao.tmp = 0
@ ao.name = []
echo *** AutoOp list. Addop nick!user@host to add. Delop to remove
echo *** nickname!username@hostname
while (ao.name = word($ao.tmp $op_list)) {
echo *** $[5]ao.tmp $ao.name
@ao.tmp = ao.tmp + 1
}
}
# Just like showop but works with channels.
alias showchan
{
@ ao.tmp = 0
@ ao.name = []
echo *** AutoOp chan list. Addchan #channel add. Delchan to remove
echo *** #channel
while (ao.name = word($ao.tmp $chan_list)) {
echo *** $[5]ao.tmp $ao.name
@ao.tmp = ao.tmp + 1
}
}
# Given a number.. deletes that person from the autoop list..
# use SHOWOP to list.
alias delop {
if (!rmatch($0. *1* *2* *3* *4* *5* *6* *7* *8* *9* *0*))
{ echo *** Usage: delop ;echo *** See showop }
{ @ op_list = notword(${[$0] + 1} $op_list) }
}
# Given a number.. deletes that channel from the autoop channel list..
# use SHOWCHAN to list.
alias delchan {
if (!rmatch($0. *1* *2* *3* *4* *5* *6* *7* *8* *9* *0*))
{ echo *** Usage: delchan ;echo *** See showchan }
{ @ chan_list = notword(${[$0] + 1} $chan_list) }
}
# Add an autochanop to the list.
alias addop {
if ([$0])
{ @ op_list = op_list ## [ $0] }
{ echo *** Usage addop nick!username@host;echo *** wildcards are allowed }
}
# Add an autochanop channel to the list.
alias addchan {
if ([$0])
{ @ chan_list = chan_list ## [ $0] }
{ echo *** Usage addchan #channel;echo *** wildcards are allowed }
}
# the actual ON that does the work
on #-join 666 * {
if (rmatch($1 $chan_list))
{
if (rmatch($0!$userhost() $op_list) && ischanop($N $1))
{ timer ${10 + rand(10)} conditionalop $1 $0 }
}
}
alias conditionalop {
if (!ischanop($1 $0))
{
mode $0 +o $1
}
}
# The perfect complement to the $word() function.
# $notword(index words) returns words minus the indexed word.
# the special handling of nw.sep is to deal with the cases when
# the index points to the first or last word.
alias notword {
if ([$0] > 0)
{
if (([$0] > 1) && ([$0] < rmatch($~ $1-)))
{ @ nw.sep = [ ] }
{ @ nw.sep = [] }
@ function_return = [$(1-${[$0]-1})] ## [$nw.sep] ## [$(${[$0]+1}-)]
}
{
@ function_return = [$1-]
}
}
Links