|
|
Under this section you will find the necessary documentation for using and configuring the
scripts included in this project.
|
Documentation for Trivi Lite 0.2.2+
|
The goal of Trivi Lite is to provide a basic, fast-paced trivia game, without all the
more advanced features other scripts provide, like statistics, teams, rounds and so on. Trivi Lite
allows one answer and shows the time (in seconds, with two decimals) and cps (caps per second) of
the answer. The current release is functional, but since it is still alpha software, it may have bugs.
Trivi Lite is a standalone script, so it does not need any additional IRC client to run it.
Installation
First of all, make sure you have Perl and the
Net::IRC
Perl module installed. For example, on a
Debian system, you would install those two packages as root like this:
|
apt-get install perl libnet-irc-perl
|
The package libnet-irc-perl should have a similar name in other distributions too.
Running Trivi Lite
Since the script is already executable, to run it just use the following command in a terminal
emulator like Konsole or GNOME Terminal:
|
Configuration
You can configure Trivi Lite by manually editing the trivi_lite.cfg file, residing
in the same directory in which trivi_lite.pl file is. You will get to choose the server
to connect to, the nick to use and so on. Do NOT use comments or alter in any
way the configuration file (except for providing the adequate information), since currently
I did not implement any way of verifying its integrity.
You can also run trivi_lite.pl with arguments provided at the command line:
|
./trivi_lite.pl [SERVER] [PORT] [NICK] [CHANNEL]
|
./trivi_lite.pl irc.oftc.net 6667 Trivi_Lite #trivia4linux
|
Other notes
- make sure the questions.txt and the trivi_lite.cfg files are in the same
directory with the script, trivi_lite.pl
- currently, the questions.txt file has only a few questions, but you can add as
many as you like using the form:
|
Just separate the question from the answer using the '|' sign. Make sure you not to put
more than one | sign on a single line. If a line is corrupted (for example it only contains a newline
character or the answer is not provided) the bot will send a message to the channel and skip to the
next question.
Error messages and what they mean
If the script detects errors,it will output them in the shell where it runs
(and in the channel, if appropriate). Here is a list of errors and what they mean:
ERROR: Error parsing the answer, check the questions.txt file. Each line should have the form QUESTION|ANSWER.
This means the questions.txt file contains some invalid line. For example, the correct form of a line would
be:
What is the capital city of Romania?|Bucharest
The question, followed by the | sign, then the answer. However, if the questions.txt file
contains some altered lines, the error above is reported (e.g. the answer is missing or there are
two new line characters in the file).
Download
You can download the last release of Trivi Lite from SourceForge.net project page,
here.
Bug reports and feature requests
For questions, suggestions, bug reports or anything related to this project, you can contact me
via email at floydian.embryo@yahoo.com or on IRC,
under Christmas @ irc.oftc.net, Chris7mas @ irc.freenode.org or Christmas_ @ Undernet.
|
|