| View previous topic :: View next topic |
| Author |
Message |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Wed Sep 19, 2007 6:35 pm Post subject: add isop to the soutcast.tcl [SOLVED] |
|
|
how can i add isop to this script
i have tryed but no luck so fare
| Code: | proc setdj {nickname djnickname } {
global streamip streamport streampass dj ctodjc
foreach nicks [split [chanlist #aliasfm]] {
if {[isop $nicks]} {
if {$djnickname == "" } { set $djnickname $nickname }
}}
putlog "shoutcast: new dj: $djnickname ($nickname)"
set temp [open "dj" w+]
puts $temp $djnickname
close $temp
set temp [open "djnick" w+]
puts $temp $djnickname
close $temp
if { [status] == "1" } { poststuff privmsg " 12\[4AliasFM12\] $nickname Er nu på som Dj: $djnickname 12\[4AliasFM12\]"
if { $ctodjc == "1" } {
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
}
} else {
putserv "privmsg $nickname :9this has not been announced because the radio is currentlfy offline." }
}
|
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze
Last edited by Fire-Fox on Thu Sep 20, 2007 10:35 am; edited 1 time in total |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Wed Sep 19, 2007 10:38 pm Post subject: RE: add isop to the soutcast.tcl |
|
|
something like | Code: | foreach target [chanlist #mychannel] {
if {[isop $target #mychannel]} {
set <something> "$target is an op
}
} | i dont think | Quote: | | if {$djnickname == "" } { set $djnickname $nickname } | that should be in there :/ maybe before it would be better. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Sep 19, 2007 10:58 pm Post subject: |
|
|
First of all:
(1) Please indent your code properly, because it is difficult to read.
(2) You don't need to split chanlist, since it is already a list.
(3) Use a foreach loop and check the isop condition for that nick on the channel, as mentioned by TCL_no_TK
Try this:
| Code: |
proc setdj {nickname djnickname} {
global streamip streamport streampass dj ctodjc
foreach nicks [chanlist #aliasfm] {
if {[isop $nicks #aliasfm] {
putlog "shoutcast: new dj: $djnickname ($nickname)"
set temp [open "dj" w+]
puts $temp $djnickname
close $temp
set temp [open "djnick" w+]
puts $temp $djnickname
close $temp
if {[status] == "1"} { poststuff privmsg " 12\[4AliasFM12\] $nickname Er nu på som Dj: $djnickname 12\[4AliasFM12\]"
if {$ctodjc == "1"} {
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
}
} else {
putserv "privmsg $nickname :This has not been announced because the radio is currentlfy offline."
}
}
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Sep 20, 2007 12:08 am Post subject: |
|
|
step 1, read the information in the script
| Code: | # shoutcast.tcl v1.03 by domsen <domsen@domsen.org> (c)2oo5
#
# comments? bugs? ideas? requests? money? beer?
# plz mail me or visit my homepage @ www.domsen.org
# visit #newsticker@ircnet |
contacting the author first about modifications would have been the proper things to do |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Thu Sep 20, 2007 6:27 am Post subject: |
|
|
| DragnLord wrote: | step 1, read the information in the script
| Code: | # shoutcast.tcl v1.03 by domsen <domsen@domsen.org> (c)2oo5
#
# comments? bugs? ideas? requests? money? beer?
# plz mail me or visit my homepage @ www.domsen.org
# visit #newsticker@ircnet |
contacting the author first about modifications would have been the proper things to do |
The site soes not work so it's hard to do some researche  _________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Sep 20, 2007 12:33 pm Post subject: |
|
|
and you went to ircnet also?
the website is not the only way....
| Quote: | | # visit #newsticker@ircnet |
|
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Thu Sep 20, 2007 1:03 pm Post subject: |
|
|
Contact the author then: domsen@domsen.org _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
|