#
# \|/ Welcome to PhoEniX Version 2.25 from Vassago \|/
# \|/ The ORIGINAL PHOENIX/GARGOYLE -*- Accept no Hacks or Substitutes \|/
# \|/ Release Date: 08/16/95 \|/
#
# This script works with all 2.2.9 and greater clients (at this point in
# time). It will not work on VMS or similar systems. 2.3.17 clients and
# variations thereof may cause irregular script behavior. AIX and similar
# systems may experience unusual results from the script /SAVE function.
#
# This script is NOT compatible with any other scripts, with the exception
# of the other files that are included with it and my extras, pkicks,
# annoy, VeveS, and Serpent scripts. I only guarantee PhoEniX to be
# backdoor free if you download it from my Public Domain FTP sites:
#
#
jcowan.reslife.okstate.edu - or -
unix.mclv.net
# (in directory /pub/irc/phoenix)
#
# If you have problems, delete your .ircrc and/or make sure you are
# untarring the tarfile (tar -xvf <filename>). If problems persist,
# get a fresh copy from my FTP site.
#
# - Vassago (Ryan Addams)
#
^set NOVICE OFF
^set EXEC_PROTECTION OFF
echo
.-------------------------------------------------------------------------.
EVAL echo | __________ /\\___ ________/\\_________/\\ .__ ___ ____ _____ |
EVAL echo | /_______ \\_ | \\::/ _____ ______ . \\| \\| | |/ / |
EVAL echo | .::| |/ / \\/ /| \\ ___|:/ \\ ` \\ |\\ | /::. |
EVAL echo | .::::| _____/ | \\ \\| \\ | \\ \\ \\ |/ _ \\::::. |
EVAL echo |::::::| |:\\_____| \\________/____ \\___\\ \\_|____| \\:::::.|
EVAL echo |::::::|
|:::::::|______/:::::::::::\\______/::|______/:::::|______\\:::::|
echo | : : (< MiSTRaL / PaRaLLaX >) |
echo | PhoEniX Version 2.25 by Vassago - Accept No Hacks or Substitutes! |
echo
|-------------------------------------------------------------------------|
EVAL echo | = Type /COMMANDS for a list of commands \(PHOENIX.HLP must be
loaded\). = |
echo | Get the latest version of PhoEniX! ftp to 139.78.232.29 or
204.95.95.2. |
echo | If you enjoy using PhoEniX, please register your copy with Vassago. |
echo | \|/ Type /ABOUT for more information on registering PhoEniX. \|/ |
echo | DO NOT use this script unless you get it directly from my FTP site!
|
echo
`-------------------------------------------------------------------------'
### Customizable Section
assign ex [E/X]
assign phoenix.ver Running PhoEniX v2.25 by Vassago
assign fingermsg Running PhoEniX v2.25 by Vassago
assign pingmsg Pong!
assign floodmsg You've triggered my script flood protection!
assign pk | PhoEniX |
assign abkickmsg | Auto BKick |
assign channel.floodmsg | Channel Flood |
assign nick.floodmsg | Nick Flood |
assign uban.kickmsg | User Ban |
assign ikey.kickmsg | Invalid Key |
assign igtypes MSGS CTCP NOTICES INVITES NOTES PUBLIC
assign defumes Be back in a few...
assign idlemes Automatically set away.
assign signmsg I'm outta here!
assign usermode +is-w
assign false_chars * * * * * * ** ** *;* * * * * *$$* * * * *
assign bogus_patterns *fuck* *shit* *suck* *dick* *penis* *cunt* *haha*
*fake* *split* *ass* *hehe* *bogus* *yawn* *leet*
# Sensor Settings (Flood/Mass Protection)
@ msgsensor = 6
@ noticesensor = 10
@ ctcpsensor = 4
@ nicksensor = 3
@ msensor = 2
@ ksensor = 3
@ dcclimit = 10
@ resetcount = 16
@ ig_count = 2
# Default Assigns (Can be changed while online)
assign idletime 5
assign autochannels ALL
assign bandef Normal
assign extmes ON
assign floodp ON
assign cprot ON
assign prot ON
assign nhp OFF
assign rejoin ON
assign ctcpauto ON
assign autorename ON
assign autoop on
assign AUTOGET ON
assign AUTOSEND ON
assign AUTOCLOSE OFF
assign SECURITY OFF
assign OVERWRITE OFF
# PhoEniX Directories ($W designates current directory)
# If you aren't on SunOS, you might want to change $HOME to ~ if you are
# having problems with the script trying to write to a strange directory.
# $W is your current directory at time of IRC startup.
EVAL @ phoenixfile = [$HOME/.phoenix]
EVAL @ phoenixbak = [$HOME/.phoenix.bak]
EVAL @ UPLOADDIR = [$W]
EVAL @ DOWNLOADDIR = [$W]
EVAL @ AWAYFLE = [$phoenixfile\.away]
EVAL @ OFFERFILE = [$phoenixfile\.xdcc]
EVAL ^set logfile $W/irclog.ex
### End Customize Section
### Initializers: Do not edit below this line.
EVAL echo $ex PhoEniX Version 2.25 now loading, please wait...
^set status_format %T %*%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %W%>%U
EVAL ^assign OLD_STATUS $STATUS_FORMAT
@ mcount = 0
@ kcount = 0
@ dccsent = 0
@ nickcnt = 0
@ away_messages = 0
@ msgmax = 10
@ MYSEND = [NO]
@ FRIENDADD = 0
@ PRIVADD = 0
@ ENEMYADD = 0
@ COMMENTADD = 0
@ GETCOUNT = 0
@ TOTPACK = 0
EVAL @ flood_ok = [$help_service]
assign bandef h
assign ban_name HOST
assign cstat ON
assign awaystat ON
assign isaway NO
assign logirc OFF
set AUTO_UNMARK_AWAY OFF
set AUTO_WHOWAS OFF
set BEEP ON
set BEEP_MAX 2
set BEEP_ON_MSG NONE
set BEEP_WHEN_AWAY OFF
set BOLD_VIDEO ON
set CHANNEL_NAME_WIDTH 15
set CLOCK ON
set CLOCK_24HOUR OFF
set COMMAND_MODE OFF
set CONTINUED_LINE
set DCC_BLOCK_SIZE 2048
set DISPLAY ON
set FLOOD_WARNING OFF
set FULL_STATUS_LINE ON
set HELP_WINDOW OFF
set HIDE_PRIVATE_CHANNELS OFF
set HIGHLIGHT_CHAR BOLD
set HISTORY 30
set HOLD_MODE OFF
set INDENT ON
set INPUT_PROMPT <P>
set INPUT_PROTECTION ON
set INSERT_MODE ON
set INVERSE_VIDEO ON
set LASTLOG 100
set LASTLOG_LEVEL ALL DCC
set LOG OFF
EVAL ^if ([$MAIL]==[0]) {^set mail 1}
set MAX_RECURSIONS 200
set NO_CTCP_FLOOD ON
set NOTIFY_ON_TERMINATION OFF
set SCROLL ON
set SEND_IGNORE_MSG OFF
set SHOW_AWAY_ONCE ON
set SHOW_CHANNEL_NAMES ON
set SHOW_END_OF_MSGS OFF
set SHOW_NUMERICS OFF
set SHOW_STATUS_ALL ON
set SHOW_WHO_HOPCOUNT ON
set STATUS_AWAY (A)
set STATUS_CHANNEL %C
set STATUS_CHANOP @
set STATUS_CLOCK %T
set STATUS_HOLD ** MORE **
set STATUS_MODE (+%+)
set STATUS_MAIL M:%M
set STATUS_NOTIFY A:%F
set STATUS_OVERWRITE (ow)
set STATUS_QUERY Q:%Q
set STATUS_UMODE (+%#)
set STATUS_USER \|/ PhoEniX v2.25 \|/
set STATUS_WINDOW ^
set SUPPRESS_SERVER_MOTD ON
set TAB ON
set TAB_MAX 2
set UNDERLINE_VIDEO ON
set USER_WALLOPS OFF
set VERBOSE_CTCP OFF
set WARN_OF_IGNORES ON
bind meta1-[ meta2
bind meta1-O meta2
bind meta2-A backward_history
bind meta2-B forward_history
bind meta2-C forward_character
bind meta2-D backward_character
bind ^B self_insert
bind ^_ self_insert
bind ^V self_insert
bind ^Z stop_irc
bind ^X switch_channels
bind ^O parse_command /ig $,
bind ^I parse_command ^getmsg 1 $msglist
bind ^R parse_command ^getmsg -1 $msglist
bind ^F parse_command //flush
bind ^Y parse_command /holdset
### Basic Aliases (Used Throughout PhoEniX. Most by Vassago)
alias ww whowas
alias sc names $C
alias wi whois
alias chops w -chops
alias re redirect
alias c mode $C $0-
alias ji //join $decode($inv_chan)
alias dc /dcc chat
alias dcg //dcc close get
alias dcs //dcc close send
alias dcx //dcc close chat
alias ex exec
alias wii whois $0 $0
alias ls exec ls -al
alias cat exec cat
alias quit signoff $0-
alias m msg
alias n notice
alias mm msg $0 [To: $0] $1-
alias unignore noig
alias about aboutgcommand
alias avar {^assign $0 $1-}
alias umode mode $N
alias nnotice quote NOTICE $0 :$1-
alias kkick quote KICK $0 $1 :$2-
alias mmode quote MODE $0-
alias mc quote MODE $C -lsnmpitk $chankey
alias nokey quote MODE $C -k $chankey
alias sec_check if (rmatch($0 $SECLIST)) {@ FUNCTION_RETURN = [YES]}{@
FUNCTION_RETURN = [NO]}
alias isnum if (rmatch($0 *0* *1* *2* *3* *4* *5* *6* *7* *8* *9*)) {@
FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0}
alias isalpha if (rmatch($0 *a* *b* *c* *d* *e* *f* *g* *h* *i* *j* *k* *l*
*m* *n* *o* *p* *q* *r* *t* *u* *v* *w* *x* *y* *z*)) {@ FUNCTION_RETURN =
1}{@ FUNCTION_RETURN = 0}
alias _checkkey if (!rmatch($M *k*)) {^set status_mode (+%+)}{^timer 15
_checkkey}
alias wl wholeft
alias i inv $,
alias xl CTCP $C XDCC LIST
alias bkick bk
alias deop dop
alias dop ndop $C $0-
alias getig {@ FUNCTION_RETURN = ig_count * 60}
alias submode if (mcount>0) {@ mcount = mcount - 1}
alias subkick if (kcount>0) {@ kcount = kcount - 1}
alias chanpass if ((match($strip(# $0)
$AutoChannels))||([$AutoChannels]==[ALL])) {^assign FUNCTION_RETURN YES}
alias _delayop if (isop($decode($1) $0)==0) {/mmode $0 +o $decode($1)}
alias enickonly {^assign FUNCTION_RETURN $encode($left($index(! $0) $0))}
alias userdomain @ function_return = LEFT($INDEX(@ $0)
$0)##[@]##MID(${1+INDEX(. $0)} 99 $0)
alias hostonly @ function_return = mid(${index(@ $0)+1} 99 $0)
alias pecho {^xecho -level crap $ex $0-}
alias pubact if (isop($N $1)) {/kkick $1 $0 $channel.floodmsg}
alias serv {/if ([$0]) {//server $0-}{/if ([$_server]!=[]) {//server
$_server}{//server 0}}}
alias pubecho if ([$1]==[$C]) {/echo <$0> $2-}{/echo <$0:$1> $2-}
alias safe {^assign FUNCTION_RETURN $strip(\;\(\)*/\\\{\}$$~`|'\"
$0-)}
alias msafe {^assign FUNCTION_RETURN $strip(\;$$ $0-)}
alias j if
((![$0])||([&]==[$[1]0])||([#]==[$[1]0])||([$0]==[0])||([-]==[$[1]0]))
{//join $0-} {//join #$0-}
alias l if (![$0]) {//leave $C}{/if
(([&]==[$[1]0])||([#]==[$[1]0])||([$0]==[*])) {//leave $0} {//leave #$0}}
alias ap {
^set STATUS_USER Lag ? - E/X
quote PING $time() $S
}
alias tref {
^timer -delete $0
^timer -refnum $0-
}
alias holdset {
^set HOLD_MODE TOGGLE
pecho Screen pausing mode is now $HOLD_MODE\.
}
alias cwait {
wait -CMD #
wait -CMD $0-
}
alias purge {
foreach $0 ii {/purge $0.$ii}
^assign -ii
^assign -$0
}
alias sb {
^on ^367 "*" {
if ([$4]) {/echo *** $1 $2 \(By $3, $mid(4 15 $stime($4))\)}
{/echo *** $1-}}
if ([$0]) {//mode #$strip(# $0) +b}
{//mode $C +b}}
alias w if ([$0]) {
if ([$0]==[-chops]) {//who $0 $C $1-}
{//who -h $0-}}
{//who $C}
alias t {
if ([$0]==[#*]) {//topic $0-}
{//topic $C $0-}}
alias inv {
if ([$0]) {
if ([$1]) {//invite $0-}
{//invite $0 $C}}
{/pecho You need to specify a nick to invite.}}
alias pubcat {
if ([$0]) {//^exec -notice $C cat $0}
{/pecho Usage: /pubcat <filename>}}
alias ver {
if ([$0]) {/ctcp $0 VERSION}
{/ctcp $C VERSION}}
alias p {
if ([$0]) {//ping $0}{//ping $C}}
alias op {
mmode $C +ooo $0 $1 $2
if ([$3]) {/op $3-}}
alias ndop {
mmode $0 -oo $1 $2
if ([$3]) {/ndop $0 $3-}}
alias ftm {
if ([$left(1 $0)]==[0]) {@ timestr = [$mid(1 4 $0)]}{@ timestr = [$left(5
$0)]}
@ timestr = [$timestr $tolower($right(2 $0))]
@ FUNCTION_RETURN = [$timestr]
}
### DCC PARSER (by Vassago, CHAT autoclose by AlphaSux)
alias dcc {
//dcc $0-
if ([$0]==[SEND]) {
@ dccsent = dccsent + 1
^timer 120 checksend $1 $2
}
if ([$0]==[CHAT]) {
^addmsg \=$1 $msglist
^on ^401 "% $1 *" {
^dcx $1
pecho I can't find $1 on IRC. Closing CHAT request.
}
cwait ^on ^401 - "% $1 *"
}}
### IsOp Function (by CKeeper)
alias isop {
if (([$1] == [$C])&&([$0] == [$N])) {
if ([$P] == [@]) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0}}
{/EVAL @ FUNCTION_RETURN = $ischanop($0 $1)}}
### Server Message Redefinition (by Vassago and wc)
on ^002 "*" #
on ^305 "*" #
on ^306 "*" #
on ^443 "*" #
on ^333 "*" echo *** Topic for $1 set by $2 on $mid(4 15 $stime($3))
on ^404 "*" check_synch $0-
on ^482 "*" check_synch $0-
on ^301 "*" if ([$0]!=[$N]) {/echo *** Away : $0 is away: $1-}
on ^311 "*" {
echo *** Whois Information for: $1
echo *** Address : $2@$3
echo *** IRCNAME : $5-
}
on ^312 "*" echo *** Server : $1 \($2-\)
on ^313 "*" echo *** IRC OP : $1 has operator status.
on ^314 "*" {
echo *** Whowas information for: $1
echo *** Address : $2@$3
echo *** IRCNAME : $5-
}
on ^319 "*" echo *** On Channels : $1-
on ^317 "*" {
if (index(012345679 $3) != -1) {
^assign -sectime
^assign -mintime
^assign sectime $2
@ mintime = sectime / 60
echo *** Idle Time : $mintime minute\(s\) \($2 seconds\)
echo *** Signed on : $stime($3)
}{
^assign -sectime
^assign -mintime
^assign sectime $2
@ mintime = sectime / 60
echo *** Idle Time : $mintime minute\(s\) \($2 seconds\)
}}
alias check_synch {
if ([$0]!=[$desynch]) {
if ([$0]!=[$S]) {
pecho $0 is desynched from the IRC Network.
^assign desynch $0
tref 500 60 ^assign -desynch
}{/echo *** $1-}}}
### MODE and KICK Protection (by Vassago)
alias mdact {
if ((isop($N $1))&&([$mdwait]!=[$0])&&([$decode($0)]!=[$N])) {
mmode $1 -o $decode($0)
pecho MASS DEOP DETECTED. By: $decode($0) On: $1
^assign mdwait $0
tref 501 8 ^assign -mdwait
}
@ mcount = 0
}
alias kact {
if ((isop($N $1))&&([$kwait]!=[$0])&&([$decode($0)]!=[$N])) {
mmode $1 -o $decode($0)
pecho MASS KICK DETECTED. By: $decode($0) On: $1
^assign kwait $0
tref 502 8 ^assign -kwait
}
@ kcount = 0
}
alias mdtest {
if ([$0]==[$lastmd]) {
@ mcount = mcount + $2
^timer 12 submode
if (mcount>msensor) {/mdact $0 $1}}{
^assign lastmd $0
@ mcount = $2
^timer 12 submode
if (mcount>msensor) {/mdact $0 $1}}}
alias ktest {
if (([$0]==[$lastmdk])&&([$0]!=[$encode($N)])) {
@ kcount = kcount + 1
^timer 12 subkick
if (kcount>ksensor) {/kact $0 $1}
}{^assign lastmdk $0}}
### MODE & KICK Handlers (by Vassago & YaZoO)
on -raw_irc "% MODE *" {
@ mdcnt = 0
@ nixcnt = 0
^assign mde +
^assign mdech $3
^assign nix $4-
@ mdchop = [$encode($left($index(! $0) $0))]
if (([$prot]==[ON])&&(rmatch($3 -ooo* *-ooo*))) {/mdact $mdchop $2}
while (mid($mdcnt 1 $mdech)!=[]) {
^assign mdecc $mid($mdcnt 1 $mdech)
if (([$mdecc]==[-])||([$mdecc]==[+])) {^assign mde $mdecc}{
if (match($mdecc b o k l m n s t p i)) {
if ([$mde$mdecc]==[+b]) {
if ((match($word($nixcnt $nix) $ownadd))&&(rmatch($0 *!*))) {/bansave $2
$mdchop $word($nixcnt $nix)}
if ((!rmatch($0 *!*))&&(isop($N $2))&&([$nhp]==[ON])&&([$SAVEBAN]==[]))
{/mmode $2 -b $word($nixcnt $nix)}
^assign -SAVEBAN
}
if ([$mde$mdecc]==[+o]) {
if ((!rmatch($0 *!*))&&(isop($N $2))&&([$nhp]==[ON])) {/mmode $2 -o
$word($nixcnt $nix)}}
if ([$mde$mdecc]==[-o]) {/if ([$prot]==[ON]) {/mdtest $mdchop $2 1}}
if ([$mde$mdecc]==[+k]) {
^assign chankey $word($nixcnt $nix)
if ((rmatch($word($nixcnt $nix) $false_chars))&&(rmatch($0 *!*))) {
EVAL ^set status_mode $word(0 \(+$M\))
^timer 10 _checkkey
if ((isop($N $2))&&([$cprot]==[ON])) {/mmode $2 -k $word($nixcnt $nix)}
}
{/if ((!rmatch($0 *!*))&&(isop($N $2))&&([$NHP]==[ON])) {/mmode $2 -k
$word($nixcnt $nix)}}
}
@ nixcnt = nixcnt + 1
}}
@ mdcnt = mdcnt + 1
}}
on ^mode "%.% *" pecho SERVER MODES DETECTED. In $1: \'$2-\'
alias bansave {
if (isop($N $0)) {
mmode $0 -ob $decode($1) $2
kkick $0 $decode($1) $uban.kickmsg
}
^assign SAVEBAN YES
pecho BAN ON YOU DETECTED. By: $decode($1)
}
### Kick handler (by Vassago)
on -raw_irc "% KICK *" {
^assign kickchan $strip(: $2)
^assign kickperson $encode($left($index(! $0) $0))
if ([$prot]==[ON]) {/ktest $kickperson $kickchan}
if (([$3]==[$N])&&([$REJOIN]==[ON])) {
cwait //join $kickchan
}}
### Nick Flood Protection (by Vassago)
on -channel_nick "*" {
if ( ([$cprot]==[ON])&&([$2]!=[$N])) {
if ([$newnick1]==[$encode($1)]) {@ nickcnt = nickcnt + 1}
if (nickcnt==nicksensor) {
if (isop($N $0)) {
kkick $0 $2 $nick.floodmsg
pecho NICK FLOOD DETECTED. On $0 by: $2
}
@ nickcnt = 0
}
^assign newnick1 $encode($2)
^timer 30 ^assign -newnick1
^timer 30 @ nickcnt = 0
}}
### JOIN Functions (by Vassago)
alias autocheck {
^assign ainuse Y
foreach ENEMIES XX {
if ((rmatch($ENEMIES[$XX] $1))||(match($ENEMIES[$XX] $1))) {
if ([$bkmatch]==[]) {
if ([$COMMENTS[$XX]]!=[]) {
mmode $0 -o+b $decode($2) $ENEMIES[$XX]
kkick $0 $decode($2) $COMMENTS[$XX]
}{
mmode $0 -o+b $decode($2) $ENEMIES[$XX]
kkick $0 $decode($2) $abkickmsg
}
@ bkmatch = 1
}}}
^assign -bkmatch
if (([$autoop]==[ON])&&([$chanpass($0)]==[YES])&&(rmatch($1 $OPLIST)))
{^timer 3 _delayop $0 $2}
}
on -raw_irc "% JOIN *" {/if (isop($N $strip(: $2))) {/autocheck $strip(: $2)
$safe($0) $encode($left($index(! $0) $0))}}
on ^join "*" {^netjoined $encode($tolower($1)) $encode($0) $1 $0
$safe($Userhost())}
### Netsplit Detection (by Daemon, mods by Vassago)
alias netclean {
foreach splittime ii {
foreach splittime.$ii jj {
if ( time() - splittime[$ii][$jj] > 300 ) {
foreach signcross.$(ii).$jj xx {
foreach signcross.$(ii).$(jj).$xx yy {
^assign -signcross[$ii][$jj][$xx][$yy]
^assign -signoffs[$xx][$yy]
}}
^assign -xx
^assign -yy
^assign -isbroke[$ii][$jj]
^assign -splitname[$ii][$jj]
^assign -splittime[$ii][$jj]
}}}
^assign -ii
^assign -jj
}
alias isbogus {
if ([$3]) { @ function_return = 1 }
if (rmatch(.$1. $bogus_patterns *..*)) { @ function_return = 1 }
if (rmatch(.$2. $bogus_patterns *..*)) { @ function_return = 1 }
}
on ^channel_signoff "% % %.% %.*" {
if (isbogus($1-)) {/echo *** Signoff: $1 \($2-\)}
{^netbroke $encode($tolower($0)) $encode($1) $encode($2).$encode($3) $2-}
}
alias netbroke {
^assign signcross[$2][$0][$1] 1
^assign signoffs[$0][$1] $2
^assign splittime[$2] $time()
if (isbroke[$2]==[]) {
^assign isbroke[$2] 1
^assign splitname[$2] $3-
pecho Netsplit detected at $ftm($Z): \($3-\)
pecho Type /wholeft to see who split away.
}}
alias netjoined {
if (signoffs[$0][$1]) {
if (isbroke[$signoffs[$0][$1]]) {/pecho Netjoined at $ftm($Z)
\($splitname[$signoffs[$0][$1]]\)}
^assign -isbroke[$signoffs[$0][$1]]
^assign -signcross[$signoffs[$0][$1]][$0][$1]
^assign -signoffs[$0][$1]
}
{
if ([$2]==[$C]) {/echo *** $3 \($4-\) has joined channel $C}
{/echo *** $3 \($4-\) has joined channel $2\}}
}
alias netpurge {
purge isbroke
purge splitname
purge splittime
purge signcross
purge signoffs
}
alias lformat {
@ IRCII.word = [$1-]
if (@IRCII.word < [$0]) {@ function_return = [$([$0]IRCII.word)]}
{@ function_return = [$IRCII.word]}
}
alias wholeft {
foreach signoffs ii {/foreach signoffs.$ii jj {/pecho $lformat(15
$decode($ii)) $lformat(10 $decode($jj)) $splitname[$signoffs[$ii][$jj]]}}
^assign -ii
^assign -jj
}
### Flood Handling Routines (by Vassago)
alias fcheck {
@ FUNCTION_RETURN = 0
if (([$floodp]==[ON])&&(!match($decode($0) $flood_ok))) {
if ((match(* * * * $3-))||(rindex($right(1 $3) $3) >= 170)) {
ignore_flood $0 $1 $hostonly($2)
clflood $1
@ FUNCTION_RETURN = 1
}
if (match($_tflood $lastmsg $lastnotice $lastctcp)==1) {
EVAL @ $1count = $($1count)+1
EVAL ^timer $resetcount sub $1
if
((msgcount==msgsensor)||(noticecount==noticesensor)||(ctcpcount==ctcpsensor))
{
ignore_flood $0 $1 $hostonly($2)
clflood $1
@ FUNCTION_RETURN = 1
}}{/clflood $1}
^assign _tflood $hostonly($2)
^assign last$1 $_tflood
}}
alias clflood {
if ([$0]==[MSG]) {@ msgcount = 0;^assign -lastmsger}{
if ([$0]==[NOTICE]) {@ noticecount = 0;^assign -lastnoter}{
if ([$0]==[CTCP]) {@ ctcpcount = 0;^assign -lastctcper}}}}
alias sub {
if (([$0]==[MSG])&&(msgcount>0)) {@ msgcount = msgcount - 1}{
if (([$0]==[NOTICE])&&(noticecount>0)) {@ noticecount = noticecount - 1}{
if (([$0]==[CTCP])&&(ctcpcount>0)) {@ ctcpcount = ctcpcount - 1}}}}
alias ignore_flood {
EVAL //^ignore *@$2 $igtypes
EVAL ^timer $getig() _igexp $0 $2
pecho $1 FLOOD DETECTED. From: $decode($0). Ignoring for $ig_count\
minutes\(s\).
if ([$floodmsg]!=[]) {/nnotice $decode($0) $floodmsg}
}
alias _igexp {
//^ignore *@$2 NONE
pecho No longer ignoring $decode($0) [$1] \(expired\).
}
### FLOOD-OK List (by Vassago & Robey)
alias fok {
if ([$0]) {
if (!match($0 $flood_ok)) {
@ flood_ok = flood_ok ## [ $0]
pecho Nick $0 now exempt from triggering flood protection.
}{/pecho Nickname $0 is already on your flood ok list.}}{
pecho Nicknames exempt from triggering flood protection:
pecho $flood_ok
}
if ([$1]) {/fok $1-}}
alias frem {
if ([$0]) {
if (match($0 $flood_ok)) {
@ flood_ok = rem_w($0 $flood_ok)
pecho Nickname $0 has been removed from your flood_ok list.
}{/pecho $0 is not on your flood_ok list.}}
{/pecho Usage: /REMFLOOD <nick> of person to remove from flood_ok.}
if ([$1]) {/frem $1-}}
### PUBLIC flood Protection (by Vassago & CKeeper)
on ^public "% % * * * * * *" {
if ([$floodp]==[ON]) {
pubecho $0 $1 [Possible Tsunami] $msafe($2-)
}{/pubecho $0 $1 $2-}
if ([$cprot]==[ON]) {/pubact $0 $1}}
on ^public "% % * * * * * * *" {
if ([$floodp]==[ON]) {
pubecho $0 $1 [Excess Beeps] $msafe($2-)
}{/pubecho $0 $1 $2-}
if ([$cprot]==[ON]) {/pubact $0 $1}}
### Raw IRC CTCP/NOTICE Protection/Notification (by Vassago)
on ^raw_irc "% PRIVMSG % :* %INFO *" #
on ^raw_irc "% % % :* * * * *" #
on ^raw_irc "% PRIVMSG % : VER* *" {
if ([$LASTVER]!=hostonly($0)) {
if (rmatch($2 #*)) {/pecho $decode($enickonly($0)) requested version
information for everyone in $2\.}
{/pecho $decode($enickonly($0)) requested version information for you.}
if ([$phoenix.ver]!=[]) {/nnotice $decode($enickonly($0)) VERSION
$phoenix.ver\ }
^assign LASTVER $hostonly($0)
tref 504 30 ^assign -LASTVER
}}
on ^raw_irc "% PRIVMSG % : FINGER* *" {
if ([$LASTFING]!=hostonly($0)) {
if (rmatch($2 #*)) {/pecho $decode($enickonly($0)) requested finger
information for everyone in $2\.}
{/pecho $decode($enickonly($0)) requested finger information for you.}
if ([$fingermsg]!=[]) {/nnotice $decode($enickonly($0)) FINGER
$FINGERMSG\ }
^assign LASTFING $hostonly($0)
tref 505 30 ^assign -LASTFING
}}
### CTCP Commands/Responses (by Vassago)
on -ctcp "*" {
if ([$1]==[$N]) {
if ([$inuse]==[]) {
^assign inuse YES
^assign ctcpadr $safe($Userhost())
if ([$fcheck($encode($0) CTCP $ctcpadr $2-)]==0) {
if (!match($2 ACTION TIME UTC ERRMSG SED ECHO)) {
if (rmatch($0!$ctcpadr $FRIENDLIST)) {
if ([$3]) {^assign channel $3}
{^assign channel $C}
if ([$2]==[HELP]) {/ctcpcmd $0 HELP}{
if ([$chanpass($channel)]==[YES]) {
if (match($2 INVITE OP)) {
if ([$2]==[OP]) {
if (rmatch($0!$ctcpadr $OPLIST)) {
ctcpcmd $0 $2
^assign TEMPYES ON
}}
if ([$2]==[INVITE]) {
if (rmatch($0!$ctcpadr $INVITELIST)) {
ctcpcmd $0 $2
^assign TEMPYES ON
}}
if ([$TEMPYES]==[]) {/nnotice $0 You do not have access to command $2\.}
{^assign -TEMPYES}}
{/nnotice $0 $2 is not a valid CTCP command.}}
{/nnotice $0 CTCP functions are not enabled for channel $channel\.}
}}{
if (match($2 INVITE OP UNBAN HELP)) {
if ([$said_not]==[]) {
^assign said_not ON
nnotice $0 You are not registered.
tref 506 45 ^assign -said_not
}}
pecho CTCP \($safe($[35]2-)\) from unregistered person $0\.
}}}
^assign -inuse
}}}
# CTCP COMMAND Parser (by YaZoO & Vassago)
alias ctcpcmd {
if ([$ctcpauto]==[ON]) {
if ([$1]==[OP]) {
if (isop($N $channel)) {
mmode $channel +o $0
if ([$phoenix.ver]) {/nnotice $0 You have been opped via PhoEniX v2.25 by
Vassago}
pecho $0 has been opped on $channel via a CTCP request.
}{
nnotice $0 I am not an operator on channel $channel\.
pecho $0 requested a CTCP Op on $channel\.
}}
if ([$1]==[INVITE]) {
if (isop($N $channel)) {
//^invite $0 $channel
if ([$phoenix.ver]) {/nnotice $0 You have been invited via PhoEniX v2.25 by
Vassago}
pecho Inviting $0 under request from a CTCP.
}{
nnotice $0 I am not a channel operator on $channel\.
pecho $0 requested a CTCP invite to $channel\.
}}
if ([$1]==[HELP]) {
nnotice $0 These commands are available via CTCP request:
nnotice $0 /CTCP $N OP <#Channel> :For ops on <#Channel>.
nnotice $0 /CTCP $N INVITE <#Channel> :For an invite to <#Channel>.
nnotice $0 I am currently on channel\(s\): $tolower($strip(# $mychannels()))
nnotice $0 Channel\(s\) on which these commands are active: $autochannels
pecho $0 has asked for help from my Friends list.
}}{
nnotice $0 Sorry, but my CTCP functions are disabled.
pecho $0 tried $1 for $channel via CTCP.
pecho CTCP functions are currently disabled.
}}
# Miscellaneous CTCP Handlers (by Vassago)
on -ctcp "% % PING *" {
^assign pingadr $safe($Userhost())
if ([$fcheck($encode($0) CTCP $pingadr $2-)]==0) {
if (rmatch($1 #*)) {/pecho $0 has pinged everyone in $1\.}
{/pecho $0 pinged you.}
if ([$pingmsg]!=[]) {/nnotice $0 $PINGMSG}
}}
on ^ctcp "% % DCC CHAT *" {
^assign dccadr $safe($Userhost())
if (([$fcheck($encode($0) CTCP $dccadr $2-)]==0)&&([$_lastchat]!=[$dccadr]))
{
^assign _lastchat $dccadr
pecho DCC CHAT received from $0 [$dccadr\]
^assign _temp $"[E/X] Connect? "
if (rmatch($_temp y*)) {/dc $0}{
pecho Closing $0\'s DCC CHAT request.
dcx $0
}
^assign -_temp
tref 513 30 ^assign -_lastchat
}}
### Lag Indicator/PONG Flood Protection
### (by Robey & Vassago, based on some ideas and scripting from BeeF.)
on ^raw_irc "%.% PONG *" {
if ([$0]==[$S]) {
^assign lagtime ${time()-mid(1 999 $3)}
if (lagtime==0) {^set status_user E/X}
{^set status_user Lag $lagtime - E/X}
}}
### Invitation Handlers (by Vassago)
on ^invite "*" {
if ([$fcheck($encode($0) CTCP $safe($Userhost()) $1-)]==0) {
if (rmatch($1 $false_chars)) {/pecho $0 invites you to channel $1\ \(Fake\)}
{/echo *** $0 invites you to channel $1}}
^assign inv_chan $encode($1)
}
### Fake Mode Handler (by YaZoO)
on ^server_notice "*" #
on ^server_notice "% % no% -- fake: *" {
if (rmatch($7 $mychannels())) {/pecho [FAKE] $5 $7- from $0}
}
### DCC Control Parsers (By Vassago, based on some stuff from YaZoO)
on ^msg "% XDCC *" {
^assign XDCCUSER $safe($userhost())
if ([$fcheck($encode($0) CTCP $XDCCUSER $2-)]==0) {/xdccmsg $0 $XDCCUSER
$2-}
}
on ^ctcp "% % XDCC *" {
^assign DCCUSER $safe($userhost())
if ([$fcheck($encode($0) CTCP $DCCUSER $3-)]==0) {/xdccmsg $0 $DCCUSER $3-}
}
alias dccCHECK {
@ FUNCTION_RETURN = 0
if ([$floodp]==[ON]) {
if (index(\;/\\\{\}~|\"~=+ \^
$4-)>=0) {
ignore_flood $encode($0) DCC-SEND $dcc_ignore
//^dcc close get $0 $4
@ FUNCTION_RETURN = 1
^assign -dcc_ignore
}}}
# This command also fixes the .* file bug in earlier IRCII clients.
on ^ctcp "% % DCC SEND* * *" {
if ([$1]==[$N]) {
^assign dcc_ignore $safe($userhost())
if ([$dccCHECK($0-)]==0) {
if ([$left(1 $4)]==[.]) {^assign dccfile _$mid(1 $index($right(1 $4)) $4)}
{^assign dccfile $4}
if (([$AUTOGET]==[ON])&&([$AUTOCLOSE]!=[ON])) {
//^dcc rename $0 $dccfile $DOWNLOADDIR/$dccfile
^exec -name DCG$0/${DOWNLOADDIR}/$dccfile ls ${DOWNLOADDIR}/$dccfile
}{
if ([$AUTOCLOSE]==[ON]) {
pecho DCC SEND $dccfile from $0 request ignored and closed.
//^dcc close get $0 $dccfile
}{
if (([$AUTOGET]!=[ON])&&([$AUTOCLOSE]!=[ON])) {
//^dcc rename $0 $dccfile $DOWNLOADDIR/$dccfile
pecho DCC SEND $dccfile from $0 added to XDCC request list.
adddccrequest $DOWNLOADDIR/$dccfile $0
}}}}}}
on ^exec_error "DCG* *" {
@ dcclen = [$0]
@ getf = [$right(${@dcclen-3} $0)]
@ idx = [$index(/ $getf)]
@ filenme = [$right(${@getf-idx+1} $0)]
@ nicknme = [$left($idx $getf)]
pecho I am autogetting $filenme from $nicknme\.
//^dcc get $nicknme $filenme
}
on ^exec "DCG* *" {
@ dcclen = [$0]
@ getf = [$right(${@dcclen-3} $0)]
@ idx = [$index(/ $getf)]
@ filenme = [$right(${@getf-idx+1} $0)]
@ nicknme = [$left($idx $getf)]
if ([$OVERWRITE]==[ON]) {
pecho Autogetting $filenme from $nicknme \(Overwriting file\).
//^dcc get $nicknme $filenme
}{
pecho $nicknme offered $filenme\ but it already exists.
if ([$AUTORENAME]!=[ON]) {
@ dctemp = [$"[E/X] Enter new filename or ENTER to close: "]
if (dctemp!=[]) {
if ([$[1]dctemp]!=[/]) {^assign dctemp ${downloaddir}/${dctemp}}
pecho Getting $filenme renamed to $dctemp from $nicknme\.
//^dcc rename $nicknme $filenme $dctemp
//^dcc get $nicknme $dctemp
}{
pecho Closing DCC GET request from $nicknme\.
//^dcc close get $nicknme $filenme
}}{
^assign dctemp $filenme\.$rand(999)
pecho Autorenaming to $dctemp\ and receiving.
if ([$[1]dctemp]!=[/]) {^assign dctemp ${downloaddir}/${dctemp}}
//^dcc rename $nicknme $filenme $dctemp
//^dcc get $nicknme $dctemp
}}}
### Server Connection ONs (by Vassago)
on ^connect "*" /cwait _connect
on ^disconnect "*" {
pecho Connection closed. Autoconnecting to $_server\
^timer 2 /serv
}
on ^window "% ??? Use /SERVER to*" {
if ([$1]==[***]) {
pecho Connection closed. Autoconnecting to $_server\
^timer 2 /serv
}}
on -436 "*" {
pecho Connection closed. Autoconnecting to $_server
^timer 2 /serv
}
### Miscellaneous ON Commands (by TG, Mods by Vassago)
on ^send_msg "*" {
echo <-[$0]-> $1-
^addmsg $0 $msglist
}
on ^dcc_chat "*" echo =$0= $1-
on ^send_action "*" if ([$[1]0]!=[#])
{/echo * $0 >> $N $1-}
{/echo * $N $1-}
on ^send_public "*" {
if ([$0]==[$C]) {/echo <${N}> $1-} {/echo -> <${N}> $1-}
}
on ^send_dcc_chat "*" {
echo <=$0=> $1-
^addmsg \=$0 $msglist
}
on ^action "*" if ([$[1]1]!=[#])
{/echo * $0 $2-}
{/if ([$C]!=[$1]) {/echo * $1 >> $0 $2-}
{/echo * $0 $2-}
}
on ^exec "from *" pecho Mail: From $safe($1-)
on ^exec_error "from *" #
on ^mail "*" {
^exec -name from frm | tail -$0
pecho You have new email! \(Mail Waiting: $1\)
}
### Message Handler Commands (by Vassago)
on ^msg "*" {
^assign msghost $safe($Userhost())
if (fcheck($encode($0) MSG $msghost $1-)==0) {
if (encode( *$0* $1-) != lmes) {
if (extmes==[ON]) {/echo [$0:$Userdomain($msghost)] $1- }
{/echo [$0] $1-}
}
if (isaway==[YES]) {
^exec echo "[$ftm($Z)] [$safe($0):$userdomain($msghost)] $safe($strip(!
$1-))" >> $awayfle
@ away_messages = away_messages + 1
}
^assign lmes $encode( *$0* $1- )
}{^assign lmes $encode( *$0* [Flood Detected])}
^addmsg $0 $msglist
}
alias dirlm {
if ([$0]) {//msg $0 $decode($lmes)}
{/say $decode($lmes)}
}
### Notice Commands (by Vassago)
on ^notice "*" {
if ([$fcheck($encode($0) NOTICE $safe($Userhost()) $1-)]==0) {
if (rmatch($1 *WallOp*)) {/echo [-$0\-] $1-}
{/echo -$0- $1-}
^assign lnotice $encode(-$0- $1-)
}
{^assign lnotice $encode(-$0- [Flood Detected] )}
^addmsg $0 $msglist
}
alias dirln {
if ([$0]) {//msg $0 $decode($lnotice)}
{/say $decode($lnotice)}
}
### Timer/Idle Control
on -timer "*" {
^ap
^netclean
if (rmatch($0 %:00*)) {/pecho The time is now $0\.}
}
on -idle "*" {
if (([$0]==[$idletime])&&([$isaway]==[NO])) {
setaway $idlemes
pecho Setting you away after being idle for $idletime minutes.
}}
### Tabkey Handlers
alias addmsg {
@ matched = rmatch($0 $^\1-)
if (matched) {@ msglist = [$(0-${matched-1}) $(${matched+1}-)]}
{@ msglist = [$(0-${msgmax-1})]}
@ msgcnt = 0
^assign -matched
}
alias getmsg {
@ msgcnt = msgcnt + [$0]
if (#msglist < msgcnt) {@ msgcnt = 1}
if (msgcnt <= 0) {@ msgcnt = #msglist}
@ junk = K ## [m]
//type ^U$junk $^^{[$($msgcnt)]}
}
### Ban Handlers (by Vassago and Fred1)
alias bandef {
if ([$0]==[N]) {@ bandef= [Normal]}
if ([$0]==[H]) {@ bandef= [Host]}
if ([$0]==[D]) {@ bandef= [Domain]}
if ([$0]==[S]) {@ bandef= [Screw]}
if (!match($bandef Normal Host Domain Screw)) {@ bandef= [Normal]}
@ set.dfbt= left(1 $bandef)
pecho Default ban is $set.dfbt \($bandef\).
}
alias ban {
if ([$0]) {
if (!rmatch($0 *!* *@* *.*)) {
if ([$1]) {
@ _t.who= [$1]
@ _t.prm= mid(1 1 $0)
}{
@ _t.who= [$0]
@ _t.prm= set.dfbt
}
Userhost $_t.who -CMD if ([$4]!=[<UNKNOWN>]) {
@ _t.ban= []
if (match($_t.prm S N H D)) {@ _t.ban= [$($_t.prm\ban($3 $4 *))]}
if (!(_t.ban)) {@ _t.ban= nban($3 $4 *)}
if (isop($0 $C)) {/mmode $C -o+b $0 $_t.ban} {/mmode $C +b $_t.ban}
}{/pecho I couldn't find $0 on IRC.}
}{/c +b $0-}}{/pecho Usage: /ban [<bantype>] <nick>
}}
alias bk {
if ([$0]) {
@ _t.prm= [$0]
if (index(! $0)!=-1) {
@ _t.prm= mid(1 1 $0)
@ _t.who= [$1]
@ _t.bkr= [$2-]
}{
@ _t.prm= set.dfbt
@ _t.who= [$0]
@ _t.bkr= [$1-]
}
if (_t.bkr) {@ _t.bkr= [ $_t.bkr\]} {@ _t.bkr= [$pk]}
Userhost $_t.who -CMD if ([$3]!=[<UNKNOWN>]) {
@ _t.ban= []
if (match($_t.prm S N H D)) {@ _t.ban= [$($_t.prm\ban($3 $4 *))]}
if (!(_t.ban)) {@ _t.ban= nban($3 $4 *)}
mmode $C -o+b $0 $_t.ban
kkick $C $0 $_t.bkr
}{/pecho I couldn't find $0 on IRC.}
}{/pecho Usage: /bk [<BanType>] <Nick> [<Reason>]
}}
alias sban {
@ cnt = 0
@ tomake = [$0@$1]
@ temp = [$1]
^assign tomake $0@*$right(${@temp-index(. $1)} $1)
^assign -temp
if ((mid($cnt 1 $0)==[~])||(mid($cnt 1 $0)==[#])) {@ cnt = 1}
while (mid($cnt 1 $tomake)!=[]) {
@ rnd = rand(10)
if ((mid($cnt 1 $tomake)==[*])||(mid($cnt 1 $tomake)==[@])||(mid($cnt 1
$tomake)==[.])||(mid($cnt 1 $tomake)==[])||(mid($cnt 1 $tomake)==[ ])) {@
temp = [$temp$mid($cnt 1 $tomake)]}
{
if (rnd>4) {@ temp = [$temp?]}
{@ temp = [$temp$mid($cnt 1 $tomake)]
}}
@ cnt = cnt + 1
}
@ function_return = [*!*$temp]
}
alias nban @function_return= [$2!]##fixname($0 $2)##[@]##fixdomain($1 $2)
alias hban @function_return= [$2!$2@]##fixhost($1 $2)
alias dban @function_return= [$2!$2@]##fixdomain($1 $2)
alias fixhost {
if (index(. $0)==rindex(. $0)) {@ function_return= [$1] ## [$0]}
{@ function_return= [$0]}
}
alias fixname {
if (rmatch($0 ?? ?)) {@ function_return= [$1]}
{@ function_return= [$1] ## mid(1 99 $0)}
}
alias fixdomain {
if (index(. $0)!=rindex(. $0)) {
if (is_ip($0)) {@ function_return= left($rindex(. $0) $0) ## [.$1]}
{@ function_return= [$1$mid($index(. $0) 99 $0)]}
} {@ function_return= [$1$0]}
}
alias is_ip {
if ((right(1 $0) >= [0]) && (right(1 $0) <= [9]))
{@ function_return= [1]}
{@ function_return= [0]}
}
alias unbanlop {
if ([$3]) {
mmode $C -bbb $0 $1 $2
unbanlop $3-
}{
if ([$2]) {/mmode $C -bbb $0 $1 $2}{
if ([$1]) {/mmode $C -bb $0 $1}{
if ([$0]) {/mmode $C -b $0}}
}}}
alias banlop {
if ([$3]) {
mmode $C +bbb $0 $1 $2
banlop $3-
}{
if ([$2]) {/mmode $C +bbb $0 $1 $2}{
if ([$1]) {/mmode $C +bb $0 $1}{
if ([$0]) {/mmode $C +b $0
}}}}}
alias dobans {
pecho Doing bans in AutoBkick list.
banlop $BKLIST
}
alias cdban {
pecho Clearing channel of bans.
^assign -bunband
^on ^367 "*" {^assign bunband $2 ${bunband}}
//^mode $C +b
wait
cdban2 $bunband
}
alias unban {
if ([$0]) {
^assign -bunband
if (!rmatch($0 *@* *!* *.*)) {
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign dbanz $0!$3@$4
^on ^367 "*" {
if ((match($2 $dbanz))||(match($dbanz $2))) {^assign bunband $2 ${bunband}}
}
//^mode $C +b
wait
cdban2 $bunband
}}}
{/pecho Usage: /UNBAN <nick/filter> to unban on your current channel.}}
alias cdban2 {
unbanlop $0-
^on 367 - "*"
}
### Status Screen
alias status {
pecho +-----------+ Your Current PhoEniX Configuration +-----------+
pecho CTCP Op/Invite : $ctcpauto
pecho Setaway Time : $idletime
pecho IRC Logging : $logirc
pecho AutoRejoin on KICK : $rejoin
pecho Extended Message Display : $extmes
pecho Kick/MassDeop Protection : $prot
pecho Personal Flood Protection : $floodp
pecho Channel Protection : $cprot
pecho Netsplit Hack Protection : $nhp
pecho Ban/Bkick Type Setting : $ban_name
pecho PhoEniX SENSOR Settings:
pecho Deop: $msensor Kick: $ksensor Nick Flood: $nicksensor
pecho Message Flood: $msgsensor Notice Flood: $noticesensor
pecho CTCP Flood: $ctcpsensor Timer resets after: $resetcount
pecho Flood-triggered Ignores last $ig_count minutes.
pecho Ignores stop: $igtypes\.
pecho +-------+ Type /XDCC STATUS for XDCC information. +-------+
}
### Toggleable Commands
alias upp {
^assign $0 $toupper($1)
chgst
}
alias extmes {
if (match($0 ON OFF)) {/upp extmes $0}
pecho Extended messages display is $extmes\.
}
alias prot {
if (match($0 ON OFF)) {/upp prot $0}
pecho Megadeop/Kick Protection is $prot\.
}
alias nhp {
if (match($0 ON OFF)) {/upp nhp $0}
pecho Netsplit hack protection is $nhp\.
}
alias autoop {
if (match($0 ON OFF)) {/upp autoop $0}
pecho Auto OP friends on JOIN is $autoop\.
}
alias auto {
if (match($0 ON OFF)) {/upp ctcpauto $0}
pecho CTCP op/invite is $ctcpauto\.
if ([$1]) {^assign AutoChannels $tolower($strip(# $1-))}
pecho AUTO functions will work in channels: $AutoChannels\
}
alias autochan {
if ([$0]) {^assign AutoChannels $tolower($strip(# $0-))}
if ([$AutoChannels]!=[ALL]) {/pecho AUTO functions will work in:
$AutoChannels\}
{/pecho AUTO functions will work in ALL your current channels.}
}
alias floodp {
if (match($0 ON OFF)) {/upp floodp $0}
pecho Message/Notice/CTCP flood protection is $floodp\.
}
alias cprot {
if (match($0 ON OFF)) {/upp cprot $0}
pecho Channel flood/bomb protection is $cprot\.
}
alias rejoin {
if (match($0 ON OFF)) {/upp rejoin $0}
pecho AutoRejoin on kick is $rejoin\.
}
alias irclog {
if (match($0 ON OFF)) {
^set log $0
upp logirc $0
}
pecho The IRC Logfile is $logirc\.
}
alias autotime {
if ([$0]) {^assign idletime $0}
pecho Auto setaway idle time is $idletime\.
}
### MDeop, MOp, MVoice, MRemoveVoice, LK, and MK (by YaZoO and Vassago)
alias mass {
if ([$0]) {
if (([$0]!=[lk])&&([$0]!=[k])) {
if ([$0]==[d]) {@ mass_mode = [-ooo];^on ^names "*" /findops $$1-\;^on
^names - "*"}
{
if ([$0]==[o]) {@ mass_mode = [+ooo]}
if ([$0]==[v]) {@ mass_mode = [+vvv]}
if ([$0]==[s]) {@ mass_mode = [-vvv]}
if ([$mass_mode]!=[]) {^on ^names "*" /findnonops $$1-\;^on ^names - "*"}
}
//names $C
cwait domassmode
}{
if ([$0]==[lk]) {
^on ^names "*" {^assign lamkick $1-}
^names $C
wait
^assign lktmp no
@ lcnt = 0
pecho LKick started, please wait.
while ([$(#lamkick)]>lcnt) {
if (!match(@* $word($lcnt $lamkick))) {
if ([$word($lcnt $lamkick)]!=[$N]) {
if ([!$word($lcnt $lamkick)]!=[!]) {
^assign bkicked $word($lcnt $lamkick) ${bkicked}
^assign lktmp ppl
}}}
@ lcnt = lcnt + 1
}
if ([$lktmp]==[ppl]) {
@ lcnt = 0
while ([$(#bkicked)]>=lcnt) {
kkick $C $word($lcnt $bkicked) $pk
@ lcnt = lcnt + 1
}
pecho $bkicked have been kicked from $C.
}
{/pecho Everyone is opped on $C\.}
^on names - "*"
^assign -bkicked
^assign -lcnt
^assign -lktmp
}
if ([$0]==[k]) {
pecho Masskicking everyone from $C\.
^on ^441 "*" #
^on ^names "*" findops $$1-
names $C
cwait _kickcont
}}}{
pecho Usage: /MASS <o,d,v,s,k,lk> - O to op all non channel ops,
pecho d to deop all ops on the channel, v to give non-ops voice,
pecho and s to remove voice from all non-ops \(silence\), lk to
pecho mass kick all non-ops from the channel, and k to masskick
pecho EVERYONE from your current channel.
}}
alias _kickcont {
^assign kicklist $mdchange
kickthem
^assign -mdchange
^on ^names "*" findnonops $$1-
names $C
cwait _kickcont2
}
alias _kickcont2 {
^assign kicklist $mdchange
kickthem
^assign -mdchange
^on 441 - "*"
^on names - "*"
}
alias domassmode {
@ mdchangecnt = 1
while ([$(#mdchange)]>=mdchangecnt) {
mmode $C $mass_mode $decode($word(${mdchangecnt-1} $mdchange))
$decode($word($mdchangecnt $mdchange)) $decode($word(${mdchangecnt+1}
$mdchange))
@ mdchangecnt = mdchangecnt + 3
}
^assign -mdchangecnt
^assign -mdchange
^assign -mass_mode
}
alias findops {
if (([$[1]0] == [@]) && (match($0 @${N} $N)==0)) {^assign mdchange
$encode($strip(@ $0)) ${mdchange}}
if (([$[1]1] == [@]) && (match($1 @${N} $N)==0)) {^assign mdchange
$encode($strip(@ $1)) ${mdchange}}
if (([$[1]2] == [@]) && (match($2 @${N} $N)==0)) {^assign mdchange
$encode($strip(@ $2)) ${mdchange}}
if ([$3]) {/findops $3-}
}
alias findnonops {
if (([$[1]0] != [@]) && (match($0 @${N} $N)==0)) {^assign mdchange
$encode($strip(+ $0)) ${mdchange}}
if (([$[1]1] != [@]) && (match($1 @${N} $N)==0)) {^assign mdchange
$encode($strip(+ $1)) ${mdchange}}
if (([$[1]2] != [@]) && (match($2 @${N} $N)==0)) {^assign mdchange
$encode($strip(+ $2)) ${mdchange}}
if ([$3]) {/findnonops $3-}
}
alias kickthem {
@ mcnt = 0
if ([$kicklist]!=[]) {
while ([$(#kicklist)]>mcnt){
kkick $C $decode($word($mcnt $kicklist)) $pk
@ mcnt = mcnt + 1
if ([$(#kicklist)]>mcnt) {
kkick $C $decode($word($mcnt $kicklist)) $pk
@ mcnt = mcnt + 1
}}}
^assign -kicklist
^assign -mcnt
}
### Other KICK Routines (by YaZoO, Mods by Vassago)
alias fk {
if ([$0]) {
pecho FilterKick of $0 in $C started, please wait...
^assign fkfilt $0
^on ^who "*" {
if ((rmatch($1!$3@$4 $fkfilt))&&([$1]!=[$N])) {^assign ftbkick $encode($1)
${ftbkick}}
}
//who $C
cwait dofilterkick
}{/pecho Usage: /fk <hostname/*filter*>. Wildcards allowed.}
}
alias fbk {
if ([$0]) {
mmode $C +b $0
fk $0
}{/pecho Usage: /fbk <hostname/*filter*>. Wildcards allowed.}
}
alias dofilterkick {
@ fkcnt = 0
while ([$(#ftbkick)]>fkcnt) {
kkick $C $decode($word($fkcnt $ftbkick)) | Filter Kick $fkfilt |
@ fkcnt = fkcnt + 1
}
if ([$ftbkick]!=[]) {/pecho $fkcnt people kicked from $C with the filter
$fkfilt\.}
{/pecho No one matching filter $fkfilt is in channel $C\.}
^on who - "*"
^assign -ftbkick
^assign -fkfilt
}
alias k {
if ([$0]) {
if ([$1]) {/kkick $C $0 $1- }
{/kkick $C $0 $pk}
}{/pecho You must specify a nickname.}
}
### Setaway & Setback Routines (by Vassago)
alias setaway {
if ([$0]) {^assign awreason $encode($0-)}
{^assign awreason $encode($defumes)}
//away $decode($awreason) \(Away since $ftm($Z) $left(10 $stime($time()))\)
//me is away - $decode($awreason) - messages will be saved.
^assign isaway YES
^exec echo " [$left(10 $stime($time())) $ftm($Z)] Setaway: $safe($strip(!
$decode($awreason))) " >> $awayfle
@ away_messages = 0
}
alias away if ([$0]) {/setaway $0-}{/setback}
alias setback {
^assign isaway NO
//me has returned.
//away
pecho You have $away_messages messages waiting.
^assign temp $"[E/X] Display message file? (y/n) "
if (([$temp]==[y])||([$temp]==[yes])) {^exec cat $awayfle}
^assign temp $"[E/X] Save message file? (y/n) "
if (([$temp]==[n])||([$temp]==[no])) {
^on ^exec_error "awayrm *" #
^exec -name awayrm rm $awayfle
^wait %awayrm
^on exec_error - "awayrm *"
pecho Setaway message list has been deleted.
}{/pecho Setaway message list has not been deleted.}
@ away_messages = 0
^assign -temp
}
### Script Variable Save Aliases (by Vassago)
alias adadddfriend {
@ FRIENDS[$FRIENDADD] = [$0]
@ FRIENDADD = FRIENDADD + 1
}
alias adadddpriv {
@ PRIVS[$PRIVADD] = [$0-]
@ PRIVADD = PRIVADD + 1
}
alias adadddenemy {
@ ENEMIES[$ENEMYADD] = [$0]
@ ENEMYADD = ENEMYADD + 1
}
alias adadddcomment {
@ COMMENTS[$COMMENTADD] = [$0-]
@ COMMENTADD = COMMENTADD + 1
}
alias save {
pecho Save started, please wait...
^on ^exec_error "save *" #
^exec -name save mv $phoenixfile $phoenixbak
wait %save
^on ^exec_error - "save *"
^exec -name exsve cat >> $phoenixfile
wait
^on ^exec_error "exsve *" #
^writeln ### Master Script Save File for PhoEniX Version 2.25 from Vassago
^writeln ### Last saved: $left(10 $stime($time())) at $ftm($Z)
pecho Saving miscellaneous script settings...
^writeln # Miscellaneous Settings
^writest defumes $defumes
^writest idlemes $idlemes
^writest pk $pk
^writest pingmsg $pingmsg
^writest signmsg $signmsg
^writest usermode $usermode
^writest idletime $idletime
^writest bandef $bandef
^writest cstat $cstat
^writest extmes $extmes
^writest ctcpauto $ctcpauto
^writest autochannels $autochannels
pecho Saving Flood/Mass Protection settings...
^writeln # Flood and Mass Protection Settings
^writest igtypes $igtypes
^writest prot $prot
^writest flood_ok $flood_ok
^writest floodp $floodp
^writest nhp $nhp
^writest cprot $cprot
^writest resetcount $resetcount
^writest ig_count $ig_count
^writest msensor $msensor
^writest ksensor $ksensor
^writest msgsensor $msgsensor
^writest noticesensor $noticesensor
^writest ctcpsensor $ctcpsensor
^writest nicksensor $nicksensor
pecho Saving XDCC settings...
^writeln # XDCC Settings
^writest autoget $autoget
^writest autosend $autosend
^writest autoclose $autoclose
^writest autorename $autorename
^writest security $security
^writest uploaddir $UPLOADDIR
^writest downloaddir $DOWNLOADDIR
pecho Saving Friends and AutoBkick lists...
^writeln # Friends List
foreach FRIENDS XX {^writeln adadddfriend $FRIENDS[$XX]}
foreach PRIVS XX {^writeln adadddpriv $PRIVS[$XX]}
^writeln # Auto BKick List
foreach ENEMIES XX {^writeln adadddenemy $ENEMIES[$XX]}
foreach COMMENTS XX {^writeln adadddcomment $COMMENTS[$XX]}
^writeln # Notify List
pecho Saving notify list...
@ notify_size = [$#notify.ex]
@ notify_counter = 0
while (notify_counter < notify_size) {
@ ind = 0
^assign -notify_write
while (ind < 7) {
^assign notify_write $notify_write $word($notify_counter $notify.ex)
@ ind = ind + 1
@ notify_counter = notify_counter + 1
}
^writeln NOTIFY $notify_write
}
^exec -CLOSE %exsve
wait
^on ^exec_error - "exsve *"
pecho Save has been completed.
}
alias writest {
^msg %exsve avar $0 $1-
wait
}
alias writeln {
^msg %exsve $0-
wait
}
### AUTOBKICK LIST Routines (by Vassago)
alias check_enemy {
@ FUNCTION_RETURN = 0
foreach ENEMIES XX {
if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) {@ FUNCTION_RETURN
= 1}
}}
alias add_enemy {
@ ENTMP = rand(9999)
^assign ENEMIES[$ENTMP] $0
makelists
if ([$1]) {
^assign COMMENTS[$ENTMP] $1-
pecho Added $0 to your AutoBKick list with comment: $1-
}{/pecho Added $0 to your AutoBKick list with no comment.}
}
alias delete_enemy {
foreach ENEMIES XX {
if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) {
pecho Match: Removing $ENEMIES[$XX] from list.
^assign -ENEMIES[$XX]
^assign -COMMENTS[$XX]
makelists
}}}
alias addbk {
if ([$0]) {
if (rmatch($0 *@* *!* *.*)) {
if ([$check_enemy($0)]==1) {/delete_enemy $0}
add_enemy $0 $1-
}{
pecho Searching for nickname $0\...
^assign tempcomment $1-
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign TOADD $safe($3)@$4
if ([$check_enemy(*!*$TOADD)]==1) {/delete_enemy *!*$TOADD}
add_enemy $nban($safe($3) $4 *) $tempcomment
^assign -TOADD
^assign -tempcomment
}{/pecho I can't find $0 on IRC.}
}}{
pecho Usage: /ADDBK <nick/filter> <comment> to add a nick/filt to your
pecho AUTOBKICK list. You can place your bans in your bkick list by
pecho typing /DOBANS. If someone joins one of your channels with a
pecho user@host that matches in your list, they will be deopped,
pecho banned, and kicked from the channel automatically.
}}
alias listbk {
pecho Listing Enemies/Filters in your list:
@ THELIST = 0
foreach ENEMIES XX {
@ THELIST = THELIST + 1
if ([$COMMENTS[$XX]]!=[]) {/pecho #$THELIST $ENEMIES[$XX]
\($COMMENTS[$XX]\)}
{/pecho #$THELIST $ENEMIES[$XX]}
}
pecho End of AutoBKick list. A total of $THELIST people/filters.
^assign -THELIST
}
alias rembk {
if ([$0]) {
if ([$0]==[ALL]) {
purge ENEMIES
purge COMMENTS
^assign -BKLIST
pecho Your AutoBkick list has been cleared.
}{
if (rmatch($0 *@* *!* *.*)) {
if ([$check_enemy($0)]==1) {/delete_enemy $0}
{/pecho $0 is not in your AutoBKick list.}
}{
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign TOREMOVE $safe($3)@$4
if ([$check_enemy(*!*$TOREMOVE)]==1) {/delete_enemy *!*$TOREMOVE}
{/pecho *!*$TOREMOVE is not in your AutoBkick list.}
^assign -TOREMOVE
}{/pecho I can't find $0 on IRC.}}}}{
pecho Usage: /REMBK <nick or filter to remove from Auto Bkick list>.
pecho Type /REMBK ALL to clear your AutoBkick list.
}}
### CTCP Friends List Functions (by Vassago)
alias check_friend {
@ FUNCTION_RETURN = 0
foreach FRIENDS XX {
if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) {@ FUNCTION_RETURN
= 1}
}}
alias add_friend {
@ FRTMP = rand(9999)
^assign FRIENDS[$FRTMP] $0
setprivs $1-
pecho Added $0 to your Friends list with
pecho CTCP access of: $PRIVS[$FRTMP]
makelists
}
alias delete_friend {
foreach FRIENDS XX {
if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) {
pecho Match: Removing $FRIENDS[$XX] from list.
^assign -FRIENDS[$XX]
^assign -PRIVS[$XX]
makelists
}}}
alias addf {
if ([$0]) {
if (rmatch($0 *@* *!* *.*)) {
if ([$check_friend($0)]==1) {/delete_friend $0}
add_friend $0 $1-
}{
^assign STUFF $1-
pecho Searching for nickname $0\...
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign TOADD $safe($3)@$4
if ([$check_friend($0!$TOADD)]==1) {/delete_friend $0!$TOADD}
add_friend $nban($safe($3) $4 *) $STUFF
nnotice $0 You have been added to my Friends list with CTCP
nnotice $0 access of: $PRIVS[$FRTMP]
nnotice $0 Type /CTCP $N HELP for more information.
^assign -STUFF
^assign -TOADD
}{/pecho I can't find $0 on IRC.}
}}{
pecho Usage: /ADDF <nick/filter> <privileges>. Available privileges are
pecho INVITE, OP, & XDCC. To give them all access, type /ADDF <nick/filt>
pecho ALL. To change someone's privileges, just /ADDF them again.
}}
alias setprivs {
^assign -PRIVS[$FRTMP]
if ([$0]) {
if (match(INVITE $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [INVITE ]}
if (match(OP $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [OP ]}
if (match(XDCC $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [XDCC ]}
if (match(ALL $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [INVITE OP XDCC]}
if (!match($0 OP INVITE ALL XDCC)) {
pecho You must specify OP, INVITE, XDCC or ALL.
pecho Setting privileges to INVITE and XDCC. \(default\).
@ PRIVS[$FRTMP] = [INVITE XDCC]
}}{@ PRIVS[$FRTMP] = [INVITE XDCC]}}
alias listf {
pecho Listing Friends/Filters in your list and their access:
@ THELIST = 0
foreach FRIENDS XX {
@ THELIST = THELIST + 1
pecho #$THELIST $FRIENDS[$XX]
pecho Privileges: $PRIVS[$XX]
}
pecho End of Friends list. A total of $THELIST people.
^assign -THELIST
}
alias remf {
if ([$0]) {
if ([$0]==[ALL]) {
purge FRIENDS
purge PRIVS
pecho Your friends list has been cleared.
}{
if (rmatch($0 *@* *!* *.*)) {
if ([$check_friend($0)]==1) {/delete_friend $0}
{/pecho $0 is not on your Friends list.}
}{
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign TOREMOVE $safe($3)@$4
if ([$check_friend($0!$TOREMOVE)]==1) {/delete_friend $0!$TOREMOVE}
{/pecho $0!$TOREMOVE is not on your Friends list.}
^assign -TOREMOVE
}{/pecho I can't find $0 on IRC.}}}
}{
pecho Usage: /REMF <nick/filter to remove from Friends list>.
pecho To clear your friends list, type /REMF ALL.
}}
alias makelists {
^assign -OPLIST
^assign -FRIENDLIST
^assign -INVITELIST
^assign -SECLIST
^assign -BKLIST
foreach FRIENDS ii {
^assign FTMP *$uhostonly($FRIENDS[$ii])
if (match(OP $PRIVS[$ii])) {@ OPLIST = OPLIST ## [$FTMP ]}
if (match(INVITE $PRIVS[$ii])) {@ INVITELIST = INVITELIST ## [$FTMP ]}
if (match(XDCC $PRIVS[$ii])) {@ SECLIST = SECLIST ## [$FTMP ]}
@ FRIENDLIST = FRIENDLIST ## [$FTMP ]
}
foreach ENEMIES ii {@ BKLIST = BKLIST ## [$ENEMIES[$ii] ]}
}
alias uhostonly {
^assign uhost_tmp $0
^assign FUNCTION_RETURN $right(${@uhost_tmp-index(! $0)} $0)
}
### Notify Functions
on ^notify_signon "*" {
if (V > 19931229) {
if (!_n.list) {^timer -refnum 634 4 m.notify}
^assign _n.list $_n.list $0
}{
^assign _n.list $0
m.notify
}}
alias m.notify {
if (_n.list) {
Userhost $_n.list -cmd if ([$4]!=[<UNKNOWN>]) {
if ([$2] == [+]) {^assign tvar [Away]}{^assign -tvar}
pecho Signon at $ftm($Z) for $0 [$userdomain($strip(#~\;\$ $3)@$4)]
detected. $tvar
^assign -tvar
}}
^assign -_n.list
}
on ^notify_signoff "*" pecho Signoff at $ftm($Z) for $0 detected.
### NOTIFY Alias (by TG)
alias notify {
if ([$0]) {
if ([$left(1 $0)]==[-])
{
//notify $0-
^assign notify.ex $rem_w($mid(1 1000 $0-) $notify.ex)
}{
^assign notify.ex $notify.ex $strip(+ $0-)
//notify $0-
}}{
pecho Notify List: $notify.ex
//notify +
}}
### Miscellaneous Functions (by Jeremy Nelson)
alias rem_w {
@ _pattern = rmatch($0 $1-) - 1
if (_pattern != -1) {@ function_return = notw($_pattern $1-)}
{@ function_return = [$1-]}
}
alias notw {
if ([$0]) {@ _pad = [ ]}
{@ _pad = []}
@ _words = [$1-]
@ function_return = [$leftw($0 $1-)] ## [$_pad] ## [$restw(${[$0]+1} $1-)]
}
alias leftw {@ function_return = [$(1-$0)]}
alias restw {@ function_return = [$(${[$0]+1}-)]}
### Miscellaneous Aliases
alias finger {
^exec -kill %finger
if (([$0]==[-h])&&([$1]!=[])) {
Userhost $1 -cmd if ([$3] != [<UNKNOWN>]) {
pecho Launching Host finger on: $0 -> @$4
^eval exec -name finger exec finger @$$4
}{/pecho I can't find $0 on IRC.}}{
if (index(@ $0) > -1) {^exec -name finger exec finger $0}{
if ([$0]) {
Userhost $0 -cmd if ([$3] != [<UNKNOWN>]) {
pecho Launching finger on $0!$strip(#~!> $3)@$4
^eval exec -name finger exec finger $strip(#~!> $3)@$$4
}{/pecho I can't find $0 on IRC.}}
{/pecho Usage: /FINGER [[-h] <nickname>][[user]@full.hostname]}
}}}
alias _connect {
if ([$S]!=[]) {^assign _server $S}
if ([$ISAWAY]!=[YES]) {//away}
cwait EVAL quote MODE $N $usermode
}
alias chgst {
if ([$cstat]==[ON]) {
^assign ptmp $ptmp${TOTPACK}-
^assign ptmp $ptmp${GETCOUNT}
if ([$AUTOGET] == [ON])
{ ^assign ptmp ${ptmp}:G}
{ ^assign ptmp ${ptmp}:g}
if ([$AUTOSEND] == [ON])
{ ^assign ptmp ${ptmp}S}
{ ^assign ptmp ${ptmp}s}
if ([$AUTOCLOSE] == [ON])
{ ^assign ptmp ${ptmp}C}
{ ^assign ptmp ${ptmp}c}
if ([$AUTORENAME]==[ON])
{ ^assign ptmp ${ptmp}N}
{ ^assign ptmp ${ptmp}n}
if ([$SECURITY]==[ON])
{ ^assign ptmp ${ptmp}X}
{ ^assign ptmp ${ptmp}x}
if ([$ctcpauto]==[ON])
{ ^assign ptmp ${ptmp}A}
{ ^assign ptmp ${ptmp}a}
if ([$LOGIRC] == [ON])
{ ^assign ptmp ${ptmp}L}
{ ^assign ptmp ${ptmp}l}
if ([$FLOODP]==[ON])
{ ^assign ptmp ${ptmp}F}
{ ^assign ptmp ${ptmp}f}
if ([$prot]==[ON])
{ ^assign ptmp ${ptmp}M}
{ ^assign ptmp ${ptmp}m}
if ([$cprot]==[ON])
{ ^assign ptmp ${ptmp}P}
{ ^assign ptmp ${ptmp}p}
if ([$nhp]==[ON])
{ ^assign ptmp ${ptmp}H}
{ ^assign ptmp ${ptmp}h}
if ([$rejoin]==[ON])
{ ^assign ptmp ${ptmp}R}
{ ^assign ptmp ${ptmp}r}
^assign ptmp [${ptmp}]$OLD_STATUS
^set STATUS_FORMAT $ptmp
^assign -ptmp
}{^set STATUS_FORMAT $OLD_STATUS}}
alias _host {
EVAL Userhost $N -CMD if ([$3]) {/EVAL ^assign ownadd $0!$strip(~ $3)@$4}
{^timer 20 _host}
}
alias default {
pecho Setting DEFAULT Script settings.
pecho Enter deop sensitivity \(currently $msensor\).
@ temp = [$"[E/X] Deop value: "]
if (isnum($temp)==1){@ msensor = temp}
pecho Enter kick sensitivity \(currently $ksensor\).
@ temp = [$"[E/X] Kick value: "]
if (isnum($temp)==1){@ ksensor = temp}
pecho Enter nickname flood sensitivity \(currently $nicksensor\).
@ temp = [$"[E/X] Channel Nickname Flood value: "]
if (isnum($temp)==1){@ nicksensor = temp}
pecho Enter message flood sensitivity \(currently $msgsensor\).
@ temp = [$"[E/X] FloodP Msg Flood value: "]
if (isnum($temp)==1){@ msgsensor = temp}
pecho Enter notice flood sensitivity \(currently $noticesensor\).
@ temp = [$"[E/X] FloodP Notice Flood value: "]
if (isnum($temp)==1){@ noticesensor = temp}
pecho Enter CTCP flood sensitivity \(currently $ctcpsensor\).
@ temp = [$"[E/X] FloodP CTCP Flood value: "]
if (isnum($temp)==1){@ ctcpsensor = temp}
pecho Enter # of minutes auto-ignores should last \(currently $ig_count\).
@ temp = [$"[E/X] Automatic ignores last <in minutes>: "]
if (isnum($temp)==1){@ ig_count = temp}
pecho Enter the # of seconds until the timer resets \(currently
$resetcount\).
@ temp = [$"[E/X] FloodP timer subtraction value: "]
if (isnum($temp)==1){@ resetcount = temp}
pecho Enter types of messages to be ignored by /IG or flood activation.
pecho Valid: MSGS CTCP NOTICES WALLS WALLOPS INVITES NOTES PUBLIC CRAP, or
ALL.
pecho Currently: $igtypes
@ temp = [$"[E/X] Ignore type\(s\): "]
if (isalpha($temp)==1){@ igtypes = temp}
pecho Enter the message sent when someone PINGs you.
pecho Currently: $pingmsg
@ temp = [$"[E/X] Ping Message: "]
if (temp){@ pingmsg = temp}
pecho Enter your default kick message.
pecho Currently: $pk
@ temp = [$"[E/X] Default Kick Message: "]
if (temp){@ pk = temp}
pecho Enter your default /SETAWAY message.
pecho Currently: $defumes
@ temp = [$"[E/X] Default Setaway Message: "]
if (temp){@ defumes = temp}
pecho Enter your Auto-Setaway on Idle message.
pecho Currently: $idlemes
@ temp = [$"[E/X] Auto Setaway Message: "]
if (temp){@ idlemes = temp}
pecho Enter your default /SIGNOFF message.
pecho Currently: $signmsg
@ temp = [$"[E/X] Signoff Message: "]
if (temp){@ signmsg = temp}
pecho Enter the default usermode set on server CONNECT. \(Currently
$usermode\)
@ temp = [$"[E/X] Default Usermode: "]
if (temp){@ usermode = temp}
pecho Default settings complete. Type /SAVE to make them permanant.
^assign -temp
}
alias signoff {
if ([$0]) {
EVAL echo *** Signoff: $N \($0-\)
//signoff $0-
}{
EVAL echo *** Signoff: $N \($signmsg\)
EVAL //signoff $signmsg
}}
alias cycle {
pecho Cycling on channel $C\, one moment...
^assign tmpchan $C
//part $C
cwait //join $tmpchan
^assign -tmpchan
}
# Channel Stats Generator (by YaZoO)
alias chanst {
pecho Gathering information for channel $C\...
if ([$0]) {^assign chnl $0}
{^assign chnl $C}
@ cnscnt = 0
@ opedpl = 0
@ unoppl = 0
@ awaypl = 0
@ herepl = 0
@ ircopl = 0
^assign -ircopz
^on ^who "*" {
if (index(@ $2)!=-1) {@ opedpl = opedpl + 1}
{@ unoppl = unoppl + 1}
if (index(H $2)!=-1) {@ herepl = herepl + 1}
if (index(G $2)!=-1) {@ awaypl = awaypl + 1}
if (index(* $2)!=-1) {
@ ircopl = ircopl + 1
^assign ircopz $1 ${ircopz}
}
@ cnscnt = cnscnt + 1
}
//who $chnl
cwait givestats
}
alias givestats {
^on who - "*"
pecho Current channel statistics for $chnl
pecho Total users: $cnscnt | Ops: $opedpl | Unopped: $unoppl
pecho Users here: $herepl | Users Set Away: $awaypl
if ([$ircopz]!=[]) {/pecho IRC Ops: $ircopl \( $ircopz\)}
{/pecho IRC Ops: $ircopl }
}
alias bye {
sf_assigning
@ byecount = [$rand($byenum)]
^assign gone $(sf$byecount)
signoff $gone
}
alias sf_assigning {
^assign byenum 50
@ sf1=[Sorrow paid for valor is too much to recall.]
@ sf2=[Destiny, the crooked schemer, says the dead shall rise again.]
@ sf3=[Demonic link?]
@ sf4=[bad, Bad, REAL BAD link?]
@ sf5=[Missing link?]
@ sf6=[Where do we go from here?]
@ sf7=[The end is finally here. God have mercy!]
@ sf8=[Sweet taste of vindication, It turns to ashes in your mouth.]
@ sf9=[If you're fighting to live, It's ok to die!]
@ sf10=[Blue sky, Black death, I'm off to meet my maker!]
@ sf11=[Jump or die!]
@ sf12=[Feeling claustrophobic, like the walls are closing in.]
@ sf13=[Killed (AliJah (Flood ME, will ya??!?@!@))]
@ sf14=[Killed (GOD (Flood ME, will ya???!?@1!@1!!))]
@ sf15=[Killed (MaSoNrY (Flood ME, will ya???!@?@!?@!))]
@ sf16=[Killed (Fred1 (Flood ME, will ya?!@?@!?@!?@!))]
@ sf17=[No escaping pain, you belong to me.]
@ sf18=[I need a ride to the morgue, that's what 911 is for.]
@ sf19=[That that doesn't kill me, only makes me stronger.]
@ sf20=[Born from the dark, in the black cloak of night.]
@ sf21=[Set the world Afire!!!]
@ sf22=[They said it'd never come, we knew it was a lie.]
@ sf23=[All forms of life die now, the humans all succumb.]
@ sf24=[Time to kiss your ass goodbye, the end has just begun.]
@ sf25=[No time to change your fate, no time left, it's too late.]
@ sf26=[And if it comes, the living will envy the dead!]
@ sf27=[No one will be left to prove the humans existed.]
@ sf28=[We all live on one planet and it will all go up in smoke.]
@ sf29=[And now the final scene, a global darkening...]
@ sf30=[Einstein said `We'll use rocks on the other side'.]
@ sf31=[Oh shit, cops at my door!1!!@!!1!1!@!@@1!!]
@ sf32=[Badd link?]
@ sf33=[Supercalifragilisticexpealidotious link?]
@ sf34=[Killed (Vassago (Hey, who said you could use my script? :>))]
@ sf35=[No Survivors!!!!!! Set the World Afire!!!!]
@ sf36=[I walk, I walk alone, into the promised land...]
@ sf37=[There's a better place for me, but it's far, far away...]
@ sf38=[Everlasting life for me, in a perfect world.]
@ sf39=[But the time has come when all things shall pass.]
@ sf40=[This good thing passed away.]
@ sf41=[I'm a child of the air, I'm a witch of the wind.]
@ sf42=[Lie, steal and cheat, a real bad guy!]
@ sf43=[I'm not a fish, I'm a man!]
@ sf44=[Perhaps I'll try real life for awhile.]
@ sf45=[Rot in hell, it's time you know...to your master, off you go!]
@ sf46=[/<rad link?]
@ sf47=[Illegal w00p by link?]
@ sf48=[Excess Lameness]
@ sf49=[Killed (Mom (Don't hang around with them! They're troublemakers!))]
}
### Ignoring/Unignoring Functions (by Vassago)
alias ig {
if ([$0]) {
if ([$1]) {^assign _types $1-}
if (!rmatch($0 *!* *@* *.*)) {
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
^assign to_ignore *$4
if ([$_types]) {//^ignore $to_ignore $_types}
{//^ignore $to_ignore $igtypes}
pecho Now ignoring $0 [$3@$4].
^assign -_types
}{/pecho I can't find $0 on IRC.}
}{
if ([$_types]) {//^ignore $0 $_types}
{//^ignore $0 $igtypes}
pecho Now ignoring $0.
^assign -_types
}}{/pecho Usage: /IG <nickname of person to ignore by user@hostmask>.}
}
alias noig {
if ([$0]) {
Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) {
//^ignore $0 NONE
//^ignore *@$4 NONE
pecho $0 has been unignored.
}{/pecho I can't find $0 on IRC.}
}{/pecho Usage: /NOIG <nickname of person to unignore>.}
}
### CHANNEL WALLOPS (by Eagle-1, Mods from Vassago)
alias wall {
if ([$C]==0) {/pecho You must be on a channel to use /WALL.}{
pecho Sending WallOp message to $C, please wait...
^assign message $encode($0-)
pecho [WallOp/$C] $decode($message)
^on ^names "*" sendwall $$1-
^names $C
cwait ^on names - "*"
}}
alias sendwall {
if ([$0]) {
if (([$[1]0] == [@]) && ([$0] != [@] ## N)) {
if ([$sendlist]==[]) {
^assign sendlist $strip(@ $0)
^assign showlist $strip(@ $0)
sendwall $1-
}{
^assign sendlist $strip(@ $0),$sendlist
^assign showlist $strip(@ $0) $showlist
sendwall $1-
}}{/sendwall $1-}}{
if ([$sendlist]!=[]) {
//^notice $sendlist [WallOp/$C] $decode($message)
pecho WALLOPED: $showlist
^assign -sendlist
^assign -showlist
}}}
### NET Alias for Window Control (by Vassago)
alias net {
if ([$0]) {
pecho Hit CONTROL-W then ? for help on windowing commands.
pecho Creating a window on server $0, please wait...
^window new
if ([$1]) {/EVAL window server $0:$1::_$N}
{/EVAL window server $0:6667::_$N}}{
pecho Usage: /net <server> [<port>]
pecho /NET creates a new window and connects it to <server>.
pecho CONTROL-W + <Letter> is used for most window commands:
pecho ^W? - Shows you this help screen.
pecho ^WK - kills the current window.
pecho ^WH - hides the current window.
pecho ^WS - shows and balances all windows.
pecho ^WC - clears the current window.
pecho ^WL - lists all windows.
pecho ^WP - Goes to the previous window.
pecho ^WN or /wn - Goes to the next window.
pecho ^W<1-9> - Changes to window number <1-9>.
pecho /wr <n> to reduce a window <n> number of lines.
pecho /wg <n> to grow a window <n> number of lines.
}}
bind ^W meta2_character
bind ^W? parse_command net
bind ^Wh parse_command window hide
bind ^Wn parse_command window next
bind ^Wp parse_command window previous
bind ^Wk parse_command window kill
bind ^Wl parse_command window list
bind ^Wc parse_command clear -a
bind ^Ws parse_command win_show
bind ^W1 parse_command window goto 1
bind ^W2 parse_command window goto 2
bind ^W3 parse_command window goto 3
bind ^W4 parse_command window goto 4
bind ^W5 parse_command window goto 5
bind ^W6 parse_command window goto 6
bind ^W7 parse_command window goto 7
bind ^W8 parse_command window goto 8
bind ^W9 parse_command window goto 9
alias wn window next
alias wr window shrink
alias wg window grow
alias win_show {
^window show 2
^window show 1
^window balance
}
### XDCC File Transfer Script (By XaBi, Extensive mods by Vassago)
# This is NOT the original XDCC script - it's been modified many times
# by me - XaBi's didn't have the counters or upload/download directories
# and several other things I've added or changed to work better.
# XDCC Counter/Limits/Idle Close (by Vassago)
# Using On Windows is the ONLY way to do this correctly via script (sigh)
on -window "% ??? DCC SEND:* %sec" if ([$1]==[***]) {/subdccs}
on -window "% ??? DCC SEND:* lost" if ([$1]==[***]) {/subdccs}
on -window "% ??? DCC SEND:* closed" if ([$1]==[***]) {/subdccs}
alias subdccs {
if (dccsent > 0) {@ dccsent = dccsent - 1}
if ([$gonnacount]==[]) {
^assign gonnacount ON
^timer 55 updatecount
}}
alias updatecount {
if ([$counting]!=[ON]) {
^assign counting ON
@ dccsent = 0
^on ^window "*" {/if ([$1]==[SEND]) {@ dccsent = dccsent + 1}}
//dcc list
^on window - "*"
^assign -counting
^assign -gonnacount
}{^timer 30 updatecount}
}
alias iswaiting {
^assign counting ON
^assign dccfilename none
^assign liststarted no
^assign listdone no
^assign chnick $0
^assign chfile $1
^assign dccwaiting no
^on ^window "*" {
if (([$listdone]==[no])&&([$liststarted]==[yes])) {
if (([$1]==[SEND])&&([$3]==[Waiting])&&(match(*$chfile
$6)==1)&&([$2]==[$chnick])) {
^assign dccwaiting yes
^assign dccfilename $6
}}
{
if (([$listdone]==[no])&&([$1]==[Type])&&([$2]==[nick])&&([$3]==[status]))
{^assign liststarted yes}
}}
//dcc list
^on window - "*"
if ([$liststarted]==[no]) {^assign dccwaiting dunno}
^assign -listdone
^assign -liststarted
^assign -chnick
^assign -chfile
^assign -counting
}
alias checksend {
iswaiting $0 $1
if ([$dccwaiting]==[dunno]) {^timer 1 checksend $0 $1}
{
if ([$dccwaiting]==[yes]) {
^timer 60 closesend $0 $1
if ([$lastnotdcc]!=[$0]) {
nnotice $0 You have DCCs pending. Type /DCC GET $N\.
^assign lastnotdcc $0
tref 508 15 ^assign -lastnotdcc
}}}
^assign -dccwaiting
^assign -dccfilename
}
alias closesend {
iswaiting $0 $1
if ([$dccwaiting]==[dunno]) {^timer 1 closesend $0 $1}
{
if ([$dccwaiting]==[yes]) {
//^dcc close send $0 $dccfilename
^subdccs
if ([$lastnotdcc]!=[$0]) {
pecho One or more DCC SENDs to $0 have timed out.
^assign lastnotdcc $0
tref 509 30 ^assign -lastnotdcc
}}}
^assign -dccfilename
}
alias xdccmsg {
if ([$hostonly($1)]!=[$LASTXDCCMSG]) {
if (match($2 HELP LIST SEND)) {/$2COMMAND $0 $1 $3-}
{/nnotice $0 Try /MSG $N XDCC HELP.}
^assign LASTXDCCMSG $hostonly($0)
tref 510 5 ^assign -LASTXDCCMSG
}}
alias HELPcommand {
if ([$hostonly($1)]!=[$LASTHELPED]) {
nnotice $0 /MSG $N XDCC LIST - to get the list of offered packs.
nnotice $0 /MSG $N XDCC LIST #<N> - to get more info on pack #<N>.
nnotice $0 /MSG $N XDCC SEND #<N> - to send pack #<N>.
^assign LASTHELPED $hostonly($1)
tref 511 45 ^assign -LASTHELPED
}}
alias LISTcommand {
if ([$hostonly($1)]!=[$lastlister]) {
if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) {
if ([$2]) {
if ([$[1]2] == [#]) {
@ TEMP = [$2]
@ NUM = right(${@TEMP-index(# $2)+1} $2)
if (NUM <= TOTPACK) {
pecho List of pack #$NUM request received from $0.
@ TEMPFILE = []
@ TEMPTOT = 0
@ COUNT0 = 1
nnotice $0 Pack: $ARRAYDESC[$NUM]
nnotice $0 Length File
while (COUNT0 <= ARRAYTOTF[$NUM]) {
nnotice $0 $[10]ARRAYLENG[$NUM][$COUNT0] $X_FILE($ARRAYFILE[$NUM][$COUNT0])
@ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT0]
@ COUNT0 = COUNT0 + 1
}
nnotice $0 ---------- -------------------------------------------------
nnotice $0 $[10]TEMPTOT $ARRAYTOTF[$NUM] file\(s\)
}{/nnotice $0 Pack $2 doesn't exist. Try /MSG $N XDCC LIST}}
{/nnotice $0 XDCC LIST $2 is invalid. /MSG $N XDCC HELP.}
}{
if (TOTPACK > 0) {
pecho All pack list request from $0 [$Userdomain($1)]
@ COUNT0 = 1
nnotice $0 Pack Description
while (COUNT0 <= TOTPACK) {
nnotice $0 #$[3]COUNT0 $ARRAYDESC[$COUNT0]
@ COUNT0 = COUNT0 + 1
}}{/nnotice $0 No files offered.}}
^assign lastlister $hostonly($1)
tref 512 15 ^assign -lastlister
}{
nnotice $0 No files offered.
pecho Unregistered XDCC LIST request from $0 [$Userdomain($1)]
}}}
alias SENDcommand {
if ([$AUTOSEND] == [ON] || [$MYSEND] == [YES]) {
if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) {
if (([$2]!=[])&&(isnum($2)==1)&&(isalpha($2)==0)) {
if ([$[1]2] == [#]) {
@ TEMP = [$2]
@ NUM = right(${@TEMP-index(# $2)+1} $2)
if (NUM <= TOTPACK) {
@ dcctmp = dcclimit - dccsent
if (ARRAYTOTF[$NUM]>dcctmp) {
pecho DCC Limit of $dcclimit\ reached. Sending $2 to $0 would exceed
$dcctmp\ free slots.
nnotice $0 DCC Limit reached. $ARRAYTOTF[$NUM] slots needed, only $dcctmp\
free.
}{
pecho Sending $2 to $0 [$Userdomain($1)]
nnotice $0 Sending you $ARRAYDESC[$NUM]\.
@ COUNT1 = 1
@ TEMPTOT = 0
while (COUNT1 <= ARRAYTOTF[$NUM]) {
^dcc send $0 $ARRAYFILE[$NUM][$COUNT1]
@ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT1]
@ COUNT1 = COUNT1 + 1
}
nnotice $0 Total files sent: $ARRAYTOTF[$NUM]\. You'll need $TEMPTOT\ bytes.
}}{/nnotice $0 File $2 does not exist. /MSG $N XDCC LIST.}
}{/nnotice $0 XDCC SEND $2 is invalid. /MSG $N XDCC HELP.}}
{/nnotice $0 There is no such file.}
}{
nnotice $0 There is no such file.
pecho Unregistered user XDCC SEND request from $0 [$1].
}}{/nnotice $0 That function has been disabled.
}}
alias xdcc {
if (match($0 LOAD PSEND CLOSE SAVE GET DIR AUTOCLOSE HELP LIST PLIST SEND
STATUS NOTICE OFFER DOFFER LIMIT AUTOGET AUTOSEND GLIST OVERWRITE ULDIR
DLDIR AUTORENAME SEC))
{$0MCOMMAND $1-}
{/HELPMCOMMAND}
}
alias HELPMCOMMAND {/pecho Try /XDCC HELP. \(You must have PHOENIX.HLP
loaded first\).}
alias LIMITmcommand {
^assign TMPLIMIT $word(0 $"[E/X] Enter new limit for DCC SENDS: ")
if ([$TMPLIMIT]!=[]) {
if (isnum($TMPLIMIT)==1) {@ dcclimit = TMPLIMIT}
^assign -TMPLIMIT
}
pecho XDCC Limit: $dcclimit\
}
alias PSENDmcommand {
if (TOTPACK > 0)
{ @ TMPVAR = []
@ NICKLIST = []
^assign TMPVAR $"[E/X] Pack to send: "
if ([$TMPVAR]!=[])
{ if (TMPVAR <= TOTPACK)
{ ^assign NICKLIST $"[E/X] Nicks: "
if ([$NICKLIST])
{ @ COUNT2 = 0
@ MYSEND = [YES]
while (word($COUNT2 $NICKLIST))
{ SENDcommand $word($COUNT2 $NICKLIST) #$TMPVAR
@ COUNT2 = COUNT2 + 1}
@ MYSEND = [NO]}}{/pecho Pack #$TMPVAR doesn't exist. Try /XDCC LIST.}}}
{/pecho There are no packs created.}}
alias LISTmcommand {
if ([$0]) {
if ([$[1]0] == [#]) {
@ TEMP = [$0]
@ NUM = right(${@TEMP-index(# $0)+1} $0)
if (NUM <= TOTPACK) {
@ COUNT2 = 1
@ TEMPTOT = 0
pecho PACK: $ARRAYDESC[$NUM]
while (COUNT2 <= ARRAYTOTf[$NUM]) {
pecho FILE: $ARRAYFILE[$NUM][$COUNT2]
@ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT2]
@ COUNT2 = COUNT2 + 1
}
pecho Total: $TEMPTOT Bytes on $ARRAYTOTF[$NUM] file\(s\)}
{/pecho Pack $0 doesn't exist.}}
{/pecho Usage: /XDCC LIST <Pack #>}}{
if (TOTPACK > 0) {
@ COUNT2 = 1
pecho Pack Description
while (COUNT2 <= TOTPACK) {
pecho #$[2]COUNT2 $ARRAYDESC[$COUNT2]
@ COUNT2 = COUNT2 + 1}}
{/pecho There are no files offered.
}}}
alias NOTICEmcommand //say ** $TOTPACK file\(s\) offered. For file list,
/MSG $N XDCC LIST.
alias PLISTmcommand {
if (TOTPACK > 0) {
//say ** PACKS OFFERED. /MSG $N XDCC SEND #N to autosend pack #N
@ _dcctemp = dcclimit - dccsent
//say ** There are $_dcctemp\ of $dcclimit\ DCC slots available.
^assign -_dcctemp
@ COUNT3 = 1
while (COUNT3 <= TOTPACK) {
//say #$COUNT3 $ARRAYDESC[$COUNT3]
@ COUNT3 = COUNT3 + 1
}}{/pecho There are no files offered.}}
alias SENDmcommand {
if ([$0]) {@ TMPVAR = [$0]}
{
@ TMPVAR = []
^assign TMPVAR $"[E/X] Files to send: "
}
if ([$TMPVAR]) {
if ([$getdir()] == [OK]) {
if ([$1]) {@ NICKLIST = [$1-]}
{
@ NICKLIST = []
^assign NICKLIST $"[E/X] Nicks: "
}
if ([$NICKLIST]) {
dosend
pecho Send finished.
}}{/pecho Please check the files.}}}
alias getdir {
@ FILECOUNT = 0
^on -exec_error "DIR1 *" {/pecho Error: $1-}
^on ^exec "DIR1 *" addfile $$1-
@ COUNT4 = 0
while (word($COUNT4 $TMPVAR))
{ @ TMPFILE = word($COUNT4 $TMPVAR)
if ([$[1]TMPFILE] == [/]) {}
{ @ TMPFILE = [$UPLOADDIR/$TMPFILE] }
^exec -name DIR1 ls -ld $TMPFILE
^wait %DIR1
@ COUNT4 = COUNT4 + 1 }
if ( FILECOUNT == 0 )
{ @ function_return = [ERROR] }
{ @ function_return = [OK]
}}
alias addfile {
if ([$[1]0] == [-])
{ @ FILECOUNT = FILECOUNT + 1
if ([$8])
{ @ FILELIST[$FILECOUNT] = [$8]
@ FILELENG[$FILECOUNT] = [$4] }
{ @ FILELIST[$FILECOUNT] = [$7]
@ FILELENG[$FILECOUNT] = [$3]
}}}
alias dosend {
@ COUNT5 = 0
while (word($COUNT5 $NICKLIST))
{ @ COUNT6 = 1
@ SENDTOT = 0
while (COUNT6 <= FILECOUNT)
{ ^dcc send $word($COUNT5 $NICKLIST) $FILELIST[$COUNT6]
@ SENDTOT = SENDTOT + FILELENG[$COUNT6]
@ COUNT6 = COUNT6 + 1
}
nnotice $word($COUNT5 $NICKLIST) $SENDTOT Bytes in $FILECOUNT file\(s\).
@ COUNT5 = COUNT5 + 1
}}
alias STATUSmcommand {
pecho +--------+ Current XDCC Configuration +--------+
pecho Autoget Offered DCCs $AUTOGET
pecho Autosend from List $AUTOSEND
pecho Autoclose DCC SENDS $AUTOCLOSE
pecho Overwrite existing files $OVERWRITE
pecho AutoRename existing files $AUTORENAME
pecho Files Offered $TOTPACK
pecho Get Count $GETCOUNT
pecho Upload Directory $UPLOADDIR
pecho Download directory $DOWNLOADDIR
pecho +----------------------------------------------+
}
alias OFFERmcommand {
@ TMPVAR = []
@ TMPDESC = []
^assign TMPVAR $"[E/X] Files: "
if ([$TMPVAR])
{ if ([$getdir()] == [OK])
{ ^assign TMPDESC $"[E/X] Description: "
if ([$TMPDESC])
{ @ TOTPACK = TOTPACK + 1
@ COUNT = 1
@ SENDTOTAL = 0
while (COUNT <= FILECOUNT)
{ @ ARRAYFILE[$TOTPACK][$COUNT] = [$FILELIST[$COUNT]]
@ ARRAYLENG[$TOTPACK][$COUNT] = [$FILELENG[$COUNT]]
@ SENDTOTAL = SENDTOTAL + FILELENG[$COUNT]
@ ARRAYTOTF[$TOTPACK] = [$FILECOUNT]
@ COUNT = COUNT + 1 }
@ SENDTOTAL = SENDTOTAL / 1024
if (FILECOUNT==1) {@ ARRAYDESC[$TOTPACK] = [$TMPDESC \[$SENDTOTAL\kb,
$FILECOUNT\ file\]]}
{@ ARRAYDESC[$TOTPACK] = [$TMPDESC \[$SENDTOTAL\kb, $FILECOUNT\ files\]]}
pecho $FILECOUNT\ file\(s\) added to Pack #$TOTPACK\.
chgst}{}}
{/pecho One or more of these files don't exist.}}}
alias DOFFERmcommand {
if (TOTPACK > 0)
{ @ TMPNUM = []
^assign TMPNUM $"[E/X] Pack to remove (* for all): "
if ([$TMPNUM])
{ if ([$TMPNUM] == [*])
{ @ TOTPACK = 0
chgst
pecho All packs removed from offer list. }
{ if ((TMPNUM <= TOTPACK) && (TMPNUM > 0))
{ @ COUNT7 = TMPNUM
while (COUNT7 < TOTPACK)
{ @ COUNT8 = ARRAYTOTF[${COUNT7+1}]
while (COUNT8 > 0)
{ @ ARRAYFILE[$COUNT7][$COUNT8] = [$ARRAYFILE[${COUNT7+1}][$COUNT8]]
@ ARRAYLENG[$COUNT7][$COUNT8] = [$ARRAYLENG[${COUNT7+1}][$COUNT8]]
@ COUNT8 = COUNT8 - 1 }
@ ARRAYDESC[$COUNT7] = [$ARRAYDESC[${COUNT7+1}]]
@ ARRAYTOTF[$COUNT7] = [$ARRAYTOTF[${COUNT7+1}]]
@ COUNT7 = COUNT7 + 1 }
@ TOTPACK = TOTPACK - 1
pecho Pack #$TMPNUM removed from offer list.
chgst }
{/pecho Try a number between 1 and $TOTPACK\.
}}}{}}
{/pecho There are no files offered.
}}
alias AUTOGETmcommand {
if (match($0 ON OFF)) {/upp AUTOGET $0}
pecho Autogetting of offered files is $AUTOGET\.
}
alias SECmcommand {
if (match($0 ON OFF)) {/upp SECURITY $0}
pecho XDCC Security is $SECURITY\.
}
alias AUTOSENDmcommand {
if (match($0 ON OFF)) {/upp AUTOSEND $0}
pecho Autosending from offer list is $AUTOSEND\.
}
alias cstat {
if (match($0 ON OFF)) {/upp cstat $0}
pecho Changing the status line is $cstat\.
}
alias AUTOCLOSEmcommand {
if (match($0 ON OFF)) {/upp AUTOCLOSE $0}
pecho Autoclose offered files \(refuse send\) is $AUTOCLOSE\.
}
alias AUTORENAMEmcommand {
if (match($0 ON OFF)) {/upp AUTORENAME $0}
pecho AutoRenaming of existing offered files is $AUTORENAME\.
}
alias OVERWRITEmcommand {
if (match($0 ON OFF)) {/upp OVERWRITE $0}
pecho Overwrite existing files \(no prompting\) is $OVERWRITE\.
}
alias ULDIRmcommand {
if ([$0]) {^assign newdir $0}
{^assign newdir $"[E/X] New upload directory: " }
if ([$newdir]!=[]) {
^assign olddir $W
^cd $newdir
^assign uploaddir $W
^cd $olddir
^assign -olddir
}
^assign -newdir
pecho Upload directory: $uploaddir\.
}
alias DLDIRmcommand {
if ([$0]) {^assign newdir $0}
{^assign newdir $"[E/X] New download directory: " }
if ([$newdir]!=[]) {
^assign olddir $W
^cd $newdir
^assign downloaddir $W
^cd $olddir
^assign -olddir
}
^assign -newdir
pecho Download directory: $downloaddir\.
}
alias x_file {
^assign TMP $0
if (rindex(/ $TMP))
{ @ function_return = right(${@TMP-rindex(/ $0)+1} $0) }
{ @ function_return = [$0] }
}
alias adddccrequest {
@ GETCOUNT = GETCOUNT + 1
@ ARRAYFILEGET[$GETCOUNT] = [$0]
@ ARRAYNICKGET[$GETCOUNT] = [$1]
chgst
}
alias CLOSEmcommand {
if (GETCOUNT > 0)
{ @ TMPNICK = []
^assign TMPNICK $"[E/X] Nick to remove get files (* for all): "
if ([$TMPNICK])
{ if ([$TMPNICK] == [*])
{ @ GETCOUNT = 0
foreach ARRAYFILEGET XX
{ //^dcc close get $ARRAYNICKGET[$XX] }
chgst
pecho All files removed from get list. }{
@ COUNT8 = 1
@ COUNT9 = 1
@ COUNT10 = GETCOUNT
while (COUNT9 <= COUNT10)
{ if ([$ARRAYNICKGET[$COUNT9]] != [$TMPNICK])
{ @ ARRAYFILEGET[$COUNT8] = [$ARRAYFILEGET[$COUNT9]]
@ ARRAYNICKGET[$COUNT8] = [$ARRAYNICKGET[$COUNT9]]
@ COUNT8 = COUNT8 + 1 }
{ //^dcc close get $TMPNICK
@ GETCOUNT = GETCOUNT - 1}
@ COUNT9 = COUNT9 + 1}
chgst
}}{}}{/pecho There are no pending files.
}}
alias DIRmcommand {
@ TMPVAR = []
^assign TMPVAR $"[E/X] Dir: "
if ([$getdir()] == [OK])
{ @ COUNT8 = 1
pecho Length File
while (COUNT8 <= FILECOUNT)
{ pecho $[10]FILELENG[$COUNT8] $FILELIST[$COUNT8]
@ COUNT8 = COUNT8 + 1
}}}
alias GETmcommand {
if (GETCOUNT > 0)
{ @ TMPNICK = []
^assign TMPNICK $"[E/X] Nick to get files (* for all): "
if ([$TMPNICK])
{ if ([$TMPNICK] == [*])
{ @ GETCOUNT = 0
foreach ARRAYFILEGET XX {//^dcc get $ARRAYNICKGET[$XX] $ARRAYFILEGET[$XX]}
chgst
pecho All files taken from get list. }
{ @ COUNT8 = 1
@ COUNT9 = 1
@ COUNT10 = GETCOUNT
pecho Getting all files offered from $TMPNICK\.
while (COUNT9 <= COUNT10)
{ if ([$ARRAYNICKGET[$COUNT9]] != [$TMPNICK])
{ @ ARRAYFILEGET[$COUNT8] = [$ARRAYFILEGET[$COUNT9]]
@ ARRAYNICKGET[$COUNT8] = [$ARRAYNICKGET[$COUNT9]]
@ COUNT8 = COUNT8 + 1 }
{ //^dcc get $TMPNICK $ARRAYFILEGET[$COUNT9]
@ GETCOUNT = GETCOUNT - 1 }
@ COUNT9 = COUNT9 + 1 }
chgst
}}{}}{/pecho There are no files offered.
}}
alias GLISTmcommand {
if (GETCOUNT > 0)
{ @ TMPNICK = []
^assign TMPNICK $"[E/X] Nick to list pending files (* for all): "
if ([$TMPNICK])
{ @ COUNT11 = 1
pecho Nick File
while (COUNT11 <= GETCOUNT)
{ if (match($TMPNICK $ARRAYNICKGET[$COUNT11]))
{ pecho $[9]ARRAYNICKGET[$COUNT11] $ARRAYFILEGET[$COUNT11] }
{}
@ COUNT11 = COUNT11 + 1
}}{}}{/pecho There are no pending files.
}}
alias LOADmcommand {
if ([$0])
{/pecho Loading XDCC Offer file: $0\...
@ OLDNUM = TOTPACK
@ LOAD_ERROR = [NO]
@ LINECOUNT = 0
@ COUNT12 = [desc comment]
^on ^exec_error "load_files *" {
@ LOAD_ERROR = [YES]
if ([$LOADPHOENIX]==[]) {/pecho Error: $1-}
}
^on ^exec "load_files *" add_line $$1-
^exec -name load_files cat $0
^wait %load_files
if ([$LOAD_ERROR] == [NO]) {
@ COUNT = 1
while (COUNT <= LINECOUNT)
{ add_file $XDCCFILELINE[$COUNT]
@ COUNT = COUNT + 1 }
if (ARRAYTOTF[$TOTPACK] == 0) {@ TOTPACK = TOTPACK - 1}
chgst
}
if ([$LOAD_ERROR] != [NO]) {@ TOTPACK = OLDNUM}}{
if ([$OFFERFILE]!=[]) {
pecho Default: Loading $OFFERFILE\...
loadmcommand $OFFERFILE
}{/pecho There is no such file in the specified directory.}}}
alias SAVEMCOMMAND {
if ([$0]) {
pecho Saving file...
@ TEMP1 = [$1-]
@ SAVE_ERROR = [NO]
@ TEMP2 = []
@ COUNT = 0
@ LINECOUNT = 0
^on ^exec_error "fsave *" #
^exec -name fsave rm $OFFERFILE
^wait %fsave
^on ^exec_error - "fsave *"
if ([$1]) {
while (word($COUNT $TEMP1)) {
if ([$[1]word($COUNT $TEMP1)] != [#]) {
pecho Error: $word($COUNT $TEMP1) is not a valid pack format.
@ SAVE_ERROR = [YES]
}{
@ TEMP = word($COUNT $TEMP1)
@ NUM = right(${@TEMP-1} $TEMP)
if (NUM > TOTPACK) {
pecho Error: #$NUM does't exist.
@ SAVE_ERROR = [YES]
}{@ TEMP2 = [$TEMP2] ## [ $NUM]}}
@ COUNT = COUNT + 1}}{
while (COUNT < TOTPACK) {
@ COUNT = COUNT + 1
@ TEMP2 = [$TEMP2] ## [ $COUNT]
}}
if ([$SAVE_ERROR] != [YES]) {
@ COUNT = 0
@ SAVE_ERROR = [NO]
while (word($COUNT $TEMP2)) {
add_line Comment Pack $COUNT
add_line desc $ARRAYDESC[$word($COUNT $TEMP2)]
@ COUNT1 = 0
while (COUNT1 < ARRAYTOTF[$word($COUNT $TEMP2)]) {
@ COUNT1 = COUNT1 + 1
add_line files $ARRAYFILE[$word($COUNT $TEMP2)][$COUNT1]
}
@ COUNT = COUNT + 1
}
^on ^exec_error "save_xdcc_file *" {
pecho Error: $1-
@ SAVE_ERROR = [YES]
}
@ COUNT = 0
while (COUNT < LINECOUNT) {
@ COUNT = COUNT + 1
^exec -name s_xdcc_f echo $strip(\;\(\)\{\}$$\`\|\'\" $XDCCFILELINE[$COUNT])
>> $0
^wait %s_xdcc_f
}
if ([$SAVE_ERROR] = [NO]) {/pecho File saved correctly.}
}}{
if ([$OFFERFILE]) {
pecho Default: Saving as $OFFERFILE\...
savemcommand $OFFERFILE
}{/pecho Usage: /XDCC SAVE <filename>}}}
alias add_line {
@ LINECOUNT = LINECOUNT + 1
@ XDCCFILELINE[$LINECOUNT] = [$0-]
}
alias add_file {
if (match($0 $COUNT12))
{ if ([$0] == [desc])
{ @ OLDNUM = TOTPACK
if ((TOTPACK >= 0) && (ARRAYTOTF[$TOTPACK] == 0)) {}
{ @ TOTPACK = TOTPACK + 1 }
@ ARRAYDESC[$TOTPACK] = [$1-]
@ ARRAYTOTF[$TOTPACK] = 0
@ COUNT12 = [files comment] }
{ if ([$0] == [files])
{ @ COUNT12 = [desc files comment]
@ TMPVAR = [$1-]
if ([$getdir()] == [OK])
{ @ COUNT13 = 1
while (COUNT13 <= FILECOUNT)
{ @ ARRAYTOTF[$TOTPACK] = ARRAYTOTF[$TOTPACK] + 1
@ ARRAYFILE[$TOTPACK][$ARRAYTOTF[$TOTPACK]] = [$FILELIST[$COUNT13]]
@ ARRAYLENG[$TOTPACK][$ARRAYTOTF[$TOTPACK]] = [$FILELENG[$COUNT13]]
@ COUNT13 = COUNT13 + 1}}{}}{}}{}}{
@ LOAD_ERROR = [YES]
pecho Error loading offer file on line:
pecho [$COUNT] $0-
pecho First word on line isn't [$COUNT12]\.
@ COUNT = LINECOUNT
}}
### About PhoEniX
alias ABOUTGCOMMAND {
echo +------------------+ PhoEniX Version 2.25 from Vassago
+------------------+
echo
echo This script has been made possible through the hard work and testing of
echo many people. To create it, I used many different scripts as well as my
own,
echo edited and changed to work correctly with PhoEniX. To date, these
people
echo are YaZoO, XaBi, TG, & CKeeper. Thanks also go to the following script
echo contributors: Robey, Fred1, Eagle-1, Daemon, WinterHawk, BeeF, and wc.
echo
echo I've made PhoEniX for free for about 2 years now. If you like the
script,
echo or any of my scripts, and would like to help me out, please send $10
echo cash, check or money order \(payable in US funds please\) to:
echo Ryan Addams, P.O. Box 720916, Oklahoma City, OK, 73172, U.S.A.
echo Include your email address and you will be registered, as well as
echo receiving updated copies of PhoEniX as they are released.
echo In return you will receive 1\) A free copy of my booklet,
echo 'Vassago's Guide to IRC', 2\) Prompt IRC technical support via email to
echo
ro...@unix.mclv.net - I'll probably answer your mail even if you don't
echo register, but my time is valuable and it may take a little longer.
echo 3\) The author's undying gratitude for helping him out. :> I'm trying
to
echo get through school on out of state tuition, and it's costing me a
fortune :\(
echo So anything will help me immensely. If you want to send MORE, then by
all
echo means, do so :>
^assign PTMP $"-+ Enter to Continue +-"
^assign -PTMP
echo
echo A partial listing of Vassago's scripts for IRC:
echo
echo ANTIKILL.IRC - Attempts to stop you from being the victim of a mass
echo collision kill, with a 50-75% success rate.
echo *DJINN.TAR.GZ - Vassago's DJiNN IRC Script, which is a pretty much
echo unique little script for people who are into DCCing
echo and fast script responses.
echo *GARGOYLE.IRC - The script that started it all, GargOyle, the
echo precursor to PhoEniX and DJiNN, and most of the
echo hacks and modified IRC scripts on the internet.
echo *PHOENIX.TAR.GZ - PhoEniX, the full featured, most widely used IRC
echo script all over the net. Everything you ever
echo wanted or will want in an IRC script.
echo SCYTHE.IRC - Vassago's IRC warscript. Not for the faint of heart.
echo VEVES.IRC - Vassago's VEVES script, with unusual features like
echo VeveBots and split finders.
echo
echo * \(indicates a full IRC script package. All are available via FTP to
echo
jcowan.reslife.okstate.edu or
unix.mclv.net in /pub/irc/phoenix.\)
echo
+----------------------------------------------------------------------------+
}
### Final RunTime Commands
@ LOADPHOENIX = [Y]
EVAL pecho Loading Save file: $phoenixfile\...
EVAL load $phoenixfile
EVAL loadmcommand $offerfile
EVAL makelists
EVAL chgst
EVAL _host
EVAL $srand($time())
EVAL //away
EVAL quote MODE $N $usermode
EVAL pecho Vassago's PhoEniX Version 2.25 is now loaded.
^assign -LOADPHOENIX