How to configure your eggdrop bot

Configuration

There are two files you will need to edit before you can start up your Eggdrop - the configuration file and (optionally) the botchk file. You can find the example configuration file in the directory you extracted the Eggdrop source to, under the name 'eggdrop.conf', and the 'botchk' file can be found in the /scripts subdirectory. If you downloaded Eggdrop to your system, you can unzip the tarball (.tar.gz) file to its own directory using 7-Zip or a similar program, and view the example config file, botchk file, and all the documentation files locally. You can use Notepad to edit these files, although it's sometimes desirable to use an editor that supports the Unix file format such as EditPlus.

Editing the config file

Previous versions of the 1.6 series of Eggdrop came with eggdrop.simple.conf, eggdrop.advanced.conf, and eggdrop.complete.conf, with the simple one being the best sample configuration file for new users. This has been changed since 1.6.13, and there is now only the single, complete sample config eggdrop.conf. While this makes things simpler for developers and helpers, the complete config is over 1000 lines long and can be overwhelming for people new to Eggdrop. I will soon be releasing a version of my simple.conf (which I originally wrote for Eggdrop 1.3/1.4) for 1.6, but in the meantime you're stuck with editing the complete config file. If you want to take full advantage of all Eggdrop has to offer, you will eventually need to spend the extra time it takes to go through and understand many of the options in the complete config file anyway.

You should first rename the sample config file to something other than "eggdrop.conf". Giving it the name of the bot's nick (e.g. NiceBot.conf) is quite common. In the config file, you set up the IRC servers you want the bot to use, the channels you want the bot to be in, and set Eggdrop's options to suit your needs. Eggdrop has many options to configure, and editing the configuration file can take some time. I recommend you go over the entire config file to ensure the bot will be configured properly for your needs. All of the options in the config file have written explanations - be sure to read them carefully. Some of them can be a little bit vague, though.

If you're editing the config file on your system (usually a better idea than editing it on the shell as that can be rather cumbersome) you'll need to upload it to your bot's directory when you're done.

Below I elaborate on and make some recommendations for many of the settings, but it is not a complete list of settings. You'll probably notice many of the options are commented out (i.e. preceded by the # (hash) character) - a commented out setting can either mean the setting is not used or it's set to the default setting. You can uncomment the setting by removing the hash. Many of the options can be set to either 0 or 1 - 0 typically means the option is disabled, while 1 means enabled.

Note that if you're using a version of Eggdrop older than 1.3.27, some of the settings below may not apply -- if it's not in the complete sample config that comes with your version of Eggdrop, then the setting is not supported. If you're editing my simple.conf rather than the complete config file, you can skip the descriptions below as they mainly cover many of the more complex options not available in simple.conf.

set username: if your shell runs identd (most do), then you should set this to your account login name.

set my-hostname and set my-ip: you'll need to set one of these if you want your bot to use a vhost. The my-hostname setting is the vhost, e.g. linux.niceshells.net, while my-ip is the IP address of the vhost, e.g. 206.343.63.217. You don't need to set both of these, but I recommend you do so as it can help if the shell is having problems with DNS. Setting these can also help solve userfile transfer problems.

logfile: keeping logs is a good idea. Generally, you should have one log for bot stuff, and one log for each of your channels. For bot stuff, add the line logfile mcobxs * "botnick.log" to the config. For channels, add logfile jkp #donkeys "#donkeys.log", logfile jkp #horses "#horses.log", etc. Make sure you remove the sample logfile lines for the channel #lamest. If you'd like to put your logfiles in their own directory, specify the directory in the log name (e.g. logfile jkp #donkeys "logs/#donkeys.log" to write the logfiles in the /logs directory).

set sort-users: by default, userfile entries are sorted in the order each user is added, from first to last. Setting this to 1 will make the userlist sort itself based on user flags. Both sorting methods can be just as useful as the other - I recommend leaving this set to 0 to start with.

listen 3333 all: you will almost certainly want to change this, as 3333 will probably be in use if there are other Eggdrops running on the machine. Generally, you can choose any port from 1024 to 65535, but the 49152-65535 range is best as these are the private/dynamic ports least likely to be reserved by other processes. You can choose not to have a port by commenting this line out, but that will prevent any telnet connections to the bot (you won't be able to use the bot as a hub, won't be able to telnet to the bot yourself, and the bot won't respond to /ctcp botnick CHAT requests).

set protect-telnet: setting this to 1 is strongly recommended for security reasons.

set require-p: this is a useful feature allowing you to give party line access on a user-specific basis. I recommend setting it to 1.

set stealth-telnets: when you telnet to your bot, it will usually display the bot's nickname and version information. You probably don't want people seeing this info if they do a port scan on the bot's shell. Setting this to 1 will prevent the bot from displaying its nickname and version when someone telnets to it.

set dcc-flood-thr: this setting determines the number of lines per second you can send to the party line before being booted. It can be a pain in the butt when you want to paste multiple lines on the party line, so you may want to increase this to something like 5 or 10.

set hourly-updates: it's a good idea to change this from the default setting of 00, since lots of other bots are already using 00 and putting a lot of stress on the shell at that time. Choose something that isn't a multiple of 10 (e.g. 03, 37, and 56 are examples of good settings).

set notify-newusers: set this to the nick you will have on the bot. This setting isn't really used if you have learn-users switched off.

set owner: you should only put one person in this list - yourself. Set it to the nick you will have on the bot. Do NOT leave it set to the default "MrLame, MrsLame".

set default-flags: these are the flags automatically given to a user when they introduce themselves to the bot (if learn-users is on) or when they're added using .adduser. If you don't want the user to be given any flags initially, set this to "" or "-".

set remote-boots: the default setting of 2 can result in annoying boots from the party line (which is kind of like being kicked from an IRC channel). You should probably set this to 0 or 1.

unbind dcc n tcl *dcc:tcl and unbind dcc n set *dcc:set: these lines unbind the .tcl and .set commands. It's a good idea to leave these lines alone, as the .tcl and .set commands can be a security risk since they provide access to your shell account through the bot. These commands are only really useful if you plan on writing Tcl scripts.

set must-be-owner: if you have the .tcl and .set commands enabled, you should definitely set this to 1. In 1.3.26 and later, you can set it to 2 for even better security.

set chanfile: the chanfile allows you to store 'dynamic' channels so that the bot rejoins the channel if restarted. Dynamic channels are those you make the bot join using the .+chan command - they aren't defined in the config file. The chanfile is good if you frequently add/remove channels from the bot, but can be a pain if you only like to add/remove channels using the config file since settings stored in the chanfile with overwrite those set in the config. You can choose not to use a chanfile by setting it to "".

channel add: this is the command you use to add channels to the bot. There are lots of options for this command. Channels are added in the following format:

channel add #donkeys {
  options
}

channel set #donkeys +option -option

channel add #horses {
  options
}

channel set #horses +option -option

All the different options and channels settings are shown in the examples in the config file. Make sure you remove the example entries for #lamest and #botcentral.

set nick: this is what you use to specify your bot's nickname. I recommend against using [ ] { } \ character's in the bot's nick, since these can cause problems with some Tcl scripts, but if you'd like to use them, you'll need to precede each of those characters with a backslash in the setting, e.g. if you wanted your bot to have the nick [NiceBot], use set nick "\[NiceBot\]".

set altnick: if you want to use [ ] { } \ characters in the bot's alternate nick, follow the backslash rule described previously.

set servers: you should specify multiple servers in this list, in case the bot is unable to connect to the first server. The format for this list is shown below.

set servers {
  irc.chitchat.com:6667
  irc.talkworld.com:6665
  irc.nice.net:6667
}

Wherever possible, you should use a port other than 6667 (connect to the server and type /motd to see a list of available ports). You should use servers that allow bots (some shells have rules enforcing this), but unless your shell's policy says otherwise you may also wish to use non-bot servers as a backup in case your IRC network has very few bot servers your bot is able to connect to (but place the servers that allow bots at the top of the list).

set use-ison: leave this set to 1, as setting it to 0 will make your bot use the 'trace' command and may get your bot k:lined (banned) from a server.

set strict-host: if this is set to 0, Eggdrop will ignore the tilde in idents starting with ~. Setting it to 1 is a little more secure, but it can be a pain when it comes to user hostmask management. If you're not sure how you should set this, just leave it set to 0.

set server-cycle-wait: by default, Eggdrop waits 60 seconds between connection attempts to servers. This is quite a long time, but it is necessary to prevent 'throttling' on Undernet servers (if a server gets too many connection attempts from a particular host within a short period of time, it will block all connections from that host until there's been a break in connection attempts). If you use Undernet and you're sharing a shell with lots of other bot users, leave this set to 60. Otherwise, it's a good idea to decrease this to something like 20.

set trigger-on-ignore: setting this to 1 diminishes the usefulness of Eggdrop's ignore feature. I recommend you leave it set to 0.

set bounce-bans: setting this to 1 makes the bot remove any bans set by a server.

set bounce-modes: setting this to 1 makes the bot remove any modes set by a server.

set learn-users: this is an important setting that determines how users will be added to your Eggdrop. If set to 1, people can add themselves to the bot by sending 'hello' to it (the user will be added with the flags set in default-flags). If set to 0, users cannot add themselves - a master or owner must add them using the .adduser command.

unbind msg - hello *msg:hello and bind msg - myword *msg:hello: these allow you to change the 'hello' command to something different. Change myword to the name you the hello command you want. If you have learn-users set to 0, this command is only used for when you first introduce yourself to the bot.

unbind msg - ident *msg:ident and unbind msg - addhost *msg:addhost: these lines unbind the ident and addhost commands. You will almost certainly want to rebind the ident command, either by commenting out the unbind line (this will enable the default 'ident' msg command) or by binding it to a new command. It's a good idea to change the command for extra security. To bind it to another command, let's say 'horse', you would add the line bind msg - horse *msg:ident.

set dcc-block: although the example config file recommends you set this to 0 (turbo-dcc), this may cause DCC transfers to abort prematurely. If you'll be using DCC transfers a lot, set this to 1024.

loadmodule uptime: read my uptime module description for a better idea of what this module is for.

Finally, be sure to remove the 'die' commands from the config (there are two of them 'hidden' in various places), or the bot won't start. Once you've finished editing the config file, make sure you rename it to something other than
"eggdrop.conf" if you haven't already. Then, if you edited the config file locally, upload the config file to the directory you installed the bot.

  • 3 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

Setting up an Eggdrop (the short version)

Setting up an Eggdrop The Short Short Version If you're experienced with the Unix shell...

Getting the Eggdrop Source Code

Getting the Eggdrop Source There are many different versions of Eggdrop available for download...

Detailed Installation Instructions (Manual Install Method)

Installation Installing Eggdrop is a relatively simple process provided your shell has the...

Editing the botchk file to automatically restart your bot

Editing the botchk file The botchk script and crontab are used to automatically restart the bot...

Starting your eggdrop bot for the first time

Starting the Eggdrop Phew! Now that you've compiled, installed, and configured Eggdrop, it's...