Senin bu söledigin kisi sifresini girdigi zaman olacak birsey degilmi? Arkadasin sölemek istedigi daha farkli işi sanirim.. Yani direk kisi yayin aldiginda ncikini degistirilmesini istiyor.
evet bu soylediqim nick şifresini qirdikten sonra #dj kanalına qiriş yaptıqı an otomatik dj eki alacak saten aynı şey dj ler #dj kanalına qiriş yapıyor tabiki o onun secimi
evet bu soylediqim nick şifresini qirdikten sonra #dj kanalına qiriş yaptıqı an otomatik dj eki alacak saten aynı şey dj ler #dj kanalına qiriş yapıyor tabiki o onun secimi
tşk ediorum ama anlatmak istedgm bu deil :S:S
yayını alan kişinin nickine eklenecek DJ-Nick die . yani #dj kanalına girene deil yayını alana oto vercek ?
yayını alan kişinin nickine eklenecek DJ-Nick die . yani #dj kanalına girene deil yayını alana oto vercek ?
şöyle bir mantık yürütüyorum..
radyo.tcl de kanala !dj yazdığımızda..
yayındaki dj kullandığı programda genre bölümüne ne yazarsa..
kanala onu aksediyor..
eğer ki..
yayındaki dj genre bölümüne sunucuda..
kullandığı nicki aynen (takısız yalın halde) yazar ise..
örnek kullandığı nick "ali" genre bölümünede "ali" diye yazarsa..
radyo.tcl de ufak bir editle istediğin yapılabilir gibi geliyor..
set radiochans "#Radyo"
set streamip "208.53.141.254"
set streamport "4500"
set streampass "hasretfmxx123"
set scstatstrigger "!durum"
set scstreamtrigger "!url"
set sclistenertrigger "!dinleyici"
set scplayingtrigger "!dinleyen"
set scdjtrigger "!dj"
set scsetdjtrigger "!setdj"
set scwishtrigger "!istek"
set scgreettrigger "!greet"
set sclastsongstrigger "!eski"
set schelptrigger "!help"
set announce "1"
set urltopic "1"
set tellsongs "1"
set tellusers "1"
set tellbitrate "1"
set advertise "1"
set offlinetext "8,1Radyomuz Online Dj Ler Gelene Kadar Kapalıdır.. Iyi SohbetLer"
set offlinetopic "4Radyo kanalına hoşgeldiniz. 8,1Yayınımız şu an yoktur.."
set onlinetext "4Radyomuz Yayına Başladı. Dinlemek Için Adresimiz >>> 8,1http://Mavra.Gen.TR:4500/listen.pls"
set onlinetopic "8,1Muzigin Kalbi M-Fm`de Atiyor.. Yayin Akisini Dinlemek icin Yandaki Adrese Tiklayiniz. >> 4http://Mavra.Gen.TR:4500/listen.pls "
set streamtext "8,1Muzik Siz Kalma Bizimle Ol.. M-Fm Yayin Akisini Dinleyiniz.Sevdiklerinize Arkadasiniza Parca Armagan Edin... Romantik onlar Burda Ya Siz Nerdesiniz.. >>> 8,112http://Mavra.Gen.TR:4500/listen.pls"
set advertisetext "8,1Sohbet 1,7 - 8,1Dostluk 1,7 - 8,1Sevgi 1,7 - 8,1Eglence 1,7 - 8,1Arkadaslik Hepsi Bir Arada M-Fm 1,7 8,1 7,1http://Mavra.Gen.TR:4500/listen.pls 8,1tıklamanız yeterli "
proc msg_stream { nick uhost hand arg } { global radiochans; 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 :4Mesajı eklemeyi unuttunuz."; return 0}
global dj streamip streamport streampass
putlog "shoutcast: $nick greets fly out to: $arg"
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
putlog "error: $sockerror"
return 0 } else {
puts $sock "GET /admin.cgi?pass=$streampass&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: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
}}
if { $streamstatus == "1" } {
set temp [open "djnick" r]
set djnick [gets $temp]
close $temp
putserv "privmsg $djnick Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir. GREET) - $nick - $arg"
} else {
putserv "notice $nick :sorry radio is currently offline" }
}}
proc msg_greet { nick uhost hand arg } { global radiochans; 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 msg_setdj { nick uhost hand arg } { global radiochans; setdj $nick $arg }
proc pub_setdj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { setdj $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
putlog "shoutcast: $target asked for dj info"
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
putlog "error: $sockerror"
return 0 } else {
puts $sock "GET /admin.cgi?pass=$streampass&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: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
}}
if {$streamstatus == 1} {
if {[file exists dj]} {
set temp [open "dj" r]
set dj [gets $temp]
close $temp
putserv "notice $target :$dj is at the turntables!"
} else { putserv "notice $target : 7 M-Fm'in Şu Anki Dj'i 2$stitle$sgenre " }
} else {
putserv "notice $target :sorry radio is currently offline"
}
close $sock
}}
proc msg_dj { nick uhost hand arg } { global radiochans; 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]} {
putlog "error: $sockerror"
return 0 } else {
puts $sock "GET /admin.cgi?pass=$streampass&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: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
set repl [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]
set curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]
set currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
set surl [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]
set maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]
set bitrate [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]
set stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]
set sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]
if {$sgenre != ""} {set sgenre " ($sgenre)"}
set avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]
set irc [string range $bl [shrink + 5 "<IRC>" 0 $bl] [shrink - 1 "</IRC>" 0 $bl]]
set icq [string range $bl [shrink + 5 "<ICQ>" 0 $bl] [shrink - 1 "</ICQ>" 0 $bl]]
if {$icq == 0} { set icq "N/A" }
set aim [string range $bl [shrink + 5 "<AIM>" 0 $bl] [shrink - 1 "</AIM>" 0 $bl]]
set webhits [string range $bl [shrink + 9 "<WEBHITS>" 0 $bl] [shrink - 1 "</WEBHITS>" 0 $bl]]
set streamhits [string range $bl [shrink + 12 "<STREAMHITS>" 0 $bl] [shrink - 1 "</STREAMHITS>" 0 $bl]]
set version [string range $bl [shrink + 9 "<VERSION>" 0 $bl] [shrink - 1 "</VERSION>" 0 $bl]]
if {$streamstatus == 1} {
if {[file exists dj]} {
set temp [open "dj" r]
set dj [gets $temp]
close $temp
} else { set dj "none" }
putserv "notice $target :4 $stitle$sgenre 2şu anda yayında. Sitemmizi Her zaman Ziyaret etmeniz dileğiyle6: $surl"
} else {
putserv "notice $target :2Şuanda $stitle$sgenre Online değil.." }
putserv "notice $target :2Şu An Yayınımızı Dinleyen Kişi Sayısı4 $repl "
putserv "notice $target :2Ortalama dinlenme süresi4 $avgtime 2saniye."
putserv "notice $target :4Mavra.Gen.TR"
}}
close $sock
}}
proc msg_scstat { nick uhost hand arg } { global radiochans; scstat $nick}
proc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick }}
proc playing {target} {
global streamip streamport streampass
putlog "shoutcast: $target ed for current song"
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
putlog "error: $sockerror"
return 0 } else {
puts $sock "GET /admin.cgi?pass=$streampass&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: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]
set songtitle [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]
set songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]
if {$songurl != ""} { set songurl " ($songurl)"}
regsub -all "<" $songtitle "<" songtitle
regsub -all ">" $songtitle ">" songtitle
regsub -all "&" $songtitle "+" songtitle
regsub -all """ $songtitle "\"" songtitle
regsub -all "'" $songtitle "'" songtitle
regsub -all "ÿ" $songtitle "" songtitle
if {$streamstatus == 1} {
putserv "notice $target :8,1Çalan Parça $songtitle$songurl 4 Dj $stitle$sgenre "
} else {
putserv "notice $target :server is currently offline, sorry"
}}}
close $sock
}}
proc msg_playing { nick uhost hand arg } { global radiochans; playing $nick}
proc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick }}
proc isonline { nick uhost hand chan arg } {
global radiochans announce tellusers tellsongs tellbitrate urltopic
global offlinetext offlinetopic onlinetext onlinetopic
global streamip streampass streamport
if {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {
set isonlinefile "isonline"
set oldisonline "isonline: 0"
set oldcurlist "curlist: 0"
set oldcurhigh "curhigh: 0"
set oldsong "cursong: 0"
set oldbitrate "bitrate: 0"
if {[file exists $isonlinefile]} {
putlog "shoutcast: checking if stream is online"
set temp [open "isonline" r]
while {[eof $temp] != 1} {
set zeile [gets $temp]
if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }
if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }
if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }
if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }
if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }
}
close $temp
}
if {[catch {set sock [socket $streamip $streamport] } sockerror]} {
putlog "error: $sockerror"
return 0} else {
puts $sock "GET /admin.cgi?pass=$streampass&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: $streamip"
puts $sock "Connection: close"
puts $sock ""
flush $sock
while {[eof $sock] != 1} {
set bl [gets $sock]
if { [string first "standalone" $bl] != -1 } {
set streamstatus "isonline: [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]"
set repl "curlist: [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]"
set curhigh "curhigh: [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]"
set currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]
set surl "serverurl: [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]"
set cursong "cursong: [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]"
set songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]
set bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"
set stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]
set sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]
}}
close $sock
}
set temp [open "isonline" w+]
puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrat e"
close $temp
if {$announce == 1 } {
if {$streamstatus == "isonline: 0" && $oldisonline == "isonline: 1"} {
poststuff privmsg $offlinetext
if {$urltopic == 1} { poststuff topic $offlinetopic }
}
if {$streamstatus == "isonline: 1" && $oldisonline == "isonline: 0" } {
if {$sgenre != ""} {
set sgenre " ($sgenre)"
}
poststuff privmsg "22 Radyomuz Su An Onlinedir.!!! 4Radyo Url Adresimiz : 8,1http://Mavra.Gen.TR:4500/listen.pls"
if {$urltopic == 1} { poststuff topic "22 Radyomuz Su An Onlinedir.!!!<<<Online Dj : $stitle$sgenre >>4Radyo Url Adresimiz : 8,1http://Mavra.Gen.TR:4500/listen.pls" }
}}
if {($tellusers == 1) && ($streamstatus == "isonline: 1") && ($oldcurhigh != "curhigh: 0") } {
if {$oldcurhigh != $curhigh} {
poststuff privmsg "4,15Yeni dinleyici sayısı : [lindex $curhigh 1]"
}
if {$oldcurlist != $repl} {
poststuff privmsg "8,1Şu An Yayınımızı Dinleyen Kişi Sayısı 4 $repl "
}}
if {($tellsongs == 1) && ($oldsong != $cursong) && ($streamstatus == "isonline: 1") } {
if {$songurl != ""} { set songurl " ($songurl)"}
regsub -all "<" $cursong "<" cursong
regsub -all ">" $cursong ">" cursong
regsub -all "&" $cursong "+" cursong
regsub -all """ $cursong "\"" cursong
regsub -all "'" $cursong "'" cursong
regsub -all "ÿ" $cursong "" cursong
poststuff privmsg "8,1Çalan Parça : 0,6 [lrange $cursong 1 [llength $cursong]]$songurl 0,7 DJ ..:: $stitle$sgenre ::..4 - 1,7http://Mavra.Gen.TR:4500/listen.pls "
}