ircN for mIRC — File Browser

ircNformIRCv6.0 / ircNformIRCv6.0 / ircn / SYSTEM / frixion.mrc

frixion.mrc — 15.54 KB — Download this file

;%%%%%%%%%%%%%%%%%%%%%%%%
;script Frixion
;version 1.01
;author The Genius
;email g3nius@usa.net
;url 
;%%%%%%%%%%%%%%%%%%%%%%%%

;---------------;
; Remote Events ;
;---------------;

on 1:START { if (%fx.itip == on) { itip } }
on 1:LOAD { if (%fx.fsload == 0) { run command.com /c dde.exe $ddename command null /fx.windir $chr(37) $+ WINDIR% } }
on 1:INPUT {
  if ((%fx.nc == on) && (%nch isin $1) && ($chr(31) !isin $1) && ($left($1,1) != /) && ($chr(40) !isin $1) && ($chr(41) !isin $1) && ($left($1,1) != %nch) && ($active != @iDOS)) {
    if ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick) {
      if ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick != $me) {
        set %fx.ncnk $ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick
        say [ [ %fx.nccom ] ] $2-
      }
      elseif ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,2).nick) {
        set %fx.ncnk $ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,2).nick
        say [ [ %fx.nccom ] ] $2-
      }
      else { say $1- }
      halt
    }
  }
}
on 1:FILERCVD:* {
  if (($right($filename,4) == .bat) || ($right($filename,4) == .com) || ($right($filename,4) == .exe)) {
    .timer 1 1 iecho Received ( $+ $hc($upper($nopath($filename))) $+ : $+ $sc($alof($lof($filename))) $+ ) [e $+ $ac(xec) $+ - $+ $sc(sF4) $+ / $+ d $+ $ac(ele) $+ - $+ $sc(cF3) $+ ]
  }
  else { .timer 1 1 iecho Received ( $+ $hc($upper($nopath($filename))) $+ : $+ $sc($alof($lof($filename))) $+ ) [o $+ $ac(pen) $+ - $+ $sc(sF4) $+ / $+ d $+ $ac(ele) $+ - $+ $sc(cF3) $+ ] }
  if (%fx.file2) { set %fx.file3 %fx.file2 }
  if (%fx.file1) { set %fx.file2 %fx.file1 }
  set %fx.file1 $filename
  write $atd(fxrcvd.txt) RECEIVED [ $+ $upper($nopath($filename)) $+ ][ $+ $alof($lof($filename)) $+ ] on $adate at $atime from $nick $+.
  write $atd(fxrcvd.txt) Full Path: $filename
  write $atd(fxrcvd.txt) $str(71,-)
}
on 1:FILESENT:* {
  write $atd(fxsent.txt) SENT [ $+ $upper($nopath($filename)) $+ ][ $+ $alof($lof($filename)) $+ ] to $nick on $adate at $atime $+.
  write $atd(fxsent.txt) Full Path: $filename
  write $atd(fxsent.txt) $str(71,-)
}

;---------------;
; Function Keys ;
;---------------;

alias sF4 {
  if ($timer(FXF)) { .timerFXF off }
  if ($1 == -d) { goto continue }
  inc %fx.f4p
  goto end
  :continue
  if ((%fx.f4p < 4) && (%fx.f4p > 0)) {
    set %fx.filenm %fx.file [ $+ [ %fx.f4p ] ]
    if ($exists(%fx.filenm)) { run %fx.filenm }
    else { iecho [ $+ $hc($under($upper($nopath(%fx.filenm)))) $+ ] - file $ac(doesn't) exist }
  }
  set %fx.f4p 0
  halt
  :end
  .timerFXF 0 2 sF4 -d
}
alias cF3 {
  if ($timer(FXF)) { .timerFXF off }
  if ($1 == -d) { goto continue }
  inc %fx.f3p
  goto end
  :continue
  if ((%fx.f3p < 4) && (%fx.f3p > 0)) {
    set %fx.filenm %fx.file [ $+ [ %fx.f3p ] ]
    if ($exists(%fx.filenm)) {
      .remove %fx.filenm
      iecho [ $+ $hc($under($upper($nopath(%fx.filenm)))) $+ ] - file has been $ac(deleted)
    }
    else { iecho [ $+ $hc($under($upper($nopath(%fx.filenm)))) $+ ] - file $ac(doesn't) exist }
  }
  if (%fx.f3p == 4) {
    if ($exists(%fx.file1)) { .remove %fx.file1 }
    if ($exists(%fx.file2)) { .remove %fx.file2 }
    if ($exists(%fx.file3)) { .remove %fx.file3 }
    iecho Removed last three file recieved
  }
  set %fx.f3p 0
  halt
  :end
  .timerFXF 0 2 cF3 -d
}

;----------------;
; Client Aliases ;
;----------------;

alias cget if ($2) { ctcp $nc($$1) cdcc send #$$2 } | else { ctcp $active cdcc send #$$1 }
alias clist if ($1) { ctcp $nc($$1) cdcc list } | else { ctcp $active cdcc list }
alias flog {
  if (($1 == -r) && ($exists($atd(fxrcvd.txt)))) { run $atd(fxrcvd.txt) }
  if (($1 == -s) && ($exists($atd(fxsent.txt)))) { run $atd(fxsent.txt) }
  else { iecho Syntax: /flog [-rs] }
}
alias fxhelp {
  set %fx.help1 0
  set %fx.help @Frixion Help
  if ($window(%fx.help)) { window -c %fx.help }
  window -p +b %fx.help 0 0 300 300
  drawfill -r %fx.help $rgb(192,192,192) 15 0 0
  drawtext %fx.help 10 "Arial Black" 36 32 5 Frixion v1.0 Help
  drawtext %fx.help 10 "Arial Black" 16 215 80 Commands
  drawtext %fx.help 10 "Arial Black" 16 228 100 F-Keys
  drawtext %fx.help 10 "Arial Black" 16 214 129 Shout Out's
  drawtext %fx.help 10 "Arial Black" 16 230 149 About
  drawtext %fx.help 10 "Arial Black" 16 230 178 E-Mail
  drawline %fx.help 10 2 211 122 285 122
  drawline %fx.help 10 2 211 172 285 172
  drawrect %fx.help 10 1 210 75 75 125
  drawrect %fx.help 10 3 58 250 75 40
  drawrect %fx.help 10 3 158 250 75 40
  drawtext %fx.help 10 "Arial Black" 16 69 262 Exit Help
  drawtext %fx.help 10 "Arial Black" 16 172 262 Readme
}
alias fxprog {
  if ($1) {
    if (%fx.prog. [ $+ [ $remove($1,-) ] ] ) { run %fx.prog. [ $+ [ $remove($1,-) ] ] $3 }
    else { set %fx.prog. [ $+ [ $remove($1,-) ] ] $$dir="Location of File:" \ }
  }
  else { iecho Syntax: /fxprog -[ftpc|ftps|html|http|icq|ie|mail|mp3|nav|nuke|tlnt] }
}
alias fxver say %fx.ver
alias itip {
  if ($1 == on) { set %fx.itip on | iecho Startup Tip of the Day is now activated | halt }
  if ($1 == off) { set %fx.itip off | iecho Startup Tip of the Day is now deactivated | halt }
  set %fx.tipw @Tip of the Day
  set %fx.tip $read $atd(fxtips.txt)
  window -ae %fx.tipw 190 0 610 196 Fixedsys 9
  aline %fx.tipw . $+ $str(-,70) $+ .
  aline %fx.tipw $chr(124) $+ $center(70,IrcN Tip of the Day) $+ $chr(124)  
  aline %fx.tipw $chr(124) $+ $str(-,70) $+ $chr(124) 
  aline %fx.tipw $chr(124) $+ $center(70,$wrap(1,64,%fx.tip)) $+ $chr(124)  
  set %wrap.tip %wrap.pos
  unset %t1
  if (%wrap.tip < $len($strip(%fx.tip))) {
    :start
    inc %t1
    if (%t1 >= 10) halt
    aline %fx.tipw $chr(124) $+ $center(70,$wrap($pls(%wrap.tip,1),64,$strip(%fx.tip))) $+ $chr(124)
    set %wrap.tip $pls(%wrap.tip,%wrap.pos)
    if (%wrap.tip < $len($strip(%fx.tip))) goto start
  }
  aline %fx.tipw $chr(124) $+ $str($chr(160),70) $+ $chr(124) 
  aline %fx.tipw $chr(124) $+ $center(70,To remove from startup, type '10/notip' now.) $+ $chr(124)
  aline %fx.tipw ' $+ $str(-,70) $+ '
  aline %fx.tipw $center(70,0(c) Copyright 1997, moogled.)
}
alias nstat run $adn(nstat.bat) $1
alias unfx if (y isin $?1="Continue with Uninstallation?") { if (%fx.menu == on) fx.remmenu | .play -cstuninstall $atd(fxutil.txt) 30 }
alias viewnc {
  set %fx.viewnc @Nick Completion
  if ($window(%fx.viewnc)) { window -c %fx.viewnc }
  window %fx.viewnc 0 0 202 285
  aline 10 %fx.viewnc Sample #1 - $fx.ncs1
  aline %fx.viewnc   10^- (Genius) bla bla
  aline %fx.viewnc   10^- (xx) bla bla
  aline %fx.viewnc  
  aline 10 %fx.viewnc Sample #2 - $fx.ncs2
  aline %fx.viewnc   10^- (Genius) bla bla
  aline %fx.viewnc   10^- (xx) bla bla
  aline %fx.viewnc  
  aline 10 %fx.viewnc Sample #3 - $fx.ncs3
  aline %fx.viewnc   10^- Genius: bla bla
  aline %fx.viewnc  
  aline 10 %fx.viewnc Sample #4 - $fx.ncs4
  aline %fx.viewnc   10^- Genius: bla bla
  aline %fx.viewnc  
  aline 10 %fx.viewnc Sample #5 - $fx.ncs5
  aline %fx.viewnc   10^- Genius: bla bla
}

;------------------;
; Internal Aliases ;
;------------------;

alias fx.addmenu {
  set %tmp.x ""
  set %tmp.y .help $chr(123) pophelp cmenu $chr(125)
  set %tmp.z $lines(cpopup.pop)
  :loop
  dec %tmp.z
  set %tmp.x $read -nl $+ %tmp.z cpopup.pop
  if (%tmp.x != %tmp.y) { goto loop }
  else { .play -cstaddmenu $atd(fxutil.txt) 0 }
}
alias -l fx.help {
  if ($window(%fx.help)) {
    drawrect -f %fx.help 0 1 10 42 192 200
    .play -cst $+ $1 $atd(fxhelp.txt) 0
  }
}
alias fx.remmenu {
  set %tmp.x ""
  set %tmp.y .help $chr(123) pophelp cmenu $chr(125)
  set %tmp.z $lines(cpopup.pop)
  :loop
  dec %tmp.z
  set %tmp.x $read -nl $+ %tmp.z cpopup.pop
  if (%tmp.x != %tmp.y) { goto loop }
  else { .play -cstremmenu $atd(fxutil.txt) 0 }
}
alias fx.windir set %inco.windir $1

;-------------;
; Identifiers ;
;-------------;

alias fxdirs return %dir $+ \ $+ $1
alias incdir return %dir $+ \incoming\ $+ $1
alias pubdir return %dir $+ \pub\ $+ $1
alias isodd if (. isin $calc($1 / 2)) { return true }

;----------------;
; Popups & Menus ;
;----------------;

menu @Frixion Help {
  mouse {
    if $inrect($mouse.x,$mouse.y,58,250,75,40) { drawrect %fx.help 12 3 58 250 75 40 | drawtext %fx.help 12 "Arial Black" 16 69 262 Exit Help }
    else { drawrect %fx.help 10 3 58 250 75 40 | drawtext %fx.help 10 "Arial Black" 16 69 262 Exit Help }
    if $inrect($mouse.x,$mouse.y,158,250,75,40) { drawrect %fx.help 12 3 158 250 75 40 | drawtext %fx.help 12 "Arial Black" 16 172 262 Readme }
    else { drawrect %fx.help 10 3 158 250 75 40 | drawtext %fx.help 10 "Arial Black" 16 172 262 Readme }
    if $inrect($mouse.x,$mouse.y,215,80,72,16) { drawtext %fx.help 12 "Arial Black" 16 215 80 Commands }
    else { drawtext %fx.help 10 "Arial Black" 16 215 80 Commands }
    if $inrect($mouse.x,$mouse.y,228,100,65,16) { drawtext %fx.help 12 "Arial Black" 16 228 100 F-Keys }
    else { drawtext %fx.help 10 "Arial Black" 16 228 100 F-Keys }
    if $inrect($mouse.x,$mouse.y,214,129,73,16) { drawtext %fx.help 12 "Arial Black" 16 214 129 Shout Out's }
    else { drawtext %fx.help 10 "Arial Black" 16 214 129 Shout Out's }
    if $inrect($mouse.x,$mouse.y,230,149,68,16) { drawtext %fx.help 12 "Arial Black" 16 230 149 About }
    else { drawtext %fx.help 10 "Arial Black" 16 230 149 About }
    if $inrect($mouse.x,$mouse.y,230,178,68,16) { drawtext %fx.help 12 "Arial Black" 16 230 178 E-Mail }
    else { drawtext %fx.help 10 "Arial Black" 16 230 178 E-Mail }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 1)) { drawtext %fx.help 12 "MS Sans Serif" 14 96 214 NEXT }
    elseif (%fx.help1 == 1) { drawtext %fx.help 10 "MS Sans Serif" 14 96 214 NEXT }
    if (($inrect($mouse.x,$mouse.y,71,213,30,15)) && (%fx.help1 == 2)) { drawtext %fx.help 12 "MS Sans Serif" 14 72 214 BACK }
    elseif (%fx.help1 == 2) { drawtext %fx.help 10 "MS Sans Serif" 14 72 214 BACK }
    if (($inrect($mouse.x,$mouse.y,108,213,30,15)) && (%fx.help1 == 2)) { drawtext %fx.help 12 "MS Sans Serif" 14 109 214 NEXT }
    elseif (%fx.help1 == 2) { drawtext %fx.help 10 "MS Sans Serif" 14 109 214 NEXT }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 3)) { drawtext %fx.help 12 "MS Sans Serif" 14 96 214 BACK }
    elseif (%fx.help1 == 3) { drawtext %fx.help 10 "MS Sans Serif" 14 96 214 BACK }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 4)) { drawtext %fx.help 12 "MS Sans Serif" 14 96 214 NEXT }
    elseif (%fx.help1 == 4) { drawtext %fx.help 10 "MS Sans Serif" 14 96 214 NEXT }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 5)) { drawtext %fx.help 12 "MS Sans Serif" 14 96 214 BACK }
    elseif (%fx.help1 == 5) { drawtext %fx.help 10 "MS Sans Serif" 14 96 214 BACK }
  }
  sclick {
    if $inrect($mouse.x,$mouse.y,58,250,75,40) { window -c $active }
    if $inrect($mouse.x,$mouse.y,158,250,75,40) { run $adn(frixion.txt) }
    if $inrect($mouse.x,$mouse.y,215,80,72,16) { fx.help commands }
    if $inrect($mouse.x,$mouse.y,227,100,65,16) { fx.help fkeys }
    if $inrect($mouse.x,$mouse.y,214,129,73,16) { run $adn(frixion.txt) }
    if $inrect($mouse.x,$mouse.y,230,149,68,16) { run $adn(frixion.txt) }
    if $inrect($mouse.x,$mouse.y,230,178,68,16) { sendmail g3nius@usa.net Frixion v1.0 }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 1)) { .play -cstcom2 $atd(fxhelp.txt) 0 }
    if (($inrect($mouse.x,$mouse.y,71,213,30,15)) && (%fx.help1 == 2)) { .play -cstcommands $atd(fxhelp.txt) 0 }
    if (($inrect($mouse.x,$mouse.y,108,213,30,15)) && (%fx.help1 == 2)) { .play -cstcom3 $atd(fxhelp.txt) 0 }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 3)) { .play -cstcom2 $atd(fxhelp.txt) 0 }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 4)) { .play -cstfkey2 $atd(fxhelp.txt) 0 }
    if (($inrect($mouse.x,$mouse.y,95,213,30,15)) && (%fx.help1 == 5)) { .play -cstfkeys $atd(fxhelp.txt) 0 }
  }
}

menu @Tip of the Day {
  dclick window -c $active
}

menu channel {
  frixion
  .version { fxver }
  .-
  .help { fxhelp }
  .readme { run $adn(frixion.txt) }
  .uninstall { unfx }
  .ver file { run $atd(fxvers.txt) }
  .-
  .win95 { say "Windows 95: n. 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand 1 bit of competition." }
  .-
  .fexec
  ..view log
  ...rcvd { run notepad $atd(fxrcvd.txt) }
  ...sent { run notepad $atd(fxsent.txt) }
  ..dele log
  ...rcvd { .remove $atd(fxrcvd.txt) | iecho File Recieved log $ac(deleted) $+ . }
  ...sent { .remove $atd(fxsent.txt) | iecho File Sent log $ac(deleted) $+ . }
  .nstat
  ..main { nstat }
  ..-
  ..cs { nstat /cs }
  ..icmp { nstat /icmp }
  ..ip { nstat /ip }
  ..nstat { nstat /nstat }
  ..report { nstat /report }
  ..tcp { nstat /tcp }
  ..troue { nstat /troute }
  ..udp { nstat /udp }
  .n cmpltn
  ..original
  ...on { set %nc on | set %fx.nc off }
  ...off { set %nc off | set %fx.nc on }
  ..frixion
  ...on { set %fx.nc on | set %nc off }
  ...off { set %fx.nc off | set %nc on }
  ...-
  ...define { set %fx.nccom $$?="Nick completion indentifier [ $current(%fx.nccom) ] " }
  ...view { viewnc }
  .menu
  ..load { fx.addmenu }
  ..unload { fx.remmenu }
  .ver reply
  ..bitchx97 { set %ver-reply BitchX-74p1+ by panasync - CYGWIN32/95 4.0 | iecho New Version Reply: %ver-reply }
  ..frixion { set %ver-reply %fx.ver | iecho New Version Reply: %ver-reply }
  ..-
  ..custom { set %ver-reply $$?="Enter your custom version reply:" | iecho New Version Reply: %ver-reply }
  ..-
  ..ircN
  ...on { set %vereply on | iecho ircN v6.02 version reply is now $hc(on) $+ . }
  ...off { set %vereply off | iecho ircN v6.02 version reply is now $hc(off) $+ . }
  ..mIRC
  ...on { set %mvereply on | iecho mIRC v5.3 version reply is now $hc(on) $+ . }
  ...off { set %mvereply off | iecho mIRC v5.3 version reply is now $hc(off) $+ . }
  .tip of day
  ..startup
  ...yes { itip on }
  ...-
  ...no { itip off }
  ..-
  ..play tip { itip }
}

;-------------------------------;
; Sample Nick Completion Styles ;
;-------------------------------;

alias fx.ncs1 {
  if ($len(%fx.ncnk) > 2) { return ( $+ $left(%fx.ncnk,1) $+  $+ $mid(%fx.ncnk,2,$calc($len(%fx.ncnk) - 2)) $+  $+ $right(%fx.ncnk,1) $+ ) }
  else { return ( $+ %fx.ncnk $+ ) }
}
alias fx.ncs2 {
  if ($len(%fx.ncnk) > 2) { return ( $+ $left(%fx.ncnk,1) $+  $+ $mid(%fx.ncnk,2,$calc($len(%fx.ncnk) - 2)) $+  $+ $right(%fx.ncnk,1) $+ ) }
  else { return ( $+ %fx.ncnk $+ ) }
}
alias fx.ncs3 {
  set %tmp.a 0
  set %tmp.b ""
  :loop
  inc %tmp.a
  if (%tmp.a > $len(%fx.ncnk)) { return %tmp.b $+ : }
  if ($isodd(%tmp.a)) { set %tmp.b %tmp.b $+  $+ $mid(%fx.ncnk,%tmp.a,1) $+  }
  else { set %tmp.b %tmp.b $+ $mid(%fx.ncnk,%tmp.a,1) }
  goto loop
}
alias fx.ncs4 {
  set %tmp.a 0
  set %tmp.b ""
  :loop
  inc %tmp.a
  if (%tmp.a > $len(%fx.ncnk)) { return %tmp.b $+ : }
  if ($isodd(%tmp.a)) { set %tmp.b %tmp.b $+  $+ $mid(%fx.ncnk,%tmp.a,1) $+  }
  else { set %tmp.b %tmp.b $+ $mid(%fx.ncnk,%tmp.a,1) }
  goto loop
}
alias fx.ncs5 {
  set %tmp.a 0
  set %tmp.b ""
  :loop
  inc %tmp.a
  if (%tmp.a > $len(%fx.ncnk)) { return %tmp.b $+ : }
  if ($isodd(%tmp.a)) { set %tmp.b %tmp.b $+  $+ $mid(%fx.ncnk,%tmp.a,1) $+  }
  else { set %tmp.b %tmp.b $+  $+ $mid(%fx.ncnk,%tmp.a,1) $+  }
  goto loop
}