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.

greetd.tcl error

Old posts that have not been replied to for several years.
Locked
D
DvilleStoner
Voice
Posts: 17
Joined: Wed Dec 17, 2003 6:24 am

greetd.tcl error

Post by DvilleStoner »

I loaded this script. Downloaded it from the web site. I load the bot and when it attempts to msg a user that joins it says
<BotA> [19:50] Tcl error [autogreet]: can't read "greetd(show)": no such variable
and doesnt msg anybody
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

after showing the error message, you have to show the proc which is causing this error. In your case the proc is autogreet
D
DvilleStoner
Voice
Posts: 17
Joined: Wed Dec 17, 2003 6:24 am

Post by DvilleStoner »

I have downloaded a different greet script.
Im getting this error.


<BotA> [07:09] Tcl error [msg_pmsg2]: can't read "siteinfo2": no such variable
<BotA> [07:09] Tcl error [msg_jmsg2]: can't read "www2": no such variable


here is everything in the tcl file that has "siteinfo2" in it

## Do you want to display the website info on leave? (1-On/0-Off)
set siteinfo2 "0"

proc msg_pmsg2 {nick uhost hand channel args} {
global partmsg2 siteinfo2 www2 update2
if {$siteinfo2 == "0"} {
putserv "PRIVMSG $nick : [do_part2 $args]"
return 0
}

if {$siteinfo2 == "1"} {
putserv "PRIVMSG $nick : $www2 -updated!- $update2"
putserv "PRIVMSG $nick : [do_part2 $args]"
return 0
}



I just need a basic basic greet script.
One that can send 2 different greets to 2 different channels, to greet people that JUST join, not part. And one that does NOT msg the +of users on the bots. If someone could post a basic one of these I would GREATLY appreciate it.
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

Code: Select all

bind join - * greet

set greetmsg(#chan1) "greet msg for chan1"
set greetmsg(#chan2) "greet msg for chan2"

proc greet {nick host hand chan} {
global greetmsg

    set chan [string tolower $chan]
    if {[info exists greetmsg($chan) && ![matchattr $hand of]} {
           puthelp "NOTICE $nick :$greetmsg($chan)"
    }
}
i'm not sure about the matchattr of, but the rest should be fine.
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

matchattr $hand of is correct if the user has global +of flags. if you want it to check for global or local flags then use:

Code: Select all

matchattr $hand of|of $chan
D
DvilleStoner
Voice
Posts: 17
Joined: Wed Dec 17, 2003 6:24 am

Post by DvilleStoner »

I put both of those posted lines in a greet.tcl and just load it?
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

After you've made the changes as they sugested save the file and .rehash the eggdrop.
Once the game is over, the king and the pawn go back in the same box.
D
DvilleStoner
Voice
Posts: 17
Joined: Wed Dec 17, 2003 6:24 am

Post by DvilleStoner »

set greetmsg(#chan1) "greet msg for chan1"
set greetmsg(#chan2) "greet msg for chan2"
matchattr $hand of|of $chan

so I just change these to the channel and the greeting
and it will msg users withOUT the +of that join that channel?
just wanna make sure this is what im supposed to change
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

DvilleStoner wrote:set greetmsg(#chan1) "greet msg for chan1"
set greetmsg(#chan2) "greet msg for chan2"
matchattr $hand of|of $chan

so I just change these to the channel and the greeting
and it will msg users withOUT the +of that join that channel?
just wanna make sure this is what im supposed to change
NO, you open a new file and paste the following:

Code: Select all

bind join - * greet 

set greetmsg(#chan1) "greet msg for chan1" 
set greetmsg(#chan2) "greet msg for chan2" 

proc greet {nick host hand chan} { 
global greetmsg 
 set chan [string tolower $chan] 
 if {[info exists greetmsg($chan) && ![matchattr $hand of|of $chan]} { 
  puthelp "NOTICE $nick :$greetmsg($chan)" 
  } 
}
as Arcane suggested (I just changed the matchattr check)

and load it.
D
DvilleStoner
Voice
Posts: 17
Joined: Wed Dec 17, 2003 6:24 am

Post by DvilleStoner »

Code: Select all

bind join - * greet

set greetmsg(#Channel) "greet"
set greetmsg(#channel2) "greet"

proc greet {nick host hand chan} {
global greetmsg
set chan [string tolower $chan]
if {[info exists greetmsg($chan) && ![matchattr $hand of|of $chan]} {
puthelp "NOTICE $nick :$greetmsg($chan)"
}
}


putlog "Channel Greet v 1.0 - Loaded Correctly!"

Thats what I got and it gives me this error.

<Bot> [03:24] Tcl error [greet]: missing close-bracket

When a user joins.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

if {[info exists greetmsg($chan) && ![matchattr $hand of|of $chan]} {
If you notice, there's a missing "]" after "greetmsg($chan)"

Code: Select all

if {[info exists greetmsg($chan)] && ![matchattr $hand of|of $chan]} {
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

ooops... my fault :)
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked