SUNiNET - Your Eggdrop & TCL resources site
[ Home Eggdrop TCL Links About ]

Guide to TCL scripting for Eggdrop 1.6

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


2. IRC and Eggdrops

You proberbly already know what IRC and Eggdrops are and what you can do with them, but to help newbies I will give some basic information about them before we start creating real scripts.

2.1 IRC

IRC stands for Internet Relay Chat. An IRC network is made of multiple servers connected to each other. On IRC you have channels, how many depends on which network you are. Most networks allow you to create your own channels so you can be with a group of friends in your own channel, without outsiders. You could compare IRC with a hotel. You can go visit people in their rooms or get your own room.

2.2 The IRC protocol (RFC1459)

You are proberbly using a program like mIRC in Windows, X-Chat in X11 or BitchX in Linux to connect to an IRC server, but what exactly does that program do?

These programs send special commands to the IRC server to make sure that what you type arrives at the correct destination. If you are going to write TCL scripts which have to send information to someone through a message, notice, ctcp or something else you can not simply do something like notice <nickname> <message>. You would have to send the specific command to the IRC server just like mIRC, X-Chat and BitchX do, so you will also need to know a bit about how an IRC server interacts with IRC clients if you want to accomplish your goals.

While you are reading this guide you will learn what the most commenly used commands are and how to use them. They aren't very difficult so don't worry about that or what they exactly are. If you are familiar with RFC protocols and understand what they say, you can do a search on RFC1459.txt and read it to learn more about the IRC protocol. Appendix A also discusses various IRC server commands.

2.3 Bots

The word bot comes from robot. Bots are programs which connect to an IRC server and perform commands you tell them to do. Most bots are very configurable and can be expanded with scripts. The main purpose of bots are to guard channels. On IRC servers without ChanServ a channel is removed when nobody is on them. When you have a bot which is permanently online you can put it in the channel to prevent it from being removed.

Bots can also store information about people who are not allowed in the channel and kick/ban them when they join. This way you don't have to do everything yourself and also have a channel that can't be taken by someone else just because he/she joined while nobody was around.

2.4 Eggdrop

Eggdrop is a bot written in C. It is highly configurable and can be easily expandeded with TCL scripts. You can change almost everything with TCL scripts.

Eggdrop comes with its source. This lets C programmers fix bugs and change anything they want on a more deeper level aswell and also make modules for it written in C aswell.

Eggdrop keeps a user database in which users are identified by their hostname and a password they set themselves. You can link mutiple eggdrops together to make them share user databases and send commands to each other so they perform commands like opping each other. With the right scripts, there is nothing Eggdrop can't do.


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


Design & Graphics by Shawn Borton
Copyright © 2000-2005 Marijn van Zon