🔔 Çevrimdışı bildirim almak ister misiniz?
Bir konuya etiketlendiğinizde, özel mesaj aldığınızda, bir mesajınız alıntılandığında forumda olmasanız bile anlık bildirim almak için lütfen izni verin.
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
# config ##########################
set radiochans "#radyo"
set adminchans "#radyo"
set streamip "ip-adresiniz"
set streamport "port"
set streampass "şifreniz"
set scstatstrigger "!durum"
set scstreamtrigger "!adres"
set scplayingtrigger "!calan"
set sclistenertrigger "!dinleyici"
set scdjtrigger "!dj"
set scsetdjtrigger "!setdj"
set scunsetdjtrigger "!unsetdj"
set scwishtrigger "!istek"
set scgreettrigger "!karsılama"
set sclastsongstrigger "!son"
set schelptrigger "!yardım"
set alertadmin ""
set doalertadmin "1"
set announce "1"
set urltopic "1"
set ctodjc "1"
set tellsongs "1"
set tellusers "1"
set tellbitrate "0"
set advertise "1"
set advertiseonlyifonline "1"
set offlinetext "1Şu anda yayınımız kesilmiştir."
set offlinetopic "7-1Radyo şu anda radyo yayını aktif DEĞİLDİR! http://$streamip:$streamport/listen.pls"
set onlinetext "7-1Radyoda şu anda yayında Dj 12/sgenre/1 arkadaşımız var. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"
set onlinetopic "7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"
set streamtext "1Sizde Dinleyin! 2 /dj/ 4http://$streamip:$streamport/listen.pls"
set advertisetext "15-14- 1Radyo 12http://$streamip:$streamport/listen.pls 14-15-"
bind pub - $scstatstrigger pub_scstat
bind msg - $scstatstrigger msg_scstat
bind pub - $scplayingtrigger pub_playing
bind msg - $scplayingtrigger msg_playing
bind pub - $scdjtrigger pub_dj
bind msg - $scdjtrigger msg_dj
bind pub D $scsetdjtrigger pub_setdj
bind msg D $scsetdjtrigger msg_setdj
bind pub D $scunsetdjtrigger pub_unsetdj
bind msg D $scunsetdjtrigger msg_unsetdj
bind pub - $scwishtrigger pub_wish
bind msg - $scwishtrigger msg_wish
bind pub - $scgreettrigger pub_greet
bind msg - $scgreettrigger msg_greet
bind pub - $scstreamtrigger pub_stream
bind msg - $scstreamtrigger msg_stream
bind pub - $sclastsongstrigger pub_lastsongs
bind msg - $sclastsongstrigger msg_lastsongs
bind pub - $sclistenertrigger pub_listener
bind msg - $sclistenertrigger msg_listener
bind pub - $schelptrigger pub_help
bind msg - $schelptrigger msg_help
bind time - "* * * * *" isonline
bind time - "?0 * * * *" advertise
bind nick D * djnickchange
set dj ""
set surl "http://$streamip:$streamport/listen.pls"
set bitrate "48"
set stitle ""
if {[file exists dj]} {
set temp [open "dj" r]
set dj [gets $temp]
close $temp
}
proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }
proc status { } {
global streamip streamport streampass
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"
puts $sock "Host: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set songs [string range $bl [string first "<TITLE>" $bl] [expr [string last "</TITLE>" $bl] + 7]]
regsub -all "<" $songs "<" songs
regsub -all ">" $songs ">" songs
regsub -all "&" $songs "+" songs
regsub -all """ $songs "\"" songs
regsub -all "'" $songs "'" songs
regsub -all "ÿ" $songs "" songs
regsub -all "<TITLE>" $songs "(" songs
regsub -all "</TITLE>" $songs ")" songs
regsub -all "<SONG>" $songs "" songs
regsub -all "</SONG>" $songs " - " songs
regsub -all "<PLAYEDAT>" $songs "" songs
regsub -all "</PLAYEDAT>" $songs "" songs
regsub -all {\d} $songs "" songs
regsub -all "´" $songs "´" songs
regsub -all "–" $songs "-" songs
regsub -all "ö" $songs "ö" songs
regsub -all "ä" $songs "ä" songs
regsub -all "ü" $songs "ü" songs
regsub -all "Ö" $songs "Ö" songs
regsub -all "Ä" $songs "Ä" songs
regsub -all "Ü" $songs "Ü" songs
regsub -all "ß" $songs "ß" songs
}}
close $sock
putserv "notice $target :$songs"
}}
proc msg_lastsongs { nick uhost hand arg } { sclastsongs $nick }
proc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}
proc scstream { target } {
global streamip streamport streamtext
putlog "shoutcast: streaminfo requested by $target"
poststuff notice nick $target $streamtext
}
proc msg_stream { nick uhost hand arg } { scstream $nick }
proc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}
proc scgreet { nick arg } {
if {$arg == ""} { putserv "notice $nick :7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"; return 0}
if { [status] == "1" } {
set temp [open "djnick" r]
set djnick [gets $temp]
close $temp
putserv "privmsg $djnick GREET) - $nick - $arg"
} else {
putserv "notice $nick :Üzgünüm, şu anda radyo yayını aktif değil." }
}
proc msg_greet { nick uhost hand arg } { scgreet $nick $arg }
proc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}
proc djnickchange { oldnick uhost hand chan newnick } {
set temp [open "djnick" r]
set djnick [gets $temp]
close $temp
if {$oldnick == $djnick} {
putlog "shoutcast: dj nickchange $oldnick -> $newnick"
set temp [open "djnick" w+]
puts $temp $newnick
close $temp
}}
proc dj { target } {
global streamip streamport streampass dj
putlog "shoutcast: $target asked for dj info"
if {[status] == 1} {
if {[file exists dj]} {
set temp [open "dj" r]
set dj [gets $temp]
close $temp
putserv "notice $target :$dj Şu anda Yayında!"
} else { putserv "notice $target :Dj Adı Bulunamadı." }
} else { putserv "notice $target :Şu anda radyo aktif değildir." }
}
proc msg_dj { nick uhost hand arg } { dj $nick"}
proc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick }}
proc scstat {target} {
global streamip streamport streampass
putlog "shoutcast: $target asked for serverstats"
if {[catch {set sock [socket $streamip$streamport] } sockerror]} {
poststuff privmsg chan none "7-1Radyo yayını şu anda 12AKTİF1. Radyoyu dinlemek için 12http://$streamip:$streamport/listen.pls1 link adresine tıklayınız!"