BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Glarawyn on January 08, 2007, 06:46:54 am

Title: Ventrilo Display
Post by: Glarawyn on January 08, 2007, 06:46:54 am
Here it is, a module to display the status of your Ventrilo server.

Pre-Installation:
This module needs The ventrilo_status program to function. The ventrilo_status program for Windows, Linux i386, Solaris SPARC, Solarias x86, FreeBSD x86, NetBSD x86, and Mac OSX PowerPC can be found in the server version of Ventrilo. Download from Ventrilo.com (http://www.ventrilo.com/download.php). This module will obviously only work on the platforms supported by the Ventrilo binaries.

Disclaimer: Ventrilo's license does not allow unauthorized redistribution of their binaries, as such they are not included with this module. Also, I do not want the responsibility of ensuring that a binary executable is free from viruses and other security risks. You should only download ventrilo_status from Ventrilo.com

Pre-Installation (Cont.):
Download the Ventrilo server and locate the ventrilo_status (or ventrilo_status.exe for windows users) and place it somewhere on your harddrive. The default location for this module is in your BeBot's extras directory. 

This module also uses the Module Settings (http://bebot.link/index.php/topic,607.0.html) module. Install the Module Settings modules before installing the Ventrilo module.

Required Configuration
Before you can use the Ventrilo module, you must configure it.

/tell yourbot !set Ventrilo server <hostname or ip address> (Required!)
/tell yourbot !set Ventrilo port <port number> (Required!)

Optional Configuration
/tell yourbot !set Ventrilo password <password> (Only required if your Ventrilo server requires a password to obtain status via ventrilo_status. If your server does not require this, don't set it!!!)

/tell yourbot !set Ventrilo prgpath <path to ventrilo_status> (Only required if you put ventrilo_status somewhere besides your BeBot's extras directory. Default: ./extras/. Example: c:\ventrilo\, /usr/local/bin/)

/tell yourbot !set Ventrilo showclient <On|Off> (Enables and disables showing client information such as ping and time connected)
/tell yourbot !set Ventrilo showserver <On|Off> (Enables and disables showing server information)

Usage
Use the !vent command in tell, private group, or guild chat to display the status. Ventrilo admins will be displayed in red. Protected rooms will be highlighted in orange.

Current Version:: 1.0.6 (2007-01-17)

Download: Ventrilo-1.0.6.zip (http://zibby.isa-geek.net/bebot/Ventrilo/Ventrilo-1.0.6.zip)

Enjoy!

Changelog:
1.0.0: Initial Release
1.0.1: SVN and Release were not in sync. Whoops.
1.0.5: Fixed for Windows bot hosts and updated to use v2.0.3 of Module Settings
1.0.6: Fixed error messages displayed on bot console when no clients are connected to the Ventrilo server.
Title: Re: Ventrilo Display
Post by: Glarawyn on January 11, 2007, 11:49:57 pm
One more note. The PHP function shell_exec() requires that PHP's safe mode be disabled. On my Linux box (Ubuntu 6.06.1 LTS (Dapper Drake) the php4-cli packages was configured with safe mode off by default, so I didn't see any problems with using this method.

If your distributor or host has chosen to enable safe mode globally, you should not change the global configuration file. Instead create a php.ini in your bot's directory and run your bot with the command:

php -c . start.php
Title: Re: Ventrilo Display
Post by: Dabaron on January 15, 2007, 03:17:34 am
Not sure what I'm doing wrong but I get this error after I use the !vent command:

'.' is not recognized as an internal or external command,
operable program or batch file.

Warning: Invalid argument supplied for foreach() in C:\BeBot\Beerraid\modules\Ventrilo.php on line 227

Warning: Invalid argument supplied for foreach() in C:\BeBot\Beerraid\modules\Ventrilo.php on line 172


It lets me set everything and it all shows up in the settings but this is what I get when doing the command to check the status.  Any ideas?
Title: Re: Ventrilo Display
Post by: Xenixa on January 15, 2007, 11:55:46 am
Well at a cursory glance at the code for showing Vent server stats it appears there is a typo. I don't have a Vent server to test on but try this:
Line 136, remove the Period or Change
Code: [Select]
$inside .= $this -> channel_display( ... etc. etc.
to read like this
Code: [Select]
$inside = $this -> channel_display( ... etc. etc.

Title: Re: Ventrilo Display
Post by: Glarawyn on January 15, 2007, 11:48:56 pm
Xenixa's typo is not a typo. :)

I looked, and what I have released doesn't seem to match up with what I have running on my bot, so I might have exported the wrong revision out of my SVN repository for release.

Updated to v 1.0.1, try downloading the new version.

If you continue having problems, reread the first post again and make sure you've followed all the instructions. Installing this module is not as simple as dumping the php files into you bot and restarting.

If you continue to have problems, please post here. I haven't tested this module on a Windows machine so I don't know if it will work, though I don't see any reason why it shouldn't.
Title: Re: Ventrilo Display
Post by: Xenixa on January 16, 2007, 06:39:49 am
I thought it a typo as the .= means its a concat of a string into a var and assumed that was the first instance of the $inside var.

That and I was half asleep when looking over the code. :p
Title: Re: Ventrilo Display
Post by: Dabaron on January 16, 2007, 07:57:11 am
Ok, changed to the new module you put in here, I am starting my bot via php -c . start.php, I do have the ventrilo_status.exe in the /extras directory (even did the prgpath command with the exact path even though its in the bots /extras directory just to make 100% sure that wasn't the issue).

Current error:

'.' is not recognized as an internal or external command,
operable program or batch file.

Warning: Invalid argument supplied for foreach() in C:\BeBot\Beerraid\modules\Ventrilo.php on line 209

Warning: Invalid argument supplied for foreach() in C:\BeBot\Beerraid\modules\Ventrilo.php on line 154
Title: Re: Ventrilo Display
Post by: Glarawyn on January 16, 2007, 06:16:26 pm
The error is that the module is not finding the ventrilo status program.

Is the file named ventrilo_status.exe? I didn't actually look at the windows Ventrilo stuff, I just assumed it would be the same name with a .exe. :)

What version of Windows are you running? It could be that the code that is detecting Windows or not windows isn't detecting Windows, thus the Ventrilo executable is being set to ventrilo_status not ventrilo_status.exe (this happens automatically.)

I'll see if I can duplicate the issue on my Windows machine.
Title: Re: Ventrilo Display
Post by: Glarawyn on January 16, 2007, 08:41:50 pm
I've fixed the issues on Windows so this will work on both Windows and Unix machines now. You may want to delete your existing Ventrilo settings as I've added click options for common locations for the ventrilo_status program. Slashes (/) for Unix machines, backslashes (\) for Windows...

Also, you'll want to grab the latest Module Settings (http://bebot.link/index.php/topic,607.0.html) (2.0.3 or higher) for BeBot 0.2.
Title: Re: Ventrilo Display
Post by: Dabaron on January 17, 2007, 08:25:45 am
Deleted all old module settings, put in new module for ventrilo, tried every setting you had in there for program location, still same thing.  Errors on lines 227 and 172 in the for each loops.

Anything else I could be doing wrong here?
Title: Re: Ventrilo Display
Post by: Glarawyn on January 17, 2007, 03:52:30 pm
If nobody is online on your vent server you'll get those errors. If the module is showing your vent servers channels, server info, etc. properly than you're good to go.

I made another minor update that properly deal with things if no clients are connected to the Ventrilo server. New version is 1.0.6. :)
Title: Re: Ventrilo Display
Post by: Dabaron on January 17, 2007, 09:12:27 pm
Ok, was getting closer but was still getting error '.\extras\'ventrilo_status.exe' is not recognized as an internal or external command.  I'm assuming its due to the extra ' between \ and ventrilo but can't see in code whats causing it.  To test that theory I changed line 294 from:
Code: [Select]
$command = "\"".$this -> bot -> settings['Ventrilo']['prgpath'].$ventrilo_status."\" -c2 -t".$server;
to

Code: [Select]
$command = "\".extras\ventrilo_status.exe\" "." -c2 -t".$server;
and it works fine.
Title: Re: Ventrilo Display
Post by: Glarawyn on January 17, 2007, 09:18:40 pm
I don't see where you're getting the extra ' either. It works fine for me when I tried it on Windows and Linux, so maybe you added it when you set your path? ' is right next to return on my keyboard.  ;D

I know the code gets somewhat confusing around that area with escaping the quotes and what not...

Glad you got it working at least.
Title: Re: Ventrilo Display
Post by: Malosar on January 17, 2007, 10:33:42 pm
Check your db entry for that setting and see if there is an escaped ' in there?
Title: Re: Ventrilo Display
Post by: Dabaron on January 18, 2007, 08:05:31 am
I don't see where you're getting the extra ' either. It works fine for me when I tried it on Windows and Linux, so maybe you added it when you set your path? ' is right next to return on my keyboard.  ;D

I know the code gets somewhat confusing around that area with escaping the quotes and what not...

Glad you got it working at least.

Clicked your button on the blob so doubt I added it   :P

There was a ' after it in the database though (and is listed that way in the options you coded into the sql) but I manually removed it and still got the same thing when I ran it.  No clue whats causing it but hard coding it will work for now.

Thanks for the awesome module Glara!!!!
Title: Re: Ventrilo Display
Post by: tonyuh on April 24, 2007, 12:36:12 am
My org just switched to vent recently and I can't get this module working. I don't get any errors, i set everything using the setting module and the settings come up in the database fine. But when i try !vent, theres only the template on the return window. for example i get:

Channel Info:
 + Lobby

Ventrio Server Status

Name:
Phonetic:
Comment:
.... and so on... nothing actually comes up. I tried to execute the ventrilo_status.exe in cmd and it works fine, i  get result and everything.

I'm using windows and bebot 0.2.10 and php 5.1.5

Thanks,
Tony
Title: Re: Ventrilo Display
Post by: Glarawyn on April 24, 2007, 04:35:02 pm
Where did you put the ventrillo_status.exe program? I don't test on a Windows machine so it's possible that the default paths provided in the settings interface don't work. :)
Title: Re: Ventrilo Display
Post by: tonyuh on April 24, 2007, 06:11:11 pm
my exe is in .\extras\ i even tried setting prgpath as the full path including the ' ' at the start and end with no luck. also I notice that if i click the .\extras\ near Change to: in the Settings module blob, it says prgpath: .\extras\' with the ' at the end but not at the start. also i have file extension turned on in my windows so my program name is ventrio_status.exe but i'm not sure if thats the problem since windows accept name without extension too.
Title: Re: Ventrilo Display
Post by: Glarawyn on April 24, 2007, 07:19:17 pm
Looks like you're having the same issue as Dabaron. I haven't been able to reproduce that yet.

What bot version?
What version of MySQL?
What version of PHP?
What settings did you set?
Title: Re: Ventrilo Display
Post by: tonyuh on April 24, 2007, 07:31:38 pm
My bot version is 0.2.10
My SQL version is 5.0.27
PHP version is 5.1.5
And the settings are:-
Showserver: On
Showclient: On
Server: power.typefrag.com
Port: 6251
prgpath: '.\extras\'
Title: Re: Ventrilo Display
Post by: Nytridr on July 31, 2007, 08:09:39 am
anyway you can update this to work with the latest svn?
Title: Re: Ventrilo Display
Post by: Glarawyn on July 31, 2007, 06:43:31 pm
Nope, can't do it.  :P

(Click Here for 0.4 version. (http://bebot.link/index.php/topic,884.0.html))
Title: Re: Ventrilo Display
Post by: Nytridr on July 31, 2007, 09:15:45 pm
ROFL!!  damn almost forgot to click on that link... Your awesome glarawyn, thanks again.  I know we all appreciate it.
Title: Re: Ventrilo Display
Post by: Nytridr on July 31, 2007, 09:43:47 pm
BTW, using your clickies in the settings it puts in .\extra\'  in the settings part.. manually deleting the ' from the DB everything works correctly.

Also another thing.  not sure if it is the older vent server version I am using, but the output of the names are not showing up..

Code: [Select]
Channel Info:

+ Lobby
+ AOFBOT
+ AFK
    + R.AFK
+ Teams
+ Private
    -
    -
    + R V AFK
    + R R V AFK
    + R.R.B.AFK

where the -'s are with nothing behind them are actually names and they are actually in the lobby.  I even tried to change to differnt channels and it is still the same.  I am using Version: 2.1.2 because of the unlimited users I can have.

Code: [Select]
User Info:

 [Ping: ] [Online For 0 Minutes, 0 Seconds.]
 [Ping: ] [Online For 0 Minutes, 0 Seconds.]
Title: Re: Ventrilo Display
Post by: Diablo on August 10, 2007, 02:47:14 pm
I have the same issue with names not showing up properly theres spot for them but just no actual letters.
Title: Re: Ventrilo Display
Post by: Glarawyn on August 10, 2007, 06:04:51 pm
I have the same issue with names not showing up properly theres spot for them but just no actual letters.

Are you using an older version of Ventrilo or the current version (2.3.0)?
Title: Re: Ventrilo Display
Post by: Diablo on August 10, 2007, 07:05:51 pm
Using older version 2.1.2
Title: Re: Ventrilo Display
Post by: Glarawyn on August 10, 2007, 08:17:33 pm
Using older version 2.1.2

I developed the module for the current version of Ventrilo as that's what my org uses and it is what I have to test against. Have you tried using the ventrilo_status program from 2.3.0? 
Title: Re: Ventrilo Display
Post by: Diablo on August 11, 2007, 03:14:42 am
Yes tried the new status file and it still does the same. Its like its showing clients but not senging there information.
Title: Re: Ventrilo Display
Post by: shadowrik on January 02, 2010, 07:27:57 am
when i type the following commands:

/tell yourbot !set Ventrilo server <hostname or ip address> (Required!)
/tell yourbot !set Ventrilo port <port number> (Required!)

I get setting server for module Ventrilo does not exist

what am i missing?
Title: Re: Ventrilo Display
Post by: Huesos on January 31, 2011, 09:19:11 pm
anyone have a working module on this? the link isn't working anymore
Title: Re: Ventrilo Display
Post by: Glarawyn on January 31, 2011, 11:11:57 pm
I moved all my code to http://www.campalot.info, you can find the downloads there.
Title: Re: Ventrilo Display
Post by: Huesos on January 31, 2011, 11:47:15 pm
thanks
SimplePortal 2.3.7 © 2008-2024, SimplePortal