Script Flooding - 11/09/05 08:13 AM
I have this script:
As you can see i've tried to put an anti flood ting into the sending of the songs, but it doesn't quite work properly, when i take a look at the ini file i see:
How can i get it so that it only checks the music filename and not the whole path, and it has the music file name as the part in the square brackts ([])? then the user on a line under it then an equals sign then true. and after the song is sent it sets it to false, or is there a better way of doing it?
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 %check = $readini(ini\songs.ini,%wafile,$user) if (%check != true) { writeini -n ini\songs.ini %wafile $user true /dcc send $nick %wafile } } } } 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 }
As you can see i've tried to put an anti flood ting into the sending of the songs, but it doesn't quite work properly, when i take a look at the ini file i see:
Quote:
[C:\Documents]
and=Settings\Rowan\My Documents\My Music\11 Highway Song.wma true
and=Settings\Rowan\My Documents\My Music\11 Highway Song.wma true
How can i get it so that it only checks the music filename and not the whole path, and it has the music file name as the part in the square brackts ([])? then the user on a line under it then an equals sign then true. and after the song is sent it sets it to false, or is there a better way of doing it?