Somebody can help-me on this?
my problem is the fwrite and bwrite, both not write the file while the file is playing from the /splay

this comand is the my example... if somebody's here can help help, i will get grin [i'm not speak english very well blush ]

sorry for my english.. tks

alias radio {
if ($sock(radio)) { .splay -c stop | sockclose radio | .remove radio.mp3 }
else { sockopen radio $iif($2,$1 $2,64.236.34.97 80) }
}
alias rem.radio { if ($fopen(radio)) { .fclose radio } | .remove radio.mp3 }
on *:sockopen:radio:{
if ($sockerr) { radio }
else {
sockwrite -nt $sockname GET /stream/1074 HTTP/1.0
sockwrite -nt $sockname Host: $sock($sockname).ip
sockwrite -nt $sockname User-Agent: Radio Player
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname
}
}
on *:sockread:radio:{
sockread &radio
if (!$bfind(&radio,1,icy)) {
if (!$fopen(radio)) { .fopen $iif(!$exists(radio.mp3),-n) radio radio.mp3 }
if ($fopen(radio)) {
if ($exists(radio.mp3)) { .fseek radio $lof(radio.mp3) }
.fwrite -b radio &radio
.fclose radio
}
if ($file($+(radio,$sock($sockname).mark,.mp3)).size >= 102400) && (!$insong) {
.splay radio.mp3
}
}
}
on *:sockclose:radio:{ rem.radio }
on *:mp3end:{ if ($regex($filename,/\\radio\.mp3$/i)) { rem.radio } }


Suchorski @ FreeNode