mIRC Homepage
Posted By: r_alien Copy Files - 12/09/05 12:52 AM
Hello again

I have this code currently as my script:

Code:
; **********************
; CSP by Smc_S
; **********************
;
;######### DDE related stuff v1.2 ##########
;############# Remote script ###############

on 1:LOAD:{
  /load -a scripts/customdde.mrc
  /set %ddeservname alienDDE
  /set %ddewinyn on
  /set %saydde off
  /set %reactdde on
  /set %ddertext !song
  /set %mp3sendyn on
  /set %mp3sendtrig !sendsong
  /echo DDEwindow script loaded
}

on *:START:{
  /ddeserver on %ddeservname
  /ddewin
}

on 1:TEXT:%mp3sendtrig:#:{
  if %mp3sendyn == on {
  if %wanow != nothing {
   var %file = $nopath(%wafile)
   var %check = $readini(ini\songs.ini,%file,$nick)
   if (%check != true) {
    /writeini -n ini\songs.ini " $+ %file $+ " $nick true 
    /dcc send $nick %wafile
    ;/msg $chan There is currently a problem with DCC file transfers! Sorry :(
    /timer -o 1 60 /writeini -n ini\songs.ini " $+ %file $+ " $nick false
   }
  }
  }
}

on 1:TEXT:%ddertext:#:{
  if %reactdde == on { 
    /msg $chan I'm now listening to %wanow ( %watime ) $ismp3send
  }
}

on 1:TEXT:!list:#:{
  if %reactdde == on { 
    if %wanow != nothing {
      /notice $nick Type  %ddertext to see what I'm currently playing in Winamp
    }
  }
}


on 1:KEYDOWN:@DDE.Input:90,88,67,86,66:{
  if ($keychar == z) /dde winamp_c prev
  if ($keychar == x) /dde winamp_c play
  if ($keychar == c) /dde winamp_c pause
  if ($keychar == v) /dde winamp_c stop
  if ($keychar == b) /dde winamp_c next
}

menu status {
  -
  DDE Window
  .$enabledy(%ddewinyn) Enable:/ddewinon
  .$enabledn(%ddewinyn) Disable:/ddewinoff
  .-
  .Rename Server:/dderename
}


It sends files finally because i had to setup DMZ, but i'm gong to remove DMZ again becase of the security threats my server then faces! So i'm wondering is it possible to get the script to instead of /dcc send to copy the MP3 to a sperate folder (for example: c:/publich_html/music) and then i'll get it to send a message saying where the file is located?
Posted By: DaveC Re: Copy Files - 12/09/05 01:03 AM
alt-o/connect/options/advanced/ first & last dcc ports, set to something like 5001-5005 and then forward only those 5 ports to your PC instead of using the routers lame pretendy DMZ.
Posted By: r_alien Re: Copy Files - 12/09/05 01:15 AM
Oh, thanks DaveC, i tried that before and it wouldn't work, because i had set the ports to 20000 to 20010, but those ports were conflicting with my FTP Daemon's Passive Ports! :P

mIRC DCC, now has it's own Port Forwarding for those ports now! :P

The DMZ option isn't lame, it's just insecure! :tongue:
Posted By: DaveC Re: Copy Files - 12/09/05 10:46 AM
Quote:
The DMZ option isn't lame, it's just insecure! :tongue:


It is lame becuase its not a DMZ. A DMZ is a single machine or a range that is behind the router but not attached to your lan, but can be reached from the lan.
Most routers call the machine they forward everything to a DMZ, a real DMZ router hasa sepearate port labeled DMZ. That was my basis for calling it lame.
© mIRC Discussion Forums