This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

shoutcast

Old posts that have not been replied to for several years.
Locked
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

shoutcast

Post by Carnage69 »

hello i dont usualy share things like this with people but i need some help on it

set tr "@"
set cc "@"

set nopub "#q3f"

bind pub -|- ${tr}onair login
bind pub -|- ${tr}dj djs
bind pub -|- ${tr}offair logout
bind pub -|- ${tr}cleardj resetdj


set qversion "1.5"



proc login {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
return 0
}
set dj "$nick"
putserv "NOTICE $nick :You Are Now On Air When U Are Done Please Sign Off"
}

proc djs {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "PRIVMSG #or-radio :4,1* 14,1 »15,1»14,1»4,1 Current DJ : $dj 14,1 »15,1»14,1» 4,1*"
return 0
}

proc logout {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$nick == "$dj"} {
return 0
}
set dj "None"
putserv "NOTICE $nick :You Are Now Off Air When U Are Done Please Sign Off"
}

proc resetdj {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
return 0
}
set dj "None"
putserv "NOTICE $nick :The Dj Has Ben Reset"
}
}



when i try to load it it says
invalid command name "}"
while executing
"}"
(file "scripts/dj.tcl" line 23)
invoked from within
"source scripts/dj.tcl"
(file "eggdrop.conf" line 181)
[19:47] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

because you have one } too many.
(hint: the last proc)
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

A question about your code

Post by user »

Why are you using lsearch to compare strings?
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

hey

Post by Carnage69 »

were is the eztra }
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

cant find it

Post by Carnage69 »

i cant find it
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

There's several errors you need to fix...
"login" and "resetdj" has an extra } each (is that second "return 0" supposed to be there?)
"djs" is missing a }
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

thanks

Post by Carnage69 »

thanks man i got it
Locked