Installation
b4r a édité cette page il y a 7 ans

h1. Installation

Quick installation instructions of the Message Network Script (mnet.tcl) Last revised: 2004-08-03

 _________________________________________________________________

         Quick installation instructions of the Message Network Script

This little document describes how to install the Message Network Script (mnet) as an additional script for an eggdrop irc bot. Of course, a little knowledge of handling eggdrop bots is assumed. Otherwise I won't get an idea why the heck you want to install THIS script instead of some other 'easy' script.

Contents:

1. What is this script about?
2. Quick node start
3. Quick network maintainer start
4. Installing dependencies TclLib and TclXML
5. Short FAQ

(1) WHAT IS THIS SCRIPT ABOUT?

See the README file. (Perhaps you already guessed it. This file is based upon the
eggdrop INSTALL file)

(2) QUICK NODE START

Every eggdrop tclscript needs to be added to the configuration the bot runs:
(note) mnet requires TclXML and TclLib. Be sure to have it. Down in this document
there's more info about installing dependencies and what versions you will need
of them.

  1. It's best to copy all the files that came with this archive to an extra
     directory of your ./eggdrop/scripts directory. Please call it 'mnet'.

  2. Adjust your eggdrop.conf file and add the line ..

       source scripts/mnet/mnet.tcl

     .. to it. The next time you .rehash your eggdrop bot it will load the mnet
     script for good.

  3. Now you need to configure your mnet to use a network configuration.
     Most likely, there already is a message network you want to join. Let's
     say, you want to join the public AQ2 Message Network (aq2net) you will
     need to contact the maintainer of the network configuration file first.

  4. After he made sure that you are at least a bit suited with eggdrop
     related knowledge and has asked you about your netbot-nickname and your 
     email-address, he will tell you that you may now use the network-config
     which is located on a webserver. For example:

       http://quad.netdome.biz/aq2/aq2net.cfg

  5. Now edit your mnet.tcl located in ./eggdrop/scripts/mnet/. Go to the end
     of the file and have a look at the "CONFIG-SECTION". There may already be
     some line that looks like this, because it comes as a (not working) default 
     setting:

       lappend mnet_http_config "quad.netdome.biz" "/aq2/quadnet.cfg" "80"

  6. Change it according to what the network maintainer told you.
     If he told you: http://quad.netdome.biz/aq2/aq2net.cfg your config line should
     look like this:

       lappend mnet_http_config "quad.netdome.biz" "/aq2/aq2net.cfg" "80"

     "80" is the port of the webserver. Don't change it unless the maintainer told you
     so.

  7. Link your bot to someone elses bot that is part of the aq2 broadcasting network.
     It doesn't really matter to which bot you link your bot to. But still you will have to
     contact the owner of a bot. It's most likely that the network config maintainer
     is owner of a bot too. The commands ..

       .+bot
       .link

     .. are your friends. Have a look onto eggdrop's documentation.

  8. Now .rehash or .restart your bot. Eggdrop will load mnet, mnet will load the
     network configuration, which defines allowed bots and will give you the 
     public channel commands according to the "frequency prefix"
     in the network-config file.

  9. Don't abuse it or your node won't last long in this network.

(3) QUICK NETWORK MAINTAINER START

As a wanna-be network maintainer, I assume you already read the node quickstart.

  1. Being a network maintainer is an important role to a specific community. You
     decide which bots (and owners of bots) are allowed to join your message network.
     And, being aware of this, you can either earn some thanks, because you are nice,
     or earn some negative statements, because you didn't let just 'anyone' join the
     community broadcast. It depends on your policy.
     Be aware that nothing stops people from founding a mnet-based network on their
     own. You merely play the role of a benevolent coordinator with close-to-absolute 
     power - but people could walk away anytime given and do better than you did.

  2. Now go over and have a look at the aq2net.cfg that came with the package. It's
     a sample configuration file. The configuration is written as a XML-file. XML suited
     best to the layout of such a network.

  3. <mnet> is the tag that describes a network coming up. The attribute "sig" and its
     content has to be unique. The attribute "desc" is just a "nice to have" setting
     and not yet used.

  4. A <bot> starts describing a network node. Namely an eggdrop netbot with an
     attribute "nick" that defines the unique netbot-nick within a botnet. The "owner"
     attribute is STRONGLY recommended for future reference. Nodes may want to
     contact botowners to report abuse or they because they want to link their own 
     bots.
     The <bot> tag has to be used often to allow many bots per network. (you guess)

  5. The tag <ch> is a sub-tag of <bot> and  means "channel" .. it only has the 
     attribute "name". 
     The <ch> tag has to be used once or more to allow more channels for a bot.

  7. One tag called <frequency> defines the 'channels' in such a message network.
     As you can see, there are "name", "prefix" and "helpmsg" defined. Change it
     to your liking. "name" is used internally AND as part of the message layout.

  8. After defining one or more frequencies, you have to define a color for the 
     broadcasted messages. If you are used to mIRC color codes, you can be happy.
     The colorcodes are the same. So change the attribute "id" of the <color> to 
     something you like all network messages to look like.

  9. It's wise to add some informational comments to the top of your network-
     configuration file. Recommended comments are the name of the network-maintainer,
     join-requirements and some more contact-informations like irc-channel and/or email-
     address. Remember that using a normal off-the-shelf browser users can have a look
     onto your configuration - as long as they know the URL.

(4) INSTALLING DEPENDENCIES TclLib AND TclXML

(note) Of course, TCL itself is a dependency.. but since you are running an eggdrop 
    bot you already have TCL! So.. and if you want to run an eggdrop bot, goto
    http://www.egghelp.org
    You need at least version 8.3 of TCL! Otherwise [array unset] won't work. And it will complain
    a lot.

Well, you need TclXML (at least version 2.6)- but TclXML needs TclLib (at least 
version 1.6).. so we are gonna install both. First thing... in case of linux, know your linux 
distribution. If it is gentoo then you are happy.
It's easy for gentoo users to install the libraries. Just do..
    emerge -v tclxml
and both, TclLib and TclXML will be installed.

With Mandrake, things are a bit harder... install TclLib by typing:
    urpmi tcllib
If it doesn't work, you're having the wrong mirrors.. for mirrors see: http://easyurpmi.zarb.org/
Still, TclXML is missing - and as far as I know, there is no Mandrake package for it.
Screw Mandrake. :) You will have to manually install it..

Debian users can do
    apt-get install tcllib
and
    apt-get install tclxml
in the sarge branch.


For users who need to install TclXML manually:

Download from http://prdownloads.sourceforge.net/tclxml/tclxml-3.0.zip and unzip it..
Read the README file for a quick overview. Then go on:

    ./configure --prefix=/usr
    make
    make install

Do the same with TCLLib if you need a manual install.

(5) SHORT FAQ

(Q) What were my requirements to install this stuff again?
(A) eggdrop bot version >= 1.6.17
    using TCL version >= 8.3
    TCLLib version >= 1.6
    TCLXML version >= 2.6


(Q) How's 'mnet' related to 'aq2net'?
(A) Aq2net is a network that uses the mnet-technology to broadcast its messages.

(Q) Do you have nice tennis-socks?
(A) No.

(Q) Why is there a need for a network maintainer? I thought this is free software?!
(A) Sure, this is free software. You have the sourcecode to it, right? And you even 
    don't have pay a dime! That's even double-sensed 'free' (as in speech and beer). 
    Still, the concept of having a big network would not work out if everyone could 
    easily link to a broadcasting network that uses mnet. That would be a big mess.

(Q) I have seen this "technology" working in IRC before?!
(A) Yes, quite possible. The difference is: I am not keeping my the sourcecode closed.
    I asked once whether it's possible to use 'their' technology for other communities
    but noone understood nor wanted to understand me.
    So I re-coded 'their' so-beloved technology and gave the power to the people by
    GPL'ing it. It's free software now.

(Q) I hate you!
(A) Drop me a mail. Perhaps I will publish it when I collected enough hate-mails.
    Always worth the fun.

(Q) I love you!
(A) Send me some money. :)

(Q) Contact?
(A) The mnet-crew can be found at #messagenet @ QuakeNet. 
    Main-coder is "QuAd|Haui". Female groupies welcome, esp. for the minions hanging
    around there, too. ;-)

This is the end. For more information on thoughts and facts about the Message Network please read the README.

Have fun with Mnet!