### Configuration

After 8.0 there is only one configuration file and several text files.
All these files have to be placed in ./.verlihub directory, which itself must be in the working directory of verlihub.
config
there are keywords and their values in a form key_word = value #this is a comment that may be there, note the spaces around the = sign
Note: please don't be strict with exact definitions concerning minima or maxima if they are strict or not (difference between greater and greater or equal).
hub_name - string - Verlihub v.0.x.x beta - name of the hub
max_users - int - 3500 - limit of users to allow another user in the hub
max_extra_ops - int - 50 - addition to the limit to allow an operator
max_extra_admins - int - 1 - addition to limit + extra_ops to allow admin
min_share - unsigned long - 1024 - minmimum share in MegaBytes
min_share_reg - unsigned long - 0 - minimum share for vip registered users and higher
min_share_ops - unsigned long - 0 - min share for ops and higher
max_share - unsigned long - 1536000 - maximum share in MegaBytes
tban_kick - int - 300 - time seconds when user is not allowed in the hub after kick (not tempban, cannot be unbanned)
min_nick - int - 3 - minimum length of allowed nickname
max_nick - int - 32 - longest allowed nickname
nick_chars - onewordstring - abcd...zA..Z+-_=()[] - complete list of only allowed characters in nickname (no intervals)
db_host - hostname - localhost - mysql database hostname
db_user - string - verlihub - mysql database username
db_pass - string - - fill it please, it's a passwrd for db_user@db_host for mysql
db_data - string - verlihub - database name to use for reglist and banlist etc..
motd
MOTD file, all it's contents is sent to every user after successful log-in to hub Note: use DOS file encoding (CRLF) because hub doesn't translate it, and windows users would see all motd in one line..
rules
Whenever user types +rules command in main chat, the contents of this file is sent to him. Same note as about MOTD.
help_usr, help_reg, help_vip, help_op, help_cheef, help_master, help_admin
All these files should contain help, reaction on +help or !help commands in main chat.
Every one should contain only a specific help for every class of users. When user types +help
his class help and all lower helps are sent to him.
faq
This is sent on +faq command, put in frequently asked questions.
other files
In future, I mean to add configuration, that would allow you define your own
commands and files to send to user on their writing.

Create MySQL database Be sure that MySQL at least 3.23 is installed.
run mysql as a user that has rights, for example root
mysql -u root -p
CREATE DATABASE verlihub;
GRANT ALL PRIVILEGES ON verlihub.* TO verlihub@localhost IDENTIFIED BY 'the_password_you_choose';
Then try to run verlihub (without ops or registered users), it will create the tables.
Quit verlihub.
Now we create the Master user.
Connect again to database
mysql -u verlihub -p -D verlihub
enter the password
With this command:
INSERT INTO reglist (nick, class) VALUES ('Your_Admin_Nick',10);
quit mysql (CTRL+D)
Run verlihub, connect to it with a client that has your_admin_nick and at first
setup your admin password. by command +passwd Your_admin_password
the you can reconnect and you will have admin rights.

### Running VerliHub

you can run verlihub from any working directory you like ;o) suprisingly
but in that directory you need to have a configuration subdirectory ./.verlihub
make sure, that before running 'verlihub' or 'any/path/verlihub' there is
./.verlihub in current dir.
Verlihub by default binds to ip 0.0.0.0 on port 4111 (not 411).
At the moment you can override the port, but not the ip (hope it works).
To change port, use the first argument e.g. 'verlihub 411'.
Verlihub's output goes to console. You can redirect it to a file e.g.
'verlihub 411 >log 2>err &'
REGISTERING USERS AND OPS
-------------------------
There are different classes of users. They differ with right on some commands
and some limitations.
Classes:
0 - normal user - any user that connects to hub
1 - registered user - he must provide password on login, besides different ban method, he has no privileges
2 - vip reg user - he has some extra privileges, like lower share limit, and maybe some more...
3 - operator - even lower share limit, kick, ban, get ips, create/modify reg users of class 1, etc..
4 - cheef - regusers class 1,2; some more..
5 - admin - can create ops, !broadcast, change settings etc..
10 - master - can do everything except creating another master ;o)
So if you have enough right to register a user to a given class, do it by command
!regnewuser nick [class]
if class is not given 1 is used.
This will add user to a reglist database. His rights (except login with banned ip talk about this later)
are not applied until he sets up his password with +passwd command in main chat. Then he must reconnect.
To change class of registered user you will use !regclass nick new_class. This
takes effect after user's reconnect. You can't give higher class then you are allowed to ;).
When user needs to change password you can user !regpasswd nick command.
User is then allowed and obliged to change his password with +passwd command.
If user lost his password, you can do the same. But attention, if it's realy the user.
Some information about last good ip, and last bad ip are stored in database. The
!getinfo command will in future tell you this.
!regdisable and !regenable are to temporarily enable or disable users account.
!regpurge to delete it from database with all it's info.
HOW TO BAN
----------
1) The easiest way to ban someone is when you are kicking him.
You just add _BAN_ into the kick reason, and user is not only kicked, but
immediately permanently banned (ip and nick). You can use of course temporary ban
by adding _BAN_3d for example into the kick reason. the 3d is a time period of
ban validity. The ban is for ip and nick. and takes effect 3days.
Note, that every kick has almost same effect like ban, deflaut tban_kick values
is 300 seconds.
Time units in temporary bans:
s - second
m - minute - 60 seconds
h - hour - 60 minutes
d or D - day - 24 hours
w or W - week - 7 days
M - month - 4 weeks
Y - year - 12 moths (4*7*12 days 336)
so you make it _BAN_numberunit
e.g. ...kicked ..because: incomplete files _BAN_4d
or ........ because: hob/slot ratio _BAN_2h
etc...
>br> After a kick like this you have to do nothing more to ban or unban user.
Note: you need to put a space after the unit, or end of reason. Hub writes "Banned." if it worked.
2) The classical way !ban !tempban:
Normally you first kick the user, and read his ip, then you ban the ip with !ban command.
Well this works too, but does slightly different thing.
When you type !ban 1.1.1.1 or !tempban 1.1.1.1 3d , hub searches among history of
your kicks, if there was user with the same ip address, when found, hub takes the
last one and uses the nick and reason for banning ip and nick.
If nothing is found you are asked for more information, and nothing is done.
If you want to ban ip without having kicked a user, you have to provide the reason.
Use command !ban 1.1.1.1 reason reason ...
In this special case, only the ip is banned, if you want to add a nickban, use
!nickban command.
3) context menu...
not implemented yet
*************************************
Hiding operators:
-----------------
* there are ways, to hide operators..
* noone can be hidden for his superiors or same level ops
What can be hidden?
-------------------
1/ presence in oplist
2/ presence in NickList (not asured)
3/ kicking messages to chat (cheefs and higher)