Hack 77 Manage Channels with an Eggdrop
Eggdrops are pretty neat bots for handling
channels. Use one to prevent people flooding and to give out ops and
voice.
Once you have set up and run Eggdrop for
the first time, you will need to say
"hello" to it.
This is done by simply sending the word
"hello" to the bot in a private
message:
/msg Hacky hello
The bot should reply with some basic information and explain how to
set a password:
-Hacky- Hi MD87! I'm Hacky, an eggdrop bot.
-Hacky- I'll recognize you by hostmask '*!MD87@caduceus' from now on.
-Hacky- YOU ARE THE OWNER ON THIS BOT NOW
-Hacky- As master you really need to set a password: with /MSG Hacky pass
<your-chosen-password>.
-Hacky- All major commands are used from DCC chat. From now on, you don't need to use
the -m option when starting the bot. Enjoy !!!
You can then tell the Eggdrop what your password is:
/msg Hacky pass password
The bot will respond by confirming your choice of password:
-Hacky- Password set to: 'password'.
After you've set the password, you can start a DCC
chat session with the bot. The command to do this may vary from
client to client, but it will usually be similar to:
/dcc chat Hacky
The DCC chat session works by letting the Eggdrop connect directly to
your IRC client, so you will need to make sure the bot is able to do
this—check that you do not have a firewall blocking these sorts
of connections. When the DCC chat is established, enter your username
and password if the bot asks for them:
<Hacky> Enter your password.
<MD87> password
<Hacky>
<Hacky> Connected to Hacky, running eggdrop v1.6.16+notesfix
You are now connected to the bot's
"partyline." From here you can
issue commands to the bot, monitor events, and talk to other users
who are connected to the partyline.
12.6.1 Joining Channels
The
command to make an Eggdrop join a channel
is .+chan. This is done within the partyline, for
example:
.+chan #irchacks
When you issue this command, the bot should tell you that it is
joining the channel and will eventually confirm when it has joined:
<Hacky> [12:41] #MD87# +chan #irchacks
<Hacky> [12:41] Hacky joined #irchacks.
Now that the bot is in the channel, you can begin configuring it. The
main command used to alter channel settings is the
.chanset command. To get the Eggdrop to
list all of its available options for the channel #irchacks, you can
type:
.chaninfo #irchacks
The Eggdrop will then respond with something similar to this:
<Hacky> Settings for dynamic channel #irchacks:
<Hacky> Protect modes (chanmode): +tn
<Hacky> Idle Kick after (idle-kick): DON'T!
<Hacky> stopnethack: DON'T!
<Hacky> aop-delay: 5:30
<Hacky> revenge-mode: 0
<Hacky> ban-time: 120
<Hacky> exempt-time: 60
<Hacky> invite-time: 60
<Hacky> Other modes:
<Hacky> -inactive +statuslog -secret +shared
<Hacky> +greet -seen +cycle +dontkickops
<Hacky> +protectops -protectfriends -revenge -revengebot
<Hacky> -bitch -autoop -autovoice -nodesynch
<Hacky> -enforcebans +dynamicbans +userbans -autohalfop
<Hacky> -protecthalfops
<Hacky> +dynamicexempts +userexempts +dynamicinvites +userinvites
<Hacky> flood settings: chan ctcp join kick deop nick
<Hacky> number: 10 3 5 3 3 5
<Hacky> time : 60 60 60 10 10 60
Each option is explained in the bot's help file,
which is available by typing:
.help chaninfo
The first thing you can play with is the
"revenge" mode. This makes
the bot take revenge on people who de-op or kick known operators or
Eggdrop owners. To enable this, you must type:
.chanset
#foo
+revenge
Other settings can be activated in a similar way.
You also need to change the revenge mode setting. This defines what
sort of punishment the bot will give. The online help describes the
various levels:
<Hacky> revenge-mode This setting defines how the bot should punish
<Hacky> bad users when revenging. There are four possible
<Hacky> settings:
<Hacky> 0 Deop the user.
<Hacky> 1 Deop the user and give them the +d flag for the
<Hacky> channel.
<Hacky> 2 Deop the user, give them the +d flag for the
<Hacky> channel, and kick them.
<Hacky> 3 Deop the user, give them the +d flag for the
<Hacky> channel, kick, and ban them.
The +d flag mentioned is the de-op flag.
This will make the bot de-op the user whenever she is opped. To
change the setting so that a user is de-opped and also de-opped again
each time she is opped, you should set option 1, like so:
.chanset #irchacks revenge-mode 1
Now, if someone de-ops you, the bot will de-op him and make sure he
stays de-opped:
* Lamer sets mode: -o MD87
* Hacky sets mode: -o Lamer
Likewise, the bot will de-op somebody if he kicks you from the
channel:
* MD87 was kicked by Lamer (MD87)
* Hacky sets mode: -o Lamer
12.6.2 Adding Users
Adding another user to the Eggdrop is also
simple. She can either say "hello"
to the bot as you did when you were setting it up, or you can add her
from the partyline. The syntax for this is .+user
handle hostmask.
handle is the name the bot will know the
user by. This can be anything you like, but it's
probably best to keep it similar to the user's
nickname. hostmask is a mask to match the
user's address on IRC, in the form of
ident@host. If you
/whois the user, you should see this on the first
line. You may include the wildcard * to match any
number of characters, so if the user has a dynamic IP address like
123-123-123-123.isp.com, you can match it with
*.isp.com.
After you've added a user, you can make the bot
automatically op that user. This is done with the
.chattr command. Eggdrop bots use a
"flags" system—each
handle has both global flags and channel-specific flags.
To add, remove, and view a user's flag, type
.chattr handle.
Most of the flags are explained in the bot's online
help, which you can get by entering .help
whois. The flag for auto-op is +a, so
to give user "foo" auto-op on
channel #irchacks, you should type:
.chattr
foo
+a
#irchacks
If you want the bot to op foo on all channels, just type:
.chattr
foo
+a
When foo joins a channel, he will be opped after a short delay. You
can alter the length of this delay using the
"aop-delay" channel setting.
12.6.3 Flood Protection
Another
useful feature of Eggdrop
bots is that they can protect channels from flooders. Flooders are
users or bots that repeatedly send nonsense messages to a channel.
These settings are listed at the bottom of the output from the
.chaninfo command:
<Hacky> flood settings: chan ctcp join kick deop nick
<Hacky> number: 10 3 5 3 3 5
<Hacky> time : 60 60 60 10 10 60
These settings show how many times a user can do something
(number) in a given number of seconds
(time). In this example, you can see that anyone
sending more than 10 channel messages in 60 seconds will be kicked.
To alter these settings, like all others, use the
.chanset command. The format
for this is .chanset #channel
flood-type number:time, where
type is the type of flood (this must match
one of the entries on the first line of the preceding output),
number is the number of times a user can
do it, and time is the time in seconds.
For example, setting the nick flood setting to 2 nick changes in 10
seconds would be done like so:
.chanset
#irchacks
flood-nick
2:10
This results in the bot banning and then kicking any user who changes
nicks more than two times in 10 seconds, for example:
* Lame is now known as Lamer
* Lamer is now known as Lame2
* Lame2 is now known as LameSquared
* Hacky sets mode: +b *!*@Lame.users.network.com
* LameSquared was kicked by Hacky (nick flood)
All of the other flood settings can be changed in a similar way.
Eggdrop has lots of other built-in features, as well as a complete
online documentation system. Typing .help in
the partyline will allow you to access this online help, which is
invaluable for anyone who wants to do more with her Eggdrop.
—Chris Smith
|