This manual specifically focuses on linux
installations and verlihub 0.9.8c. Specific examples using the gentoo linux
distribution will be provided. Other distributions have package management
systems available similar to gentoo or use RPMs, so do some research and find
the equivalent commands.
verlihub's official website is located here. The official forums are
located here (no, the forums on
sourceforge are not frequented regularly.)
Want to
translate into a language not here? Come to VAZ and speak with danomac. If you
don't know what VAZ is, check the forums.
What is verlihub?
VerliHub is a Direct Connect Hub (the server.) It is
primarily developed on linux, and is written in C++. It uses very low
cpu-ram-bandwidth usage relative to other Hub software, and offers many useful
features. Verlihub accepts plugins, and uses a MySQL database to store hub
settings and user information.
First of all, you will need the source for
verlihub from sourceforge.
Download the release and save it in /root (root home folder). Throughout the
course of this manual, it will be assumed you are logged in as root during the
compiling and installation phase and the source is located in the root home
folder. (Note: root access is not generally needed during compiling -
gentoo for example can use portage as long as the user belongs to the
portage usergroup, if you know what you are doing and want to use a
different username, make sure you correct all the path references from here on.)
Use the following command to extract the files:
tar zxvf
verlihub-0.9.8c.tar.gz
This will extract the source into it's
own folder. (In the example above, it will be in /root/verlihub-0.9.8c).
There are some requirements that need to be
fulfilled before you attempt to compile Verlihub. Each linux distribution has
it's own type of package management system, it is up to you to research it. From
here on, gentoo distribution specific instructions will be used. For
example, debian has apt-get, fedora/suse/mandrake use RPMs. Go to rpmfind.net to find RPMs for your distribution.
These are the requirements:
gcc version >= 3.2 (gcc --version will tell you the version number)
mysql (3.23 or higher) Slackware users only: use 4.0.20 or higher
Perl-compatible regular expression library (pcre)
GeoIP
Optional:A remote way to administer mysql. (This guide is
not dependent on it, and it IS NOT a requirement. For those that use
mysql, this can make life a lot easier.)
The package distribution
needs to be updated prior to installing any packages. For gentoo, use:
Google around to locate the source, or use rpmfind.net if your distribution supports it. For
gentoo users, installing geoip using portage is simple; use:
emerge geoip
This will
download, compile and install it for you.
This is what is required: libpcre0-devel or libpcre1-devel.
Again, Google around to locate the source, or use rpmfind.net if your distribution supports
it.
For gentoo users, use:
emerge libpcre
This will
download, compile and install it for you.
Once again, Google around to locate the source,
or use rpmfind.net if your distribution
supports it.
Yet again, you can install it using the package management
system:
emerge mysql
This will
download, compile and install it for you. After mysql installs, there still are
three things you need to do. Firstly, mysql doesn't come with any database files
installed. For gentoo users, use:
mysql-install-db
to install the
database files.
Second, mysql should start at boot up. Use the following
gentoo distribution command (other distributions will have a command similar to
it):
rc-update add mysql default
and
this will automagically add mysql to your startup scripts.
Lastly, you
need to start mysql. You can do this by rebooting or use:
/etc/init.d/mysql start
to
start it.
You should remove the two anonymous user accounts from mysql.
Use this to accomplish it:
mysql -u root mysql> DELETE FROM mysql.user WHERE User = ''; mysql> FLUSH PRIVILEGES;
Lastly, you have to set a
root password for mysql, and remove the anonymous accounts installed by default.
Reset the root password by using:
mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' =
PASSWORD('newpwd'); mysql> SET PASSWORD FOR
'root'@'host_name' = PASSWORD('newpwd');
Replace the password
between the two single quotes with a password of your choice. You will need
this password later on! For the second password statement, replace
'host_name' with the IP address of the computer mysql is running on.
Now
mysql is ready to go. Keep in mind that mysql does not necessarily need to run
on the same machine as the hub software. It can be located (preferably) on the
same LAN for latency reasons. Instructions to set this up however are outside
the scope of this document.
phpmyadmin is a set of
scripts written in PHP that allows you to use apache to remotely administer your
mysql database. This can prove to be quite handy should you need to change some
values in the verlihub database directly. Of course, there are two prerequisites
to running phpmyadmin: you need apache and php installed. While installing and
configuring apache, php and phpmyadmin are outside the scope of this document,
gentoo's portage system makes it easy to install and configure, so these three
steps will be shown here.
Step 1
First, you need to
make sure /etc/hosts is configured correctly. The hostname of the computer must
reside next to the 127.0.0.1 listing. To get your hostname, do:
cat /etc/hostname
This will
show you your hostname. Now, open /etc/hosts in your favorite editor and make
sure your localhost (127.0.0.1) line looks similar to this:
127.0.0.1 localhost myhostnamefromabove
DO NOT
remove localhost from this line! Simply go to the end of the line, press the
spacebar and enter in your hostname.
Step 2
Second,
get apache and mod_php installed (we will assume php is used as a module here.)
Use the following command to install them:
emerge apache mod_php
This will
install both packages. Now all that is needed is some quick configuration. Open
/etc/conf.d/apache2 in your favorite editor and change:
#APACHE2_OPTS="-D SSL"
to
APACHE2_OPTS="-D PHP4"
Ensure you remove the '#' (pound
character) from this line. Now open /etc/apache/conf/apache2.conf in your
favorite editor and make two changes. Change:
#ServerName=localhost
to
ServerName=localhost
then change the ErrorLog
line (this should only be a few lines below the ServerName line above)
to:
ErrorLog /var/log/apache2/error_log
Make sure the
directory /var/log/apache2 exists. If not, create it.
To start the
webserver use:
/etc/init.d/apache2 start
To
stop it use:
/etc/init.d/apache2 stop
If you
want it to be loaded at startup, use:
rc-update add apache2
default
Step 3
The final step: install
phpmyadmin. Use:
emerge phpmyadmin
to accomplish
this. NOTE: Watch the output of emerge! You need to run some commands in
order to have phpmyadmin work! It involves importing some SQL commands into
mysql.
After all this is done browse to http://localhost/phpmyadmin if
you are running a web browser on the PC that verlihub is installed on, or
http://<myhostname>/phpmyadmin if from another PC. NOTE: use the
root username/password to login!
First of all we need to prepare
the database. If you look where you extracted the tar.gz file from Getting
Started, you will notice a /scripts folder. We are going to run the installer
script located in this directory. The output is shown below.
cd
/root/verlihub-0.9.8c/scripts ./vh_install -------------------------------- Your name
? (root) press enter
Hello root, let's start
with configuration of database
access..
-------------------------------- mysql database for verlihub
will be called? (verlihub) press enter mysql user to
access verlihub gonna be? (verlihub) press
enter password to access verlihub be? (1110079846) press enter mysql server will run where? (localhost) press enter -------------------------------- user =
verlihub password = 1110079846 host = localhost database =
verlihub -------------------------------- This database account cannot be
accessed -------------------------------- Is this info correct ?
(Y/N)y Do you want to create database now? (Y/N)y -------------------------------- Ok preparing
mysql.. You probably need administrator access to mysql database mysql
administrator username? (root)press
enter
--------------------------------
You'll be now
promted by mysql client for password of root@localhost Enter password:enter mysql root
password -------------------------------- This database account
exists --------------------------------
--------------------------------
root,
you need to choos a place for the configuration
files -------------------------------- The order of folder that verlihub
is looking for is following:
1 - variable $VERLIHUB_CFG -
-inexisting- 2 - ./.verlihub - /root/verlihub-0.9.8c/scripts/.verlihub
-inexisting- 3 - /root/.verlihub - /root/.verlihub -inexisting- 4 -
/usr/local/etc/verlihub - /usr/local/etc/verlihub -inexisting- 5 -
/etc/verlihub - /etc/verlihub -inexisting- if two or more of these exist,
lower number has
priority --------------------------------
-------------------------------- what
is will be the configuration folder ? (/etc/verlihub)press
enter The config folder /etc/verlihub does not exist and would be
created -------------------------------- Do you want to continue with
these settings (if not then select another folder) ? (Y/N)y -------------------------------- Written:
/etc/verlihub/dbconfig
--------------------------------
Wait few
seconds.. ./vh_install: line 63: <PID> Killed $bindir/verlihub 1
>&/dev/null -------------------------------- root, now I will ask
you few more questions about your future hub, if you
permit..
-------------------------------- Try to not put many special
characters, you'll be able to put some laer
Give me your DC hub master
nickname.. ([SU]root)think of a master nickname and enter it
here Choose your password.. (1110079846) enter a
password for the master nickname Which will be default ONE hub port
number? (4111)[Choose a port; < 1024 verlihub needs to run as
root. Default: 4111, DC uses 411.] What will be your hub hostname?
(<computername>)enter the url of your hub Give
me the name of your hub (hub of root) enter the name of your
hub -------------------------------- Hub: '<hubname entered
above>' url: 'dchub://<hostname entered above>:<port entered
above>' Master user: '<master username entered above>' Master's
password: '<master password entered
above>' -------------------------------- Is this info correct ?
(Y/N)y FYI: settings are going to be created or
updated /etc/verlihub /etc/verlihub /etc/verlihub will invoke the
command class is 10 nick is <master username entered
above> password is <master password entered
above> done
The installer script asks for
a port to use. This section is here only to list the two common choices, and
will show how to change the port should you decide to use a different one. When
Verlihub is installed, it will use port 4111 by default. This allows the
verlihub daemon to run as a non-root user, which can be desirable for security
reasons. Most hub installs should be fine with this. If verlihub is behind a
firewall, the firewall may be able to route incoming requests from port 411 to
the verlihub machine listening on port 4111. However, DC *clients* will always
use port 411 if a port is not specified with the hub address. When
specifying a hub address with a port, the format is <hub
address>:<port>. The only concern with this is that the verlihub
daemon has to run as root to bind to this port.
Verlihub should be ready
to go now; if you want to change the port, start verlihub directly:
/usr/local/bin/verlihub
Then
issue the following command to change the port:
Now that the Hub has been set up, now you need
to decide how it starts. In this guide so far, verlihub has been invoked
manually. It can also be run as a daemon.
This is how it has been invoked so far. You can
log on as a normal user and start the hub manually each time by using:
/usr/local/bin/verlihub
When
running the hub this way, all you need to do is press CTRL+C to stop the hub
software, or if you are logged in as the Master user type !quit in the chat
window. Please note: When you run the hub as a non-root user you CANNOT
set the hub to listen on ports below 1024!
When verlihub is configured to run as a
daemon, it is generally loaded in the startup scripts. You don't need to be
there manually to login and start up the hub. The problem is that different
distributions have different ways of writing scripts and adding them to the
startup sequence. You should really check out the forums (link is at the top of
this page) for possible help with certain distributions.
Verlihub comes
with a script to launch as a daemon, but it may not work in all instances (see
Starting and Stopping verlihub as a daemon for how try try to use the provided
script.) The following is gentoo-distribution specific. This is a script
that can be used with gentoo to start and stop verlihub. First, copy this into
/etc/conf.d/verlihub:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Verlihub configuration
# The directory where the verlihub config files are
CONFDIR=/etc/verlihub
# The location of the verlihub binary
VERLIBIN=/usr/local/bin/verlihub
# The process file
VERLIPIDFILE=/var/run/verlihub.pid
# Required files for verlihub to start
REQFILES="dbconfig"
# Optional files for verlihub
OPTFILES="motd faq rules help_admin help_master help_op help_usr help_reg"
Then save this into /etc/init.d/verlihub:
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Verlihub boot script for gentoo distributions
depend() {
need net
need mysql
}
start() {
ebegin "Starting verlihub"
# make sure the configuration directory exists
if [ ! -d ${CONFDIR} ]; then
eerror FATAL ERROR: missing configuration directory ${CONFDIR}
return 1
fi;
# check for the required files
for f in ${REQFILES}; do
file=${CONFDIR}/$f
if [ ! -e $file ]; then
eerror "FATAL ERROR: missing required file $file"
return 1
fi;
done;
# check for the optional files
for f in ${OPTFILES}; do
file=${CONFDIR}/$f
if [ ! -e $file ]; then
eerror "WARNING: missing file $file, some functionality will be disabled"
fi;
done;
# start the hub
start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${VERLIPIDFILE} --exec ${VERLIBIN}
eend $?
}
stop () {
ebegin "Stopping verlihub"
# stop verlihub
start-stop-daemon --stop --pidfile ${VERLIPIDFILE}
eend $?
}
After you save that script, you need to make it executable. Use:
chmod +x
/etc/init.d/verlihub
to do this. Now we need to add the new
initscript to the startup scripts. Use:
rc-update add verlihub
default
to do this. See the next section for how to use the
gentoo script.
NOTE: This initscript is intended to be run as
root (so port 411 can be used.) If you want the initscript to run as a user,
first create the user verlihub on your machine, then change this line in
/etc/init.d/verlihub:
There are helper scripts in the CVS version of
verlihub (and/or versions later than August 26, 2004.) They have been listed
here in a table with a brief description of what they are capable of:
Script
Description
vh_getcfg
Run this script and see which configuration folder verlihub is most
likely to use
vh_runhub
start, stop, restart verlihub as a daemon; creates log and err files;
displays missing files
vh_getdb
Finds the dbconfig files and parses it, then allows you to do multiple
things with that information such as: connect; query; gethost; getdata;
getuser; getpass
There are a few components to the basic
configuration of your hub. There is some settings that need to be changed in the
database, as well as some files need to be added (such as a Message of the Day,
FAQ, amongst other things...) to the configuration directory.
In the following table is a list of the "basic"
things that should be set in your hub.
Configured with install
script
Variable
Explanation
listen_port
The port the hub listens on. Other hubs use port 411, but you need to
run verlihub as root to do that. Default: 4111.
hub_host
What people will use to connect to your hub. (An example:
myhub.no-ip.com)
hub_name
The name of your hub.
Not configured - you may
need to configure these
Variable
Explanation
listen_ip
If you have more than one network card in your PC, enter the IP
address to listen on. If you don't have more than one network card, no
change is necessary. Default: (empty)
hub_desc
A description of your hub.
hub_owner
Owner that runs the hub.
min_nick
Minimum nickname length. Default: 3.
max_nick
Maximum nickname length. Default: 32.
max_users
Maximum number of users allowed in your hub. Default: 6000
min_share
Minimum amount that people must share in your hub in megabytes. People
that share less will not be allowed to join. Default: 2 GB (2048).
tban_kick
Length of time people must wait after being kicked to rejoin. In
seconds. Default: 300 seconds.
send_user_info
When people join, the hub will send them information about themselves.
Set to 0 (zero) to disable, or 1 to enable. Default: 1.
send_user_ip
When people join, the hub will send them the IP address they are
reporting. Set to 0 (zero) to disable, or 1 to enable. Default: 0.
hub_security
This is the name of the Hub Security bot.
hub_security_desc
This is the description of the Hub Security bot.
opchat_name
This is the name of the OpChat bot.
opchat_desc
This is the description of the OpChat
bot.
For example, to set the hub name to
'My Hub' use this command:
The message of the day will be shown to
every member joining the hub. All that needs to be done is a text file needs to
be saved as 'motd' in the configuration directory (in this guide
/etc/verlihub/motd) and verlihub will automatically use it.
Verlihub
allows you to show extra motd's based on user class. Here is a file list you can
use:
File
Description
motd
All users receive this motd.
motd_reg
Registered users receive this in addition to motd.
motd_vip
VIP Users receive this in addition to motd_reg and the normal
motd.
motd_op
OPs receive this in addition to motd_vip, motd_reg and the
normal motd.
motd_cheef
Cheef OPs receive this in addition to motd_op, motd_vip,
motd_reg and the normal motd.
motd_admin
Admin OPs receive this in addition to motd_cheef, motd_op,
motd_vip, motd_reg and the normal motd.
motd_master
Master users see all motd
messages.
Note: If you don't use
CRLF encoding in your text file, the Windows clients will display the whole file
on one line. See here for
more information.
A FAQ (Frequently Asked Questions) is available to users
using +faq in the hub chat window. Again, all that needs to be done is a text
file needs to be saved as 'faq' in the configuration directory (in this guide
/etc/verlihub/faq) and verlihub will automatically use it.
Note:
If you don't use CRLF encoding in your text file, the Windows clients will
display the whole file on one line. See here for
more information.
A rules trigger is also automatically provided. When
people type +rules in the hub chat window, the contents of 'rules' in the
configuration directory (in this guide /etc/verlihub/rules) are sent to the
user.
Note: If you don't use CRLF encoding in your text file, the
Windows clients will display the whole file on one line. See here for
more information.
In order to have help available to users, you need to
create 7 different help files. At the time of this writing, starter help files
are available in the forums; go there
and to a search. As this thread may change, it will not be hotlinked. The file
available there has also been mirrored here.
NOTE: This file also contains templates for rules, motd,
and FAQ. Be careful extracting if you have existing copies of
these!
Before you do this, it may help to understand how verlihub deals
with help files. There are several "classes"
of users that can exist in verlihub. Each one has a help file associated with
it. The help will be sent by class, for example, a regular user will only get
class 0 help when they use +help. A regular operator will get class 3, 2, 1, and
0 help sent to them when they use +help. Because of this, it is important to
create all the help files, as certain commands are only available to certain
users. The files need to be placed in the configuration directory (in this guide
it's /etc/verlihub). Here is a table outlining the files needed for the help
system to work:
Class
Tag
Help file
0
Regular users
/etc/verlihub/help_usr
1
Registered users
/etc/verlihub/help_reg
2
VIP users
/etc/verlihub/help_vip
3
Operator user
/etc/verlihub/help_op
4
Cheef user
/etc/verlihub/help_cheef
5
Admin user
/etc/verlihub/help_admin
10
Master user
/etc/verlihub/help_master
As for a
guide for what to put in these files, refer to the Hub Command
list for examples of what to put in these files.
Note: If you
don't use CRLF encoding in your text file, the Windows clients will display the
whole file on one line. See here for
more information.
All of the text
files verlihub uses should be DOS-encoded. If you use UNIX-encoding, all the
windows clients will interpret the text files incorrectly and display the entire
file on one line, which is probably not desired (of course, if you only have
1-line FAQ/motd/help/rules it doesn't matter.)
There are tools available
to convert file types back and forth. unix2dos and dos2unix will
convert back and forth between the two encodings, however these tools may not be
present on your distribution. Gentoo users can use this portage command
to get the two tools:
emerge dos2unix unix2dos
This will
install the two tools needed.
If you use the editor vim, it can
save and manipulate DOS-encoded files directly. Start vim, and issue this
command before saving files:
The items here are not necessary to
configure for the hub to function. It is a good idea to be aware of some of
these configurable options, however. All of these are configured as the Master
user logged into the hub.
Verlihub has the ability to
listen on more than one port for incoming clients, if you need to do this. For
example, to listen on 411 (the hub needs to run as root to listen on this
port) use this command:
Verlihub has an advanced file trigger feature.
You can add different types of triggers; for example, if you prefix the command
with '!' only ops can use the trigger; if you prefix with '+' then users can use
the trigger. These are the commands available to use with the file triggers:
Changes a trigger. See below this table for more information regarding
the parameters.
!deltrigger <trigger>
Removes a trigger.
Explanations of
command parameters:
Parameter
Explanation
<trigger>
The name you want the trigger to be called.
-d <definition>
The definition of the trigger. This can be pointing to a file, or it
can be the actual trigger contents, if the correct flags are specified. If
you use this for the actual contents you will have to enclose it in
quotes. An example: -d "This is the trigger
contents."
NOTE: When using the definition as the actual
trigger contents, you can not have quotations in the file! You will
need to edit the database directly in this case.
You can use %[CFG]
and verlihub's current configuration path will be used.
These
variables need flag bit 32 set:
Variable
Description
%[CC]
User's country code
%[IP]
User's IP address
%[HOST]
User's hostmask (dns_lookup must be set to 1 for this to
work)
%[USERS]
The number of users in the userlist
%[UPTIME]
Hub uptime
%[VERSION]
Hub version
%[VERSION_DATE]
Hub's release date
%[HUBNAME]
The hub name
%[NICK]
User's nickname
%[SHARE]
User's share size
%[TOTAL_SHARE]
Total amount shared in hub
-h <description help>
This is not used by Verlihub, it is here in case you need to enter a
note with the trigger to remember what it is for.
-f <flags>
This is a flag bitset. These will govern how Verlihub will use the
trigger and/or how it displays it to the user. This is a table with the
available values:
Bit
Description
0
Send to main chat (visible to user only)
1
Execute command
2
Message is sent to PM
4
Automatically trigger when user logs in
8
Trigger on +help/!help command
16
The definition is the text
32
Allow replacing of variables
64
Message is sent to everyone in the main chat
window
Some examples of usage:
Verlihub will do this
Flags to use
Send to user only in main chat
-f 0
Send message to user on login, and to a PM window
-f 6
Trigger on +help and send it to PM window
-f 10
Send message on login and on +help/!help to a PM
-f 14
Use definition as trigger contents and send to PM window with
variables
-f 50
Send to everyone in main chat window
-f 64
-n <send as nick>
When sending to the main chat window, the trigger will appear to send
from this nickname.
-c <min_class>
This is the minimum user class allowed to use this trigger.
-C <max_class>
This is the maximum user class allowed to use this
trigger.
For example, to add a trigger
called '+hublisting' from a file and have it go to a PM window when invoked:
!addtrigger +hublisting -d "/path/to/file" -f
2
TIP: Did you know that the +motd/+help/+faq/+rules
behaviour can be changed using the above flags? For example, if you want to send
the FAQ to a PM, use this command:
Verlihub has diverse parameters to protect
chat from flooding. There must be some compromise between heavy restrictions and
the possibility to chat; there is not a full set of protection against
this.
There are two hub variables that can help prevent mass flooding:
max_chat_msg and max_chat_lines. max_chat_msg is the
maximum length of a message allowed to be sent to your hub (default is 256
characters long). max_chat_lines is the maximum number of lines that can
be sent to your hub (default is 5). As an example, to set a maximum length of
512 characters and 10 lines:
!set max_chat_msg 512 !set max_chat_lines
10
If you have active bots that are frequently kicking naughty
users, you may want to get rid of the kicking messages. You can use the variable
hide_all_kicks to do this; 1 hides all kick messages, 0 shows messages.
Use this to hide all messages:
!set hide_all_kicks 1
Another
possibility for muting kick messages is using commands !hidekick
<nick> and !unhidekick <nick> which will kick the one
user and not display anything.
There is nothing in verlihub that prevents
user from repeating the same message. You may want to get a client that can
monitor this and remove users automatically. (A dcgui-qt client can do this for
you.)
Verlihub does not prevent users saying rude words. There is a
possibility to configure VerliBot to kick/ban such
users.
Verlihub has a plugin floodprot that does more extensive
flood protection. Look in the wiki
for more information.
You can set up to 10 hubs where verlihub will
try to redirect every disconnected user. The choice is made randomly among all
ten of them. If you want only one hub to redirect to you would set all ten of
them to same hub address.
If you would like to disable redirection, set
redir_host0 to your hub's IP address or hostname, and set redir_host_max to 0.
For example:
Verlihub allows you to customize
the following error messages:
User is banned message (msg_banned)
Hub full message (msg_hub_full)
Invalid nickname prefix (msg_nick_prefix)
Client version too new (msg_downgrade)
Client version too old (msg_upgrade)
Client version too old (msg_upgrade)
Here is an example of how to
set the messages:
!set msg_banned You are banned from this
hub. !set msg_hub_full This hub is full, try again later. !set
msg_nick_prefix You do not have the desired nickname prefix in order to join
this hub. !set msg_downgrade You are using too new of a client. This hub does
not support untested clients at this time. !set msg_upgrade You are using an
outdated client. Upgrade your client and rejoin.
There is a variable
msg_replace_ban that can be set to replace the '_ban_*' parts of the kick
message so they are not displayed to the hub. By default, this variable is an
empty-length string ('') so that part of the message is removed. If you want,
you can set this to replace the '_ban_*' part of the message with whatever you
want. For example, if you banned someone with this command and msg_replace_ban
is set to 'Replace':
!kick <nick> You have been a bad user.
_ban_2d
The users in the hub would see this kick message:
[<time>] <OPUser> is kicking user <nick>
because: You have been a bad user. Replace
To change the replace text
with something else, use:
Verlihub allows you to greet
members as they join. Newly registered users will be greeting with a message to
change their password, and if the main chat window is disabled in the hub, they
will see the command for how to turn the chat window on and off.
To
change the two default messages (password and chat) use this:
!set msg_chat_onoff "Use !chaton to display
messages in the chat window." !set msg_change_pwd "You have 5 minutes to
change your password."
As far as welcoming users, you can
welcome users specially by using:
!set msg_welcome_guest Welcome, %[nick] has
joined! !set msg_welcome_reg Registered member %[nick] has joined! !set
msg_welcome_vip VIP member %[nick] has joined! !set msg_welcome_op OP %[nick]
has joined. !set msg_welcome_cheef OP %[nick] has joined. !set
msg_welcome_admin Admin OP %[nick] has joined. !set msg_welcome_master Hub
owner %[nick] has joined. Everyone hide!
NOTE:
msg_welcome_guest is for anyone who joins that is not a Class 1
user or up.
Tip: If you want to use the user's nickname in the
message, use the variable %[nick] as shown above; use %[CC] for the user's
country code.
Verlihub allows you to set
different levels for registered users and hub operators. You can also specify a
overall maximum allowed share, and a maximum allowed share for registered users
(all are in megabytes). For example, to set a minimum share of 2 gigabytes for
registered users and no share for OPs, use:
!set min_share_reg 2000 !set min_share_ops
0
To set an overall maximum share of 1000 gigabytes and a
maximum share of 500 gigabytes for registered users use:
Verlihub also recognizes DC tags. Using
these tags, you can restrict users access to your hub.
NOTE: For
users of Verlihub older than 0.9.8 the method for restricting clients has
changed.
Verlihub now supports a dynamic way to restrict clients based on
the type of connection they use. There are four commands that manipulate the
tags and the restrictions that each tag imposes. The commands are summarized
below:
Adds the DC tags specified and their restrictions. See the explanation
of the parameters in the table below.
!delconntype <DC Tag>
Removes specified DC Tag.
This table
explains the parameters used to change the restrictions for each DC tag:
Parameter
Explanation
-S <tag_max_slots>
Maximum slots user can define for this connection type
-s <tag_min_slots>
Minimum slots user can define for this connection type
-l <tag_min_limit>
Minimum upload limit for user with this connection type. If user
upload rate is less than this value, they are not allowed in the
hub.
-ls <tag_min_ls_ratio>
Minimal value for upload limit per slot. If user upload rate per slot
is less than this value, they are not allowed in
hub.
NOTE: A set of these tags have
been pre-installed for you to use. Use !lstconntype to show them.
REMEMBER: The default tag is used when a matching DC Tag is not
found in the list!
Most hubs
allow you to restrict how many hubs your users are in, and also a hub/slot
ratio. Verlihub is no different, for example, if you want to restrict your users
to be in 4 hubs maximum, and have 1 slot per hub, use:
Verlihub allows you to restrict the
number of slots the client is using. You can specify default minimum and maximum
values, as well as values that are specific to the type of connection. Below is
an example of setting the minimum slots to 1 and the maximum to 50:
Verlihub also allows you to set a
minimum speed per slot for the client. Users that are below it are not
allowed a connection to the hub. You can specify an overall default, as well as
connection-specific limits.
Below is an example how to disable
this limit. If you want to set them, enter values greater than 0:
If the client connected is capable of upload
capping, you can specify a minimum cap allowed before they are allowed to join
in the hub. All that needs to be set is the default cap, however, you can also
specify caps depending on the type of connection the user is reporting. These
values are in KB/sec.
In the example below, a 25KB/sec default cap is
set, and various caps are set depending on the connection:
Verlihub has also a very simple and a bit
incomplete hublist registering support. Well there are several variables and one
command that make it work. Those that are used are:
hublist_host - the ip address of the hublist registering host
hublist_port - usually 2501 which is default
hub_host
listen_port
hub_name
hub_desc
The command to send the registration off is:
!hublist
You can use this
command once the above variables are set correctly. Do not use it more than once
every 20 minutes, as the hublists tend to ban hubs that update too frequently.
Some text of Verlihub can be
translated, specifically those that hub sends to users. By default, these
special fields are not in the database. To enable this, you need to:
!set save_lang 1
Restart the hub,
then:
!set save_lang 0
You need to
reset save_lang to 0, it is only needed once to create special settings
in the database.
Now in the database you have (in the SetupList table)
some variables with their english values (they have the format lang_en in the
table). Whatever you change in these variables will be loaded next time. If you
like you can keep the lang_en variables and make a copy to lang_whatever. If you
do this, you need to tell Verlihub to use the new ones on next startup, by
adding a line in dbconfig in the configuration folder (in this guide, the file
will be /etc/verlihub/dbconfig). All you need to do is add:
lang_name = lang_whatever
Verlihub will then use the
language specified when the hub is restarted.
Verlihub allows you to "bend" the
rules for certain people joining the hub. When the limit in max_users is
reached, and either a Registered user, an OP, or an Admin OP joins, Verlihub
checks these three values:
max_extra_regs - Amount of registered users allowed to join hub after the
hub is full
max_extra_ops - Amount of OPs allowed to join hub after the hub is full
max_extra_admins - Amount of Admin OPs allowed to join hub after the hub
is full
So if you would like to have no registered members join after
the hub is full, but you still want 5 OPs and 5 Admin OPs allowed to join, use
this set of commands:
If for example you have a 10mbit line, you need to increase the
default value for the file descriptor limits to 4096. If however, you have a
100mbit line, you need to increase your file descriptor limits by a larger
amount or you will be limited to how many users are in your hub (for example,
increase it to 10240.)
To do this, you need to change the following
files:
In /etc/security/limits.conf, add the lines:
* soft nofile 4096 * hard nofile 4096
In /etc/pam.d/login, add:
session required /lib/security/pam_limits.so
Then increase the system-wide file descriptor limit by adding
the following lines to the /etc/rc.d/rc.local startup script:
The table below lists all of variables
that are configurable in verlihub (this list is more than likely incomplete). To
change their values, use the !set command when logged into the hub as a Master
user.
General Hub settings
Variable
Explanation
hub_name
The name of your hub.
hub_desc
A description of your hub.
hub_host
What people will use to connect to your hub. (An example:
myhub.no-ip.com)
hub_owner
Owner that runs the hub.
hub_security
This is the name of the Hub Security bot.
hub_security_desc
This is the description of the Hub Security bot.
opchat_name
This is the name of the OpChat bot.
opchat_desc
This is the description of the OpChat bot.
show_tags
Show tags to users? 0=hide from all, 1=show tags, 2=show tags to OPs
only. Default=2.
Hub Connection
settings
Variable
Explanation
listen_port
The port the hub listens on. Other hubs use port 411, but you need to
run verlihub as root to do that. Default=4111.
extra_listen_ports
Extra ports the hub listens on.
listen_ip
If you have more than one network card in your PC, enter the IP
address to listen on. If you don't have more than one network card, no
change is necessary.
dns_lookup
Reverse DNS lookup when user joins. Needed to see hostmask of user. If
you have a slow DNS server this can slow down the hub.
max_users
Maximum number of users allowed in your hub.
max_upload_kbps
Maximum upload speed hub is allowed to use.
min_frequency
Somewhat automatic antilag system, higher values will allow lower lag;
0 means disabled. Largest usable value is 3. Normal values would be
between 0.1 and 1.5. If you want to try to break records, set to 0 (though
it's not recommended.)
min_class_use_hub
Nickname Rules
Variable
Explanation
min_nick
Minimum nickname length. Default of 3.
max_nick
Maximum nickname length.
nick_chars
Allowed characters in username.
nick_prefix
nick_prefix_cc
Share Rules
Variable
Explanation
min_share
Minimum amount that people must share in your hub in megabytes. People
that share less will not be allowed to join.
min_share_reg
If you want your registered users to have a different minimum share
level, use this.
min_share_vip
If you want your VIP users to have a different minimum share level,
use this.
min_share_ops
If you want your OPs to have a different minimum share level, use
this.
min_share_factor_passive
Multiplication factor for the minimum share of passive users (a
setting of 2.0 means passive have to share twice the min_share
setting)
min_share_use_hub
If this is higher then min_share then users that have less then this
will not be able to search and download, but will be allowed to join the
hub
max_share
If you want to prevent users from sharing too much, enter the max
allowed to share in MB.
max_share_reg
If you want to prevent registered users from sharing too much, enter
the max allowed to share in MB.
Ban settings
Variable
Explanation
tban_kick
Length of time people must wait after being kicked to rejoin. In
seconds. Default=300 seconds.
tban_max
Maximum length of time an OP can ban someone for. In seconds.
hide_all_kicks
Hides all kick messages from users.
Login settings
Variable
Explanation
int_login
Number of seconds user has to wait after disconnection before being
allowed to reconnect.
send_user_info
When people join, the hub will send them information about themselves.
Set to 0 (zero) to disable, or 1 to enable. Default=On.
send_user_ip
When people join, the hub will send them their IP address. Set to 0
(zero) to disable, or 1 to enable. Default=On.
nicklist_on_login
Show nicklist when users log in.
allways_ask_password
Always ask users for a password, whether they are registered or
not.
chat_default_on
Enable the chat window by default. 1=yes, 0=no. If no, users need to
use !chaton to get messages.
Custom Hub Messages
Variable
Explanation
msg_chat_onoff
msg_change_pwd
You can customize your user's change password message by putting a
message in this variable.
Custom Error
Messages
Variable
Explanation
msg_banned
You can customize the error message that indicates the user is banned
by putting a message in this variable.
msg_hub_full
You can customize the error message that indicates the hub is full by
putting a message in this variable.
msg_nick_prefix
msg_downgrade
You can customize the error message that indicates the client is too
new by putting a message in this variable.
msg_upgrade
You can customize the error message that indicates the client is
outdated by putting a message in this variable.
msg_replace_ban
Custom Welcome
Messages
Variable
Explanation
msg_welcome_guest
If you want to welcome your Class 0 members, fill in a welcome message
here. Use %[nick] to use the person's nickname in the message.
msg_welcome_vip
If you want to welcome your registered members, fill in a welcome
message here. Use %[nick] to use the person's nickname in the
message.
msg_welcome_vip
If you want to welcome your VIP members, fill in a welcome message
here. Use %[nick] to use the person's nickname in the message.
msg_welcome_op
If you want to welcome your OPs, fill in a welcome message here. Use
%[nick] to use the person's nickname in the message.
msg_welcome_cheef
If you want to welcome your Cheef OPs, fill in a welcome message here.
Use %[nick] to use the person's nickname in the message.
msg_welcome_admin
If you want to welcome your Admin OPs, fill in a welcome message here.
Use %[nick] to use the person's nickname in the message.
msg_welcome_master
If you want to welcome your Master user, fill in a welcome message
here. Use %[nick] to use the person's nickname in the message.
Maximum User
Extensions
Variable
Explanation
max_extra_regs
If the hub is full, allow this many more extra registered users to
join.
max_extra_ops
If the hub is full, allow this many more OPs to join.
max_extra_admins
If the hub is full, allow this many more Admin OPs to join.
Public Hub List
settings
Variable
Explanation
hublist_host
hublist_port
hublist_send_minshare
When set to 1, a minimum share field is added automatically to the
hublist registration description.
timer_hublist_period
Number of seconds between two hublists registrations.
Hub redirection
Variable
Explanation
redir_host_max
Set this to 0 (zero) and redir_host0 to your hub's DNS name to disable
redirection.
redir_host0
Enter hosts to redirect to in case users aren't allowed in your hub,
or leave them blank.
redir_host1
redir_host2
redir_host3
redir_host4
redir_host5
redir_host6
redir_host7
redir_host8
redir_host9
Search settings
Variable
Explanation
int_search
Minimum number of seconds user has to wait before being allowed to
search again.
min_search_chars
Minimum number of characters allowed in a search.
DC Tag settings
Variable
Explanation
tag_allow_none
Allow clients to NOT report a tag? 1=yes, 0=no. Yes by default.
tag_sum_hubs
The count of numbers to sum and use as the HUBS count from the H:X/Y/Z
part of tag
tag_min_class_ignore
Which lowest class users are not to be checked for tags
tag_max_hs_ratio
Enter the minimum hub/slot ratio here. Users that are below this are
refused connections to the hub. For example, setting to 1 means user needs
to have 1 slot open per hub.
tag_max_hubs
Set this to restrict how many hubs your user can be in
concurrently.
tag_min_version_plusplus
Use the _min_version_ tags to specify a minimum version for the client
allowed in the hub.
tag_min_version_dcgui
tag_min_version_odc
tag_min_version_dc
tag_min_version_dcpro
tag_min_version_strongdc
tag_min_version_idc
tag_min_version_zdc
tag_max_version_plusplus
Use the _max_version_ tags to specify a maximum version for the client
allowed in the hub.
tag_max_version_dcgui
tag_max_version_odc
tag_max_version_dc
tag_max_version_dcpro
tag_max_version_strongdc
tag_max_version_idc
tag_max_version_zdc
tag_allow_sock5
Country Code User
Definitions
Variable
Explanation
cc_zone1
Enter the countries for the first country code zone. The format is
`:XX:YY:ZZ:`. It has to start and end with a colon, and all country codes
are separated by colons. There can be any number of codes (example codes:
CZ; UK; US; SE. NOTE: These need to be capitalized!)
cc_zone2
Enter the countries for the second country code zone. The format is
`:XX:YY:ZZ:`. It has to start and end with a colon, and all country codes
are separated by colons. There can be any number of codes (example codes:
CZ; UK; US; SE. NOTE: These need to be capitalized!)
cc_zone3
Enter the countries for the third country code zone. The format is
`:XX:YY:ZZ:`. It has to start and end with a colon, and all country codes
are separated by colons. There can be any number of codes (example codes:
CZ; UK; US; SE. NOTE: These need to be capitalized!)
max_users0
If a user joins that doesn't belong in the Country Code list specified
below, this user limit applies.
max_users1
User limit that applies to cc_zone1
max_users2
User limit that applies to cc_zone2
max_users3
User limit that applies to cc_zone3
IP Address User
Definitions
Variable
Explanation
ip_zone4_min
If you want to restrict users by IP address, enter the minimum IP
address for the first IP zone here. (Verlihub allows you to define 3 IP
zones.)
ip_zone4_max
If you want to restrict users by IP address, enter the maximum IP
address for the first IP zone here. (Verlihub allows you to define 3 IP
zones.)
ip_zone5_min
If you want to restrict users by IP address, enter the minimum IP
address for the second IP zone here. (Verlihub allows you to define 3 IP
zones.)
ip_zone5_max
If you want to restrict users by IP address, enter the maximum IP
address for the second IP zone here. (Verlihub allows you to define 3 IP
zones.)
ip_zone6_min
If you want to restrict users by IP address, enter the minimum IP
address for the third IP zone here. (Verlihub allows you to define 3 IP
zones.)
ip_zone6_max
If you want to restrict users by IP address, enter the maximum IP
address for the third IP zone here. (Verlihub allows you to define 3 IP
zones.)
max_users0
If a user joins that doesn't belong in the IP range specified below,
this user limit applies.
max_users4
User limit that applies to ip_zone4_*
max_users5
User limit that applies to ip_zone5_*
max_users6
User limit that applies to ip_zone6_*
Miscellaneous
settings
Variable
Explanation
cmd_start_user
The prefix for user commands. Default '+'.
cmd_start_op
Prefix for OP commands. Default '!'.
report_dns_lookup
max_message_size
int_chat_ms
show_email
show_desc_len
int_nicklist
desc_insert_mode
Insert 'A', 'P', or '5' into user's description ? (1 = yes/0 =
no)
use_reglist_cache
use_penlist_cache
save_lang
Set to 1 to enable multi-language. See this guide for more
details.
timer_conn_period
timer_serv_period
timer_reloadcfg_period
delayed_search
delayed_myinfo
reg_class_difference
The minimum difference between a class of user that is registering and
the new user's class (for OPs adding new users)
step_delay
bc_reply
When you set to 0 (zero), then the !bc commands don't send you replies
from all back to your PM
log_level
check_ctm
check_rctm
optimize_userlist
ul_portion
int_flood_pm_period
int_flood_pm_limit
timeout_myinfo
hub_version
hub_version_special
classdif_reg
classdif_kick
classdif_download
classdif_pm
min_class_register
min_class_bc
min_class_bc_regs
min_class_redir
dest_report_chat
dest_regme_chat
dest_drop_chat
max_passive_sr
This reduces the load that passive users put on the hub. Try setting
to 100, 80, or 50 to restrict passive users usage. Default: 0
(disabled)
default_password_encryption
The ecryption method which will be used (if available) to encrypt
passwords that will be set. Effective immediately. (1 - ENCRYPT (default),
0 - not encrypted - plain text, 2 - MD5). If given method is not
available, another encryption method is used or at worst the plain text
password is stored.
timeout_key
timeout (in seconds) from the connection until the first
response
timeout_nick
timeout (seconds) from the key response, until the reception of
nick
timeout_myinfo
timeout (seconds) - from the nick until the myinfo (description,
share, tags,etc..)
timeout_flush
timeout (seconds) (reserved, not used)
timeout_login
timeout (seconds) from the connection until the appearance in the
userlist
timeout_setpass
timeout (seconds) from login until user sets his/her initial
password
max_class_int_login
maximal class that get int_login seconds long tempban on every login
(this is added mainly for debugging purpose)
Verlihub has various commands that range from
adding registered users to banning them from the hub. This section has been
broken into 5 parts: User Management, Kicking users, Banning users, Sending
messages to users, and Muting users.
This section of the manual deals specifically
with commands and instructions for user management. Before you do any user
management, make sure you are familiar with the next section, User
classes.
First some clarification on who can
add users. Normal users, VIP users, and Normal OPs (Level 3) can not add a
registered user. Cheef OPs (Level 4) can add Registered users, and Admin OPs
(Level 5) can create VIP users and Registered users. Master users (Level 10) can
NOT create another Master user, however they can create Admin OPs, Cheef OPs,
OPs, VIP users, and Registered users. All of this is summarized in this table
below:
With that out
of the way, to register a user use the command !regnewuser <nick>
<class>. As an example, here's how to create the user 'ARegUser' as a
normal registered user:
!regnewuser ARegUser
1
NOTE: The user will need to use the +passwd command to
register a password! They will be kicked from the hub if they don't change the
password in 5 minutes!
TIP: If you have some users that can't
figure out how to change their password you can do it for them by using the
command !regpass <nick> <password>.
Only Admin OPs (Class 5) are
allowed to remove registered users. Removing a registered user in done using the
!regdelete <nick> command. For example, to remove user 'BadUser'
use:
Verlihub allows you to
temporarily disable a registered nickname without permanently removing it from
the database. This is done using the !regdisable <nick> command.
!regenable <nick>. This is example of disabling user 'DisableMe'
and then enabling it right away:
Ah yes, promotions (or demotions?)
always seem to happen depending on user's behaviour. Should this ever happen,
you can simply change the user's class with the command !regclass
<nick> <newclass> command. The rules for adding new users apply
here (see here). For
example to change the user 'NewOP' to class 3 (Normal OP) use:
!regclass NewOP 3
To
temporarily OP someone, use the command !class <nick>
<newclass>. So to temporarily OP the user 'TempOP' use:
There are two ways to get
information about a user in Verlihub, both with slightly different information.
If you want to see the user's registration information, use !reginfo
<nick> and it will show you the information related to the user's
registration. For example, to see information on user 'Someuser':
!reginfo Someuser
The other
information will show simply the IP address, and the Hostname (if dns_lookup = 1
in the configuration). This command is simply !getinfo <nick>. So,
to get information on 'Someuser' again, use:
!getinfo Someuser
If you want to
get a list of nicknames by providing the IP address, use the command !whoip
<IP address>. There are also two other ways to get information by IP:
!whorange <lower IP address>..<upper IP address> (shows
nicknames for a range of addresses)
!whorange <ip address>/<left mask bits> (shows
nicknames by subnet)
If you want to protect a
registered user from accidental kicks, you can do this with the command
!regprotect <nick> <protect_class>. What this does is allow
you to grant protection from being kicked from certain classes of users. For
example, to protect 'VIPUser' from normal OPs (Class 3) use this command:
!regprotect VIPUser 3
and this will
prevent user from being kicked by any Class 3 user.
Once a user has registered a password once,
he/she will need to inform the OP if for whatever reason they want to change it.
The user will not be allowed to change the password without an OP knowing. To
allow the user to set the password use the command !regpass <nick>.
So, to allow user 'NeedPWChanged' to have their password changed:
!regpass NeedPWChanged
After
this has been done, the user will be prompted to change their password. They
will be kicked from the hub if they don't change the password in 5 minutes.
TIP: If you have some users that can't figure out how to change
their password you can do it for them by using the command !regpass
<nick> <password>.
You can also "mute" a given user temporarily
from chatting. Using command !gag <nick> [<time>] will keep
the user quiet for the time specified (the default is 2 days) or !ungag
<nick> is used. For example to mute user 'Annoying':
You can prevent
users from searching the hub if they are abusing it. Using command !nosearch
<nick> [<time>] will prevent the user from searching for the
time specified (default is 2 days) or !unnosearch <nick> is used. For
example to prevent user 'Annoying' from searching:
You can
prevent users from messaging others if they are abusing it. Using command
!nopm <nick> [<time>] will prevent the user from sending PMs
for the time specified (default is 2 days) or !unnopm <nick> is used. For
example to prevent user 'Annoying' from sending messages:
You can prevent a
user from connecting to others in your hub. Using command !noctm <nick>
[<time>] will not allow the nickname specified to connect to anyone in
the hub for the time specified (default is 2 days). For example to prevent user
'Annoying' from connecting to anyone:
Verlihub
allows you to manipulate the registered users table directly, using the
!regset command. The format for this command is:
!regset <nick> <variable<
<value>
Some of this information is displayed to the user
when the login or use the +myinfo command. Here are the items you can
change in the registered users table:
Kicking users temporarily removes them from the
channel. They will not be able to rejoin immediately, depending on the settings
of tban_kick in the Hub settings. (The default is 5 minutes.) Kicking
someone is done using the !kick <nick> <reason> command. You
have to specify a reason to kick the user from the hub. For example to kick
'BadUser' because he isn't sharing enough use:
!kick BadUser You are not sharing
enough.
If you don't want a public kick message to show in the
chat window, use !hidekick. Alternatively, set the configuration variable
hide_all_kicks to 1 to hide all kick message.
If you want to ban
the IP of a user you just kicked and can only remember the nickname, use
!banip this nick <nick> <reason>.
If you want to kick and ban a user with
one command, simply add '_BAN_' somewhere in the kick reason. For example, to
kick and ban 'BadUser' for not sharing enough:
!kick BadUser You are not sharing enough.
_BAN_
Also, you can temporarily ban a user by appending the time
unit after _BAN_ (for example, a 2 day ban you would use _BAN_2d). See Temporarily
banning a user for more information. This method bans both IP address
and nickname.
There are various ways to ban users fromt the hub.
They are outlined below. The best way to ban is during a kick. See Banning
during a kick for information.
If you need to, you can temporarily
ban a user. First of all, you will need to know the time units that are
available to you. They are illustrated in this table:
Time Unit
Abbreviation
Second
s
Minute
m
Hour
h
Day
d
Week
w
Month
M
Year
y
With that out of the way, just
append the time unit after any of the ban commands, with an underscore
seperating them. For example, to temporarily ban someone for 2 weeks, use:
!ban_2w BadPerson You have been temporarily
banned.
There are two commands to ban an IP address.
The first is !ban <ip> <reason>, and the second is !banip
<ip> <reason>. These commands are the same, it does not matter
which one you use.
There are two ways to ban a
range of addresses. The first way is simply to specify a range of IP addresses
to ban using !banrange <ipmin>..<ipmax>
<reason>.
The second way is to ban by subnet. To do this,
specify an IP and the subnet mask to ban, using the command !banrange
<ip>/<left_mask_bits> <reason>
If you want to get information
about a ban, there is the !infoban <nick_or_ip_or_whatever>
command. This method will try to list all possible matches for what is
entered.
If you want to specify a specific type of ban use these three
commands:
You have to provide a reason for the
unban. Even a dot (".") is allowed for the reason. The unbans are stored in
database, and the Master user can view them.
This is a list of the
various unban commands:
Unban Command
Explanation
!unban <ip_or_nick> <unban_reason>
Standard method for removing bans.
!unbanip <ip> <unban_reason>
Will remove only existing IP bans.
!unbannick <nick> <unban_reason>
Removes nickname bans.
!unbanhost2 <hostname> <unban_reason>
Removes a second-level hostname ban.
!unbanhost3 <hostname> <unban_reason>
Removes a third-level hostname ban.
!unbanhostr1 <hostname> <unban_reason>
Removes the leftmost part of a hostname ban.
!unbanemail <email> <unban_reason>
Removes an email ban.
!unbanprefix <prefix> <unban_reason>
Removes a nickname prefix ban.
!unbanshare <exact_share_in_bytes>
<unban_reason>
Removes a share size ban.
!unbanrange <low IP value>..<high IP value>
<unban_reason>
Verlihub provides three
methods for sending messages to multiple users: a simple broadcast to everyone,
a message to OPs only, and a message to all registered users.
If you ever need to send a
message to all users connected to your hub, use the !broadcast
<message> command. For example, to send a message to everyone that the
hub is going down for maintenance:
!broadcast This hub is going down for
maintenance and will be back in 2 minutes.
There are two ways to send a
message to OPs only. First of all, if there is an OPChat bot in your hub, simply
send it a message and it will relay that message to all of the other
OPs.
Secondly, use the !ops <message> command. For example:
If you want to send
a message to your registered users, use the !regs <message>
command. For example, to tell the registered users they need to change their
password:
!regs You need to reset your password. PM an OP
for more details.
Verlihub supports the use of plugins. The actual plugin
development is beyond the scope of this guide. If you are wondering how to
compile a plugin, refer to the documentation that came with the plugin. The
commands are listed here in case you decide to install one. If you upgrade
Verlihub, IT IS VITAL you recompile ALL of the plugins you have loaded!
There is a plugin manager available
for Verlihub. It is available as a plugin (ironically) and allows you to list
available plugins and turn them on and off. This is the preferred way to
manipulate the plugins.
The Plugin Manager should have been compiled with
Verlihub when you installed it; it is just not loaded automatically. The plugins
are by default installed into /usr/local/lib. To load the Plugin Manager
manually use this command:
!plugin libplug_pi.so
This will
load it once only; when you restart you will need to load it again.
Alternatively, to load the plugin manager when Verlihub starts, create a symlink
to your configuration directory (in this guide /etc/verlihub by issuing
the following commands:
The Plugin Manager commands have been
put in this table for quick reference:
Command
Parameters
Description
!lstplug
List the registered plugins
!addplug
<nick[8]> [-p <"path"> [-d "desc"] -a <autoload
(0/1)>
Registers a new plugin. nick is a short plugin nickname (8
characters); path is a relative or absolute path to the plugin's
binary; desc is an optional description; autoload set to 1
to have it start when verlihub loads.
There are various plugins available for
Verlihub; however, it is better to check the WiKi
as that document will always be more up to date. Also, the Plugin Manager may
list the available plugins once it is loaded. A short list is provided here
(remember, check the WiKi
for more current plugins!):
The Plugin Manager
Plugin Name
Description
plugman
This is the plugin manager for Verlihub, and is part of the verlihub
download tarball.
Scripting Languages
Plugin Name
Description
lua
This allows you to use simple scripts written with LUA.
perl
This allows you to use simple scripts written in Perl.
Developer Tools
Plugin Name
Description
PluginScriptInterface
This is a special interface with better support of scripting
languages.
Chat and Flood
control
Plugin Name
Description
forbid
This plugin allows you to filter main chat and private messages for
forbidden words.
replacer
This plugin replaces given patterns in text. For example if someone
types Windows in the main chat, you can have this plugin change it to
Winblows.
funny
This one is amusing, it mixes up the chat messages. Install this one
and don't tell your hub users. ;)
floodprot
This plugin offers more control from users flooding the hub.
diakritika
This plugin replaces some letters with other letters (to remove
diatrics for example, or just to simply make all of the chat messages
lowercase. This was included in the tarball of verlihub.
Miscellaneous
Plugin Name
Description
stats
This periodically saves statistics in the database (i.e. users, share,
upload, searching, etc...)
messanger
This plugin is used to send messages to offline users.
gagrange
This plugin is used to disable chat for all non registered users in a
given IP range.
iplog
This logs IP addresses as users join and leave the hub.
chatroom
This will set up individual chatrooms for users. This would work
similarly to OPChat. This is great if you have a multiple-language
hub.
isp
This plugin allows you to check connection types, nickname prefixes,
and minimum shares, among other things...
Adds a forbidden pattern. Using the -C option, you can specify the
classes to ignore filtering. Set to 1 to ignore registered users and
up. Using the -r option, you can specify a kick reason. Using the -f
option, you can specify which chats are screened and whether or not a
message is sent to OpChat when a rule is broken. Using the table below, to
screen main chat and private messages, use -f 3.
Value
Explanation
1
Screen public chat
2
Screen private messages
4
Notify OpChat when a rule is broken
!modforbid <"pattern">
Modifies forbidden pattern. See parameters for adding.
Sends a message to nick and will be displayed next time they
log in. It is a good idea to send this to a registered nickname. Enter a
newline character between the subject and the message! Some clients
require ctrl+enter to do this!
There are two sets of commands for the
chatroom plugin; a command set to manipulate the chatrooms and a set of commands
you can use in the chatroom to invite users and such.
The commands to
manipulate the chatrooms are:
Command
Description
!lstroom
Lists all chatrooms available.
!addroom <nick> <topic>
Create a chatroom named nick and sets the topic specified. When
specifying the nickname, make sure you obey the nickname rules!
!delroom <nick>
Removes specified chat room.
The
commands to manage the users in the chatrooms are:
Command
Description
+invite <online_users_nick> <invite message>
Invites a person into the chatroom with an optional invitation
message.
+leave
Leaves chatroom; no messages from the chatroom will be received.
+out <nick>
Excludes a user from the chatroom. This is useful if you have users in
the chatroom that normally do not have the rights to access the
room.
Most, if not all of the plugins are currently in
CVS, which requires CVS software installed. Google around to find the
appropriate cvs package for your distribution.
Gentoo users can
use the following command:
emerge cvs
After this is
complete, browse the
Verlihub CVS repository for plugins available to download. NOTE: Not
all of the folders are plugins!!
To retrieve a plugin, use the following
command:
cd ~ cvs
-d:pserver:anonymous@cvs.sf.net:/cvsroot/verlihub login <hit enter
when asked for password> cvs
-d:pserver:anonymous@cvs.sf.net:/cvsroot/verlihub co
<plugin_name>
After getting the source for the plugins,
you need to build them using these commands:
cd
~/<plugin_name> ./configure make make
install
Once the plugin is built, check the location of the
modules (default: /usr/local/lib) to make sure they exist there. After
this is done, use the Verlihub Plugin Manager to register them (if needed - do a
!lstplug first), then you can turn them on and off. If they still do not
load, remove them with the Plugin Manager and re-add them (see here
for more details on the Plugin Manager.)
Sends a chat message, similar to if you typed it in the main chat
window.
5
!protoall_redir
unknown
Forces hub redirection.
5
!protoall_any
unknown
You can try anything here, the pipe is added to the end
automatically.
5
!protoactive_*
unknown
Sends the proto command to active users. Commands are similar to the
!protoany commands above; for example, !protouser_hubname.
5
!protohello_*
unknown
Sends the proto command to users that don't support the NoHello
feature. Commands are similar to the !protoany commands above; for
example, !protouser_hubname.
5
!protouser_*
unknown
Sends the proto command to users. Commands are similar to the
!protoany commands above; for example, !protouser_hubname.
Cheef User Commands (Level
4)
Level
Command
Aliases
Parameters
Description
4
!broadcast
!bc
<msg>
Sends msg to all users.
4
!regnewuser
!rn
<username> [class]
Registers new username. If you do not specify class, the
user is registered with a class of 1. You can not register users with a
class higher than your class - 2
4
!regpasswd
<nick>
Allows registered nick to change his password (he has to use
command +passwd <pass>).
4
!regdisable
<nick>
Disable a user's registration, but he can be re-enabled later. You
should use this if you only want to punish a user for example.
4
!regenable
<nick>
Enable a user's registration that was previously disabled with
!regdisable.
4
!regdelete
<nick>
Destroys a registered user by removing him from the database. If you
later change your mind, you must register the user all over again. You
should use this if you want to permanently remove a user.
4
!regclass
<nick> <class>
Changes a previously registered user's class to <class>. You
cannot change a user to a class higher than yours - 2.
4
!class
<nick> <class>
Temporarily changes nick's class to class. Stays
effective until user leaves and rejoins hub.
4
!regprotect
<nick> <class>
Protects a registered user from being kicked/banned etc. by a user of
a class lower than class. The user does not have to be in the
hub.
4
!protect
<nick> <class>
Protects an unregistered user from being kicked/banned etc. by a user
of a class lower than class. The user must be currently connected
to the hub for this to take effect.
4
!drop
<nick>
Disconnects user from hub without giving him a reason and without
banning him.
Op User Commands (Level
3)
Level
Command
Aliases
Parameters
Description
3
!hubinfo
Shows information about the hub.
3
!kick
<nick>nbsp;<reason>
Kick the user from command line and give a ban equal to the hub's
specified tempban time. If you right-click in your client and kick, it
does the same thing. If you include _ban_time in the reason, then the ban
is extended to the time you specify. Valid entries for time are Ns, Nm,
Nh, Nd, NM, Nw, Ny. The IP and the nick are both banned. This is the most
reliable and easiest way to ban.
3
!hidekick
<nick>nbsp;<reason>
Kicks user nick with reason. It does this quietly; it
doesn't announce it to the hub users.
3
!ban
<ip> <reason>
Bans ip from hub with reason.
3
!banip
<ip> <reason>
Bans ip from hub with reason.
3
!bannick
<nick> <reason>
Bans nick from hub with reason.
3
!banhost1
<host> <reason>
Bans first level of host from hub with reason. This usually
isn't too useful; for example in my.web.host.com it would ban
'.com'.
3
!banhost2
<host> <reason>
Bans second level of host from hub with reason. For example in
my.web.host.com it would ban 'host.com'.
3
!banhost3
<host> <reason>
Bans second level of host from hub with reason. For example in
my.web.host.com it would ban 'web.host.com'.
Bans range of IPs. Examples: !banrange 1.1.1.1...1.1.1.4 or
!banrange 1.1.1.1/24.
3
!ban_time
<ip> <reason>
This bans the IP for the specified time. If a nick with the <ip>
has been previously kicked, then that nick is banned too and any user with
the <ip> is dropped. If no nick with the <ip> was previously
kicked then no nick is banned and no user is dropped. If a nick with the
<ip> is later kicked, then that nick is banned for the same time as
the <ip>. Valid entries for time are Ns, Nm, Nh, Nd, NM, Nw, Ny. So
'!ban_1M <ip> <reason>' would ban an ip for one month with the
reason. The best use for !bannick is if you want to prevent a certain ip
(no matter the nick) from entering the hub. If you wish to ban a user who
is connected to the hub you should use !kick instead.
3
!bannick_time
<nick> <reason>
This bans only the nick of the user for the specified time. Valid
entries for time are Ns, Nm, Nh, Nd, Nw, NM, Ny. So '!bannick_10m nick
reason' would ban a nick for 10 minutes with the reason. The best use for
!bannick is if you want to prevent a certain nick (no matter the ip) from
entering the hub. If you wish to ban a user who is connected to the hub
you should use !kick instead.
3
!unban
<ip> <reason>
Unban IP and nick for the user. If a nick is associated with an ip or
an ip is associated with a nick, then both are removed. This also removes
bans that were issued with !kick.
3
!unbannick
<nick> <reason>
Removes a nickname ban.
3
!unbanhost1
<host> <reason>
Removes a first level host ban.
3
!unbanhost2
<host> <reason>
Removes a 2nd level host ban.
3
!unbanhost3
<host> <reason>
Removes a 3rd level host ban.
3
!unbanhostr1
<host> <reason>
Removes a leftmost host ban.
3
!unbanprefix
<prefix> <reason>
Removes a nickname prefix ban.
3
!unbanshare
<share> <reason>
Removes a share ban.
3
!unbanemail
<email> <reason>
Removes an email ban.
3
!unbanrange
<any_ip_from_range> <reason>
Specify and IP in the range that is banned and the entire IP block
will be unbanned.
3
!hideme
<class>
Set this and users below class won't be able to see you.
3
!ccbroadcast
!ccbc
<msg>
If you have country codes in your nickname, this will send a message
to only those with specified country codes. For example: !ccbc :GB:US:
Hi those from Great Britian and the US!..
3
!flood
<nick>
Floods user off hub. Beware!
3
!infobanip
<ip>
Shows ban information for ip.
3
!infobannick
<nick>
Shows ban information for nick.
3
!infobanrange
<any_ip_from_range>
Specify an IP from the IP range that is banned, and it will show the
ip range that is banned.
3
!infoban
_ipban_
Shows current IP bans.
3
!infoban
_nickban_
Shows current nickname bans.
3
!infoban
_banrange_
Shows current IP Range bans.
3
!lsban
100
Shows the 100 most recent bans.
3
!getip
<nick>
Shows ip address for nick.
3
!gethost
<nick>
Shows hostname for nick. This requires dns_lookup in verlihub
configuration to be set to 1.
3
!getinfo
<nick>
Shows information about nick.
3
!whoip
<ip>
Attempts to find nickname for ip.
3
!whorange
<ipmin>...<ipmax> <ip>/<bitmask>
Attempts to show nicknames for the range of IP addresses. Examples:
!whorange 1.1.1.1...1.1.1.4 and !whorange 1.1.1.1/24
3
!regs
<msg>
Sends msg to all registered users.
3
!nosearch
<nick>
Prevents nick from searching the hub.
3
!unnosearch
<nick>
Allows nick to search, if previously prevented with
!nosearch.
3
!gag
<nick> [time]
Prevents the user from using the chat function until he restarts his
session or until [time] has expired. If you leave the [time] blank, then
the time is set for one week. Valid entries for [time] are Ns, Nm, Nh, Nd,
NM, Nw, Ny. So '!gag 1h would stop the user from chatting for 1 hour
or until he reconnected.
3
!nopm
<nick>
Prevents nick from PM'ing others in the hub.
3
!noctm
<nick>
Prevents nick from connecting to others.
3
!unnoctm
<nick>
Allows nick to connect to others, when prevented with
!noctm.
3
!unnopm
<nick>
Allows nick to PM other users of hub, if they were denied with
!nopm.
3
!ungag
<nick>
Allows nick to chat in main channel, if they were silenced with
!gag.
VIP User Commands (Level
2)
Level
Command
Aliases
Parameters
Description
No commands
Registered User Commands
(Level 1)
Level
Command
Aliases
Parameters
Description
No commands
Normal User Commands (Level
0)
Level
Command
Aliases
Parameters
Description
0
+rules
Shows hub rules.
0
+faq
Shows frequently asked questions.
0
+motd
Shows message of the day.
0
+help
Shows help.
0
+report
<msg>
Sends a message to an OP, through OPChat.
0
+regme
<msg>
Sends a message to an OP, through OPChat.
0
+myip
Shows user their IP address.
0
+myinfo
Shows user information about themself.
0
+me
<msg>
Replaces '+me' with their nick and sends message to
channel.