FAQ

How can I install Verlihub with GCC 3.x

First install old version of gcc then go to verlihub directory and type:

CXX=g++-3.x ./configure

where g++-3.x is your GCC version; for example CXX=g++-3.3 for GCC 3.3

then compile it with usual commands:

make
sudo make install

The system will compile verlihub with gcc 3.x

How can I get over 1010 users?

Let's say you have 10mbit line and so limit 4096 will be ok. If you have 100Mbit line, you would need rather 10240 ;o) Allow users to increase their file descriptor limits by changing the following configuration 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

Increase the system-wide file descriptor limit by adding the following lines to the /etc/rc.d/rc.local startup script:

  echo 16256 > /proc/sys/fs/file-max echo 24576 > /proc/sys/fs/inode-max

Also, run these commands at the command line, and you can add them to your .bash_profile You will then need to tell the system to use the new limits.

  ulimit -n unlimited (bash)

or

  unlimit descriptors (csh, tcsh).

Verify this has raised the limit by checking the output of ulimit -a (bash) or limit (csh, tcsh) Then you can run the hub.

I can't run Verlihub after installing it; why?

If you can't start your Verlihub after installing it, don't start verlihub as a demon so you will be able to see the output; type:

 verlihub

or use a debbuger like gdm

gdb verlihub
(gdb) run

Mysql data wrong

If you get this error:

 cMySQL - Connection to mysql server failed: Access denied for user: '@localhost' to database 'verlihub'  Allocated objects: 1  Caught error:Mysql connection error.

Solution: your database username or password are wrong, so you need to edit dbconfig file locate in your Verlihub config folder or run vh_install again (you use the same database, so you will not lose your data!) edit dbconfig file dbconfig file is locate in your Verlihub config folder like /etc/verlihub or /home/mynick/.verlihub. This file have three variables:

db_host = localhost
db_data = verlihub

db_user = nick

db_pass = password

Just replace nick with your Mysql username and password with your Mysql password, then it should work

Error after Mysql update

If you get this error:

/usr/local/bin/verlihub: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory

If you update your Mysql, you need to recompile Verlihub again and so the problem should be solved.

How do I install MySQL server on FreeBSD?

MySQL is also included in the FreeBSD ports tree.

cd /usr/pports/databases/mysql50-server
make install clean

When this starts, some options will be shown on-screen. If you want to use any of these hit cntrl-C to stop the build and pick one of them. Also, you can install a different version of MySQL server if you want. I use 4.0 extensively and it works perfectly.

How to install and setup Pisg

If you want to set up a nice main chat statistics using Pisg to entertain your users, here's the way to do it.

  • First get Pisg. No need to install it, just unpack it somewhere, but be sure you have working Perl.
  • Use main chat logging lua script:
-- mclogger.lua 0.2 - written by TyPhOoN

logfile= "/root/.verlihub/mainchat.log"
lf= "n"

function Main()
-- handle =  io.open(logfile,"a+") -- to append (notinhere)
handle =  io.open(logfile,"w+")
io.output(handle)
end

function formatTF(field)
if (tonumber(field)<10 and string.len(field)== 1) then -- Fixed: string.len(field)= = 2) (notinhere)
field =  "0"..field
end
return field
end

function VH_OnParsedMsgChat(nick, data)
if (handle) then
date =  os.date ("*t") io.write("[["..date.year.."-"..formatTF(date.month).."-"..formatTF(date.day).."|"..formatTF(date.hour)..":"..formatTF(date.min).."]] <"..nick.."> "..data..lf)
io.flush()
end
return 1
end

That should give you /etc/verlihub/mainchat.log file which we'll use to generate statistics.

  • Setup pisg.cfg. This is mine working cfg, and it could be your starting point:
<channel="Main Chat">
Logfile = "/var/www/htdocs/chat/chat.log"
Format = "DCpp"
Maintainer = "Kotnik"
OutputFile = "/var/www/htdocs/chat/index.html"
Network = "NS Hub"
Lang = "YU"
</channel>

-- useri:
<user nick="kotnik" pic="kotnik.jpg" sex="m">
<user nick="b0jaN" pic="b0jan.gif" sex="m">
<user nick="ferfuzna" pic="ferfuzna.png" sex="m">
<user nick="MeahevServi" pic="meahev.png" sex="m">
<user nick="Mister_Stoka" pic="mrstoka.gif" sex="m">
<user nick="MaDrE_DI_FaKrE" alias="MaDrE_DI_FaKrE@HOME" sex="m">
<user nick="mix_NS" alias="[[D]]mix_NS" sex="m">
<user nick="GirlScout" sex="f">
<user nick="Und3i2c0v3i2" sex="f">
<user nick="NS_Girl" sex="f">
<user nick="Cruela_de_Vill" sex="f">
<user nick="gaga" sex="f" alias="[[d]]gaga">
<user nick="BondNS" sex="f">
<user nick="Masai_Mara" sex="f">
<user nick="daameer" alias="becheery SBB">

--botovi:
<user nick="BigBrother" ignore="y">
<user nick="NSHub" ignore="y">
<user nick="{MENI}" ignore="y">
<user nick="=ROULETTE=" ignore="y">
  • Use this quick&dirt script to generate statistics:
   cp /etc/verlihub/mainchat.log /var/www/htdocs/chat sed 's/~//' /var/www/htdocs/chat/mainchat.log > /var/www/htdocs/chat/chat.log /var/www/htdocs/chat/pisg
  • Setup a nice cronjob to do it all for you, and you're done

This page came from forums.verlihub-project.org. Thk to kotnik

How can I execute a command?

The command execution can become a dangerous thing, specially if you run hub as root. You must take precautions before you start using it. And think 10 times before you do something. It can be relatively safe if;

  • all users who can add/modify triggers are trusted (this condition is important)
  • hub runs as non-root user (it's safer)
  • you don't allow variable substitution in the trigger command
  • if you allow it, avoid using things that user can trigger it change (NICK, PAR1, and maybe more)

To enable command execution triggers you must first of all place following line in dbconfig file. (default is 0)

 allow_exec = 1

You can also place following line to disable creating / modifying exec triggers by hub commands (default is 1).

 allow_exec_mod = 0

Then create and chmod following files and directories in Verlihub config directory;

 $ cd /home/user/.verlihub
 $ mkdir tmp
 $ cd tmp
 $ > trigger.tmp
 $ chmod 777 trigger.tmp (if youre running Verlihub with another user)

Creating the trigger itself;

 !addtrigger !top -c 5 -f 1 -d "top -n 1"

Thanks to Vokx for explanation of how it works.

Startup script

To get the Startup script go here

Ho can I use ebuild for Gentoo ?

To get help with ebuild go here