Guide to TCL scripting for Eggdrop 1.6

[ Previous ] [ Index ] [ Next ]
[ Text version ]


1. Introduction

This is the Guide to TCL scripting for Eggdrop 1.6. It is made to help people get underway in making TCL scripts for Eggdrop bots. Examples will be used to explain commands and I will try to keep everything as simple as possible. When you finish reading this guide you will know in general how to make various kinds of scripts. You will (hopefully :p) understand the descriptions in tcl-commands.doc and the TCL man pages than aswell. I advice you to look at tcl-commands.doc after you've finished reading this Guide, because if you understand everything that is discussed in this Guide and know most of the commands and binds in tcl-commands.doc aswell you'll be an expert in TCL scripting for Eggdrops.

I started making scripts for Eggdrop 1.3.27 and I always write my scripts for the newest (STABLE) version of Eggdrop which is at the moment the 1.6 series. I can't guarantee that all the commands discussed here will work on earlier versions of Eggdrop, but I am reasonable sure that they will work on most versions of Eggdrop 1.3 and 1.4 aswell with sometimes a few minor adjustments. Whether or not all of these will still work on future versions like 1.7.x or 1.8.x depends on how much the Eggdrop developers decide to change in the TCL section.

I have always worked with TCL 8.x. I don't know if all the TCL commands are also valid in older and newer versions. At the moment the standard is 8.0.3 on most machines, so I don't think that you have to worry about that and I think that the commands will work on newer versions aswell. If the commands don't work on other versions you either have to find an other way to let your script do what you want it to do or ask the system administrator to upgrade (or downgrade) the TCL version to 8.0.3.

1.1 Contributors

This guide would not have been possible without all the information and help contributed by other people, namely the eggdrop developers (currently Eggheads), the people from the channel #eggdrop on IRCnet and your reactions.

My special thanks go out to:
- Robey Pointer for creating Eggdrop.
- Eggheads for taking over from Robey Pointer and keeping it such a great program.
- NML_375 from #eggdrop @ IRCnet for all his comment and help.

1.2 Acknowledgments

Eggdrop is copyrighted by Robey Pointer. All changes made by Eggheads from version 1.3.28 and up are copyrighted by Eggheads.

TCL is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, and other parties.

Eggdrop and TCL are not affiliated with this TCL Guide or myself.

1.3 Revision History

1.10:
General: Converting the TCL Guide to PHP required it to be torn apart and reconstructed paragraph by paragraph so I took the occasion to go through the whole Guide again and corrected a few typo's here and there, the only general specific change is that now all the syntaxes of commands are underlined.
Chapter 9.6: Well I completely screwed up with the description on the join command. It said that <list> had to be a string and after saying that open and close braces would be removed I gave an example in which I didn't exclude them from the result at all. Sorry for this :(.

1.09:
Appendix A-4 and A-5: added a note that the channel records of Eggdrop itself also have to be changed when manually joining and parting your bot (Glimpse)

1.08:
Chapter 4.3: explained what "args" as parameter does
Chapter 12.7: added a section about the catch command (stdarg)

1.05:
Text version: a printable/downloadable text version of the Guide has been made (multiple)
Chapter 4.3: a note has been added on the difference between "arg" and "args" (stdarg)
Chapter 5.6: a note has been added stating that the string used with incr has to be a valid numeric number (stdarg)
Chapter 12.1: an example has been added has been added regarding using the list command in timers (stdarg)

1.00:
The Guide has gone final. There are proberbly still various things that aren't entirely correct, typo's and things like that, but all the chapters have been finished. Please email me any comments, suggestions, requests to add something or anything else regarding this Guide.

1.4 New versions of this guide

You can always find the most recent version of this guide at http://www.suninet.nl/.

If you make a translation of this document into another language, please let me know and I'll include a reference to it here.

1.5 Feedback

Feedback is appreciated a lot. Comments, suggestions, found mistakes, anything is always welcome. Please email them to me and I will see what I can do.

1.6 Distribution Policy

Copyright © 2000-2003 by Marijn van Zon. This document may be distributed under the terms set forth in version 2.0 (12 January 1998) of the LDP license at http://www.suninet.nl/COPYRIGHT.html.

This guide is free documentation; you can redistribute it non-commercially and/or modify it under the terms of the LDP license. This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the LDP license for more details.
Any commercial redistribution of this document in any form whatsoever without the written authorization of the author is not allowed.

Note that although this document is distributed under the term of version 2.0 of the LDP licensed this guide is not listed on the LDP, nor is it affiliated in any (other) way with the LDP.


[ Text version ]
[ Previous ] [ Index ] [ Next ]


Design & Graphics by Shawn Borton of CalcioStar.com