|| Forum | Features | Download | Patches | Help | #emech | Links | About | Contact ||
|| Versions | News Archive | Installing | Linking | Configuration | Commands | FAQ ||
The examples in this text shows how things can look when you configure your EnergyMech. Many settings will differ depending on what shell you are using, what IRC network you are connected to, etc.
To begin with, you should have an idea about what linking accomplishes.
The linking code in EnergyMech 3.0 is still not complete, but it works. Linked EnergyMechs share a common partyline, can op eachother safely in channels and invite eachother to +i channels (if opped of course).
To configure an EnergyMech 3.0 for linking you need to put some extra commands into your configuration file. The most important one is the GUID, which has to be uniqe! If two different EnergyMechs have the same guid, they will refuse to take part in the same botnet.
For the EnergyMech to be able to link, it needs to know who it is itself (guid, linkpass and linkport settings) and it has to know who the other EnergyMechs are (addlink command).
The ADDLINK command can be used both in configuration file and online. If used online, the information will be saved to the session file if the bot has been compiled with session support, otherwise the information given online will be lost each time the bot is killed and restarted. In its most simple form, only two arguments are needed:
The above example configures your mech to accept connections from a bot with guid 15243, known to have password `4321dcba'. This password is used in the authentication process when establishing botnet connection. Since no IP/host and port is known for this bot, your own bot will not have the information needed to make outgoing connections to this bot, it can only accept incoming connections from it. Once established tho, the botnet connection works like any other.
In this example a IP/host and port is also supplied which enables your own bot to attempt connections to the specified bot. The bot on the other side will need to be configured with a linkport of 5555, otherwise all connection attempts will fail.
The `guid' is used to uniquely identify your bot to others when links are established. If there is a conflict, if two bots use the same guid, they cannot link with eachother. This number can be anything from 0 to 2,1 billion, which number it is doesnt matter when linking. Since low numbers are bound to be used commonly, if you want a long lasting net without trouble, its a good idea to start numbering your bots with high numbers.
Unlike Energymech 2.x, where an identifier was only needed for the whole process, the `entity' directive, Energymech 3.0 requires each bot to have its own guid. The guid is also used to identify from which individual bot a message or a user record originates. E3 still only needs one link port and one password, which is used for the entire process.
Example configuration as follows:
In the above example two bots are created in the same mech process, one with nick `nickomania', identified with guid 12345, the other `nickymanic', identified with guid 54321. Both these bots can be connected to via port 5000 on the default IP/host of the machine the process runs on. These bots also know of another mech process with password `4321dcba', running on host `126.96.36.199' and listening on port 5555.
As autolinking is enabled, attempts to connect to the known mech will continue until a connection has been established. When connecting, guid `15243' will be asked to handle the connection even if there are more bots listening on the address/port. In the same way, a bot connecting to the above configured bot pair can ask to be linked to either the bot identified with guid 12345 or the one identified with guid 54321. It is infact the process handling the connection so which bot guid is asked for makes no real difference.
Linkport does not need to be set, the mech can still make outgoing connections to other bots (if it knows any) without an active linkport. Linkpass however always needs to be set, the mech cannot establish any links without it. Depending on what the mech is compiled with, passwords might be sent in plaintext (which is very insecure), or if MD5 is supported, passwords will be encrypted and exchanged in a very secure manner.
Once a link is established, the bots will share a common partyline for chat, they will op eachother in channels that they control, exchange other minor information and the most important feature of v3.0: they will share user records. In the 2.99 beta versions the exact settings and routines for how this exchange of information is done is not yet set in stone, things may change before release of version 3.0, or in the near future after release.