PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
#############################################
# Radyo ip'sini yazınız..
set radyoip "IPADRESINIZ"
# Radyo portunu yazınız..
set rport "RADYOPORT"
# Radyo şifresini yazınız..
set rsifre "RADYOSIFRE"
# Radyo kanalını yazınız.. Büyük küçük harfe dikkat ediniz.
# Örnek #Radyo ile #radyo farklıdır ;)
set rkanal "#Radyo"
###############################################################
###############################################################
### PROCS.......................................................
###############################################################
###############################################################
bind time - "* * * * *" yenidinleyici
proc yenidinleyici {min hour day month year} {
global radyoip rsifre rport
if {[catch {set sock [socket $radyoip $rport] } sockerror]} {
putlog "error: $sockerror"
return 0
} else {
puts $sock "GET /admin.cgi?pass=$rsifre&mode=viewxml&page=0 HTTP/1.0"
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
puts $sock "Host: $radyoip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set voicevr [string range $bl [shrink + 11 "<LISTENERS>" 0 $bl] [shrink - 1 "</LISTENERS>" 0 $bl]]
}
}
close $sock
}
set voicevr [temiz $voicevr]
set deger 0
set ::rawcount 0
set ipler ""
bind raw - 352 voysver
foreach i $voicevr {
if {[regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} [lindex $voicevr $deger]]} {
incr ::rawcount
lappend ipler "[lindex $voicevr $deger] "
}
incr deger
}
set ydeger 0
foreach j $ipler {
putquick "who +i [lindex $ipler $ydeger]"
incr ydeger
}
}
proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }
proc voysver {from keyword arg} {
global rkanal
if {![isvoice [lindex $arg 5] $rkanal]} {
putquick "mode $rkanal +v [lindex $arg 5]"
}
}
bind raw - 315 countdusur
proc countdusur {from keyword arg} {
set ::rawcount [expr $::rawcount - 1]
if {$::rawcount == "0"} {
unbind raw - 352 voysver
}
}
proc temiz {veri} {
regsub -all \< $veri " " veri
regsub -all \/ $veri " " veri
regsub -all \> $veri " " veri
return $veri
}
putlog "radyo-yama.tcl By \002SaW"
Buyrun bu tcl'yi deneyin. Çalışacaktır.