Server Module


The server module allows the bot to connect to an IRC server.

  1. Config file settings

1. Config file settings

This module provides the core server support. You have to load this if you want your bot to come on IRC.

Put this line into your Eggdrop configuration file to load the server module:

loadmodule server

There are also some variables you can set in your config file:

set net-type 0

What is your network?

0 = Efnet
1 = IRCnet
2 = Undernet
3 = Dalnet
4 = +e/+I/max-bans 20 Hybrid
5 = Others

set nick "LamestBot"

Set the nick the bot uses on IRC, and on the botnet unless you specify a separate botnet-nick, here.

set altnick "LamestBot"

Set the alternative nick which the bot uses on IRC if the nick specified by 'set nick' is unavailable. All '?' characters will be replaced by random numbers.

set keep-nick 1

This setting makes the bot try to get his original nickname back if its primary nickname is already in use.

set realname "/msg LamestBot hello"

Set here what to display in the real-name field for the bot.

bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
   global botnick
   putquick "MODE $botnick +i-ws"
}

This is a Tcl script to be run immediately after connecting to a server.

set init-server { putserv "MODE $botnick +i-ws" }

This is a Tcl script to be run immediately after connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see Tcl Commands).

set connect-server { putlog "Connecting to server." }

This is a Tcl script to be run immediately before connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see Tcl Commands).

set disconnect-server { putlog "Disconnected from server." }

This is a Tcl script to be run immediately after disconnecting from a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see Tcl Commands).

set servers {
        you.need.to.change.this:6667
        another.example.com:7000:password

}

This is the bot's server list. The bot will start at the first server listed, and cycle through them whenever it gets disconnected. You need to change these servers to YOUR network's servers.

For example:

set servers {
  irc.netw.ork
  irc.krow.ten:6668
}

The format is: server[:port[:password]]

Both the port and password fields are optional; however, if you want to set a password you must also set a port. If a port isn't specified it will default to your default-port setting..

set default-port 6667

Set the default port which should be used if none is specified with '.jump' or in 'set servers'.

set msg-rate 2

Number of seconds to wait between transmitting queued lines to the server. Lower this value at your own risk. ircd is known to start flood control at 512 bytes/2 seconds.

set server-cycle-wait 60

This setting defines how long Eggdrop should wait before moving from one server to another on disconnect. If you set 0 here, Eggdrop will not wait at all and will connect instantly. Setting this too low could result in your bot being K:Lined.

set never-give-up 1

This settings makes the bot cycle forever through the server list until it successfully connects to one.

set server-timeout 60

Set here how long Eggdrop should wait for a response when connecting to a server before giving up and moving on to next server.

set servlimit 0

If the number of servers on the net gets below this number, the bot will jump to a new server (it will assume it's on the losing end of a netsplit). Set this to 0 to turn off. If your bot is running on any major IRC network, this should probably be turned off.

set check-stoned 1

Set this to 1 if Eggdrop should check for stoned servers? (where the server connection has died, but Eggdrop hasn't been notified yet).

set serverror-quit 1

If you want your bot to exit the server if it receives an ERROR message, set this to 1.

set max-queue-msg 300

Set here the maximum number of lines to queue to the server. If you're going to dump large chunks of text to people over IRC, you will probably want to raise this. 300 is fine for most people though.

set raw-log 0

This setting allows you the logging of raw incoming server traffic via console/log flag 'r', raw outgoing server traffic via console/log mode 'v', raw botnet traffic via console/log mode 't', and raw share traffic via console/log mode 'h'. These flags can create a large security hole, allowing people to see user passwords. This is now restricted to +n users only. Please choose your owners with care.

set quiet-reject 1

This setting makes the bot squelch the error message when rejecting a DCC CHAT, SEND or message command. Normally, Eggdrop notifies the user that the command has been rejected because they don't have access. Note that sometimes IRC server operators detect bots that way.

set flood-msg 5:60

Set here how many msgs in how many seconds from one host constitutes a flood. If you set this to 0:0, msg flood protection will be disabled.

set flood-ctcp 3:60

Set here how many ctcps in how many seconds from one host are recognized as a flood. Not specifying or using number = 0 will not check against ctcp floods.

set answer-ctcp 3

Set how many ctcps should be answered at once here.

set lowercase-ctcp 0

If you want your bot to answer lower case ctcp requests (non rfc-compliant), set this setting to 1. mIRC will do this, most other clients will not.

set trigger-on-ignore 0

If you want Eggdrop to trigger binds for ignored users, set this to 1.

set exclusive-binds 0

This setting configures PUBM and MSGM binds to be exclusive of PUB and MSG binds. This means if a MSGM bind with the mask "*help*" exists and is triggered, any MSG bindings with "help" in their mask will not be triggered. Don't enable this unless you know what you are doing!

set double-mode 0

Allow identical messages in the mode queue?

set double-server 0

Allow identical messages in the server queue?

set double-help 0

Allow identical messages in the help queue?

set use-penalties 1
(default on net-type 1)

This enables Eggdrop's penalty calculation. Every command Eggdrop sends to the IRC server raises it's penalty points. If Eggdrop reaches a server limit, it gets disconnected with "excess flood" message. Eggdrop is able to count internal those penalty points, too and take measures against excess flooding. Note: it's highly advised to turn this on!

set optimize-kicks 1

This optimizes the kick queue. It also traces nick changes and parts in the channel and changes the kick queue accordingly. There are three different options for this setting:

0 = Turn it off.
1 = Optimize the kick queue by summarizing kicks.
2 = Trace nick changes and parts on the channel and change the queue accordingly. For example, bot will not try to kick users who have already parted the channel.

There are more settings for 'net-type' 5.

Use this settings only if you set 'net-type' to 5!

set check-mode-r 1

This settings defines how umode +r is understood by Eggdrop. Some networks use +r to indicate a restricted connection. If this is your case, and you want your bot to leave restricted servers and jump to the next server on its list, then set it to 1. Please note, this setting is automatically set to 0 for net-type 0/2/3/4, and set to 1 for net-type 1.

set nick-len 9

This setting allows you to specify the maximum nick-length supported by your network. The default setting is 9. The maximum supported length by Eggdrop is 32.


Copyright © 1997 Robey Pointer
Copyright © 1999 - 2011 Eggheads Development Team Eggheads Development Team