<strong>KOD;
</strong>
alias radyo.kanal {
return #radyo
}
alias radyo.host {
return RadyoIP
}
alias radyo.port {
return RadyoIPPort
}
alias radyo.adminpass {
return adminpass
}
alias radyo.sock {
return shoutcast
}
on 1:SOCKOPEN:$($radyo.sock): {
sockwrite -n $sockname GET $+(/admin.cgi?pass=,$radyo.adminpass HTTP/1.1)
sockwrite -n $sockname Host: $+($radyo.host, :, $radyo.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:$($radyo.sock): {
var %data
sockread %data
tokenize 32 %data
var %x 1
while $pos($1-,align=center><font>,%x) {
var %v1 $v1,%ip $token($token($mid($1-,%v1,100),3,62),1,60)
if (*.*.*.* iswm %ip) { hadd -m dinleyen $v2 evet }
inc %x
}
}
on *:sockclose:$($radyo.sock): {
var %x 1
while $hget(dinleyen,%x).item {
who +I $+(*,$v1,*)
inc %x
}
var %x 1
while $nick($radyo.kanal,%x,v) {
who +I $v1
inc %x
}
}
raw *:*: {
if ($numeric == 352) {
if $hget(dinleyen,$4) {
if !$nick($radyo.kanal,$6,vqho) && ($6 ison $radyo.kanal) {
msg $6 $6 yayini dinlediginiz icin tesekkurler, radyonuz suan acik durumdadir
mode $radyo.kanal +v $6
}
}
if !$hget(dinleyen,$4) {
if $nick($radyo.kanal,$6,v) && !$nick($radyo.kanal,$6,hoq) && ($6 ison $radyo.kanal) {
msg $6 $6 Radyo yayini dinlediginiz icin tesekkurler, radyonuz suan kapalı duruma gecmistir.
mode $radyo.kanal -vv $6
}
}
haltdef
}
if ($numeric == 315) {
haltdef
}
}
alias radyovoice {
if $hget(dinleyen) { hfree -sw dinleyen }
sockopen $radyo.sock $radyo.host $radyo.port
}