HTB² is a C module for eggdrop IRC bots that enables the eggdrop to report hattrick matches to an IRC channel. Features include:
- reporting up to 10 matches to an IRC channel (limited by hattrick)
- configurable command triggers
- configurable event output
- you may use eggdrop user flags to limit command access
- matchflags to only report certain events
- Hattrick account
- Eggdrop 1.6 (tested with 1.6.18, other versions could or could not work)
- libxml2 (if you want/need to compile the module yourself, you also need to have the libxml2-devel package of your distribution (whatever it is called) installed or you need to install libxml2 from source which you can get at http://xmlsoft.org)
- zlib (should be available about everywhere, reduces traffic)
If you do not have an eggdrop installed already, follow the instructions at http://www.egghelp.org/setup.htm (but do not delete the source directory), make sure it's running properly and get a bit comfortable using it, then continue here.
A. Compiling from source
- untar the archive into the eggdrop source directory
$ tar xvfj htb2-x.y.tar.bz2
- do a 'make config' and watch the output whether htb2 gets configured properly.
If htb2 gets disabled for some reason, a brief explanation should be displayed
stating what it doesn't like about your system. Fix the problem and run 'make
iconfig', for other modules just hit enter, when htb2 is shown type 'E'
NOTE: you also need to 'make config' if you're only upgrading.
- do a 'make modules' (or just 'make' if you haven't built the eggdrop already)
htb2.so should have been created in the current directory.
B. Installing the binary
- copy htb2.so to the eggdrop module directory or 'make install' to (re-)install the entire eggdrop with htb2
- add 'loadmodule htb2' to eggdrop.conf somewhere below the irc module (just add it at the very end of the file)
- start/rehash the bot
htb2 should be mentioned somewhere in the resulting text. If you are upgrading from a previous version of htb2, don't just rehash, do a '.unloadmod htb2' and '.loadmod htb2' or the bot will probably crash.
When you load the module for the first time, the file htb2.conf will be created in the bot's working directory. You need to edit that file and put at least your username and securitycode into it. The module will not load if it is not configured.
Things you can customize:
- the command prefix
- the delay in seconds between two pagerefreshes for the liveticker, minimum is 60
- the command names and userflags required to use them
- the format in which events and the scoreboard are displayed
If the module did not get loaded and complained about the configuration, edit htb2.conf and '.loadmod htb2' again.
Short usage instructions
- Use the help trigger to get a description of all available commands and matchflags.
- Add the matches you'd like to broadcast using the addmatch trigger, possibly specifying matchflags to only show certain events.
- Start broadcasting using the start trigger.
- After the matches are finished you may want to delete them from the bot's matchlist using the delmatch or delall trigger.
- If you want to reload your htb2 config you have to restart your eggdrop or reload the module using ".unloadmod htb2" and ".loadmod htb2" in your partyline.
- The broadcast is automatically stopped once the last match is deleted.
- In the current version all matches are reported to the channel where the CMD_START command trigger is issued. It is planned to change this behavior in upcoming versions.
Entire htb² code: prg
htb2.sourceforge.net, testing team: drc (teamid: 647851)
Documentation, bitching about this and that, testing team: El_Rico (teamid: 525367)
CHPP representative, testing team: foe (teamid: 521082)