IRC Guides Β· Bots
Eggdrop botnets & userfile sharing
Advanced Β· about 30 min read
This guide follows the official Eggheads documentation for Botnet Sharing and Linking and the Sharing Userfiles tutorial. Each bot should already run on its own first β see Install Eggdrop.
1. What is a botnet?
A botnet is two or more Eggdrops linked together. Linked bots can op each other more securely, coordinate against floods, and β if sharing is enabled β share user lists, bans, exempts, invites and ignores.
2. Terms
- Link β one bot connecting to another
- Hub β a bot that one or more other bots link to
- Leaf β a bot with only its hub connected; often assigned the
lflag so nothing else links through it - Share β sharing of user records between bots
- Aggressive share β this bot sends its userfile to a passive peer
- Passive share β this bot accepts a userfile from an aggressive peer
- Address β host and port, e.g.
lame.org:3333
Change a botβs address on the partyline with:
.chaddr <botname> <address> <port#>[/<relay-port#>]
You can jump to another bot with .relay <botname> even if it is not currently linked.
3. Add and link two bots
You need the address and listen port of each bot (from each configβs listen setting).
Example from the Eggheads docs: BotA on lame.org port 3333, BotB on irc.org port 4444.
On BotA
.+bot BotB irc.org 4444
If both bots share a common channel, BotBβs hostmask may be added automatically; otherwise add it with .+host.
On BotB
.+bot BotA lame.org 3333
Link
.link BotA # or on BotA: .link BotB
The bots assign each other random link passwords (stored in the userfile). You can link as many bots as you need into the same botnet.
For automatic reconnects, assign a hub with +h (see flags below). Without a hub you must link manually after each restart.
4. Secure (TLS) links
Since Eggdrop 1.8, botnet links can use TLS. On the hub, prefix the listen port with + in the config (TLS listen). When adding the hub on a leaf, prefix the port in .+bot with + as well:
# Hub config (conceptually): listen on TLS port 5555 # On the leaf partyline: .+bot HubBot 1.2.3.4 +5555
See also TLS botnet documentation and TLS certificates for IRC.
5. Important bot flags
Set with .botattr (see .help botattr). Flags may be global or channel-specific (e.g. |+s #channel).
| Flag | Meaning |
|---|---|
h | Hub β auto-link target |
a | Alternate hub if the primary hub is down |
l | Leaf β not allowed to link other bots in |
r | Reject β not allowed to link |
i | Isolate partyline across this link |
s | Aggressive share β send userfile (unlimited share to passive peer) |
p | Passive share β accept userfile from aggressive peer |
g | Global share β all channels |
b c e j n u | Fine-grained share (bans, channels, exempts, invites, ignores, users) for limited setups |
Aggressive bots do not share userfiles with other aggressive bots; passive does not share with passive. Both sides must be configured consistently.
6. Share user records (worked example)
Before sharing:
- Load the transfer and share modules
- Mark each channel you want to share with
+shared(.help chanset/.help chaninfo)
Eggheads example: hub Lamestbot, leaf Lameshare, channel #eggdrop.
On Lamestbot (hub β aggressive)
.+bot Lameshare eggdrop.com 3333 .botattr Lameshare +s .botattr Lameshare |s #eggdrop
+s means Lamestbot sends the userfile to Lameshare. |s #eggdrop shares channel flags for that channel (without it, only global flags may sync).
On Lameshare (leaf β passive)
.+bot Lamestbot best.com 3333/5555 .botattr Lamestbot +hp .botattr Lamestbot |s #eggdrop
+h marks the hub for auto-link; +p accepts the userfile from the hub. Port form 3333/5555 means bot port 3333 and separate user/relay port 5555.
Tree (share link):
Lamestbot `-+Lameshare
When a third bot is added on the hub with share flags, sharing can introduce it on the other bots automatically β but bot flags themselves are not fully shared the same way user flags are. Set hub/share flags deliberately on each bot that needs them. Use +a on an alternate hub so leaves reconnect if the primary hub fails.
7. Security notes
- Only link bots you control; a hostile share leaf can inject users and bans
- Back up userfiles before enabling share
- Do not expose partyline/botnet ports to the whole internet without firewall rules
- Prefer TLS botnet ports (
+port) - Partyline:
.bots,.link,.unlink,.botattr,.help botattr