Kod: Kodu kopyalamak için üzerine çift tıklayın!
on 1:SOCKOPEN:$($scast.socket): {
if ($sockerr) { unset %durum }
sockwrite -n $sockname GET $+(/admin.cgi?pass=,$radio.pass,&mode=viewxml HTTP/1.1)
sockwrite -n $sockname Host: $+($radio.link, :, $radio.port)
sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8
sockwrite -n $sockname *.*, */*
sockwrite -n $sockname Accept-Language: en-us,en;q=0.5
sockwrite -n $sockname Accept-Language: tr,tr;q=0.5
sockwrite -n $sockname Accept-Encoding: gzip,deflate
sockwrite -n $sockname Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
sockwrite -n $sockname Keep-Alive: 300
sockwrite -n $sockname Connection: keep-alive
sockwrite -n $sockname $crlf
}
on 1:SOCKREAD:$($scast.socket): {
var %data
sockread -f %data
while $sockbr > 0 && $sockerr == 0 {
if ($getxmltext(SERVERTITLE, %data) != $null) {
set %servertitle $replace($ifmatch,',',&,&,ç,ç,ð,ğ,ý,ı,Ý,İ,ö,ö,þ,ş,Ç,Ç,Ð,Ğ,Ö,Ö,Þ,Ş)
}
if ($getxmltext(SONGTITLE, %data) != $null) {
set %songtitle $replace($ifmatch,',',&,&,ç,ç,ð,ğ,ý,ı,Ý,İ,ö,ö,þ,ş,Ç,Ç,Ð,Ğ,Ö,Ö,Þ,Ş)
}
if ($getxmltext(CURRENTLISTENERS, %data) != $null) {
set %currentlisteners $ifmatch
}
if ($getxmltext(STREAMHITS, %data) != $null) {
set %streamhits $ifmatch
}
if ($getxmltext(STREAMSTATUS, %data) != $null) {
if ($remove($ifmatch,ÿ,&) iswm 1) {
unset %durum
}
}
if ($getxmltext(STREAMSTATUS, %data) != $null) {
if ($remove($ifmatch,ÿ,&) iswm 0) {
set %durum Kapali
}
}
sockread -f %data
}
}
off 1:SOCKCLOSE:$($scast.socket): { . }
alias radyo.durum {
.timerreplaydurum 0 30 .radyo.durum
if $sock($scast.socket) {
sockclose $ifmatch
}
sockopen $scast.socket $radio.link $radio.port
}
alias scast.socket {
return radyokontrol
}
alias getxmltext {
var %tag.open = $+(<, $1, >)
var %tag.close = $+(</, $1, >)
if $pos($2-,%tag.open) {
var %start = $ifmatch + $len(%tag.open)
var %length = $calc($pos($2-, %tag.close) - %start)
return $mid($2-, %start, %length)
}
return $null
}
alias radyodurum {
if (%durum) {
sw radyobot notice $radio.chan :0,10 $radio.name $+ 'de su anda yayinda kimse bulunmamaktadir.
sw radyobot privmsg ChanServ :topic $radio.chan 0,10 $radio.name $+ 'de su anda yayinda kimse bulunmamaktadir.
}
if (!%durum) {
sw radyobot notice $radio.chan :
sw radyobot notice $radio.chan :1,10 $radio.name $+ 0,10'de su anda yayinda1,10 %servertitle 0,10bulunmaktadir.
;sw radyobot notice $radio.chan :
sw radyobot notice $radio.chan :0,10 Calan parca:1,10 %songtitle
;sw radyobot notice $radio.chan :
sw radyobot notice $radio.chan :1,10 $radio.name $+ 0,10'i su anda1,10 %currentlisteners 0,10kisi dinliyor. 1,10(Dinlenme rekoru: %streamhits $+ )
;sw radyobot notice $radio.chan :
sw radyobot notice $radio.chan :0,10 Radyo yayinimizi winamp ile dinlemek icin:1,10 http:// $+ $radio.link $+ : $+ $radio.port $+ /listen.pls 0,10adresine tiklayiniz...
sw radyobot notice $radio.chan :
sw radyobot privmsg ChanServ :topic $radio.chan 1,10 $radio.name $+ 0,10'de su anda yayinda1,10 %servertitle 0,10bulunmaktadir. Siradaki parca:1,10 %songtitle
}
}