The examples in this text shows how things can look when you install your EnergyMech.
UNIX shells can differ alot nowadays. There will be atleast small differences between the sample outputs
on this page and how it looks on your own shell.
Also note that this is not a UNIX tutorial.
If you dont know enough basic UNIX commands to install your EnergyMech with the help of this document,
then you shouldn't even try.
First of all, you need to retrieve a suitable distribution package. There are a few packages
to choose from currently, please refer to the download page to see
which one suits you the best.
When you know which package you want, start ftp and connect to
ftp.eggheads.org.
You can find the distribution packages in the directory
/pub/energymech. Just pick the one you
want and download it to your shell. Don't forget to turn on BINARY mode (a.k.a. IMAGE mode)
before you transfer the file as it otherwise might be corrupted.
As an alternative, you can use Lynx to access the download page
of this website and download the package of your choice from there. If you're not familiar
with Lynx, use ftp.
If security is a concern to you, be sure to grab the PGP signature file or the MD5 checksums from the download page
to verify the integrity of the package once you have downloaded it.
It might look something like this:
host:~> ftp
ftp> open ftp.eggheads.org
Connected to ftp.eggheads.org.
220 ftp.eggheads.org NcFTPd Server (licensed copy) ready.
Name (ftp.eggheads.org:luser): ftp
331 Guest login ok, send your complete e-mail address as password.
Password: (you enter your email address here)
230-You are user #2 of 50 simultaneous users allowed.
230-
230 Logged in anonymously.
ftp> cd pub/energymech
250 "/pub/energymech" is new cwd.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r-- 1 ftpuser ftpusers 226603 Dec 20 10:13 emech-2.99.84.tar.gz
-rw-r--r-- 1 ftpuser ftpusers 248 Dec 20 10:14 emech-2.99.84.tar.gz.asc
226 Listing completed.
ftp> bin
200 Type okay.
ftp> get emech-2.99.84.tar.gz
local: emech-2.99.84.tar.gz remote: emech-2.99.84.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for emech-2.99.84.tar.gz (207859 bytes).
226 Transfer completed.
207859 bytes received in 146 secs (1.39 Kbytes/sec)
ftp> quit
221 Goodbye.
host:~> ls -l emech-2.99.84.tar.gz
-rw-r--r-- 1 luser lusers 226603 Dec 20 10:13 emech-2.99.84.tar.gz
host:~>
|
By now you should have your chosen package on your shell.
Once you have downloaded your selected package, you need to unpack it. The package will unpack into
a directory called "emech" so there is no need to make a directory to unpack the files in.
If your shell has GNU TAR the command would look like:
host:~> tar zxvf emech-2.99.84.tar.gz |
And if your shell has any other version of TAR, it would look like:
host:~> gzip -dc emech-2.99.84.tar.gz | tar xvf - |
The filename would of course vary depending on the package you chose to download.
As the files are being decompressed and untarred the filenames with path
will be listed. If any errors occur you most likely have a corrupted package
or your shell quota limit has been reached.
If you chose one of the binary install packages, skip this stage as you already have an
executable to run.
To be able to compile, you first have to run the configure script. The configure
script will check for all the programs that is needed to compile the mech and also ask for which
options you want your mech to have. The options it asks for can only be changed at compile time,
and not while the EnergyMech is running so make sure you make the right choice or you will have
to recompile later on.
If the configure script exits before it is done, it was unable to locate some program or other
component that is needed to be able to compile an EnergyMech. If it does, you are out of luck
unless you can compile on another machine or if one of the pre-compiled packages works on your
shell.
The options you have to choose from are the following:
Alias support ( Default: Yes )
Enables the creation of aliases and command shortcuts for base EnergyMech commands. For example, an alias `SPANK' could be created
as a shortcut to `ME spanks $1-'. This would make `spank proton' into `me spanks proton'.
Amusing misc commands (toybox) ( Default: Yes )
The `Toybox' contains amusing commands like 8BALL, PICKUP, RT (random topic) and BIGSAY.
Async DNS support ( Default: Yes )
With async DNS, the EnergyMech will resolve hostnames to IP addresses in the background, while
keeping up with its regular functions. See below for more information on how to properly configure async DNS.
Botnet support ( Default: Yes )
This option makes it possible for EnergyMechs to link with eachother,
sharing user records and protecting channels together.
CTCP ( Default: Yes )
Enable support for basic CTCP commands like PING. This option is not needed for DCC file support.
DCC file support ( Default: Yes )
This feature adds support for DCC file transfers. It is not needed for basic DCC chat.
Debug support ( Default: No )
This option makes the EnergyMech rather large, but can be quite useful when the EnergyMech
doesnt act like its supposed to do.
Dynamic channel limit (+l) ( Default: Yes )
With this feature enabled the EnergyMech is capable of dynamically updating the
+l limit according to the number of users present in the channel.
Dynamic command levels support ( Default: Yes )
If you enable this option you can change the levels required for doing commands at
runtime. Without this option, the only way to change command levels is to change them
in the source and recompile.
IRC proxy support ( Default: Yes )
Add support for IRC proxy functions in the EnergyMech process.
IRCD extensions support ( Default: Yes )
Enable support for little special tidbits present in new ircd servers.
Greet support ( Default: Yes )
Enable support for greeting users as they enter channels where the bot is.
HTTP support ( Default: No )
Experimental support for letting the EnergyMech serv up http documents just like a normal webserver.
MD5 password support ( Default: Yes )
Enable support for encrypting passwords and other misc info with MD5 hash algorithm.
Newbie support ( Default: Yes )
The newbie option adds some extra help output and other miscellanious stuff. An experienced
EnergyMech user would typically not need this newbie support.
Note support ( Default: Yes )
Store notes for your users with this feature.
Notify support ( Default: Yes )
Keep track of your friends and foes, when they are online or offline, saving the information to a log.
Perl scripting support ( Default: No )
Not yet functional.
Command output redirect ( Default: Yes )
Allow results from certain pre-defined commands with multi-line, normally DCC only, to be redirected to a channel.
Seen support ( Default: No )
If you want the SEEN command you will have to enable this option. It is not recommended
though, since the SEEN feature can use up a very large amount of memory if the mech is sitting in
a large active channel.
Session support ( Default: Yes )
Enable this option to allow the EnergyMech to save changed settings, new channels, and other information
to the mech.session file. The original configuration file is not altered when sessions is enabled.
When the mech is started it first checks if there is a session file, if there is, it loads the session
instead of the default/specified configuration file. To start a mech with the default/specified configuration
file, the previous session (mech.session) needs to be removed.
Statistics support ( Default: Yes )
Experimental support for collecting statistics of the activity in a channel.
TCL scripting support ( Default: No )
Enable scripting bot functions with TCL scripts (not eggdrop scripts).
Telnet support ( Default: Yes )
Enable this option to include support for connecting via telnet to the EnergyMech partyline (same as DCC).
Trivia support ( Default: No )
Include support for a basic trivia game.
Uptime support ( Default: Yes )
Include support for uptime reporting to the uptimes project server (uptime.enegrymech.net).
WinGate support ( Default: Yes )
If you want your EnergyMech to use WinGates to connect to servers you have to enable this option.
Once the configure script has finished setting up the configuration files, you may compile the
EnergyMech by using the command make.
host:~> make clean mech install
( cd src ; make clean )
make[1]: Entering directory `/home/luser/energymech-2.99.84/src'
rm -f mech gencmd mcmd.h core alias.o auth.o bounce.o channel.o
com-ons.o combot.o commands.o ctcp.o debug.o dns.o dynamode.o function.o
greet.o help.o irc.o kicksay.o main.o net.o net_chan.o note.o notify.o
parse.o perl.o prot.o redirect.o reset.o seen.o shitlist.o socket.o
spy.o stats.o tcl.o toybox.o trivia.o uptime.o userlist.o vars.o web.o
make[1]: Leaving directory `/home/luser/energymech-2.99.84/src'
( cd src ; make mech )
make[1]: Entering directory `/home/luser/energymech-2.99.84/src'
gcc -pipe -g -o gencmd gencmd.c
./gencmd > mcmd.h
gcc3 -pipe -g -O2 -march=i586 -fomit-frame-pointer -c alias.c
gcc3 -pipe -g -O2 -march=i586 -fomit-frame-pointer -c auth.c
gcc3 -pipe -g -O2 -march=i586 -fomit-frame-pointer -c bounce.c
gcc3 -pipe -g -O2 -march=i586 -fomit-frame-pointer -c channel.c
[ ... lots of compiler output ... ]
gcc -pipe -g -O2 -march=i586 -fomit-frame-pointer -c uptime.c
gcc -pipe -g -O2 -march=i586 -fomit-frame-pointer -c userlist.c
gcc -pipe -g -O2 -march=i586 -fomit-frame-pointer -c vars.c
gcc -pipe -g -O2 -march=i586 -fomit-frame-pointer -c web.c
gcc -pipe -g -o mech alias.o auth.o bounce.o channel.o com-ons.o combot.o
commands.o ctcp.o debug.o dns.o dynamode.o function.o greet.o help.o
irc.o kicksay.o main.o net.o net_chan.o note.o notify.o parse.o perl.o
prot.o redirect.o reset.o seen.o shitlist.o socket.o spy.o stats.o
tcl.o toybox.o trivia.o uptime.o userlist.o vars.o web.o -lcrypt -ltcl
-Wl,-T,ld/mech.ldscript
objcopy -R .note -R .comment mech
make[1]: Leaving directory `/home/luser/energymech-2.99.84/src'
( cd src ; make install )
make[1]: Entering directory `/home/luser/energymech-2.99.84/src'
chmod 0700 mech
mv mech ..
make[1]: Leaving directory `/home/luser/energymech-2.99.84/src'
host:~> ls -l mech
-rwx------ 1 luser lusers 649752 Nov 17 13:49 mech*
host:~>
|
You should now have an executable named mech in your EnergyMech directory.
EnergyMech 3.0 reads the file mech.conf by default when it starts. This file contains all the configuration commands, the
same commands as you would use online. A sample configuration file comes with the distribution archive (sample.conf).
You should not use the sample configuration file, but rather write your own from scratch.
You will need to configure a minimum of one bot and one server. If you want to find your bot when
you are online you should also configure one channel for the bot. If you also wish to issue commands to the mech,
a userfile can be good to have also. There is no `genuser' script for EnergyMech 3.0, but this little trick works
quite well:
host:~> cat > trick.conf
set userfile myusers.filename
user + handle * *!*ident@*domain.com 100 password
save
shutdown
(press Ctrl-D)
host:~> ./mech -f trick.conf
init: Using config file: trick.conf
EnergyMech 2.99.84, December 20th, 2004
Compiled on Dec 20 2004 13:48:43
Features: alias, debug, dyn, md5, net, newbie, rawdns, seen, tcl, telnet
host:~>
|
In the above example, a trick configuration file is used to run the command ADD
to create the user `handle' with the desired hostmask. This is then saved to the file `myusers.filename' which can then be
used as regular userfile. Once the mech is online, more users can be added like usual.
If your EnergyMech is configured with Async DNS (enabled by default), you also need to configure it for the bot to do DNS lookups
properly. You need to set the IP address of the host(s) who serve your machine with DNS, this can usually be found in the file
"/etc/resolv.conf". Often (but not always), the machine your shell is on will also be running a local DNS resolver, in which case
you do not need to add anything special to your bot configuration. But in many cases the resolver used is "BIND" which is
quite braindamaged as far as client resolves are concerned. If your bot fails to come online in a reasonable amount of time and you
set the DNS server properly with the "DNSSERVER" command, fetch the file
ftp://ftp.rs.internic.net/domain/root.zone.gz, uncompress it and add to your
configuration file "DNSROOT root.zone". This will fix all known problems with Async DNS not resolving properly.
host:~> wget -q ftp://ftp.rs.internic.net/domain/root.zone.gz
host:~> gzip -d root.zone.gz
host:~> ls -la root.zone
-rw------- 1 luser lusers 56168 Nov 29 11:23 root.zone
host:~> tail -3 mech.conf
dnsserver +172.16.16.1
dnsserver +172.16.16.2
dnsroot root.zone
host:~>
|
To start your new mech simply type `./mech'. If your configuration file is named different than default (mech.conf),
run the mech with `./mech -f yourconfigfile'. Normally it will only take seconds for the mech to come online if
its serverlist is good. If it takes too long, you can check what the mech does with `./mech -d'.
host:~> ./mech
EnergyMech 2.99.84, December 20th, 2004
Compiled on Dec 20 2004 13:48:43
Features: alias, debug, dyn, md5, net, newbie, rawdns, seen, tcl, telnet
init: Mech(s) added [ yoink ]
init: EnergyMech running...
|
Your EnergyMech should now be up and running, Good Luck!