21 Maret 2008

2.9 Sample .ircrc

2.9 Sample .ircrc
As a sample, here's part of my .ircrc file. Since ircII2.2, this file can be found in the "script" directory, and loaded with "/load ircprimer"

# Sample .ircrc script, from the IRCprimer v1.1
# -------------------------------------------------------------------
# IRCII sample configuration file (~/.ircrc) (Nicolas Pioch)
# -------------------------------------------------------------------
# The aim of this file is to shorten all useful commands to 1 letter.

set NOVICE off
set INPUT_ALIASES off
set AUTO_WHOWAS on
set SHOW_CHANNEL_NAMES on
set SHOW_AWAY_ONCE on

# Speeds up ircII display 2 times
set SCROLL_LINES 2

# Put Hack notices down under
on ^SERVER_NOTICE "\*\*\* Notice -- Hack: *" set status_user Hack: $4-

# Modified killpath script from YeggMan
ALIAS kpath ECHO ### Last received KILL for $nkp.path
@ nkp.path = []
ALIAS nkp.msg ECHO ### $Z -- KILL by $1 for $0 $2-
ALIAS nkp.idx @ FUNCTION_RETURN = RINDEX(! $0) + 1
ALIAS nkp.srv @ FUNCTION_RETURN = INDEX(. $MID($nkp.idx($0) 512 $0))
ON ^SERVER_NOTICE "\*\*\* Notice -- Received KILL*" {
# if (index(. $mid(${rindex(! $11) +1} 512 $11))
IF ( nkp.srv($11) > -1 )
{ nkp.msg $7 $9 }
{ nkp.msg $7 $9 $12- }
@ nkp.path = [$7-]
}

# Function to strip the less significant part of an internet hostname
# $userdomain(username@host.subdomain.dom) returns username@subdomain.dom
# This eliminates the hostname which may change frequently
alias userdomain {
@ function_return = LEFT($INDEX(@ $0) $0)##[@]##MID(${1+INDEX(. $0)} 99 $0)
}

# Who is that ?
on ^msg * echo *$0!$userdomain($userhost())* $1-

# /w [] get info on someone
# /q [] query someone
# /m send a message
# /n send a notice
# /r reply to last message I got
# /a followup on my last message

alias w whois
alias q query
alias m msg
alias n notice
alias r msg $,
alias a msg $.

# /j join a channel
# /l list people in a channel
# /ll list in the current channel
# /i [] invite someone
# /hop leave the current channel

alias j join
alias l who
alias ll who *
alias i invite
alias hop part $C

# /o [ ] give channel op status
# /d [ ] remove channel op status
# /k kick someone
# /mo [+|-] change current channel mode

alias o mode $C +ooo
alias d mode $C -ooo
alias k kick $C
alias mo mode $C

# the "wrong person" alias! /oops to resend message to
alias oops {
@ _whoops = [$B]
msg $. Whooops ! Please ignore, that wasn't meant for you.
msg $0 $_whoops
}

alias unset set -$*
alias unalias alias -$*
alias NickServ msg NickServ@Service.de
alias NoteServ msg NoteServ@Service.de

# -------------------------------------------------------------------

0 komentar: