Boucherot::CONFIGURATION - Doc about how to configure Boucherot
{
"irc" => {
"main" => {
"nicks" => [
'Boucherot', 'Blondel', 'Mesny', 'Ferrie',
],
"servers" => "efnet",
"port" => 6667,
"ircname" => "Just a Boucherot user",
"username" => "boucherot",
"userarg" => "+iw",
},
"irc-networks:update" => {
"efnet" => [
"irc.efnet.pl",
]
]
},
"dir" => {
"base" => "./home/",
"scripts" => "irc/perlscripts",
"etc" => "irc/etc",
"log" => "var/log",
"get" => "get",
"gettmp" => "tmp/get",
},
"Plugins" => [
{
class => 'BP::Backunix',
args => [ context => "main" ],
},
],
}
The syntax is a valid perl data-structure. If you're used to reference on complex perl structure, you won't learn anything here. See perllol
The configuration is a tree. The tree contains either some Hash elements, either some Array.
An Hash is something like:
{
"key1" => element1,
"key2" => element2,
...
"keyn" => elementn,
}
(for perl wizards, it's a reference on a HASH)
An Array is something like:
[
element1,
element2,
...
elementn,
]
(for perl wizards, it's a reference on an ARRAY)
An element is either a number, either a string, either a Hash, either an Array.
(for perl wizards, it's a SCALAR)
Note : Array are ordered, Hash aren't.
So :
{
"a" => 1,
"b" => 2,
},
mean
{
"b" => 2,
"a" => 1,
},
The main tree:
This is a hash that associate a ``context'' identifier to a connection, that contains all that is need to create an IRC connection.
The context can be used to find a connection.
A connection is a Hash which keys are : nicks servers port ircname username userarg
nicks is an array containing all the nicks you want to use.
servers contains the name of a network (see irc-networks).
port contains the port where to connect if the port number isn't specified.
ircname is the name / comment use to connect to IRC.
username is the user name, it's the one that is checked when there is an ident check.
userarg I don't really know what is that... It's sent to the IRC server when connecting to the IRC server.
"irc" => {
"main" => {
"nicks" => [
'Boucherot', 'Blondel', 'Mesny', 'Ferrie',
],
"servers" => "efnet",
"port" => 6667,
"ircname" => "Just a Boucherot user",
"username" => "boucherot",
"userarg" => "+iw",
},
"under" => {
"nicks" => [
'Boucherot', 'Blondel', 'Mesny', 'Ferrie',
],
"servers" => "undernet",
"port" => 6667,
"ircname" => "Just a Boucherot user",
"username" => "boucherot",
"userarg" => "+iw",
},
}
This is a Hash that associate a network name to an Array of servers
"irc-networks:update" => {
"efnet" => [
"irc.efnet.pl",
"irc.ins.net.uk",
"irc.homelien.no",
"irc.isdnet.fr",
"irc.gigabell.de",
],
"undernet" => [
"eu.undernet.org",
],
},
For now, only the first element of the Arrays are used. This is a bug.
The masta section is to be able to control the bot with telnet acces.
This is very usefull.
It's a hash where keys are port, and elements are Array of a class of a Masta client and a I<crypt>ed password.
"masta" => {
"8109" => [
"Boucherot::Connection::Masta::Client::Remote",
"R4PC2u5JaGFaE"
],
"8119" => [
"Boucherot::Connection::Masta::Client::Calc",
"R4PC2u5JaGFaE"
],
},
This will start two masta servers on port 8109 and 8119.
On port 8109, you can use the bot like an IRC client.
On port 8119, you can type perl command they will be executed and the result will appeard into the telnet session. You can use that to debug Boucherot, your Plugin, add/remove a Plugin, or even a calculator that support perl syntax.
You should type the password on as the first line of the telnet connection. The password always follows a !
Exemple:
gissehel -> gissehel:src$ telnet mycomputer 8109 Trying 127.0.0.1... Connected to mycomputer. Escape character is '^]'. Boucherot Masta r-client: !password /bind #boucherot /join #boucherot #boucherot --> Boucherot (arthibus@mycomputer.boucherot.net) has joined #boucherot /msg #boucherot Hello! #boucherot <Boucherot> Hello! #boucherot <Ferrie> Hello Boucherot.
Exemple:
gissehel -> gissehel:src$ telnet mycomputer 8119
Trying 127.0.0.1...
Connected to mycomputer.
Escape character is '^]'.
Boucherot Masta calc-client:
!password
1
1
7/8
'0.875'
This is a hash that contains all directorties for Boucherot.
"dir" => {
"base" => "./home/",
"scripts" => "irc/perlscripts",
"etc" => "irc/etc",
"log" => "var/log",
"get" => "get",
"gettmp" => "tmp/get",
},
base is the base dir for all the directories.
scripts and etc are deprecated. Don't use it unless you REALLY know what you're doing... (I love this sentence...)
log : All the logs are here.
get and gettmp : Used by DCC GET, all the files are stored there. When is file is complete, it's moved from gettmp to get.
Enable/Disable logs.
*** Need doc here ***
The list of plugins that are started.
*** Need doc here ***
*** Need doc here ***
See Boucherot::config man page.
*** Need doc here ***
This doc is a part of the Boucherot project written by Arthibus Gissehel.