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.

Little question... very little about tcl...

Old posts that have not been replied to for several years.
Locked
a
aabos

Little question... very little about tcl...

Post by aabos »

I tried to script something, like when somebody say !kiss, then the eggdrop bot would say a specific line...

I saw some posts about it in this forum and my question is...

set something "you cant take my virginity"

bind pub - something pub:something
proc pub:something {nick host handle chan bla} {
global something
putmsg $chan $something
}

what's pub ?
why does the procedure starts with pub ? I know about the other part of it, in this case its the ':something', but why does it start with pub ? is it nessesery ?
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

Code: Select all

bind pub - something pub:something
The first 'pub' is the type of a bind.. It means all public messages in channels. (see tcl-commands.doc also if you havent yet). The second 'pub' is just a label for the proc. When that bind is triggered by a message, it then will look for the proc "pub:something: and execute it. I personally don't use very descriptive proc names, to go as far as to designated it a "pub" proc. To sum it up, the second one is just there for looks, but if you change it make sure the name of your proc matches.
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

the procname in this case is "pub:something"

it could just as well have been "something"

putting <bindtype>:proc is just a naming convention which makes it easier (for some people (such as myself:)) to see what it does, what bind it belongs to, get rid of conflicts if you tend to name dcc&msg procs the same etc...

its especially useful when you are working with larger scripts.
photon?
Locked