Using Your Eggdrop

[ DCC Chat and the Party Line | Using the Console | Msg Commands | Public Commands | The Userfile | The Ban List | Channel Settings ]

DCC Chat and the Party Line

The great majority of Eggdrop's functions are controlled in a DCC chat session with the bot. DCC chat with the bot has two purposes - to use as a console for entering Eggdrop commands, and to use as a chat area. Simply DCC chat to the bot just like you would a normal user. You can also make the bot initiate the DCC session by typing /ctcp <botnick> CHAT, where <botnick> is the nick of your bot. This method is particularly useful if you're behind a firewall which prevents you from initiating the DCC session.

When you've established a connection to the bot, you will be prompted for your password, and then automatically placed on the party line (the main chat area). You type in Eggdrop commands by preceding them with a period (e.g. .help, .bots, .whom, .+chan, etc.). Anything not preceded with a period is sent out to other users on the party line, just like a message sent to an IRC channel. There are also other 'channels' on the bot (other than the party line) which you and others can switch to, and in this way the bot can act a bit like an IRC server.

Telnet

You can also access the command console and party line via a telnet session to the bot. To telnet to the bot, you simply enter its hostname and port (as specified by the 'listen' command in the config file) in your telnet client. You will be asked for your nickname and password on connecting. Once connected, you'll be at the console and on the party line just as you would if you'd opened a DCC session. Telnet is particularly useful if you need to connect to the bot but aren't able to DCC to it (e.g. when the bot isn't on IRC).

If the text output appears incorrectly during the telnet session (e.g. each new line is indented by the length of the previous line), you may need to enable some type of "new line mode" in your telnet client's options. In PuTTY, for example, you would enable Implicit CR in every LF under Terminal.

Using the Console

Eggdrop has a comprehensive internal help system. The first thing you should do when you've opened a DCC chat session with the bot is type .help. This will display most of the commands you can use. For more info about a particular command, you type .help <command>.

The DCC chat session not only allows you to speak to users on the party line (and other internal 'channels') and use Eggdrop commands, but also lets you monitor your bot. Using the .console command, you can change the types of information displayed to you, e.g. you can choose to view commands used by others, view msgs and notices sent to the bot, view public messages to a channel, and so on. Your console settings also determine what IRC channel you're working with. For example, if your bot is on #donkeys and #horses, you can set your console to either one of those channels. Many of Eggdrop's commands will apply to your current console channel, e.g. if your console is set to #donkeys and you use the command .op saddle, the bot will op 'saddle' on #donkeys. You can change your current console channel using .console <#channel>. You may save your current console settings using .save.

Msg Commands

Eggdrop has a limited number of commands performed via msg, but a few of them are quite important, such as the op command and ident command. For a list of msg commands, type /msg <botnick> help. Additional msg commands may be added by certain Tcl scripts. Be very careful when using msg commands that include your password - if you usually type /msg <command> <password> in a channel window in your IRC client, you will eventually end up accidentally msging your password to the channel for everyone to see.

Public Commands

Eggdrop has no built-in public commands (i.e. commands you type in the channel) except for 'seen'. If you have the seen module loaded (i.e. loadmodule seen in the config file) and the channel is set to +seen, then the bot will respond to the seen <nick> command in the channel. There are several Tcl scripts out there that add public commands to Eggdrop. For certain functions, such as info commands and games, this is fine. But using public commands for functions such as giving ops, adding users, jumping the bot to a new server, and so on can be insecure. Such scripts could allow malicious users to take control of your channel or Eggdrop, so a good public commands script for these types of functions must have a good authorisation system built-in, and preferably only make the commands available to users who are opped on the channel. Although some people think it looks cool to be able to use public commands without being opped, it is less secure.

The Userfile

Your Eggdrop's userfile controls which users can access the bot, and the level of access each of these users has. The userfile also contains the ban lists and ignore lists. Userfile management is one of the fundamental things you need to learn in order to use your Eggdrop effectively.

When you first start your Eggdrop and introduce yourself using the hello command or equivalent, you will be added as the first user and be given all owner privileges (if you have learn-users switched off, the hello command will be deactivated once you've introduced yourself as owner). To display your userfile entry, type .whois <yournick> in the console. You will see a display similar to the following:

HANDLE    PASS NOTES FLAGS            LAST
YourNick  yes      0 fjmnoptx        19:57 (partyline )
#donkeys             fmno            18:44
#horses              fmno            14 Apr
HOSTS: *!mynick@*.nice.net, *!mynick@207.324.333.*

The information above displays the user's handle (the handle is simply the user's nickname on the bot), whether or not they have a password set, how many notes they have, their global and channel flags, where and when they were last seen by the bot, and their hostmasks. Below you'll learn how to manipulate the userfile.

Displaying all users

To display all the users in your bot's userfile, type .match * 999. This will display a record similar to the one shown above for each user.

Adding/removing users

There are three ways a user can be added to the bot. If you have learn-users enabled in the config file, anyone can msg the hello command to the bot and the bot will add them with the default flags (as set in the config file's default-flags setting). Otherwise, you may add a user using either the .adduser or .+user command in the console. If the user you want to add is in one of the bot's channels, then .adduser is the most convenient command. Make sure the channel the user is in is your current console channel (read Using the Console again if you're not sure about this), then type .adduser <nick>, where <nick> is the nickname of the user you want to add. The user will be added to the bot's userfile with the default flags, and their hostmask will automatically be added. The .+user command should be used when the person you want to add is not on IRC. Type .+user <nick> <hostmask> to add the user with the specified nickname and hostmask.

Once a user has been added, they will need to set a password using the pass command. Tell the user to type /msg <botnick> pass <password> to set their password. You may instead wish to set a password for them using the .chpass command (explained below).

To remove a user from the bot, simply type .-user <handle>.

Changing a user's password

To set a password for a user or change their password, type .chpass <handle> <password>. You can unset the password by doing .chpass <handle> without specifying a password.

User flags

User flags determine what privileges a user has, e.g. whether or not they can get ops on a channel, which bot commands they can use, etc. All built-in flags are lower case alphabet letters. You can list all the flags by typing .help whois, but for now you only need to know the most important flags:

  • v - voice
  • o - op
  • m - master
  • n - owner
  • f - friend
  • p - partyline access

Many of the user flags are separated into two categories - global and channel - while some flags are global only. The v, o, m, n, and f flags are examples of flags that may be global or channel-specific, while the p flag is global-only. Channel flags only apply to a specific channel, e.g. if you give someone the o flag on #donkeys, the user will only be able to get ops on #donkeys, but if you give the user a global o flag, they will be able to get ops on all channels the bot is on. Global flags are also more powerful in nature, in that they give the user access to more powerful bot commands than the equivalent channel flags.

Flags are added to or removed from a user using the .chattr command. To add a global o flag, for example, you would type .chattr <handle> +o. To add a channel specific o flag, you would do .chattr <handle> +o <#channel>. Removing flags is much the same - to remove a global o it's .chattr <handle> -o, and to remove a channel o it's .chattr <handle> -o <#channel>. You can also add/remove multiple flags in one command, e.g. .chattr <handle> +fo will give the user the f and o flags.

Be very careful when giving out a global n (owner) flag. This will give the user access to virtually all the commands on your bot, and depending on how you have the bot configured it may also give the user access to your shell account via the .tcl command.

Adding/removing hostmasks

The .+host <handle> <hostmask> command allows you to add hostmasks to a user, e.g. .+host hyena *!hyena@*.africa.net. To remove a hostmask from a user, use .-host <handle> <hostmask>.

The Ban List

The ban list is a part of the Eggdrop's userfile specifically for storing bans. Bans are added to the bot's internal ban list (also called the enforced or permanent ban list) using the .+ban command. They may also be added automatically by the bot (e.g. in response to a flood) or by a Tcl script. Internal bans can either be global (they apply to all channels the bot is on) or channel-specific. A ban may be permanent or expire automatically after a set amount of time, and it may optionally be 'sticky' (the bot makes sure the ban is always active on the channel).

Note that if you're using +dynamicbans in a channel's settings, a ban set in the bots internal ban list will be removed from the channel after ban-time minutes (as set in the config file), but it will remain in the internal ban list and will be reactivated whenever someone matching the ban joins the channel. If you're using +dynamicbans but want a ban to be active on the channel around the clock, you should make the ban sticky.

Displaying the ban list

Type .bans to display all currently active global bans and channel bans (for the current console channel). To display both active and inactive bans, type .bans all. These lists will also display bans that are active on the channel but not in the bot's internal ban list (such bans will be preceded by an asterisk).

Adding/removing bans

Global bans are added using the command .+ban <banmask> (e.g. .+ban *!*lamer@*.isp.net). You can add a channel ban using .+ban <banmask> <#channel>. Bans added using these commands will be permanent (i.e. they will remain in the bot's internal ban list until someone manually removes the ban).

You can remove a ban in one of two ways - using the banmask or reference number. The output of .bans all will display a reference number before each ban. If you want to remove ban number 4, for example, you would type .-ban 4. Keep in mind that a ban's reference number can change depending on the console channel you're using (e.g. if you type .console #horses, then .bans all, then .console #donkey, then .bans all, the reference numbers for bans may be different in the two lists you displayed). To remove a ban by its banmask, simply use .-ban <banmask>.

Making a ban sticky

You can make a ban sticky by using the .stick command with either the reference number or banmask, i.e. .stick <number> or .stick <banmask>. A sticky ban will be reactivated by the bot if anyone removes it from the channel.

Channel Settings

The way your Eggdrop acts and responds to events in your channel is largely affected by channel settings. Eggdrop has many built-in channel settings, and you can set different settings for each channel, allowing for extreme flexibility. When you first created your Eggdrop's config file and added entries for each channel the bot was to reside on, you would have encountered channel settings for the first time. In the setup guide, you may remember having seen the following:

channel add #horses {
  options
}

channel set #horses +option -option

You will notice that there are two types of channel settings. The first type are ones you set between the curly braces, such as idle-kick and flood protection settings (e.g. flood-join, etc.). The second type are on/off switches you set as part of a channel set command. These switches include options such as autoop, dynamicbans, revenge, etc. These settings are preceded by a + or - sign to specify whether or not you want the option to be active or inactive respectively.

For more information about each channel setting and its function, refer to the example config file(s) included with the bot.

Dynamic channel settings

If you want to add a channel to your bot or change a channel's settings, you don't actually need to edit the config file. Eggdrop has built-in DCC commands that allow you to add/remove channels and change channel settings via the console. To add a channel, simply type .+chan #channel. Removing a channel is as simple as .-chan #channel.

Channel settings are modified using the .chanset command. This works in different ways depending on whether you're changing a on/off switches such as autoop, dynamicbans, etc., or changing a channel option such as idle-kick. Below are some examples of how the .chanset command is used:

.chanset #channel +enforcebans will enable the enforcebans option.

.chanset #channel -dynamicbans +autoop will disable dynamicbans, and enable autoop.

.chanset #channel chanmode +sntk green will change the channel's chanmode setting to "+sntk green".

.chanset #channel idle-kick 60 will set the channel's idle-kick setting to 60.

To view all current channel settings for a channel, type .chaninfo #channel.

The chanfile

Because the bot cannot modify its own config file, channels added with the .+chan command and channel settings modified with the .chanset command need to be stored in a special file called the chanfile. You may remember specifying the chanfile in your bot's config file (e.g. set chanfile "mybot.chan"). The chanfile ensures any changes you make using the DCC commands will be remembered even if the bot is shut down and restarted.

There is a downside to having a channel file. Whenever the bot starts, it will first read from its config file, followed by the chanfile. Any channel settings you've specified in the config file will be overwritten by those in the chanfile - if you make changes to a channel's settings in the config file, they will not take effect. In order to change a channel's settings, you have to use the DCC commands. This can often result in a channel's actual settings being out of sync with those specified in the config file. As a result, some people chose not to add channels in the config file at all, instead using exclusively the DCC commands for adding channels and modifying their settings.

You can chose not to have a chanfile by setting it to "" in the bot's config file (e.g. set chanfile ""). This will allow you to make all changes to channel settings in the config file, but any changes you make using the DCC commands will not be remembered permanently by the bot.


Remember to utilise Eggdrop's internal .help feature to learn more about all the different commands. Once you're familiar with all the basic Eggdrop functions and commands, find out how to enhance your Eggdrop.

 

Reverse.Net: Great Unix Shell Accounts
Reverse.Net: Great Unix Shell Accounts

© 1999-2012 by egghelp.org. The text on this page is licensed under a Creative Commons Licence.