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.

Error?

Old posts that have not been replied to for several years.
Locked
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

bind pub n .next next:voice

proc next:voice {nick uhost handle chan arg} {
global list
set who [lindex $list 0]
putserv "PRIVMSG $chan :list is empty"
return 0 }
if {[botisop $chan] && [onchan $who $chan]} { ; here is the problem
putserv "MODE $chan +v $who"
regsub -all "$who" $list "" list
}

I'm getting this: TCL error in file 'eggdrop.conf': can't read "chan": no such variable while executing "botisop $chan" (file "scripts/voice.tcl" line 1) (file "eggdrop.conf" line 1) * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

1) Where is the mistake?
2) Any sugestion to change the last part to check if the $list == "" to say this msg "list is empty" like i write up.
Thx!

PS: This is only the last part of the tcl.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

proc next:voice {nick uhost handle chan arg} {
global list
set who [lindex $list 0]
putserv "PRIVMSG $chan :list is empty"
return 0 }
^^^ proc ends here


everything below here is procless code

if {[botisop $chan] && [onchan $who $chan]} { ; here is the problem
putserv "MODE $chan +v $who"
regsub -all "$who" $list "" list
}



Also, if you're including this from line 1 of your .conf, I'm supprised the bind even worked as you would have not loaded any modules. Always put tcls at end of conf, so all the dependancies are loaded.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

this part of the copde is not in my .conf file.. is in a tcl file, at the end of it.
I got to change the order I put the lines.. sish.. Thx for the info!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Like I told you up, here is my original code. :smile:

proc next:voice {nick uhost handle channel arg} {
global voicelist
set who [lindex $voicelist 0]
if {$voicelist == "" } {
putserv "NOTICE $nick :Voice voicelist is empty."
return 1 }
if {[botisop $channel]} {
putserv "MODE $channel +v $who"
set voicelist [lrange $voicelist 1 end]
return 1 }
putserv "NOTICE $nick :I'm not oped on $channel. ~:o("
}

I meen the original end of the .next tcl. :smile:
Locked