# # /><\ Welcome to Phoenix Version 3.01 from Vassago /><\ # The OFFICIAL PHOENIX/GARGOYLE/DJINN \|/ Accept no Hacks or Substitutes # -=- Release Date: 11/16/96 -=- # # - Vassago [Ryan Addams] # set NOVICE OFF set EXEC_PROTECTION OFF //clear -all @ set.loading = 1 @ ex = [\[E/X\]] alias ex.echo if ([$0]) {//xecho -level crap $ex $0-} alias pause { ^assign PTMP $"-+ Rämpytäppä sitä Entteriä +-" ^assign -PTMP } if (V < 19950405) { //echo *** WARNING: Your client version might be too old to support this script. //echo *** It is suggested that you obtain the latest IRC client from EVAL //echo *** cs-pub.bu.edu in \/pub\/irc/clients or get your system //echo *** administrator to upgrade it for you. } if ([$msg.version]!=[]) { //echo *** WARNING: You may have loaded Phoenix more than once. This can //echo *** damage variables within the script. It is advised you sign off //echo *** and sign back on with a fresh copy before continuing. } ### Customizable Section @ msg.ping = [Ai Saatana Toi Sattui Äläs Töki] @ msg.flood = [Phoenix flood protection activated. You are now being ignored.] @ msg.unignore = [You have been unignored.] @ msg.kick = [| Phoenix |] @ msg.abk = [| Auto BKick |] @ msg.cflood = [| Pika kirjoittaja??? Channel Flood |] @ msg.nflood = [| Liikaa Vaihtoja Nick Flood |] @ msg.uban = [| User Ban |] @ msg.away = [Taas Jossain...Tietäs Vaan Missä...] @ msg.idle = [Tais Nukahtaa Tossa Vähän Aikaa Sitten.] @ msg.signoff = [Cu Later Alligator...] @ msg.version = [Ajaa Itse ConffattuaPhoenix v3.01 Versiota] @ set.cprot = 0 @ set.mprot = 0 @ set.nhp = 0 @ set.fprot = 1 @ set.rejoin = 1 @ set.extmes = 1 @ set.friendaccess = 1 @ set.autoop = 1 @ set.autobk = 1 @ set.statusbar = 1 @ set.autoaway = 1 @ set.nickchange = 1 @ set.stealth = 0 @ set.quiet = 0 @ set.opview = 0 @ set.showkill = 0 @ set.bandefault = [host] @ set.igtypes = [MSGS CTCP NOTICES INVITES NOTES ] @ set.usermode = [+iw] @ set.falsechars = [** ** ** ** ** *;* ** ** *$$* ** ** *\\* * * ** ** ** ** ** ** * * ** ** ** ** ** **] @ set.boguspats = [*fuck* *shit* *suck* *dick* *penis* *cunt* *haha* *fake* *split* *ass* *hehe* *bogus* *yawn* *leet* *penix* *lice* *lame*] @ set.notify = [] @ lm.ignore = 3 @ lm.reset = 17 @ lm.msg = 6 @ lm.notice = 10 @ lm.ctcp = 4 @ lm.nick = 3 @ lm.mode = 2 @ lm.kick = 3 @ lm.idle = 5 @ lm.tabkey = 10 @ dcc.badfiles = [null core kill zero rm killall stty bin global ln] @ dcc.protection = 1 @ dcc.maxsize = 8388608 @ dcc.limit = 10 @ dcc.autorename = 1 @ dcc.autoget = 1 @ dcc.autochat = 0 @ dcc.chatask = 1 @ dcc.autosend = 1 @ dcc.autoclose = 1 @ dcc.quiet = 0 @ dcc.security = 0 @ dcc.overwrite = 0 EVAL @ file.phoenix = [$HOME/.phoenix] EVAL @ file.friends = [$HOME/.phoenix.friends] EVAL @ file.notify = [$HOME/.phoenix.notify] EVAL @ file.download = [$W] EVAL @ file.upload = [$W] EVAL @ file.away = [$HOME/.phoenix.away] EVAL @ file.xdcc = [$HOME/.phoenix.xdcc] EVAL @ file.xdccset = [$HOME/.phoenix.xdccset] EVAL @ file.notes = [$HOME/.phoenix.notes] EVAL @ file.log = [$HOME/.phoenix.log] EVAL ^set logfile $W/irclog.phoenix ### End Customize Section ### Script Initializers. Do not edit below this line. ex.echo Phoenix Version 3.01 loading, please wait... ^set status_format %T %*%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %W%>%U EVAL @ set.oldstatus = [$STATUS_FORMAT] # Internal Settings, DO NOT CHANGE. @ cnt.log = 0 @ cnt.mode = 0 @ cnt.kick = 0 @ cnt.dcc = 0 @ cnt.nick = 0 @ cnt.awaymsgs = 0 @ cnt.notice = 0 @ cnt.msg = 0 @ cnt.request = 0 @ cnt.ver_req = 0 @ cnt.ctcp = 0 @ cnt.friend = 0 @ cnt.priv = 0 @ cnt.enemy = 0 @ cnt.comment = 0 @ dcc.mysend = 0 @ dcc.getcount = 0 @ dcc.totalpack = 0 @ dcc.counting = 0 @ dcc.progress = 0 @ ver.waitstate = 0 @ ctcp.inuse = 0 @ status.away = 0 @ status.logging = 0 @ set.myaddress = [] @ set.recon = 0 @ set.msgwindow = 0 @ msg.internal = [FAGIGPGFGOGJHICAHGDDCODADBCAGCHJCAFGGBHDHDGBGHGP] EVAL @ set.msglist = [$N] set AUTO_UNMARK_AWAY ON set AUTO_WHOWAS OFF set BEEP ON set BEEP_MAX 1 set BEEP_ON_MSG NONE set BEEP_WHEN_AWAY OFF set BOLD_VIDEO ON set CHANNEL_NAME_WIDTH 12 EVAL ^set CLIENT_INFORMATION $decode($msg.internal) set CLOCK ON set CLOCK_24HOUR OFF set CMDCHARS / set COMMAND_MODE OFF set CONTINUED_LINE set DCC_BLOCK_SIZE 1024 set DISPLAY ON set EIGHT_BIT_CHARACTERS OFF set FLOOD_WARNING ON set FLOOD_RATE 0 set FLOOD_USERS 0 set FLOOD_AFTER 0 set FULL_STATUS_LINE ON set HELP_WINDOW OFF set HELP_PAGER OFF set HELP_SERVICE NULL set HIDE_PRIVATE_CHANNELS OFF set HIGHLIGHT_CHAR BOLD set HISTORY 200 set HOLD_MODE OFF set INDENT ON set INPUT_PROTECTION ON set INSERT_MODE ON set INVERSE_VIDEO ON set INPUT_PROMPT set LASTLOG 750 set LASTLOG_LEVEL ALL DCC set LOG OFF EVAL if ([$MAIL]!=[1]) {^set MAIL 1} set MAX_RECURSIONS 200 set NO_CTCP_FLOOD ON set NOTIFY_HANDLER QUIET set NOTIFY_LEVEL ALL set NOTIFY_ON_TERMINATION OFF set SCROLL ON set SCROLL_LINES 1 set SEND_IGNORE_MSG OFF set SHOW_AWAY_ONCE ON set SHOW_CHANNEL_NAMES ON set SHOW_CTCP_IDLE ON set SHOW_END_OF_MSGS OFF set SHOW_NUMERICS OFF set SHOW_STATUS_ALL ON set SHOW_WHO_HOPCOUNT ON set STATUS_AWAY (Poissa) set STATUS_CHANNEL %C set STATUS_CHANOP (OP) set STATUS_CLOCK %T set STATUS_HOLD **MORE** set STATUS_MODE (+%+) set STATUS_MAIL M:%M set STATUS_NOTIFY A:%F set STATUS_OVERWRITE (overwrite) set STATUS_QUERY Q:%Q set STATUS_UMODE (+%#) set STATUS_USER \|/ Ekin Scripta v1.01 \|/ set STATUS_WINDOW ^ set SUPPRESS_SERVER_MOTD ON set TAB ON set TAB_MAX 5 set TRANSLATION LATIN_1 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 ^P backward_history bind ^N forward_history bind ^^ parse_command /ig $, bind ^I parse_command /ex.tabget 1 $set.msglist bind ^R parse_command /ex.tabget -1 $set.msglist bind ^F parse_command //flush bind ^Y parse_command /ex.hold ### Basic Aliases (Used Throughout Phoenix) 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($set.invite) 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 quit signoff alias exit signoff alias m //msg alias n //notice alias unignore noig alias about aboutgcommand alias umode //mode $N alias mc //quote MODE $C -lsnmpitk $decode($set.key) alias nokey //quote MODE $C -k $decode($set.key) alias wl wholeft alias i inv $, alias xl //ctcp $C xdcc list alias bkick bk alias deop dop alias dop ex.ndop $C $0- alias serv {/if ([$0]) {//server $0-}{/if ([$set.server]!=[]) {//server $set.server}{//server 1}}} alias kick k alias k if ([$0]) {/if ([$1]) {/ex.qkick $C $0  $1- }{/ex.qkick $C $0 $msg.kick}}{/ex.echo You must specify a nickname.} alias join j alias leave l alias part l 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 ex.qnot if ([$0]!=[]) {//quote NOTICE $0 :$1-} alias ex.qkick if ([$0]!=[]) {//quote KICK $0 $1 :$2-} alias ex.qmode if ([$0]!=[]) {//quote MODE $0-} alias ex.nonly {@ FUNCTION_RETURN = left($index(! $0) $0)} alias ex.avar {^assign $0 $1-} alias ex.secchk if (rmatch($0 $SECLIST)) {@ FUNCTION_RETURN = [YES]}{@ FUNCTION_RETURN = [NO]} alias ex.isnum if (index(012345679 $0) != -1) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0} alias ex.isalpha if (index(abcdefghijklmnopqrstuvwxyz $0) != -1) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0} alias ex.keychk if (!rmatch($M *k*)) {^set status_mode (+%+)}{^timer 15 ex.keychk} alias ex.getsec {@ num = [$0];@ FUNCTION_RETURN = num * 60;^assign -num} alias ex.getmin {@ num = [$0];@ FUNCTION_RETURN = num / 60;^assign -num} alias ex.submode if (cnt.mode>0) {@ cnt.mode = cnt.mode - 1} alias ex.subkick if (cnt.kick>0) {@ cnt.kick = cnt.kick - 1} alias ex.delayop if (!ischanop($1 $0)) {/ex.qmode $0 +o $1} alias ex.userdom {@ function_return = LEFT($INDEX(@ $0) $0)##[@]##MID(${1+INDEX(. $0)} 99 $0)} alias ex.honly {@ function_return = mid(${index(@ $0)+1} 99 $0)} alias ex.date {@ function_return = mid(4 12 $stime($0))} alias ex.decho if (([$0]!=[]) && (dcc.quiet==0)) {//xecho -level crap $ex $0-} alias ex.flag if ([$0]==1) {@ function_return = [ON]}{@ function_return = [OFF]} alias ex.pubact if (ischanop($N $1)) {/ex.qkick $1 $0 $msg.cflood} alias ex.pubecho if ([$1]==[$C]) {//echo <$0> $2-}{//echo <$0/$1> $2-} alias ex.safe {@ FUNCTION_RETURN = strip(\ \:\;&\(\)*/\\\{\}$$~`|'\"\^ §¶  $0-)} alias ex.msafe {@ FUNCTION_RETURN = strip(\ \;$$\^ §¶  $0-)} alias ex.tref {^timer -delete $0;^timer -refnum $0-} alias ex.uhonly {@ uhost_tmp = [$0];@ FUNCTION_RETURN = right(${@uhost_tmp-index(! $0)} $0);^assign -uhost_tmp} alias ex.hold {^set HOLD_MODE TOGGLE;^ex.echo Screen pausing mode is now $HOLD_MODE\.} alias ex.purge { foreach $0 ii {/ex.purge $0.$ii} ^assign -ii ^assign -$0 } alias ex.ndop { ex.qmode $0 -oo $1 $2 if ([$3]) {/ex.ndop $0 $3-} } alias ap { ^set STATUS_USER Lag ? - E/X //quote PING $time() $S } alias sb { ^on ^367 "*" { if ([$4]) { ex.echo $[15]1 $2 ex.echo ^^^ Ban placed by ${ex.nonly($3)} at $ex.date($4)} {/ex.echo $1-}} if ([$0]) {//mode #$strip(# $0) +b}{//mode $C +b} ^on ^368 "*" {^on ^367 - "*";^on ^368 - "*"} } 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}} {/ex.echo You need to specify a nick to invite.}} alias pubcat { if ([$0]) {//exec -notice $C cat $0} {/ex.echo Usage: /pubcat }} alias version { //echo *** Script: $decode($msg.internal) //VERSION } alias ver { if ([$0]) {//ctcp $0 VERSION} {//ctcp $C VERSION}} alias p { if ([$0]) {//ping $0}{//ping $C}} alias op { ex.qmode $C +ooo $0 $1 $2 if ([$3]) {/op $3-}} ### DCC PARSER (by Vassago) alias dcc { //dcc $0- if ([$0]==[SEND]) { @ DNUM = rand(9999) ^timer -refnum ${DNUM} 60 checksend $1 $2 ^on ^401 "% $1 *" { ex.tabadd $1 $set.msglist ^dcs $1 ex.echo I can't find $1 on IRC. DCC SEND closed. ^timer -delete ${DNUM}} ^wait -CMD ^on ^401 - "% $1 *"}{ if ([$0]==[CHAT]) { ex.tabadd \=$1 $set.msglist ^on ^401 "% $1 *" { ^dcx $1 ex.echo I can't find $1 on IRC. DCC CHAT closed.} ^wait -CMD ^on ^401 - "% $1 *" }}} ### Server Message Redefinition (by Vassago) on ^001 "*" # on ^002 "*" # on ^003 "*" # on ^004 "*" # on ^305 "*" # on ^404 "*" {/ex.synch $0-} on ^482 "*" {/ex.synch $0-} on ^329 "*" {/ex.echo Channel $1 created on $mid(4 12 $stime($2)) $3-} on ^333 "*" {//echo *** Topic for $1 set by $2 on $mid(4 15 $stime($3))} on ^301 "*" if ([$0]!=[$N]) {//echo *** Away : $0 is away: $1-} on ^311 "*" { //echo *** Whois Information for: $1 //echo *** Address : $2@$3 if ([$[1]2]==[~]) {//echo *** This userid may be hacked. \($ex.honly($2@$3) does not have identd\)} //echo *** IRCNAME : $5- } on ^312 "*" {//echo *** Server : $1 \($2-\)} on ^313 "*" {//echo *** IRC OP : $1 is one of the few, the proud, the socially inept.} on ^314 "*" { //echo *** Whowas information for: $1 //echo *** Address : $2@$3 //echo *** IRCNAME : $5- } on ^319 "*" {//echo *** On Channels : $1-} on ^317 "*" { if (ex.isnum($3)==1) { //echo *** Idle Time : $ex.getmin($2) minute\(s\) \($2 seconds\) //echo *** Signed on : $stime($3)}{ //echo *** Idle Time : $ex.getmin($2) minute\(s\) \($2 seconds\) }} alias ex.synch { if ([$0]!=[$set.desynch]) { if ([$0]!=[$S]) { ex.echo $0 is desynched from the IRC Network. ^assign set.desynch $0 ex.tref 500 25 ^assign -set.desynch }{//echo *** $1-}}} ### MODE and KICK Protection (by Vassago) alias ex.mact { if ((ischanop($N $1))&&([$mdwait]!=[$0])&&([$decode($0)]!=[$N])) { ex.qmode $1 -o $decode($0) ex.echo MASS DEOP DETECTED. By: $decode($0) On: $1 @ mdwait = [$0] ex.tref 501 8 ^assign -mdwait} @ cnt.mode = 0 } alias ex.kact { if ((ischanop($N $1))&&([$kwait]!=[$0])&&([$decode($0)]!=[$N])) { ex.qmode $1 -o $decode($0) ex.echo MASS KICK DETECTED. By: $decode($0) On: $1 @ kwait = [$0] ex.tref 502 8 ^assign -kwait} @ cnt.kick = 0 } alias ex.mdtest { if ([$0]==[$lastmd]) { @ cnt.mode = cnt.mode + $2 ^timer 12 ex.submode if (cnt.mode>lm.mode) {/ex.mact $0 $1}}{ @ lastmd = [$0] @ cnt.mode = $2 ^timer 12 ex.submode if (cnt.mode>lm.mode) {/ex.mact $0 $1}}} alias ex.ktest { if (([$0]==[$lastkick])&&([$0]!=[$encode($N)])) { @ cnt.kick = cnt.kick + 1 ^timer 12 ex.subkick if (cnt.kick>lm.kick) {/ex.kact $0 $1} }{@ lastkick = [$0]}} ### MODE & KICK Handlers (by Vassago & YaZoO) on -raw_irc "% MODE *" { if ([$N] != [$ex.nonly($0)]) { @ mdcnt = 0 @ nixcnt = 0 @ mdchop = [$ex.nonly($0)] @ mde = [+] @ mdech = [$3] @ nix = [$4-] if ((set.mprot==1)&&(rmatch($3 -ooo* *-ooo*))) {/ex.mact $mdchop $2} while (mid($mdcnt 1 $mdech)!=[]) { @ mdecc = mid($mdcnt 1 $mdech) if (([$mdecc]==[-])||([$mdecc]==[+])) {@ mde = [$mdecc]}{ if (match($mdecc b o k)) { if ([$mde$mdecc]==[+b]) { if ((match($word($nixcnt $nix) $N!$set.myaddress))&&(rmatch($0 *!*))){/ex.uban $2 $mdchop $word($nixcnt $nix)} if ((!rmatch($0 *!*))&&(ischanop($N $2))&&(set.nhp==1)) {/ex.qmode $2 -b $word($nixcnt $nix)}} if ([$mde$mdecc]==[+o]) { if ((!rmatch($0 *!*))&&(ischanop($N $2))&&(set.nhp==1)) {/ex.qmode $2 -o $word($nixcnt $nix)}} if ([$mde$mdecc]==[-o]) {/if (set.mprot==1) {/ex.mdtest $mdchop $2 1}} if ([$mde$mdecc]==[+k]) { @ set.key = encode($word($nixcnt $nix)) if ((rmatch($word($nixcnt $nix) $set.falsechars))&&(rmatch($0 *!*))) { EVAL ^set status_mode $word(0 \(+$M\)) ^timer 10 ex.keychk if ((ischanop($N $2))&&(set.cprot==1)) {/ex.qmode $2 -k $word($nixcnt $nix)}} {/if ((!rmatch($0 *!*))&&(ischanop($N $2))&&(set.nhp==1)) {/ex.qmode $2 -k $word($nixcnt $nix)}}} @ nixcnt = nixcnt + 1}} @ mdcnt = mdcnt + 1 }}} on ^mode "*" if (set.quiet==0) { if (rmatch($0 %.%)) {/ex.echo SERVER MODES DETECTED. In $1: \'$2-\'} {if ([$1]==[$N]) {//echo *** Mode change \"$2-\" for user $1 by $0} {//echo *** Mode change \"$2-\" on channel $tolower($1) by $0}} } alias ex.uban { ex.qmode $0 -ob $decode($1) $2 ex.echo BAN ON YOU DETECTED. By: $decode($1) } ### Kick handler (by Vassago) on -raw_irc "% KICK *" { @ k.chan = encode($strip(: $2)) @ k.nick = encode($left($index(! $0) $0)) if (set.mprot==1) {/ex.ktest $k.nick $k.chan} if (([$3]==[$N])&&(set.rejoin==1)) { wait -CMD ^timer 1 //join $decode($k.chan) }} ### Nick Flood Protection/Auto Nick In Use Changer (by Vassago) on #-channel_nick 3 "*" { if ((set.cprot==1)&&([$2]!=[$N])) { if ([$n.new]==[$encode($1)]) {@ cnt.nick = cnt.nick + 1} if (cnt.nick==lm.nick) { if (ischanop($N $0)) { ex.qkick $0 $2 $msg.nflood ex.echo NICK FLOOD DETECTED. On $0 by: $2} @ cnt.nick = 0} @ n.new = encode($2) ^timer 30 ^assign -n.new ^timer 30 @ cnt.nick = 0 }} ### JOIN Functions (by Vassago) alias ex.autochk { if (set.autobk==1) { foreach ENEMIES XX { if ((rmatch($ENEMIES[$XX] $1))||(match($ENEMIES[$XX] $1))) { if ([$COMMENTS[$XX]]!=[]) { ex.qmode $0 -o+b $decode($2) $ENEMIES[$XX] ex.qkick $0 $decode($2) $COMMENTS[$XX]}{ ex.qmode $0 -o+b $decode($2) $ENEMIES[$XX] ex.qkick $0 $decode($2) $msg.abk }}}} if ((set.autoop==1)&&(rmatch($1 $OPLIST))) {^timer 3 ex.delayop $0 $2 }} on #-raw_irc 3 "% JOIN *" { if (ischanop($N $strip(: $2)) && ((set.autoop==1) || (set.autobk==1))){ /ex.autochk $strip(: $2) $ex.safe($0) $ex.nonly($0) }} on ^join "*" {^netjoined $encode($tolower($1)) $encode($0) $1 $0 $encode($userhost())} on ^leave "*" {//echo *** $0 has left channel $tolower($1) at $tolower($Z)} ### 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. $set.boguspats $set.falsechars *..*)) { @ function_return = 1 } if (rmatch(.$2. $set.boguspats $set.falsechars *..*)) { @ function_return = 1 } } on ^channel_signoff "% % %.% %.%" { if (isbogus($1-)) {/if (set.quiet==0) {//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- ex.echo Netsplit detected at $tolower($Z): \($3-\) ex.echo Type /wholeft to see who split away. }} alias netjoined { if (signoffs[$0][$1]) { if (isbroke[$signoffs[$0][$1]]) {/ex.echo Netjoined at $tolower($Z) \($splitname[$signoffs[$0][$1]]\)} ^assign -isbroke[$signoffs[$0][$1]] ^assign -signcross[$signoffs[$0][$1]][$0][$1] ^assign -signoffs[$0][$1]}{ if (set.quiet==0) { if ([$2]==[$C]) {//echo *** $3 \($decode($4-)\) has joined channel $C} {//echo *** $3 \($decode($4-)\) has joined channel $2}} }} alias netpurge { ex.purge isbroke ex.purge splitname ex.purge splittime ex.purge signcross ex.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 {/ex.echo $lformat(15 $decode($ii)) $lformat(10 $decode($jj)) $splitname[$signoffs[$ii][$jj]]}} ^assign -ii ^assign -jj } alias ex.floodig { //^ignore *@$decode($2) $set.igtypes ^on ^raw_irc "*!*@$decode($2) % % :VER*" # ^timer $ex.getsec($lm.ignore) ex.igexp $0 $decode($2) if ([$3]==[]) {/ex.echo $1 FLOOD DETECTED. From: $decode($0).} ex.echo Ignoring *@$decode($2) for ${lm.ignore} minutes\(s\). if ([$msg.flood]!=[]) {/ex.qnot $decode($0) $msg.flood} } alias ex.igexp { //^ignore *@$1 NONE ^on ^raw_irc - "*!*@$1 % % :VER*" ex.echo No longer ignoring $decode($0) [$1] \(expired\). } ### PUBLIC flood Protection (by Vassago) on ^public "*" { if ((set.fprot==1) && (rindex($right(1 $2) $2) > 200) || (rindex($right(1 $3) $3) > 180)) { ex.pubecho $0 $1 [Possible Flood] if (set.cprot==1) {/ex.pubact $0 $1}}{/ex.pubecho $0 $1 $2-} } on ^public "% % ***" { if (set.fprot==1) { ex.pubecho $0 $1 [Possible Tsunami] $ex.msafe($2-) }{/ex.pubecho $0 $1 $2-} if (set.cprot==1) {/ex.pubact $0 $1}} on ^public "% % ***" { if (set.fprot==1) { ex.pubecho $0 $1 [Possible Tsunami] $ex.msafe($2-) }{/ex.pubecho $0 $1 $2-} if (set.cprot==1) {/ex.pubact $0 $1}} on ^public "% % ******" { if (set.fprot==1) { ex.pubecho $0 $1 [Excess Beeps] $ex.msafe($2-) }{/ex.pubecho $0 $1 $2-} if (set.cprot==1) {/ex.pubact $0 $1}} ### Raw IRC CTCP/NOTICE Flood Protection (by Vassago) on ^raw_irc "*!*@* % % :*%INFO*" # on ^raw_irc "*!*@* % % :*FINGER*" # on ^raw_irc "*!*@* % % :****" # on ^raw_irc "*!*@* % % :**" # on ^raw_irc "*!*@* % % :*ERRMSG*" # on ^raw_irc "*!*@* % % :*ECHO*" # on ^raw_irc "*!*@* % % :*UTC*" # on ^raw_irc "*!*@* % % :*SED*" # alias ex.subver if (cnt.ver_req > 0) {@ cnt.ver_req = cnt.ver_req - 1} on ^raw_irc "*!*@* PRIVMSG % :VER*" { if (ver.waitstate == 0) { @ ver.waitstate = ver.waitstate + 1 @ ver.bad = 0 if (set.fprot == 1) { @ ver.host = encode($ex.honly($0)) if (ver.host == ver.lasthost) { @ cnt.ver_req = cnt.ver_req + 1 ^timer ${lm.reset} ex.subver}{ cnt.ver_req = 0 @ ver.lasthost = [$ver.host]} if ((cnt.ver_req >= lm.ctcp) || (match(**** $3-))||(rindex($right(1 $3) $3) > 48)) { ex.floodig $encode($ex.nonly($0)) VERSION-REQUEST $ver.host @ cnt.ver_req = 0 @ ver.bad = 1}} if (ver.bad==0) { if (left(1 $2)==[$$]) {/ex.echo Server wide VERSION by $ex.nonly($0) on $strip(\$ $2).}{ if (rmatch($2 #*)) {/ex.echo $ex.nonly($0) requested version information for everyone in $2.} {/ex.echo $ex.nonly($0) requested version information for you.} if ([$msg.version]!=[]) {/ex.qnot $ex.nonly($0) VERSION ${msg.version}}} ^timer 4 @ ver.waitstate = ver.waitstate - 1 }}} ### CTCP Commands/Responses (by Vassago) alias ex.subctcp if (cnt.ctcp > 0) {@ cnt.ctcp = cnt.ctcp - 1} on -ctcp "*" { if ([$1]==[$N]) { @ ctcp.bad = 0 if (set.fprot == 1) { @ ctcp.userhost = [$encode($userhost())] @ ctcp.host = [$encode($ex.honly($decode($ctcp.userhost)))] if (ctcp.host == ctcp.lasthost) { @ cnt.ctcp = cnt.ctcp + 1 ^timer ${lm.reset} ex.subctcp}{ cnt.ctcp = 0 @ ctcp.lasthost = [$ctcp.host]} if ((cnt.ctcp >= lm.ctcp) || (match(**** $2-))||(rindex($right(1 $2) $2) > 200)||(rindex($right(1 $3) $3) > 180)) { ex.floodig $encode($0) CTCP $ctcp.host @ cnt.ctcp = 0 @ ctcp.bad = 1}} if ((ctcp.bad == 0) && (ctcp.inuse == 0) && (!match($2 ACTION TIME SEND))) { @ ctcp.inuse = 1 if (rmatch($0!$decode($ctcp.userhost) $FRIENDLIST)) { if ([$3]) {@ ctcp.channel = encode($3)} {@ ctcp.channel = encode($C)} if ([$2]==[HELP]) {/ctcpcmd $0 HELP}{ if (([$2]==[OP])&&(rmatch($0!$decode($ctcp.userhost) $OPLIST))) {/ctcpcmd $0 $2 $ctcp.channel} {/if (([$2]==[INVITE])&&(rmatch($0!$decode($ctcp.userhost) $INVITELIST))) {/ctcpcmd $0 $2 $ctcp.channel} {/ex.qnot $0 $2 is not a valid CTCP command.}}}} {/if ([$2]==[HELP]) {/ex.qnot $0 Use /CTCP $N XDCC LIST for a list of files offered.} {/ex.echo CTCP \($ex.safe($[36]2-)\) from unregistered person $0\.}}} @ ctcp.inuse = 0 }} # CTCP COMMAND Parser (by YaZoO & Vassago) alias ctcpcmd { if (set.friendaccess==1) { if ([$1]==[OP]) { if (ischanop($N $decode($2))) { ex.qmode $decode($2) +o $0 ex.echo $0 has been opped on $decode($2) via a CTCP request.}{ ex.qnot $0 I am not an operator on channel $decode($2)\. ex.echo $0 requested a CTCP Op on $decode($2)\.}} if ([$1]==[INVITE]) { if (ischanop($N $decode($2))) { //^invite $0 $decode($2) ex.echo $0 requested a CTCP invite to $decode($2)\.}{ ex.qnot $0 I am not a channel operator on $decode($2)\. ex.echo $0 requested a CTCP invite to $decode($2)\.}} if ([$1]==[HELP]) { ex.qnot $0 These commands are available via CTCP request: ex.qnot $0 /CTCP $N OP <#Channel> :For ops on <#Channel>. ex.qnot $0 /CTCP $N INVITE <#Channel> :For an invite to <#Channel>. ex.qnot $0 I am currently on channel\(s\): $tolower($strip(# $mychannels())) ex.echo $0 has asked for help from my Friends list.}}{ ex.qnot $0 Sorry, but my CTCP functions are currently disabled. ex.echo $0 tried $1 for $decode($2) via CTCP. ex.echo CTCP functions are currently disabled. }} # Miscellaneous CTCP Handlers (by Vassago) on ^ctcp "% % PING *" { @ ping.host = [$encode($ex.honly($userhost()))] if ((ping.host != ping.lasthost) && (ex.isnum($3)==1)) { if ([$left(1 $1)]==[$$]) {/ex.echo Server wide PING from $0 on $strip(\$ $1).}{ if (rmatch($1 #*)) {/ex.echo $0 has pinged everyone in $1\.}{/ex.echo $0 has pinged you.} if ([$msg.ping]!=[]) {/ex.qnot $0 $msg.ping}} @ ping.lasthost = [$ping.host] }} on ^ctcp "% % DCC CHAT chat % *" { @ chat.bad = 0 if (set.fprot == 1) { if ((ex.isnum($5)==0) || (ex.isnum($6)==0) || ([$6] <= 1024)) { ex.echo FAKE DCC CHAT message received from $0. ex.floodig $encode($0) DCC-CHAT $encode($ex.honly($userhost())) 0 //^dcc close chat $0 ex.echo DCC CHAT rejected from $0. @ chat.bad = 1}} if (chat.bad==0) { ex.echo DCC CHAT request received from $0 \[$ex.honly($userhost())\] if (dcc.chatask==1) {^assign _tp $"[E/X] Connect? "} {/if (dcc.autochat==1) {^assign _tp y}{^assign _tp n}} if (rmatch($_tp y*)) { ex.echo Attempting DCC CHAT connection with $0. ex.qnot $0 DCC CHAT request from ${set.myaddress}. //dcc chat $0 ex.tabadd \=$0 $set.msglist}{ ex.echo DCC CHAT request from $0 closed. //^dcc close chat $0 ^assign -_tp }}} ### Lag Indicator/PONG Flood Protection (by Vassago) 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} }} ### Invite Handler (by Vassago) on ^invite "*" { if (!rmatch($1 $set.falsechars)) { //echo *** $0 invites you to channel $1 @ set.invite = encode($1)}{//echo ***$ $0 invites you to channel $ex.safe($1) [FAKE]} } ### XDCC Request Handlers (by Vassago) alias ex.subxdcc if (cnt.request > 0) {@ cnt.request = cnt.request - 1} on ^msg "% XDCC *" { @ xdcc.bad = 0 if (set.fprot == 1) { @ xdcc.userhost = [$encode($userhost())] @ xdcc.host = [$encode($ex.honly($decode($xdcc.userhost)))] if (xdcc.host == xdcc.lasthost) { @ cnt.request = cnt.request + 1 ^timer ${lm.reset} ex.subxdcc}{ cnt.request = 0 @ xdcc.lasthost = [$xdcc.host]} if ((cnt.request >= lm.ctcp) || (match(**** $2-))||(rindex($right(1 $2) $2) > 24)) { ex.floodig $encode($0) XDCC-REQUEST $xdcc.host @ cnt.request = 0 @ xdcc.bad = 1}} if (xdcc.bad==0) {/xdccmsg $0 $decode($xdcc.userhost) $2-} } on ^ctcp "% % XDCC *" { @ xdcc.bad = 0 if (set.fprot == 1) { @ xdcc.userhost = [$encode($userhost())] @ xdcc.host = [$encode($ex.honly($decode($xdcc.userhost)))] if (xdcc.host == xdcc.lasthost) { @ cnt.request = cnt.request + 1 ^timer ${lm.reset} ex.subxdcc}{ cnt.request = 0 @ xdcc.lasthost = [$xdcc.host]} if ((cnt.request >= lm.ctcp) || (match(**** $3-))||(rindex($right(1 $3) $3) > 24)) { ex.floodig $encode($0) XDCC-REQUEST $xdcc.host @ cnt.request = 0 @ xdcc.bad = 1}} if (xdcc.bad==0) {/xdccmsg $0 $decode($xdcc.userhost) $3-} } ### DCC SEND Handler & DCC SEND Flood Protection (by Vassago) on ^ctcp "% % DCC SEND % % *" { if ([$1]==[$N]) { @ dcc.bad = 0 if (dcc.protection == 1){ @ dcc.flood = 0 if ((ex.isnum($5) == 0) || (ex.isnum($6) == 0) || (ex.isnum($7) == 0) || ([$6] <= 1024) || (ex.isalpha($5) == 1) || (ex.isalpha($6) == 1) || (ex.isalpha($7) == 1)){ ex.echo Fake DCC SEND ctcp message detected. @ dcc.bad = 1 @ dcc.flood = 1}{ vif ((index(\ \:\;&\(\)*/\\\{\}$$~`|'\"\^ §¶  $4) >= 0) || (match($4 $dcc.badfiles))){ ex.echo Strange characters or bad filename in DCC SEND detected. @ dcc.bad = 1 @ dcc.flood = 1}{ if ([$left(1 $4)]==[.]){ ex.echo Hidden file DCC SEND detected \(period before filename\). @ dcc.bad = 1}{ if ([$7] < 1){ ex.echo Empty or NULL file via DCC SEND detected. @ dcc.bad = 1}{ if ([$7] > dcc.maxsize){ ex.echo DCC SEND file size is greater than ${dcc.maxsize}. @ dcc.bad = 1}}}}}} if (dcc.bad == 1){ ex.echo DCC SEND rejected from $0. //^dcc close get $0 $4 if (dcc.flood == 1) {/ex.floodig $encode($0) DCC-SEND $encode($ex.honly($userhost())) 1}}{ @ dcc.received = strip(\;& $4) if ((dcc.autoget==1)&&(dcc.autoclose==0)){ //^dcc rename $0 $dcc.received ${file.download}/$dcc.received //exec -name DCG$0/${file.download}/$dcc.received ls ${file.download}/$dcc.received}{ if (dcc.autoclose==1){ ex.echo DCC SEND $dcc.received from $0 request ignored and closed. //^dcc close get $0 $dcc.received}{ //^dcc rename $0 $file.received ${file.download}/$dcc.received adddccrequest ${file.download}/$dcc.received $0 ex.echo DCC SEND $dcc.received from $0 added to XDCC request list. }}}}} on ^exec_error "DCG* *" { @ dcclen = [$0] @ getf = [$right(${@dcclen-3} $0)] @ idx = [$index(/ $getf)] @ filenme = [$right(${@getf-idx+1} $0)] @ nicknme = [$left($idx $getf)] ex.echo 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 (dcc.overwrite==1) { ex.echo Autogetting $filenme from $nicknme\. //^dcc get $nicknme $filenme}{ ex.echo $nicknme offered $filenme but it already exists. if (dcc.autorename==0) { @ dctemp = [$"[E/X] Enter new filename or ENTER to close: "] if (dctemp!=[]) { if ([$[1]dctemp]!=[/]) {^assign dctemp ${file.download}/${dctemp}} ex.echo Getting $filenme renamed to $dctemp from $nicknme\. //^dcc rename $nicknme $filenme $dctemp //^dcc get $nicknme $dctemp}{ ex.echo Closing DCC GET request from $nicknme\. //^dcc close get $nicknme $filenme}}{ ^assign dctemp $filenme\.new ex.echo Autorenaming to $dctemp and receiving. if ([$[1]dctemp]!=[/]) {^assign dctemp ${file.download}/${dctemp}} //^dcc rename $nicknme $filenme $dctemp //^dcc get $nicknme $dctemp }}} ### Connection Handlers (by Vassago) on ^connect "*" { if (set.loading==0) {^timer 1 //mode $N $set.usermode} @ set.server = [$S] } on ^disconnect "*" if (set.autoreconnect==1) {^timer 2 ex.recon} on ^raw_irc "% KILL *" if (set.autoreconnect==1) {^timer 2 ex.recon} on ^window "% ??? Use /SERVER to*" if (([$1]==[***])&&(set.autoreconnect==1)) {^timer 2 ex.recon} alias ex.recon { ex.echo Connection closed. Autoconnecting to ${set.server} if (set.recon==0) { @ set.recon = 1 ex.tref 973 12 @ set.recon = 0 if ([$set.server]!=[]) {/serv ${set.server}}{/serv} }} ### Miscellaneous ON Commands (By Vassago) on ^send_msg "*" { //echo <-[$0]-> $1- ex.tabadd $0 $set.msglist } 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- ex.tabadd \=$0 $set.msglist } on ^dcc_chat "*" { //echo \(=$0=\) $1- ex.tabadd \=$0 $set.msglist } on ^action "*" if ([$[1]1]!=[#]) {//echo * $0 $2-} {/if ([$C]!=[$1]) {/echo * $tolower($1) >> $0 $2-}{//echo * $0 $2-} } on ^public_other "*" {/echo <$0/$tolower($1)> $2-} on ^exec "mailchk *" {/ex.echo Mail: From $ex.msafe($1-)} on ^exec_error "mailchk *" # on ^mail "*" if (set.loading==0) { //exec -name mailchk frm | tail -$0 ex.echo You have new email! \(Mail Waiting: $1\) } ### Message Handler (by Vassago) alias ex.submsg if (cnt.msg > 0) {@ cnt.msg = cnt.msg - 1} on ^msg "*" { @ msg.bad = 0 if (set.fprot == 1) { @ msg.userhost = [$encode($userhost()))] @ msg.host = [$encode($ex.honly($decode($msg.userhost)))] if (msg.host == msg.lasthost) { @ cnt.msg = cnt.msg + 1 ^timer ${lm.reset} ex.submsg}{ cnt.msg = 0 @ msg.lasthost = [$msg.host]} if ((cnt.msg >= lm.msg) || (match(****** $1-))||(rindex($right(1 $1) $1) > 200)||(rindex($right(1 $2) $2) > 180)) { @ msg.bad = 1 ex.floodig $encode($0) MESSAGE $msg.host @ cnt.msg = 0}} if (msg.bad==0){ if (set.extmes==1){ if (set.msgwindow) {//xecho -window Messages [$0:$strip(~ $ex.userdom($decode($msg.userhost)))] $1-} {//echo [$0:$strip(~ $ex.userdom($decode($msg.userhost)))] $1-}}{ if (set.msgwindow) {//xecho -window Messages [$0:$strip(~ $ex.userdom($decode($msg.userhost)))] $1-} {//echo [$0] $1-}} if (status.away==1) { //exec echo "[$tolower($Z)] [$ex.safe($0):$ex.safe($ex.userdom($decode($msg.userhost)))] $ex.safe($strip(! $1-))" >> $file.away @ cnt.awaymsgs = cnt.awaymsgs + 1} @ msg.last = encode( *$0*  $1-) ex.tabadd $0 $set.msglist }} alias dirlm { if ([$0]) {//msg $0 $decode($msg.last)} {/say $decode($msg.last)} } ### Notice Handler (by Vassago) alias ex.subnot if (cnt.notice > 0) {@ cnt.notice = cnt.notice - 1} on ^notice "*" { @ notice.bad = 0 if (set.fprot == 1) { @ notice.host = [$encode($ex.honly($userhost()))] if (notice.host == notice.lasthost) { @ cnt.notice = cnt.notice + 1 ^timer ${lm.reset} ex.subnot}{ cnt.notice = 0 @ notice.lasthost = [$notice.host]} if ((notice.counter >= lm.notice) || (match(**** $1-))||(rindex($right(1 $1) $1) > 200)||(rindex($right(1 $2) $2) > 180)) { @ notice.bad = 1 ex.floodig $encode($0) NOTICE $notice.host @ cnt.notice = 0}} if (notice.bad == 0) { if (rmatch($1 *wallop*)) {//echo [WallOP:$0\] $2-} {//echo \-$0\- $1-} @ notice.last = encode(-$0- $1-) ex.tabadd $0 $set.msglist }} alias dirln { if ([$0]) {//msg $0 $decode($notice.last)} {/say $decode($notice.last)} } ### Timer/Idle Control (by Vassago) on #-timer 3 "*" { @ set.loading = 0 ^netclean if (rmatch($0 %:00*)) {/ex.echo The time is now $tolower($0).} if ([$set.myaddress]==[]) { userhost $N -CMD if ([$4]!=[]) { @ set.myaddress = [$strip(~ $3)@$4] ex.echo User address set to: ${set.myaddress}. ^ap }}} on #-idle 3 "*" { if (([$0]==lm.idle)&&(set.autoaway==1)&&(status.away==0)) { setaway $msg.idle ex.echo Setting you away after being idle for $lm.idle minutes. } } ### Tabkey Handlers alias ex.tabadd { @ matched = rmatch($0 $^\1-) if (matched) {@ set.msglist = [$(0-${matched-1}) $(${matched+1}-)]} {@ set.msglist = [$(0-${lm.tabkey-1})]} @ msgcnt = 0 ^assign -matched } alias ex.tabget { @ msgcnt = msgcnt + [$0] if (#set.msglist < msgcnt) {@ msgcnt = 1} if (msgcnt <= 0) {@ msgcnt = #set.msglist} @ junk = K ## [m] //type ^U$junk $^^{[$($msgcnt)]} } ### Ban Handlers alias bandef { if (match($0 normal host domain screw elite)) { @ set.bandefault = [$0] ex.echo Default ban type is now set to $toupper($0)\. }{/ex.echo BANDEF Commands: .} } alias ban { if ([$0]) { if (!rmatch($0 *!* *@* *.*)) { if ([$1]) { @ _t.who= [$1] @ _t.prm= mid(1 1 $0)}{ @ _t.who= [$0] @ _t.prm= [$left(1 $set.bandefault)]} Userhost $_t.who -CMD if ([$4]!=[]) { @ _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 (ischanop($0 $C)) {/ex.qmode $C -o+b $0 $_t.ban} {/ex.qmode $C +b $_t.ban} }{/ex.echo I couldn't find $0 on IRC.} }{/c +b $0-}}{/ex.echo Usage: /ban [] }} 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= [$left(1 $set.bandefault)] @ _t.who= [$0] @ _t.bkr= [$1-]} if (_t.bkr) {@ _t.bkr= [$_t.bkr\]} {@ _t.bkr= [$msg.kick]} Userhost $_t.who -CMD if ([$3]!=[]) { @ _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 *)} ex.qmode $C -o+b $0 $_t.ban ex.qkick $C $0 $_t.bkr }{/ex.echo I couldn't find $0 on IRC.} }{/ex.echo USAGE: /BK [] [] }} 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!]##ex.fixname($0 $2)##[@]##ex.fixdomain($1 $2) alias hban @function_return= [$2!$2@]##ex.fixhost($1 $2) alias dban @function_return= [$2!$2@]##ex.fixdomain($1 $2) alias ex.fixhost {/if (index(. $0)==rindex(. $0)) {@ function_return= [$1] ## [$0]}{@ function_return= [$0]}} alias ex.fixname {/if (rmatch($0 ?? ?)) {@ function_return= [$1]}{@ function_return= [$1] ## mid(1 99 $0)}} alias ex.fixdomain { if (index(. $0)!=rindex(. $0)) { if (ex.isip($0)) {@ function_return= left($rindex(. $0) $0) ## [.$1]}{@ function_return= [$1$mid($index(. $0) 99 $0)]}}{@ function_return= [$1$0]} } alias ex.isip { if ((right(1 $0) >= [0]) && (right(1 $0) <= [9])) {@ function_return= [1]}{@ function_return= [0]} } alias ex.unbanloop { if ([$3]) { ex.qmode $CHC -bbb $0 $1 $2 ex.unbanloop $3-}{ if ([$2]) {/ex.qmode $CHC -bbb $0 $1 $2}{ if ([$1]) {/ex.qmode $CHC -bb $0 $1}{ if ([$0]) {/ex.qmode $CHC -b $0}} }}} alias ex.banlop { if ([$3]) { ex.qmode $C +bbb $0 $1 $2 ex.banlop $3-}{ if ([$2]) {/ex.qmode $C +bbb $0 $1 $2}{ if ([$1]) {/ex.qmode $C +bb $0 $1}{ if ([$0]) {/ex.qmode $C +b $0 }}}}} alias dobans { ex.echo Doing bans in AutoBkick list. ex.banlop $BKLIST } alias cdban { if ([$0]) {^assign CHC $0}{^assign CHC $C} ex.echo Clearing channel $CHC of bans. ^assign -cbunband ^on ^367 "*" {@ cbunband= cbunband ## [ $2]} ^mode $CHC +b wait ex.unbanloop $cbunband wait -CMD ^on 367 - "*" wait -CMD ^assign -cbunband wait -CMD ^assign -CHC } alias unban { if ([$1]!=[]) {@ CHC = [$1]}{@ CHC = [$C]} if ([$0]!=[]) { ^assign -bunband if (!rmatch($0 *@* *!* *.*)) { Userhost $0 -CMD if ([$4]!=[]) { @ dbanz = [$0!$3@$4] ^on ^367 "*" { if ((match($2 $dbanz))||(match($dbanz $2))) {@ bunband = [$2 ] ## ${bunband}}} //^mode $CHC +b ex.qnot $0 You have been unbanned on ${CHC}. ex.echo $0 has been unbanned on ${CHC}. ^on ^368 "*"{ ex.unbanloop ${bunband} ^on ^367 - "*" ^on ^368 - "*"}}}}{/ex.echo Usage: /UNBAN to unban on your current channel.} } ### Status Screen alias status { ex.echo +----/><\\----+ Your Current Phoenix Configuration +----/><\\----+ ex.echo Auto Op on Friend Join : $ex.flag($set.autoop) ex.echo Auto Bkick on Enemy Join : $ex.flag($set.autobk) ex.echo CTCP Op/Invite : $ex.flag($set.friendaccess) ex.echo Auto Setaway on Idle : $ex.flag($set.autoaway) ex.echo Autochat DCC CHATS : $ex.flag($dcc.autochat) ex.echo Ask on DCC CHATS : $ex.flag($dcc.chatask) ex.echo Setaway Time : ${lm.idle} pause ex.echo IRC Logging : $ex.flag($status.logging) ex.echo Extended Status Bar : $ex.flag($set.statusbar) ex.echo AutoRejoin on Kick : $ex.flag($set.rejoin) ex.echo AutoNickchange on Nick In Use : $ex.flag($set.nickchange) ex.echo Extended Message Display : $ex.flag($set.extmes) ex.echo MassKick/MassDeop Protection : $ex.flag($set.mprot) ex.echo Personal Flood Protection : $ex.flag($set.fprot) ex.echo Channel Protection : $ex.flag($set.cprot) ex.echo Netsplit Hack Protection : $ex.flag($set.nhp) ex.echo Ban/Bkick Type Setting : ${set.bandefault} ex.echo Script LIMIT Settings: ex.echo Deop: $lm.mode Kick: $lm.kick Nick Flood: $lm.nick ex.echo Message Flood: $lm.msg Notice Flood: $lm.notice ex.echo CTCP Flood: $lm.ctcp Flood Timer resets after: $lm.reset ex.echo Flood-triggered Ignores last $lm.ignore minutes. ex.echo Ignores will defeat: $set.igtypes\. ex.echo +---------+ Type /XDCC STATUS for XDCC information. +----------+ } ### Toggleable Commands alias pset { if ((match($0 quiet stealth showkill opview autobk autoreconnect nickchange friendaccess logging autoaway statusbar autoop cprot fprot mprot rejoin nhp extmes)) && (match($1 ON OFF))) { if ([$1]==[STEALTH]) {/if (set.stealth == 0) {^on ^raw_irc "*!*@* % % :*" #}{^on ^raw_irc - "*!*@* % % :*"}} if ([$1]==[LOGGING]) { @ set.tmp = [status.$0] ^set log $1 }{@ set.tmp = [set.$0]} if ([$1]==[on]){@ set.tmp2 = 1}{@ set.tmp2 = 0} EVAL ^assign $set.tmp $set.tmp2 if ([$1]==[NICKCHANGE]) {/if ([$1]==[ON]) { ^on ^raw_irc "% 433 *" { ex.echo Nickname already in use. Autochanging... if ([$N]!=[$left(8 $3)_]) {//nick $left(8 $3)_}{//nick $left(8 $3)$rand(9)}}}{^on ^raw_irc - "% 433 *"}} ex.echo Script variable $toupper($0) now turned $toupper($1)\. chgst}{ ex.echo PSET Commands: NICKCHANGE FRIENDACCESS LOGGING CPROT FPROT MPROT ex.echo REJOIN AUTORECONNECT NHP EXTMES AUTOOP STATUSBAR ex.echo OPVIEW SHOWKILL AUTOAWAY AUTOBK STEALTH QUIET . }} alias lset { if ((match($0 idle ignore reset msg notice ctcp nick mode kick idle tabkey)) && (ex.isnum($1))) { @ lm.tmp = [lm.$0] EVAL ^assign $lm.tmp $1 ex.echo Script limit $toupper($0) now set to $1\. chgst}{ ex.echo LSET Commands: IDLE IGNORE RESET MSG NOTICE CTCP NICK ex.echo MODE KICK IDLE TABKEY <#>. }} alias mset { if (match($0 phoenix version ping flood kick abk cflood nflood uban away idle signoff)) { @ msg.tmp = [msg.$0] EVAL ^assign $msg.tmp $1- ex.echo Script message $toupper($0) now set to $1-\.}{ ex.echo MSET Commands: VERSION PING FLOOD KICK ABK CFLOOD NFLOOD ex.echo UBAN AWAY IDLE SIGNOFF <#>. }} ### Setaway & Setback Routines (by Vassago) alias gone /setaway alias setaway { if ([$0]!=[]) {@ msg.awayreason = [$encode($0-)]} {@ msg.awayreason = [$encode($msg.away)]} //away $decode($msg.awayreason) \(Away since $tolower($Z) $left(10 $stime($time()))\) //me is away - $decode($msg.awayreason) - messages will be saved. @ status.away = 1 //exec echo "[$left(10 $stime($time())) $tolower($Z)] Setaway: $ex.safe($strip(! $decode($msg.awayreason))) " >> $file.away @ cnt.awaymsgs = 0 } alias away if (status.away==0){/setaway $0-}{/setback} alias back /setback alias setback { @ status.away = 0 //me Is Back In Life. //away ex.echo You have $cnt.awaymsgs messages waiting. ^assign temp $"[E/X] Display message file? (y/n) " if (([$temp]==[y])||([$temp]==[yes])) {//exec cat $file.away} ^assign temp $"[E/X] Save message file? (y/n) " if (([$temp]==[n])||([$temp]==[no])) { ^on ^exec_error "away *" # //exec -name away rm -f $file.away ^wait -cmd %away ^on exec_error - "awayrm *" ex.echo Setaway message list has been deleted.}{/ex.echo Setaway message list has not been deleted.} @ cnt.awaymsgs = 0 ^assign -temp } ### Script Variable Save Aliases (by Vassago) alias addfriend { @ FRIENDS[$cnt.friend] = [$0] @ cnt.friend = cnt.friend + 1 } alias addpriv { @ PRIVS[$cnt.priv] = [$0-] @ cnt.priv = cnt.priv + 1 } alias addenemy { @ ENEMIES[$cnt.enemy] = [$0] @ cnt.enemy = cnt.enemy + 1 } alias addcomment { @ COMMENTS[$cnt.comment] = [$0-] @ cnt.comment = cnt.comment + 1 } alias save { if ([$0]==[NOTIFY]) {/savenotify ex.echo Save has been completed.}{ if ([$0]==[LISTS]) {/savefriends ex.echo Save has been completed.}{ if ([$0]==[XDCC]) {/savexdcc ex.echo Save has been completed.}{ if ([$0]==[SCRIPT]) {/savescript ex.echo Save has been completed.}{ if ([$0]) {/ex.echo '$0' is not a valid save command.} ex.echo Usage: SAVE . }}}}} alias savescript { ex.echo Saving miscellaneous script settings... //^on ^exec_error "save *" # //exec -name save mv $file.phoenix $file.phoenix\.old wait ^on ^exec_error - "save *" sleep 2 //exec -name exsve cat >> $file.phoenix writeln ### Save file for $decode($msg.internal). writeln ### Last updated $left(10 $stime($time())) at $tolower($Z) writeln # Messages writest msg.ping $msg.ping writest msg.flood $msg.flood writest msg.abk $msg.abk writest msg.uban $msg.uban writest msg.signoff $msg.signoff writest msg.nflood $msg.nflood writest msg.cflood $msg.cflood writest msg.away $msg.away writest msg.idle $msg.idle writest msg.kick $msg.kick writest msg.signoff $msg.signoff writeln # Sets writest set.usermode $set.usermode writest set.bandefault $set.bandefault writest set.statusbar $set.statusbar writest set.extmes $set.extmes writest set.friendaccess $set.friendaccess writest set.igtypes $set.igtypes writest set.mprot $set.mprot writest set.fprot $set.fprot writest set.nhp $set.nhp writest set.cprot $set.cprot writest set.autoreconnect $set.autoreconnect writest set.autoop $set.autoop writest set.autobk $set.autobk writeln # Limits writest lm.idle $lm.idle writest lm.reset $lm.reset writest lm.ignore $lm.ignore writest lm.mode $lm.mode writest lm.kick $lm.kick writest lm.msg $lm.msg writest lm.notice $lm.notice writest lm.ctcp $lm.ctcp writest lm.nick $lm.nick writest lm.tabkey $lm.tabkey wait //exec -CLOSE %exsve sleep 2 } alias savefriends { ex.echo Saving Friends and AutoBkick lists... //^on ^exec_error "save *" # //exec -name save mv $file.friends $file.friends\.old wait ^on ^exec_error - "save *" sleep 2 //exec -name exsve cat >> $file.friends writeln ### Save file for $decode($msg.internal). writeln ### Last updated $left(10 $stime($time())) at $tolower($Z) foreach FRIENDS XX {^writeln addfriend $FRIENDS[$XX]} foreach PRIVS XX {^writeln addpriv $PRIVS[$XX]} foreach ENEMIES XX {^writeln addenemy $ENEMIES[$XX]} foreach COMMENTS XX {^writeln addcomment $COMMENTS[$XX]} wait //exec -CLOSE %exsve sleep 2 } alias savexdcc { ex.echo Saving XDCC settings... ^on ^exec_error "save *" # //exec -name save mv $file.xdccset $file.xdccset\.old wait ^on ^exec_error - "save *" sleep 2 //exec -name exsve cat >> $file.xdccset writeln ### Save file for $decode($msg.internal). writeln ### Last updated $left(10 $stime($time())) at $tolower($Z) writest dcc.autoget $dcc.autoget writest dcc.autochat $dcc.autochat writest dcc.chatask $dcc.chatask writest dcc.autosend $dcc.autosend writest dcc.autoclose $dcc.autoclose writest dcc.autorename $dcc.autorename writest dcc.security $dcc.security writest dcc.limit $dcc.limit writest dcc.timelimit $dcc.timelimit writest dcc.quiet $dcc.quiet wait //exec -CLOSE %exsve sleep 2 } alias savenotify { ex.echo Saving notify list... //^on ^exec_error "exsve *" # //exec -name save mv $file.notify $file.notify\.old wait %save sleep 1 ^on ^exec_error - "exsve *" //exec -name exsve cat >> $file.notify writeln ### Save file for $decode($msg.internal). writeln ### Last updated $left(10 $stime($time())) at $tolower($Z) @ notify.size = [$#set.notify] @ notify.counter = 0 while (notify.counter < notify.size) { @ notify.num = 0 ^assign -notify.write while (notify.num < 7) { ^assign notify.write $notify.write $word($notify.counter $set.notify) @ notify.num = notify.num + 1 @ notify.counter = notify.counter + 1} ^msg %exsve notify $notify.write } wait //exec -CLOSE %exsve sleep 2 ^assign -notify.num ^assign -notify.write ^assign -notify.counter ^assign -notify.size } alias writest {^msg %exsve ex.avar $*} alias writeln {^msg %exsve $*} ### AUTOBKICK LIST Routines (by Vassago) alias ex.enemychk { @ FUNCTION_RETURN = 0 foreach ENEMIES XX { if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) {@ FUNCTION_RETURN = 1} }} alias ex.enemyadd { @ ENTMP = rand(9999) ^assign ENEMIES[$ENTMP] $0 ex.makelists if ([$1]) { ^assign COMMENTS[$ENTMP]  $1-  ex.echo Added $0 to your AutoBKick list with comment: $1- }{/ex.echo Added $0 to your AutoBKick list with no comment.} } alias ex.enemydel { foreach ENEMIES XX { if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) { ex.echo Match: Removing $ENEMIES[$XX] from list. ^assign -ENEMIES[$XX] ^assign -COMMENTS[$XX] ex.makelists }}} alias addbk { if ([$0]) { if (rmatch($0 *@* *!* *.*)) { if ([$ex.enemychk($0)]==1) {/ex.enemydel $0} ex.enemyadd $0 $1-}{ ex.echo Searching for nickname $0\... ^assign tempcomment $1- Userhost $0 -CMD if ([$4]!=[]) { ^assign TOADD $ex.safe($3)@$4 if ([$ex.enemychk(*!*$TOADD)]==1) {/ex.enemydel *!*$TOADD} ex.enemyadd $nban($ex.safe($3) $4 *) $tempcomment ^assign -TOADD ^assign -tempcomment }{/ex.echo I can't find $0 on IRC.}}}{ ex.echo Usage: /ADDBK to add a nick/filt to your ex.echo AUTOBKICK list. You can place your bans in your bkick list by ex.echo typing /DOBANS. If someone joins one of your channels with a ex.echo user@host that matches in your list, they will be deopped, ex.echo banned, and kicked from the channel automatically. }} alias listbk { ex.echo Listing Enemies/Filters in your list: @ THELIST = 0 foreach ENEMIES XX { @ THELIST = THELIST + 1 if ([$COMMENTS[$XX]]!=[]) {/ex.echo #$THELIST $ENEMIES[$XX] \($COMMENTS[$XX]\)} {/ex.echo #$THELIST $ENEMIES[$XX]}} ex.echo End of AutoBKick list. A total of $THELIST people/filters. ^assign -THELIST } alias rembk { if ([$0]) { if ([$0]==[ALL]) { ex.purge ENEMIES ex.purge COMMENTS ^assign -BKLIST ex.echo Your AutoBkick list has been cleared.}{ if (rmatch($0 *@* *!* *.*)) { if ([$ex.enemychk($0)]==1) {/ex.enemydel $0} {/ex.echo $0 is not in your AutoBKick list.}}{ Userhost $0 -CMD if ([$4]!=[]) { ^assign TOREMOVE $ex.safe($3)@$4 if ([$ex.enemychk(*!*$TOREMOVE)]==1) {/ex.enemydel *!*$TOREMOVE} {/ex.echo *!*$TOREMOVE is not in your AutoBkick list.} ^assign -TOREMOVE }{/ex.echo I can't find $0 on IRC.}}}}{ ex.echo Usage: /REMBK . ex.echo Type /REMBK ALL to clear your AutoBkick list. }} ### CTCP Friends List Functions (by Vassago) alias ex.friendchk { @ FUNCTION_RETURN = 0 foreach FRIENDS XX { if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) {@ FUNCTION_RETURN = 1} }} alias ex.friendadd { @ FRTMP = rand(9999) ^assign FRIENDS[$FRTMP] $0 ex.setprivs $1- ex.echo Added $0 to your Friends list with ex.echo CTCP access of: $PRIVS[$FRTMP] ex.makelists } alias ex.frienddel { foreach FRIENDS XX { if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) { ex.echo Match: Removing $FRIENDS[$XX] from list. ^assign -FRIENDS[$XX] ^assign -PRIVS[$XX] ex.makelists }}} alias addf { if ([$0]) { if (rmatch($0 *@* *!* *.*)) { if ([$ex.friendchk($0)]==1) {/ex.frienddel $0} ex.friendadd $0 $1-}{ ^assign STUFF $1- ex.echo Searching for nickname $0\... Userhost $0 -CMD if ([$4]!=[]) { ^assign TOADD $ex.safe($3)@$4 if ([$ex.friendchk($0!$TOADD)]==1) {/ex.frienddel $0!$TOADD} ex.friendadd $nban($ex.safe($3) $4 *) $STUFF ex.qnot $0 You have been added to my Friends list with CTCP ex.qnot $0 access of: $PRIVS[$FRTMP] ex.qnot $0 Type /CTCP $N HELP for more information. ^assign -STUFF ^assign -TOADD}{/ex.echo I can't find $0 on IRC.}}}{ ex.echo Usage: /ADDF . Available privileges are ex.echo INVITE, OP, and XDCC. To give them all access, type /ADDF ex.echo ALL. To change someone's privileges, just /ADDF them again. }} alias ex.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)) { ex.echo You must specify OP, INVITE, XDCC or ALL. ex.echo Setting privileges to INVITE and XDCC. \(default\). @ PRIVS[$FRTMP] = [INVITE XDCC] }}{@ PRIVS[$FRTMP] = [INVITE XDCC]}} alias listf { ex.echo Listing Friends/Filters in your list and their access: @ THELIST = 0 foreach FRIENDS XX { @ THELIST = THELIST + 1 ex.echo #$THELIST $FRIENDS[$XX] ex.echo Privileges: $PRIVS[$XX]} ex.echo End of Friends list. A total of $THELIST people. ^assign -THELIST } alias remf { if ([$0]) { if ([$0]==[ALL]) { ex.purge FRIENDS ex.purge PRIVS ex.echo Your friends list has been cleared.}{ if (rmatch($0 *@* *!* *.*)) { if ([$ex.friendchk($0)]==1) {/ex.frienddel $0} {/ex.echo $0 is not on your Friends list.}}{ Userhost $0 -CMD if ([$4]!=[]) { ^assign TOREMOVE $ex.safe($3)@$4 if ([$ex.friendchk($0!$TOREMOVE)]==1) {/ex.frienddel $0!$TOREMOVE} {/ex.echo $0!$TOREMOVE is not on your Friends list.} ^assign -TOREMOVE}{/ex.echo I can't find $0 on IRC.}}}}{ ex.echo Usage: /REMF . ex.echo To clear your friends list, type /REMF ALL. }} alias ex.makelists { ^assign -OPLIST ^assign -FRIENDLIST ^assign -INVITELIST ^assign -SECLIST ^assign -BKLIST foreach FRIENDS ii { ^assign FTMP *$ex.uhonly($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] ]} } ### Notify Functions on ^notify_signon "*" { ex.tref 634 5 ex.notify @ notify.lst = [$notify.lst ] ## [$0] } on ^notify_signoff "*" {/ex.echo Signoff at $tolower($Z) for $0 detected.} alias ex.notify { if ([$notify.lst]!=[]) { Userhost $notify.lst -cmd if ([$4]!=[]) { if ([$2] == [+]) {/ex.echo Signon at $tolower($Z) for $0 [$ex.userdom($strip(~ $3)@$4)] detected. [AWAY]} {/ex.echo Signon at $tolower($Z) for $0 [$ex.userdom($strip(~ $3)@$4)] detected.}} ^assign -notify.lst }} ### NOTIFY Alias (by Vassago) alias notify { if ([$0]) { if ([$[1]0] == [-]) { if (match($strip(- $0) $set.notify)) { //^notify $0 @ set.notify = rem_w($strip(- $0) $set.notify) ex.echo $0 has been removed from the notify list. }{/ex.echo $0 isn't in your notify list.}}{ @ set.notify = [$strip(+ $0) ] ## set.notify //^notify $0 if (set.loading==0) {/ex.echo $0 has been added to your notify list.}} if ([$1]) {/notify $1-}}{ ex.echo Usage: NOTIFY \(+/-\) ... if ([$set.notify]!=[]) {/ex.echo Notify list: $set.notify} //notify + }} 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}-)]} ### Message In Window function (by Zelix [Peter Handel]) alias miw { if (set.msgwindow==1) { ex.echo Closing message-in-window. @ set.msgwindow = 0 ^window refnum Messages ^window kill Messages}{ ex.echo Opening message-in-window. @ set.msgwindow = 1 ^window new name Messages ^window shrink 7 ^window scroll on ^window goto 2 }} ### Miscellaneous Aliases (Credit given where due) ### UUMAIL Alias (by CKeeper, Mods by Vassago) alias uumail { if ([$0]) { ^assign MAILFILE $1- if (rmatch($0 *@* *!*)) { //exec uuencode $MAILFILE $MAILFILE | mail $ex.safe($0) ex.echo Mailed $MAILFILE to $ex.safe($0) \(uuencoded\). ^assign -MAILFILE}{ ^Userhost $0 -CMD if ([$4]!=[]) { ^assign mail_to $ex.safe($3)@$4 //exec uuencode $MAILFILE $MAILFILE | mail $mail_to ex.echo Mailed $MAILFILE to $mail_to \(uuencoded\). ^assign -MAILFILE ^assign -mail_to }{/ex.echo I can't find $0 on IRC.}}} {/ex.echo Usage: /UUMAIL }} alias reset { //clear -all -unhold ex.echo Resetting screen windows... ^set status_clock c0\;24r\;0m?5l sleep 2 //type ^[r ^set status_clock %T type ^L ex.echo Reset complete. } # Miscellaneous UNIX commands (so you can do stuff while in IRC) alias TAR //exec tar -cvf $0.tar $0 alias UNTAR //exec tar -xvf alias SPING //exec ping $0 | tail -2 alias UPTIME //exec uptime alias QUOTA //exec quota -v alias SPACE //exec du -s $HOME alias PS //exec ps -x alias PS2 //exec ps -u `whoami` alias KP //exec kill -9 alias LS //exec ls -FC alias LSA //exec ls -aFCs alias DIR //exec ls -l alias NSLOOKUP //exec nslookup alias TRACEROUTE //exec traceroute alias RM //exec rm alias MV //exec mv alias CP //exec cp -r alias MKDIR //exec mkdir alias GREP //exec grep alias CHMOD //exec chmod alias FIND //exec find $HOME -name $0 -print alias FILE //exec file alias UNCOMPRESS //exec uncompress alias COMPRESS //exec compress alias GZIP //exec gzip alias GUNZIP //exec gunzip alias UUENCODE //exec uuencode $0 $0 > $0.uue alias UUDECODE //exec uudecode alias CAT { if ([$0]) { @ numberoflines = 0 @ startingline = 0 @ numlinesdisp = 0 @ fileview = [$0] @ startingline = [$1] @ numlinesdisp = [$2] ^on ^exec "nlines *" ^assign numberoflines $$1 //exec -name nlines wc -l $fileview ^wait -cmd %nlines ^on exec - "nlines *" if ([$numlinesdisp] == [0]) {^assign numlinesdisp $numberoflines} if ([$startingline] == [0] && [$numlinesdisp] == [0]) {cat $fileview} { @tln = numberoflines - startingline //exec tail -$tln $fileview | head -$numlinesdisp}}{ ex.echo Usage: /cat }} alias note if ([$0]) { //exec -name exnote echo '[$ex.date($time())] $ex.msafe($0-)' >> $file.notes ^wait %exnote ex.echo Note stored in $file.notes\.}{ if ([$word(0 $"Do you want to see stored memos? ")]==[Y]) { ex.echo Saved notes: \(Reading file $file.notes\): ^on ^exec_error "exnote *" {/ex.echo Notes file \"$file.notes\" was not found.} //exec -name exnote cat $file.notes ^wait %exnote ^on ^exec_error - "exnote *" }} alias chgst { if (set.statusbar==1) { ^assign ptmp $ptmp${dcc.totalpack}- ^assign ptmp $ptmp${dcc.getcount} if (dcc.autoget==1) { ^assign ptmp ${ptmp}:G} { ^assign ptmp ${ptmp}:g} if (dcc.autosend==1) { ^assign ptmp ${ptmp}S} { ^assign ptmp ${ptmp}s} if (dcc.autoclose==1) { ^assign ptmp ${ptmp}C} { ^assign ptmp ${ptmp}c} if (dcc.autorename==1) { ^assign ptmp ${ptmp}N} { ^assign ptmp ${ptmp}n} if (dcc.security==1) { ^assign ptmp ${ptmp}X} { ^assign ptmp ${ptmp}x} if (set.friendaccess==1) { ^assign ptmp ${ptmp}A} { ^assign ptmp ${ptmp}a} if (set.logging==1) { ^assign ptmp ${ptmp}L} { ^assign ptmp ${ptmp}l} if (set.fprot==1) { ^assign ptmp ${ptmp}F} { ^assign ptmp ${ptmp}f} if (set.mprot==1) { ^assign ptmp ${ptmp}M} { ^assign ptmp ${ptmp}m} if (set.cprot==1) { ^assign ptmp ${ptmp}P} { ^assign ptmp ${ptmp}p} if (set.nhp==1) { ^assign ptmp ${ptmp}H} { ^assign ptmp ${ptmp}h} if (set.rejoin==1) { ^assign ptmp ${ptmp}R} { ^assign ptmp ${ptmp}r} ^assign ptmp [${ptmp}]$set.oldstatus ^set STATUS_FORMAT $ptmp ^assign -ptmp }{^set STATUS_FORMAT $set.oldstatus}} alias signoff { if ([$0]) { //echo *** Signoff: $N \($0-\) //signoff $0-}{ //echo *** Signoff: $N \($msg.signoff\) EVAL //signoff $msg.signoff }} alias cycle { ex.echo Cycling on channel $C\, one moment... @ tmp.channel = [$C] //part $C wait -CMD //join $tmp.channel ^assign -tmp.channel } ### Ignoring/Unignoring Functions (by Vassago) alias ig { if ([$0]) { if ([$1]) {@ ignore.types = [$1-]} if (!rmatch($0 *!* *@* *.*)) { Userhost $0 -CMD if ([$4]!=[]) { @ ignore.host = [*@$4] if ([$ignore.types]!=[]) {//^ignore $ignore.host $ignore.types} {//^ignore $ignore.host $set.igtypes} ex.echo Now ignoring $0 [$3@$4]. ^on ^raw_irc "*!*@$4 % % :VER*" # ^assign -ignore.types }{/ex.echo I can't find $0 on IRC.}}{ if ([$ignore.types]!=[]) {//^ignore $0 $ignore.types} {//^ignore $0 $set.igtypes} ex.echo Now ignoring $0. ^assign -ignore.types ^assign -ignore.host }}{/ex.echo Usage: /IG .} } alias noig { if ([$0]) { Userhost $0 -CMD if ([$4]!=[]) { //^ignore $0 NONE //^ignore *@$4 NONE ^on raw_irc - "*!*@$4 % % :VER*" if ([$msg.unignore]!=[]) {/ex.qnot $0 $msg.unignore} ex.echo $0 has been unignored. }{/ex.echo I can't find $0 on IRC.} }{/ex.echo Usage: /NOIG .} } ### CHANNEL WALLOPS (by Eagle-1, Mods from Vassago) alias wall { if ([$C]==0) {/ex.echo You must be on a channel to use /WALL.}{ ex.echo Sending WallOp message to $C, please wait... ^assign message $encode($0-) ex.echo [WallOP:$C] $decode($message) ^on ^names "*" sendwall $$1- ^names $C wait -CMD ^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) ex.echo WALLOPED: $showlist ^assign -sendlist ^assign -showlist }}} ### NET Alias for Window Control (by Vassago) alias net { if ([$0]) { ex.echo Hit CONTROL-W then ? for help on windowing commands. ex.echo Creating a window on server $0, please wait... //window new if ([$1]) {/EVAL //window server $0:$1::_$N} {/EVAL //window server $0:6667::_$N}}{ ex.echo Usage: /net [] ex.echo /NET creates a new window and connects it to . ex.echo CONTROL-W + is used for most window commands: ex.echo ^W? - Shows you this help screen. ex.echo ^WK - kills the current window. ex.echo ^WH - hides the current window. ex.echo ^WS - shows and balances all windows. ex.echo ^WC - clears the current window. ex.echo ^WL - lists all windows. ex.echo ^WP - Goes to the previous window. ex.echo ^WN or /wn - Goes to the next window. ex.echo ^W<1-9> - Changes to window number <1-9>. ex.echo /wr to reduce a window number of lines. ex.echo /wg to grow a window 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 -all 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 to add many improvements and Things That Were Not There Before. :> alias setmcommand { if ((match($0 protection autoget autoclose autosend overwrite security autorename)) && (match($1 ON OFF))) { @ dcc.tmp = [dcc.$0] if ([$1]==[on]){@ dcc.tmp2 = 1}{@ dcc.tmp2 = 0} EVAL ^assign $dcc.tmp $dcc.tmp2 ex.echo XDCC variable $toupper($0) now turned $toupper($1)\. chgst}{ ex.echo XDCC SET Commands: AUTOGET AUTOCLOSE AUTOSEND OVERWRITE ex.echo SECURITY AUTORENAME PROTECTION . }} # 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:* lost" if ([$1]==[***]) {/ex.subdccs} on -window "% ??? DCC SEND:* closed" if ([$1]==[***]) {/ex.subdccs} on -window "% ??? DCC SEND:* *completed* *sec*" if ([$1]==[***]) {/ex.subdccs} on -window "% ??? Unable to create connection:*" if ([$1]==[***]) {/ex.subdccs} alias ex.subdccs { if (cnt.dcc > 0) {@ cnt.dcc = cnt.dcc - 1} if (dcc.progress==0) { @ dcc.progress = 1 ^timer 55 updatecount }} alias updatecount { if (dcc.counting==0) { @ dcc.counting = 1 @ cnt.dcc = 0 ^on ^window "*" {/if ([$1]==[SEND]) {@ cnt.dcc = cnt.dcc + 1}} //dcc list ^on window - "*" @ dcc.counting = 0 @ dcc.progress = 0}{^timer 30 updatecount} } alias iswaiting { @ dcc.counting = 1 @ dccfilename = [none] @ liststarted = [no] @ listdone = [no] @ chnick = [$0] @ chfile = [$1] @ dccwaiting = [no] ^on ^window "*" { if (([$listdone]==[no])&&([$liststarted]==[yes])) { if (([$1]==[SEND])&&([$2]==[$chnick])) { if ([$3]==[Waiting]&&(match(*$chfile $6)==1)){ @ dccwaiting = [yes] @ dccfilename = [$6]}{ if ([$3]==[Active]&&(match(*$chfile $10)==1)){ @ dccwaiting = [active] @ dccfilename = [$10] }}}}{/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 @ dcc.counting = 0 } alias checksend { iswaiting $0 $1 if ([$dccwaiting]==[dunno]) {^timer 1 checksend $0 $1}{ if ([$dccwaiting]==[yes]) { ^timer 60 closesend $0 $1 if ([$lastnotdcc]!=[$0]) { Userhost $0 -CMD if ([$4]!=[]) { ex.qnot $0 You have DCCs pending. Type /DCC GET $N\. }{^timer 1 closesend $0 $1} @ lastnotdcc = [$0] ex.tref 508 15 ^assign -lastnotdcc}}} ^assign -dccwaiting } alias closesend { iswaiting $0 $1 if ([$dccwaiting]==[dunno]) {^timer 1 closesend $0 $1}{ if ([$dccwaiting]==[yes]) { userhost $0 -CMD if ([$4]!=[]) {/ex.qnot $0 Timeout: $1. Closing send.} //^dcc close send $0 ${dccfilename} ex.subdccs if ([$lastnotdcc]!=[$0]) { ex.decho One or more DCC SENDs to $0 have timed out. @ lastnotdcc = [$0] ex.tref 509 30 ^assign -lastnotdcc}}} ^assign -dccfilename } alias DESCmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if ( (NUM > 0) && (NUM <= dcc.totalpack)) { ex.echo Changing desc for pack #$NUM ^assign -TMPDESC ^assign TMPDESC $"[E/X] Description: " @ ARRAYDESC[$NUM] = [$TMPDESC] LISTmcommand #$NUM }{/ex.echo There aren't that many packs offered.}}{ ex.echo Usage: /XDCC DESC #X .} ex.echo Usage: /XDCC DESC #X .} ex.echo Usage: /XDCC DESC #X . } alias xdccmsg {/if (match($2 HELP LIST SEND)) {/$2COMMAND $0 $1 $3-}{/ex.qnot $0 Try /MSG $N XDCC HELP.}} alias HELPcommand { ex.qnot $0 /MSG $N XDCC LIST - to get the list of offered packs. ex.qnot $0 /MSG $N XDCC LIST # - to get more info on pack #. ex.qnot $0 /MSG $N XDCC SEND # - to send pack #. } alias LISTcommand { if ((dcc.security==0)||([$ex.secchk($0!$1)] == [YES])) { if ([$2]) { if ([$[1]2] == [#]) { @ TEMP = [$2] @ NUM = right(${@TEMP-index(# $2)+1} $2) if (NUM <= dcc.totalpack) { ex.decho List of pack #$NUM request received from $0. @ TEMPFILE = [] @ TEMPTOT = 0 @ COUNT0 = 1 ex.qnot $0 Pack: $ARRAYDESC[$NUM] ex.qnot $0 Length File while (COUNT0 <= ARRAYTOTF[$NUM]) { ex.qnot $0 $[10]ARRAYLENG[$NUM][$COUNT0] $X_FILE($ARRAYFILE[$NUM][$COUNT0]) @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT0] @ COUNT0 = COUNT0 + 1} ex.qnot $0 ---------- ------------------------------------------------- ex.qnot $0 $[10]TEMPTOT $ARRAYTOTF[$NUM] file\(s\)}{ ex.qnot $0 Pack $2 doesn't exist. Try /MSG $N XDCC LIST}} {/ex.qnot $0 XDCC LIST $2 is invalid. /MSG $N XDCC HELP.}}{ if (dcc.totalpack > 0) { ex.decho All pack list request from $0 [$ex.userdom($1)] @ COUNT0 = 1 ex.qnot $0 Pack Description while (COUNT0 <= dcc.totalpack) { ex.qnot $0 #$[3]COUNT0 $ARRAYDESC[$COUNT0] @ COUNT0 = COUNT0 + 1}}{/ex.qnot $0 No files offered.}}}{ ex.qnot $0 No files offered. ex.decho Unregistered XDCC LIST request from $0 [$ex.userdom($1)] }} alias SENDcommand { if ((dcc.autosend==1) || (dcc.mysend==1)) { if ((dcc.security==0)||([$ex.secchk($0!$1)] == [YES])) { if (([$2]!=[])&&(ex.isnum($2)==1)&&(ex.isalpha($2)==0)) { if ([$[1]2] == [#]) { @ TEMP = [$2] @ NUM = right(${@TEMP-index(# $2)+1} $2) if (NUM <= dcc.totalpack) { @ dcc.tmp = dcc.limit - cnt.dcc if (ARRAYTOTF[$NUM]>dcc.tmp) { ex.decho DCC Limit of $dcc.limit reached. Sending $2 to $0 would exceed $dcc.tmp free slots. ex.qnot $0 DCC Limit reached. $ARRAYTOTF[$NUM] slots needed, only $dcc.tmp\ free.}{ ex.decho Sending $2 to $0 [$ex.userdom($strip(~ $1))] ex.qnot $0 Sending you $ARRAYDESC[$NUM]\. @ COUNT1 = 1 @ TEMPTOT = 0 while (COUNT1 <= ARRAYTOTF[$NUM]) { ^edcc send $0 $ARRAYFILE[$NUM][$COUNT1] @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT1] @ COUNT1 = COUNT1 + 1} ex.qnot $0 Total files sent: $ARRAYTOTF[$NUM]\. You'll need $TEMPTOT\ bytes. }}{/ex.qnot $0 File $2 does not exist. /MSG $N XDCC LIST.} }{/ex.qnot $0 XDCC SEND $2 is invalid. /MSG $N XDCC HELP.}} {/ex.qnot $0 There is no such file.}}{ ex.qnot $0 There is no such file. ex.echo Unregistered user XDCC SEND request from $0 [$1].}}{ ex.qnot $0 That function has been disabled. }} alias xdcc { if (match($0 DESC SET MAXSIZE LOAD PSEND CLOSE SAVE GET DIR HELP LIST PLIST SEND STATUS NOTICE OFFER DOFFER LIMIT GLIST ULDIR DLDIR)) {$0MCOMMAND $1-}{/HELPMCOMMAND} } alias MAXSIZEmcommand { if (([$0]) && ex.isnum($0)) {@ dcc.maxsize = [$0]} {/ex.echo Usage: XDCC MAXSIZE <# of bytes>.} } alias LIMITmcommand { if ([$0]!=[]) {^assign TMPLIMIT $0} {^assign TMPLIMIT $word(0 $"[E/X] Enter new limit for DCC SENDS: ")} if ([$TMPLIMIT]!=[]) { if (ex.isnum($TMPLIMIT)==1) {@ dcc.limit = TMPLIMIT} ^assign -TMPLIMIT} ex.echo XDCC Limit: $dcc.limit } alias PSENDmcommand { if (dcc.totalpack > 0) { @ TMPVAR = [] @ NICKLIST = [] ^assign TMPVAR $"[E/X] Pack to send: " if ([$TMPVAR]!=[]) { if (TMPVAR <= dcc.totalpack) { ^assign NICKLIST $"[E/X] Nicks: " if ([$NICKLIST]) { @ COUNT2 = 0 @ dcc.mysend = 1 while (word($COUNT2 $NICKLIST)) { SENDcommand $word($COUNT2 $NICKLIST) #$TMPVAR @ COUNT2 = COUNT2 + 1} @ dcc.mysend = 0}}{/ex.echo Pack #$TMPVAR doesn't exist. Try /XDCC LIST.}}} {/ex.echo There are no packs created.}} alias LISTmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if (NUM <= dcc.totalpack) { @ COUNT2 = 1 @ TEMPTOT = 0 ex.echo PACK: $ARRAYDESC[$NUM] while (COUNT2 <= ARRAYTOTf[$NUM]) { ex.echo FILE: $ARRAYFILE[$NUM][$COUNT2] @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT2] @ COUNT2 = COUNT2 + 1} ex.echo Total: $TEMPTOT Bytes on $ARRAYTOTF[$NUM] file\(s\)} {/ex.echo Pack $0 doesn't exist.}} {/ex.echo Usage: /XDCC LIST }}{ if (dcc.totalpack > 0) { @ COUNT2 = 1 ex.echo Pack Description while (COUNT2 <= dcc.totalpack) { ex.echo #$[2]COUNT2 $ARRAYDESC[$COUNT2] @ COUNT2 = COUNT2 + 1}} {/ex.echo There are no files offered. }}} alias NOTICEmcommand if (dcc.totalpack>0) {//say ** $dcc.totalpack file\(s\) offered. For file list, /MSG $N XDCC LIST.}{/ex.echo No packs offered.} alias PLISTmcommand { if (dcc.totalpack > 0) { //say ** PACKS OFFERED. /MSG $N XDCC SEND #N to autosend pack #N @ dcc.tmp = dcc.limit - cnt.dcc //say ** There are $dcc.tmp\ of $dcc.limit\ DCC slots available. ^assign -dcc.tmp @ COUNT3 = 1 while (COUNT3 <= dcc.totalpack) { //say #$COUNT3 $ARRAYDESC[$COUNT3] @ COUNT3 = COUNT3 + 1 }}{/ex.echo There are no files offered.}} alias SENDmcommand { @ NICKLIST = [] @ TMPVAR = [] if ([$0]) {@ TMPVAR = [$0-]} {^assign TMPVAR $"[E/X] Files to send: "} if ([$TMPVAR]!=[]) { if ([$getdir()] == [OK]) { ^assign NICKLIST $"[E/X] Nicks: " if ([$NICKLIST]!=[]) { dosend ex.echo Send finished. }}{/ex.echo Please check the files.}}} alias getdir { @ FILECOUNT = 0 ^on -exec_error "DIR1 *" {/ex.echo Error: $1-} ^on ^exec "DIR1 *" addfile $$1- @ COUNT4 = 0 while (word($COUNT4 $TMPVAR)) { @ TMPFILE = word($COUNT4 $TMPVAR) if ([$[1]TMPFILE] == [/]) {} { @ TMPFILE = [$file.upload/$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) { ^edcc send $word($COUNT5 $NICKLIST) $FILELIST[$COUNT6] @ SENDTOT = SENDTOT + FILELENG[$COUNT6] @ COUNT6 = COUNT6 + 1 } ex.qnot $word($COUNT5 $NICKLIST) $SENDTOT Bytes in $FILECOUNT file\(s\). @ COUNT5 = COUNT5 + 1 }} alias edcc { //dcc $0- if ([$0]==[SEND]) { @ cnt.dcc = cnt.dcc + 1 ^timer 120 checksend $1 $2 }} alias OFFERmcommand { @ TMPVAR = [] @ TMPDESC = [] ^assign TMPVAR $"[E/X] Files: " if ([$TMPVAR]) { if ([$getdir()] == [OK]) { ^assign TMPDESC $"[E/X] Description: " if ([$TMPDESC]) { @ dcc.totalpack = dcc.totalpack + 1 @ COUNT = 1 @ SENDTOTAL = 0 while (COUNT <= FILECOUNT) { @ ARRAYFILE[$dcc.totalpack][$COUNT] = [$FILELIST[$COUNT]] @ ARRAYLENG[$dcc.totalpack][$COUNT] = [$FILELENG[$COUNT]] @ SENDTOTAL = SENDTOTAL + FILELENG[$COUNT] @ ARRAYTOTF[$dcc.totalpack] = [$FILECOUNT] @ COUNT = COUNT + 1 } @ SENDTOTAL = SENDTOTAL / 1024 if (FILECOUNT==1) {@ ARRAYDESC[$dcc.totalpack] = [$TMPDESC \[$SENDTOTAL\kb, $FILECOUNT\ file\]]} {@ ARRAYDESC[$dcc.totalpack] = [$TMPDESC \[$SENDTOTAL\kb, $FILECOUNT\ files\]]} ex.echo $FILECOUNT file\(s\) added to Pack #$dcc.totalpack\. chgst}{}} {/ex.echo One or more of these files don't exist.}}} alias DOFFERmcommand { if (dcc.totalpack > 0) { @ TMPNUM = [] ^assign TMPNUM $"[E/X] Pack to remove (* for all): " if ([$TMPNUM]) { if ([$TMPNUM] == [*]) { @ dcc.totalpack = 0 chgst ex.echo All packs removed from offer list. } { if ((TMPNUM <= dcc.totalpack) && (TMPNUM > 0)) { @ COUNT7 = TMPNUM while (COUNT7 < dcc.totalpack) { @ 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 } @ dcc.totalpack = dcc.totalpack - 1 ex.echo Pack #$TMPNUM removed from offer list. chgst } {/ex.echo Try a number between 1 and $dcc.totalpack\. }}}{}} {/ex.echo There are no files offered. }} alias ULDIRmcommand { if ([$0]) {^assign newdir $0} {^assign newdir $"[E/X] New upload directory: " } if ([$newdir]!=[]) { @ file.olddir = [$W] ^cd $newdir @ file.upload = [$W] ^cd $file.olddir ^assign -file.olddir } ^assign -newdir ex.echo Upload directory: $file.upload\. } alias DLDIRmcommand { if ([$0]) {^assign newdir $0} {^assign newdir $"[E/X] New download directory: " } if ([$newdir]!=[]) { @ file.olddir = [$W] ^cd $newdir @ file.download = [$W] ^cd $file.olddir ^assign -file.olddir } ^assign -newdir ex.echo Download directory: $file.download\. } alias x_file { ^assign TMP $0 if (rindex(/ $TMP)) { @ function_return = right(${@TMP-rindex(/ $0)+1} $0) } { @ function_return = [$0] } } alias adddccrequest { @ dcc.getcount = dcc.getcount + 1 @ ARRAYFILEGET[$dcc.getcount] = [$0] @ ARRAYNICKGET[$dcc.getcount] = [$1] chgst } alias CLOSEmcommand { if (dcc.getcount > 0) { @ TMPNICK = [] ^assign TMPNICK $"[E/X] Nick to remove get files (* for all): " if ([$TMPNICK]) { if ([$TMPNICK] == [*]) { @ dcc.getcount = 0 foreach ARRAYFILEGET XX { //^dcc close get $ARRAYNICKGET[$XX] } chgst ex.echo All files removed from get list. }{ @ COUNT8 = 1 @ COUNT9 = 1 @ COUNT10 = dcc.getcount while (COUNT9 <= COUNT10) { if ([$ARRAYNICKGET[$COUNT9]] != [$TMPNICK]) { @ ARRAYFILEGET[$COUNT8] = [$ARRAYFILEGET[$COUNT9]] @ ARRAYNICKGET[$COUNT8] = [$ARRAYNICKGET[$COUNT9]] @ COUNT8 = COUNT8 + 1 } { //^dcc close get $TMPNICK @ dcc.getcount = dcc.getcount - 1} @ COUNT9 = COUNT9 + 1} chgst }}{}}{/ex.echo There are no pending files. }} alias DIRmcommand { @ TMPVAR = [] ^assign TMPVAR $"[E/X] Dir: " if ([$getdir()] == [OK]) { @ COUNT8 = 1 ex.echo Length File while (COUNT8 <= FILECOUNT) { ex.echo $[10]FILELENG[$COUNT8] $FILELIST[$COUNT8] @ COUNT8 = COUNT8 + 1 }}} alias GETmcommand { if (dcc.getcount > 0) { @ TMPNICK = [] ^assign TMPNICK $"[E/X] Nick to get files (* for all): " if ([$TMPNICK]) { if ([$TMPNICK] == [*]) { @ dcc.getcount = 0 foreach ARRAYFILEGET XX {//^dcc get $ARRAYNICKGET[$XX] $ARRAYFILEGET[$XX]} chgst ex.echo All files taken from get list. } { @ COUNT8 = 1 @ COUNT9 = 1 @ COUNT10 = dcc.getcount ex.echo 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] @ dcc.getcount = dcc.getcount - 1 } @ COUNT9 = COUNT9 + 1 } chgst }}{}}{/ex.echo There are no files offered. }} alias GLISTmcommand { if (dcc.getcount > 0) { @ TMPNICK = [] ^assign TMPNICK $"[E/X] Nick to list pending files (* for all): " if ([$TMPNICK]) { @ COUNT11 = 1 ex.echo Nick File while (COUNT11 <= dcc.getcount) { if (match($TMPNICK $ARRAYNICKGET[$COUNT11])) { ex.echo $[9]ARRAYNICKGET[$COUNT11] $ARRAYFILEGET[$COUNT11] } {} @ COUNT11 = COUNT11 + 1 }}{}}{/ex.echo There are no pending files. }} alias LOADmcommand { if ([$0]){ /ex.echo Loading XDCC Offer file: $0\... @ OLDNUM = dcc.totalpack @ LOAD_ERROR = [NO] @ LINECOUNT = 0 @ COUNT12 = [desc comment] ^on ^exec_error "load_files *" { @ LOAD_ERROR = [YES] /ex.echo 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[$dcc.totalpack] == 0) {@ dcc.totalpack = dcc.totalpack - 1} chgst } if ([$LOAD_ERROR] != [NO]) {@ dcc.totalpack = OLDNUM}}{ if ([$file.xdcc]!=[]) { ex.echo Default: Loading $file.xdcc\... loadmcommand $file.xdcc }{/ex.echo There is no such file in the specified directory.}}} alias SAVEMCOMMAND { if ([$0]) { ex.echo Saving file... @ TEMP1 = [$1-] @ SAVE_ERROR = [NO] @ TEMP2 = [] @ COUNT = 0 @ LINECOUNT = 0 ^on ^exec_error "fsave *" # //exec -name fsave rm $file.xdcc wait ^on ^exec_error - "fsave *" if ([$1]) { while (word($COUNT $TEMP1)) { if ([$[1]word($COUNT $TEMP1)] != [#]) { ex.echo Error: $word($COUNT $TEMP1) is not a valid pack format. @ SAVE_ERROR = [YES] }{ @ TEMP = word($COUNT $TEMP1) @ NUM = right(${@TEMP-1} $TEMP) if (NUM > dcc.totalpack) { ex.echo Error: #$NUM does't exist. @ SAVE_ERROR = [YES] }{@ TEMP2 = [$TEMP2] ## [ $NUM]}} @ COUNT = COUNT + 1}}{ while (COUNT < dcc.totalpack) { @ 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 *" { ex.echo 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]) {/ex.echo File saved correctly.} }}{ if (file.xdcc) { ex.echo Default: Saving as $file.xdcc\... savemcommand $file.xdcc }{/ex.echo Usage: /XDCC SAVE }}} alias add_line { @ LINECOUNT = LINECOUNT + 1 @ XDCCFILELINE[$LINECOUNT] = [$0-] } alias add_file { if (match($0 $COUNT12)) { if ([$0] == [desc]) { @ OLDNUM = dcc.totalpack if ((dcc.totalpack >= 0) && (ARRAYTOTF[$dcc.totalpack] == 0)) {} { @ dcc.totalpack = dcc.totalpack + 1 } @ ARRAYDESC[$dcc.totalpack] = [$1-] @ ARRAYTOTF[$dcc.totalpack] = 0 @ COUNT12 = [files comment] } { if ([$0] == [files]) { @ COUNT12 = [desc files comment] @ TMPVAR = [$1-] if ([$getdir()] == [OK]) { @ COUNT13 = 1 while (COUNT13 <= FILECOUNT) { @ ARRAYTOTF[$dcc.totalpack] = ARRAYTOTF[$dcc.totalpack] + 1 @ ARRAYFILE[$dcc.totalpack][$ARRAYTOTF[$dcc.totalpack]] = [$FILELIST[$COUNT13]] @ ARRAYLENG[$dcc.totalpack][$ARRAYTOTF[$dcc.totalpack]] = [$FILELENG[$COUNT13]] @ COUNT13 = COUNT13 + 1}}{}}{}}{}}{ @ LOAD_ERROR = [YES] ex.echo Error loading offer file on line: ex.echo [$COUNT] $0- ex.echo First word on line isn't [$COUNT12]\. @ COUNT = LINECOUNT }} alias STATUSmcommand { ex.echo +-----------+ Current XDCC Configuration +-----------+ ex.echo Autoget Offered DCCs : $ex.flag($dcc.autoget) ex.echo Autosend from List : $ex.flag($dcc.autosend) ex.echo Autoclose DCC SENDS : $ex.flag($dcc.autoclose) ex.echo Overwrite existing files : $ex.flag($dcc.overwrite) ex.echo AutoRename existing files : $ex.flag($dcc.autorename) ex.echo DCC Autosend Limit : ${dcc.limit} ex.echo Security : $ex.flag($dcc.security) ex.echo Maximum Received Filesize : ${dcc.maxsize} ex.echo Files Offered : ${dcc.totalpack} ex.echo Get Count : $dcc.getcount ex.echo Upload Directory : $ex.flag($file.upload) ex.echo Download directory : $ex.flag($file.download) ex.echo Quiet Mode : $ex.flag($dcc.quiet) ex.echo +----------------------------------------------------+ } ### Script HELP Section alias ABOUTGCOMMAND { echo +------------------+ Phoenix Version 3.01 from Vassago +------------------+ echo This script has been made possible through the hard work and testing of echo many IRCers. Thanks go to the following script contributors: Robey, echo Fred1, Eagle-1, Daemon, WinterHawk, Beef, wc, YaZoO, XaBi, TG, CKeeper, echo Styles, Zelix, Shaman, Jailbird, and Fluff. echo +----------------------------------------------------------------------------+ } alias commands { echo +----------------------------------------------------------------------+ echo | Phoenix v3.01 by Vassago - Main Commands Help Topics | echo +----------------------------------------------------------------------+ echo | STATUS - Tells what the lights on the Status Bar Display mean. | echo | SET - Shows the commands with which to set script variables. | echo | USER - User-Specific Commands. | echo | OP - Channel Operator Commands (won't work unless you are op) | echo | LIST - Listing-Type Commands (such as /ADDF, /REMF, ADDBK, etc.) | echo | DCC - DCC Commands (File transfer) | echo | BAN - Ban Information (lists the different types of bans, etc) | echo | WINDOW - Windowing Commands (for creation/usage with IRC windows) | echo | UNIX - Unix Commands (unix aliases that do unix things from IRC) | echo | MISC - Miscellaneous Commands (don't really fit into the above) | echo | ABOUT - Tells you about Phoenix the script, credits, etc. | echo +----------------------------------------------------------------------+ echo | - PHELP - To read a help topic, type /PHELP . - PHELP - | echo +----------------------------------------------------------------------+ } alias phelp { if (match($0 STATUS USER OP LIST DCC BAN WINDOW UNIX MISC ABOUT SET)) {$0GCOMMAND} {/commands} } alias about aboutgcommand alias WINDOWGCOMMAND net alias HELPMCOMMAND phelp dcc alias STATUSGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - Status Bar Lights | echo +----------------------------------------------------------------------+ echo | The extended status bar flags [0-0:GSCNXALFMPHRX] are: | echo | A = Friends CTCP HELP/OP/INVITE/UNBAN L = IRC Logging | echo | M = Mass Deop/Kick Protection G = XDCC AutoGet | echo | F = Flood Protection N = XDCC AutoRename | echo | H = Netsplit Hack/Ban Protection C = XDCC AutoClose | echo | P = Channel Flood/Nick Flood Protection S = XDCC AutoSend | echo | R = Auto Rejoin on Kick X = XDCC Security | echo | 0-0 = Files Offered - Files Pending to Receive | echo | \(Uppercase letters indicate ON, lowercase OFF.\) | echo +----------------------------------------------------------------------+ } alias SETGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - Script Variable Commands | echo +----------------------------------------------------------------------+ echo | /PSET (command) (ON/OFF) - Sets a script variable ON or OFF. | echo | /LSET (command) (#) - Sets a script limit variable to <#>. | echo | /MSET (command) (message) - Sets a script message to . | echo | | echo | Command extensions for these commands may be found by simply typing | echo | the command with no arguments. | echo +----------------------------------------------------------------------+ } alias USERGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - User Specific Commands | echo +----------------------------------------------------------------------+ echo | /M (nick) (message) - Messages with . | echo | /N (nick) (message) - Notices with . | echo | /J (channel to join) - Joins - # is not needed. | echo | /L - leaves current channel. /L (channel) - Leaves . | echo | /W, /WI, /WW (nick) - Gives WHO, WHOIS, & WHOWAS info on . | echo | /WII (nick) - Tells you whois info on and their idle time. | echo | /SERV (server) - Switches to . /SERV - Goes to Default Serv. | echo | /SB [] - Show all bans on , or current channel. | echo | /I - Invites the last person to message you to your current channel. | echo | /EX (command) - Executes outside of IRC. | echo | /RE (Nick/Ch) (Cmd) - Redirects output of to . | echo | /DIRLM (Nick/Chn) - Directs last message received to . | echo | /DIRLN (Nick/Chn) - Directs last notice received to . | echo | /CHOPS - Lists channel operators in the current channel. | echo | /P (nick) - Pings . /P - Pings everyone on current channel. | echo | /AP - Updates your Lag indicator (on status bar.. autopings) | echo | /SC - Does a NAMES of current channel. | echo | /SAVE - Saves MOST of your personal user settings to a file. | pause echo | /IG (nick) - Ignores using default types from (by user@host). | echo | /IG (filter) - Ignores using default ignore types from . | echo | /NOIG (nick) - Unignores . | echo | /SETAWAY (reason) - Sets you away for . Logs all messages. | echo | /SETBACK - Sets you back, lists messages, & requests save/delete. | echo | /STATUS - Shows you your current Phoenix configuration. | echo | /NOTIFY (+/-nick) - Adds (+) or removes (-) from notify list. | echo | /PUBCAT (filename) - Displays a file to your current channel. | echo | /WHOLEFT/WL - When a netsplit occurs, this will show who split away. | echo | /UMODE (mode) - Changes your usermode to . | echo +----------------------------------------------------------------------+ } alias OPGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - Channel Op Commands | echo +----------------------------------------------------------------------+ echo | /OP (nicks) - Ops all . /DOP (nicks) - Deops all . | echo | /INV (nick) - Invites to current channel. | echo | /C (mode) - Sets on current channel. | echo | /MC - Clears all channel modes, including any channel keys. | echo | /K (nick) (reason) - Kicks of current channel for . | echo | /WALL (message) - Sends to all other channel operators. | echo | /BK (bantype) (nick) (reason) - Deops, bans, & kicks . | echo | /NOKEY - Removes the last set channel key. | echo | /T (topic) - Changes topic to . /T - Shows channel topic. | echo +----------------------------------------------------------------------+ } alias LISTGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - List Type Commands | echo +----------------------------------------------------------------------+ echo | /ADDF . Privileges you may assign include: | echo | INVITE, OP, and XDCC \(which lets them use your XDCC commands when | echo | you have XDCC Security ON.\) | echo | To give them all available access, type /ADDF ALL. | echo | /REMF - Removes nickname or filter from the Friends list.| echo | /REMF ALL - Removes all filters from your Friends list. | echo | /LISTF - Lists everyone on your Friends list and access levels. | echo | /ADDBK (nick/filter) - Adds or to your AutoBKick list. | echo | /REMBK (nick/filter) - Removes from your AutoBKick list. | echo | /REMBK ALL - Clears all filters from your AutoBkick list. | echo | /LISTBK - Lists your complete AutoBKick list. | echo +----------------------------------------------------------------------+ } alias BANGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - Ban Commands | echo +----------------------------------------------------------------------+ echo | /BAN (bantype) (nick) - Bans on your current channel. | echo | You can define a ban for use by typing: /BANDEF . | echo | /BAN (filter) - Bans up to three filters on your current channel. | echo | /UNBAN (nick) - Unbans on your current channel. | echo | /UNBAN (filter) - Reverses all bans matching on your channel. | echo | /BKICK/BK (bantype) (nick) - Deops and bans with . | echo | /CDBAN - Completely clears current channel of all bans. | echo | /BANDEF (n,s,h,d) - Sets default to normal, screw, host, or domain. | echo | These bans are used as default for BK and BAN. Ban types are: | echo | N Normal *!*ser@*.dom.area.cty S Screw *!*s??r@*.d??.a???.?ty | echo | H Host *!*@host.dom.area.cty D Domain *!*@*.dom.area.cty | echo | IP Addresses (Numerical) will be detected and banned correctly. | echo | /DOBANS - Does all bans & filters in your AutoBKick list. | echo +----------------------------------------------------------------------+ } alias UNIXGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - UNIX Commands | echo +----------------------------------------------------------------------+ echo | /TAR - to tar \(gather up\) a directory to file.tar. | echo | /UNTAR - to untar a file.tar file (unpack a dir). | echo | /UPTIME - displays uptime and load averages of host. | echo | /QUOTA - to find out what disk quota is. | echo | /SPACE - to find out how much disk space is used. | echo | /PS or /PS2 - to list your current running processes. | echo | /KP - to kill one process or more. | echo | /MKDIR - to create a directory. | echo | /GREP - to find occurrences of a string in a file. | echo | /CHMOD - to set a permission on files or dir's. | echo | /FIND - to find where a file is in your account. | echo | /FILE - to show what a file is \(its format\). | echo | /UNCOMPRESS - to uncompress a file.Z file. | echo | /COMPRESS - to compress a file \(.Z format\). | echo | /GUNZIP - to uncompress a file.gz file. | echo | /GZIP - to compress a file \(.gz format\). | echo | /UUENCODE - to uuencode a binary file \(.uue\). | echo | /UUDECODE - to uudecode a file. | pause echo | /CAT <#l> - to display a file \(type /cat for info\). | echo | /LS /LSA /DIR - to display your directory. | echo | /CP - to copy a file. | echo | /MV - to move or rename a file or directory. | echo | /RM - to remove a file. | echo +----------------------------------------------------------------------+ } alias MISCGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - Miscellaneous Commands | echo +----------------------------------------------------------------------+ echo | /RESET - Resets your terminal display. | echo | /NOTE - Time and date stamps something and writes to file.| echo | NOTE with no argument will display your current note file. | echo | /JI - Joins the last channel you were invited to. | echo | /UUMAIL (nick/host) - Mails a file uuencoded to . | echo | /CYCLE - Leaves current channel and rejoins right afterwards. | echo | /VER (nick) - Checks version of . /VER - Versions the channel. | echo | *TAB - Cycles through message recipient/last messagers. | echo | *CTRL-W - Controls all the Windowing functions. Type /NET for help. | echo | *CTRL-^ - Ignores the last person to MSG you. | echo | *CTRL-X - Switches back and forth between channels. | echo | *CTRL-Z - Drop to a Unix shell ('fg' exits the shell). | echo | *CTRL-F - Flushes all pending server output. | echo | *CTRL-B - Toggles BOLD text ON/OFF. | echo | *CTRL-V - Toggles INVERSE text ON/OFF. | echo | *CTRL-_ - Toggles UNDERLINE text ON/OFF. | echo | *CTRL-Y - Toggles Hold Mode ON/OFF. | echo | *ARROW UP - Brings up last command. | echo | *ARROW DOWN - Brings up next command. | echo | *ARROW LEFT - Moves the cursor left one character. | echo | *ARROW RIGHT - Moves the cursor right one character. | echo +----------------------------------------------------------------------+ } alias DCCGCOMMAND { echo +----------------------------------------------------------------------+ echo | Phoenix Version 3.01 by Vassago - DCC Commands | echo +----------------------------------------------------------------------+ echo | /XL - Does a /CTCP XDCC LIST to see files offered. | echo | /DC (nick) - Sends a DCC CHAT request to . | echo | /DCX (nick) - Closes a DCC CHAT from . | echo | /DCS (nick) - Closes a DCC SEND to . | echo | /DCG (nick) - Closes a DCC GET from . | echo | /XDCC SET - to set an XDCC variable ON/OFF. | echo | /XDCC MAXSIZE - to set max dcc autoget size. | echo | /XDCC LIST <#> - to get a list of your packs offered. | echo | /XDCC NOTICE - to make a public notice that you are offering files. | echo | /XDCC PLIST - to offer your file list to the channel. | echo | /XDCC SEND - to send files. | echo | /XDCC PSEND - to send packs. | echo | /XDCC GET - to get files. | echo | /XDCC CLOSE - to close files. | echo | /XDCC STATUS - to get XDCC status. | echo | /XDCC OFFER - to offer files to people. | echo | /XDCC DOFFER - to remove files from offered list. | echo | /XDCC FILE #X - to add/change the file(s) on pack #X | echo | /XDCC DESC #X - to add/change the desc on pack #X | echo | /XDCC NOTE #X - to add/change the note on pack #X | pause echo | /XDCC LOAD - to load offer-file FILENAME. | echo | /XDCC SAVE - to create an offer-file FILENAME. | echo | /XDCC ULDIR - to set your XDCC upload directory. | echo | /XDCC DLDIR - to set your XDCC download directory. | echo | /XDCC LIMIT - to set your XDCC AUTOSEND limit. | echo +----------------------------------------------------------------------+ } ### Runtime Stuff EVAL //load $file.phoenix EVAL //load $file.friends EVAL //load $file.xdccset EVAL //load $file.notify EVAL if (set.stealth==1) {^on ^raw_irc "*!*@* % % :*" #} EVAL if (set.nickchange==1) { ^on ^raw_irc "% 433 *" { ex.echo Nickname already in use. Autochanging... if ([$N]!=[$left(8 $3)_]) {//nick $left(8 $3)_}{//nick $left(8 $3)$rand(9)}}} EVAL //quote MODE $N $set.usermode EVAL ex.makelists EVAL $srand($time()) EVAL chgst EVAL if ($A!=[]) {//away} EVAL ex.echo Vassago's Phoenix Version 3.01 loaded.