|
| ||||||||||
| Monday, January 05, 2009 | Advanced Search | Ask Feathers | New Files | Popular Files | Links | Contact | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Eggdrop TCL Tutorial
Procedure Structure
The basic tcl procedure structure consists of the following:
|
So a basic TCL procedure would look something like this:
proc myprocedure {arg1 arg2} {
 (tcl code inside here)
}
Eggdrop Bindings
An eggdrop binding is a way to respond to certain events.
The basic eggdrop binding declaration structure contains the following:
|
The basic binding declaration would look something as follows:
bind (type) (attributes) (mask) (procedure call)
Example Script (refer to tcl-commands.doc that comes with eggdrop)
bind join - * myjoinprocedure 1
proc myjoinprocedure {nick uhost handle channel} { 2
putserv "PRIVMSG $nick :Hello there!" 3
}
1 - This line declares the bind event. (See tcl-commands.doc for other bind events)
2 - This line declares the procedure that the event calls (See tcl-commands.doc for the arguments to use for each binding)
3 - This line messages the user that joins the channel the bot is in with "Hello there!"
Check back in the future for more help topics...