Réponse acceptée !
Alors, j'avais fait un beau post, complet, avec des couleurs et comme un con j'ai fermer la fenetre...
Donc jvais la faire courte :
Shoutcast c'est un truc qui spécifique, faut chercher sur scriptsdb.org un addon qui utilise shoutcast et fouiller un peu.
J'ai déjà de quoi trovuer l'animateur et le titre :
alias slmm { if (!$sock(slm)) { sockopen slm ns505.ovh.net 8070 } }
on *:sockopen:slm:{ sockwrite -nt slm GET / HTTP/1.0 | sockwrite -nt slm Icy-MetaData:1 $str($crlf,2) }
on *:sockread:slm:{
if $sockerr { echo -a marche paaaaas | halt }
sockread %slm
if $len(%slm) <= 200 { tokenize 32 %slm }
if $left(%slm,8) == icy-name { echo -a L'animateur est en ce moment : $remove(%slm,icy-name:) | sockclose slm }
}
alias shoutcast {
if (!$isid) {
if (!$sock(shoutcast)) { sockopen shoutcast $1 $2 }
else { sockclose shoutcast }
}
else {
if ($sock(shoutcast)) { return $!active }
return $!inactive
}
}
on *:signal:shoutcast:{ echo -a Titre en cours : $1- | shoutcast - }
on *:sockopen:shoutcast:{ sockwrite -nt shoutcast GET / HTTP/1.0 | sockwrite -nt shoutcast Icy-MetaData:1 $str($crlf,2) }
on *:sockread:shoutcast:{
if ($sockerr) echo -a ca marche pas
sockread 256 &var
if ( $bfind(&var,1,StreamTitle=) ) {
var %a = $bvar(&var,$bfind(&var,1,StreamTitle=),$calc($bvar(&var,0) - $bfind(&var,1,StreamTitle=))).text
var %b = $regex(%a,StreamTitle='([^;]+)?';)
var %c = $regml(1)
if (%c) { if ($left(%c,9) != A suivre: ) { .signal -n shoutcast %c } }
}
}
l'alias /shoutcast est pas de moi
Kinder_Maxi