Botnet


People starting up an Eggdrop bot for the first time are usually confused about the "botnet" support -- i.e., the ability to link two or more bots together and have them merge party lines, and form a sort of miniature IRC.

In order to link to other bots, your bot needs to have a telnet port defined in the config file. The default is usually something like 2222 or 3333, but it's wise to choose something else, especially if a lot of other people are using the same machine. If other Eggdrop bots are running from that machine, try to pick telnet ports at least 5-10 apart.

Sometimes you will specify a port, like 3333, but that's not available when Eggdrop starts up. On most operating systems, it just means the port was in use recently (probably by your bot!) and it hasn't had time to reset it yet. So Eggdrop will try 3334, and maybe even 3335, until it gets one. Other bots are aware of this, and when they try to connect, if the specified port (3333 in this example) doesn't work, they'll try the next few before giving up. If you have one bot on 3333, and another on 3334, they will always be bumping into each other, and other bots will get confused. That's bad.

When you first connect two bots together, you need to tell each bot about the other one. To do this, use the "+bot" command. You need to know:

The format of the '+bot' command is:

.+bot <nickname> <hostname>:<port>

This creates a "bot record" for the bot, in your userfile. It's kind of like a user record, but a little different. For example, Lamestbot, running from connected.com on port 3454, would be:

.+bot Lamestbot connected.com:3454

Now to connect the bots, one of you (but not both!) needs to type:

.link <botname>

The first time two bots connect, they set a password for each other, so that after that, nobody can "fake" a connection between the two. You can reset that password later with the command:

.chpass <botname>

The bot record is like a user record except for two things:

The special flags you can set for bots are:

h (hub)

Your bot will try about once a minute to link to a hub bot, until it succeeds. Once it's linked to one hub, it will no longer try to connect to others.

a (alternate)

If no hub bots can be linked, your bot will try to link to one of these instead. Once one alternate bot is linked, it won't try to connect any others -- although it will still try to link to hub bots. If a hub bot connects later, any alternate bot could be dropped.

s (share)

This means that the bot is sharing user records aggressively.

p (passive)

This means that the bot is to share user records passively with this bot.

l (leaf)

If a bot is marked as a leaf, that means you don't want it to link any other bots behind it. In other words, it can only be connected to the botnet in one place, and no other bots may be connected through it.

r (reject)

Any bot that has this flag will not be permitted on the botnet at all, no matter where it connects. This is equivalent to an IRC's "Q-line".

There are also 10 user-defined flags (0-9) available for use with bots only.

N.B.: There's a full explanation of these flags and how to use them in the section called "Userfile Sharing".

These flags can all be changed by the '.botattr' command just like for users. For example:

.botattr Valis +sh

There are several chains of connected bots out there. See the 'nets' file for a list of the various botnets around. If the flags above seem confusing, don't worry. Usually the only one you need to worry about is the +h flag. And most botnets have a policy about what flags you should set when hooking in, and they'll tell you what to set.


© 1997 Robey Pointer
© 1999,2000 Eggheads