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.

Simple Coding Help Please

Old posts that have not been replied to for several years.
Locked
E
Ee-Ore

Simple Coding Help Please

Post by Ee-Ore »

Hi there, bit new to TCL although an accomplished coder.

Im looking through the document tcl.doc, which i found on the egghelp.org website, only somethings not quite right!

In my conf file i load the script im writing successfully, confirmed with a PUTLOG message.

All thats in the script atm is...

Code: Select all

putlog "Response Script Loaded"

bind pubm - hello pubm:hello
proc pubm:hello {nick host handle chan text} {
        puthelp "PRIVMSG $chan :Hello $nick"
}
which is an exact copy from the document, yet my eggdrop doesnt respond to it, anyone with any ideas ?

Thanks for your time,

Ee-Ore
c
cvanmeer
Halfop
Posts: 40
Joined: Tue Dec 02, 2003 1:00 pm
Location: The Netherlands
Contact:

Post by cvanmeer »

Try this code:

Code: Select all

bind pub - hello pub:hello 
proc pub:hello {nick host handle chan text} { 
        puthelp "PRIVMSG $chan :Hello $nick" 
} 
putlog "Response Script Loaded" 
E
Ee-Ore

Post by Ee-Ore »

ok that worked - and thanks for the help...

Can you explain why that worked? I though the PUB was for commands only ?
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

Ee-Ore wrote:I though the PUB was for commands only ?
no, "pub" just means that something said on the channel should be triggered
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
CrazyCat
Revered One
Posts: 1296
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

hum ?
pub is really for command-like message, so it take the first word as a command and the staying text as args.
pubm is to match any word in a line, but it's better to use it like:
bind pubm - "*hello*" pubm:hello
E
Ee-Ore

Post by Ee-Ore »

excellent - all working now - and moving along at a steady pace :D
Locked