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.

Greet script

Old posts that have not been replied to for several years.
Locked
N
Neomaster
Voice
Posts: 25
Joined: Mon Feb 23, 2004 5:24 pm

Greet script

Post by Neomaster »

Are there scripts that greet only a name?

(I want the bot to PRIVMSG all guests that comes in the channel... the default nick is "Guest")
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 - * proc:greet

proc proc:greet {nick mask hand chan} {

     if {[string match -nocase "*guest*" $nick]} {
          puthelp "NOTICE $nick : Hi $nick!"
     }
}
would greet all nicks containing "guest".
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
N
Neomaster
Voice
Posts: 25
Joined: Mon Feb 23, 2004 5:24 pm

Post by Neomaster »

I'm still getting this error : Tcl error [proc:greet]: invalid command name " "
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

You probably copied it wrong or saved it in some weird file format.
N
Neomaster
Voice
Posts: 25
Joined: Mon Feb 23, 2004 5:24 pm

Post by Neomaster »

I don't think...

This is my greet.tcl file :
bind join - * proc:greet

proc proc:greet {nick mask hand chan} {

     if {[string match -nocase "*guest*" $nick]} {
          puthelp "NOTICE $nick : Hi $nick!"
     }
}
and in my eggdrop.conf : source scripts/greet.tcl

And still get the folowing error : (when anybody enters...)

Tcl error [proc:greet]: invalid command name " "
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Well when I tried it, it worked. Maybe you used wordpad or something.
N
Neomaster
Voice
Posts: 25
Joined: Mon Feb 23, 2004 5:24 pm

Post by Neomaster »

I'm under linux. I used K-write.

Every other script I have are working,,,
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Try another program... try kate... try gedit... try pico... try vi... try typing it in instead of copy/pasting... do I really need to elaborate? Trust me, the code works. :) Please give us some credit and do some experimentation to solve this problem.

Think about it: do you see "Â " in the code on the forum? How do you think it's having an error about that? It's just a copying/formatting error. Maybe kwrite is doing something strange with unicode.
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

well, works even when edited with notepad.
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked