BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6.x Custom/Unofficial modules => Topic started by: sarakant on January 31, 2011, 11:32:54 pm

Title: TS3 Status Module
Post by: sarakant on January 31, 2011, 11:32:54 pm
Hi all,

this is a TS3 Status Module but for Ragebot, an older Version of Bot similar to Bebot.
Maybe someone can use this code to build a plugin for Bebot.

Title: Re: TS3 Status Module
Post by: Kentarii on February 02, 2011, 12:11:31 pm
I think this should have been posted under module requests.. thought I could download a finished module when I clicked here  :(
Title: Re: TS3 Status Module
Post by: sarakant on February 02, 2011, 05:56:00 pm
sry - it is not a finished module.
My mistake that I posted it wrong.
The code should help a guy that knows well about php and should support him, cause I think there is a lot of useful information there.

The Status module posts in guild chat when a person is entering in your ts3 server with name & ...

sry again for my misktake, maybe a moderator or admin can move the post...
Title: Re: TS3 Status Module
Post by: Kentarii on February 04, 2011, 11:35:17 am
I might pickup on this module if our guild decides to use TS3, but can't promise anything.

Anyways.. some more useful info perhaps:
http://addons.teamspeak.com/directory/tools/integration.html
Title: Re: TS3 Status Module
Post by: sarakant on February 04, 2011, 03:20:31 pm
The decision was already made at beginning of TS3.
We have been running a server since that time.

Of course this would be nice if you care for this...

I'll try to support as far as I can.
Title: Re: TS3 Status Module
Post by: Kentarii on February 04, 2011, 03:46:40 pm
Do you have ServerQuery access on your TS3 server? Seems like most commands require a ServerQuery user with permissions to run stuff.
Title: Re: TS3 Status Module
Post by: sarakant on February 04, 2011, 03:53:52 pm
I have access to it, but it is not necesary for it.
You have to whitelist the ip (where the bot is running), otherwise the ip gets banned.
Title: Re: TS3 Status Module
Post by: Kentarii on February 04, 2011, 04:22:04 pm
Well, without logging in to the ServerQuery with some user, I get these messages:
Code: [Select]
TeamSpeak3


Server Info

Host: xxx
Port: 9987
QPort: 10011
Error logging on to server, make sure password is correct!
ErrorID: 1538 | Message: invalid parameter

WhoAmI: 10
virtualserver_status: online
virtualserver_id: 1
virtualserver_unique_identifier: pOJSc1r6W1MOeP8yZwTlKbA4zvc=
virtualserver_port: 9987
client_id: 5
client_channel_id: 1
client_nickname: Unknown from x.x.x.x:45281
client_database_id: 0
client_login_name:
client_unique_identifier:
ErrorID: 2568 | Message: insufficient client permissions failed_permid=8470
ErrorID: 2568 | Message: insufficient client permissions failed_permid=8472
ErrorID: 2568 | Message: insufficient client permissions failed_permid=8474
Code: [Select]
8470 b_virtualserver_info_view Retrieve virtual server information
8472 b_virtualserver_channel_list List channels on a virtual server
8474 b_virtualserver_client_list List clients online on a virtual server
Ref: http://teamspeak-fans.de/wiki/teamspeak-3-permission-list.html

Will have to ask the TS3 admin on my server for access I guess. I used the ts3admin.class.php to connect to the TS3 server btw and not your attached plugin. I'll see if I can post a beta later on today.
Title: Re: TS3 Status Module
Post by: sarakant on February 04, 2011, 04:36:20 pm
Your admin needs only to enter the bot's IP to the ts3 server whitelist.

Then you need the ip, port, passwort (same as for users) & virtual server id

thats it
you can request data within this information

Thank God for Kentarii...
Title: Re: TS3 Status Module
Post by: Kentarii on February 04, 2011, 10:33:33 pm
Hi, just posted the module now.

Since I needed the top post to make updates etc, I created a new topic:
http://bebot.link/aoc-0-6-x-customunofficial-modules/teamspeak3-module-for-bebot/

Enjoy!!!
Title: Re: TS3 Status Module
Post by: Kentarii on February 07, 2011, 02:44:59 pm
So did you test the module sarakant since you were the one who requested it?
Title: Re: TS3 Status Module
Post by: sarakant on February 17, 2011, 10:20:33 pm
sry, I set up server new and so it needs some time.

I tried it, but get message:
No settings for module TeamSpeak3

What do I wrong?
Title: Re: TS3 Status Module
Post by: Kentarii on February 18, 2011, 11:30:32 am
Did you follow the installation/configuration instructions?

You might get a clue if you watch the log when your bot starts up.
Title: Re: TS3 Status Module
Post by: dillinger on February 18, 2011, 05:01:33 pm
Works like a charm!  ;D

Thank you!

dill
Title: Re: TS3 Status Module
Post by: Kentarii on February 18, 2011, 05:16:03 pm
Works like a charm!  ;D

Thank you!

dill
You're welcome  :)
Title: Re: TS3 Status Module
Post by: sarakant on March 02, 2011, 07:01:37 pm
this is the code of you module
the log seems okay except of this:

line&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">[</span><span style="color: #DD0000">'data'</span><span style="color: #007700">][</span><span style="color: #DD0000">'virtualserver_clientsonline'</span><span style="color: #007700">];<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$this&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">bot&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">core</span><span style="color: #007700">(</span><span style="color: #DD0000">'settings'</span><span style="color: #007700">)&nbsp;-&gt;&nbsp;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #DD0000">'TeamSpeak3'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'ShowServerInfo'</span><span style="color: #007700">))&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #

this is the code of your module. This is not normal I think....

regards
Title: Re: TS3 Status Module
Post by: Kentarii on March 02, 2011, 07:18:51 pm
How did you download the module? And did you follow the installation instructions?

Try running:
Code: [Select]
php -l TeamSpeak3.phpDo you get:
Code: [Select]
No syntax errors detected in TeamSpeak3.php
Title: Re: TS3 Status Module
Post by: sarakant on March 02, 2011, 08:48:35 pm
# php -l TeamSpeak3.php
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
No syntax errors detected in TeamSpeak3.php
Title: Re: TS3 Status Module
Post by: Kentarii on March 02, 2011, 10:18:25 pm
Did you download and unzip the teamspeak class php file?
Title: Re: TS3 Status Module
Post by: sarakant on March 02, 2011, 10:38:21 pm
yes I did this.
ts3adminclass.php directly in the extra folder, or do I have to create a subfolder? like whois-update
Title: Re: TS3 Status Module
Post by: Kentarii on March 02, 2011, 10:41:29 pm
Does the bot startup ok? Did you manage to change the settings in the module?

If you want help, you have to provide a way of reproducing the error..
Title: Re: TS3 Status Module
Post by: sarakant on March 02, 2011, 10:56:55 pm
this is what I get if I start the bot (at the end)

</code>Zornbot [MOD-CUSTOM]   [LOAD]   TeamSpeak3.php


Zornbot [LOGIN]   [STATUS]   Connecting to aoc server aoc-eu-um.live.ageofconan.com:7000
Zornbot [LOGIN]   [STATUS]   Authenticating
Sending RPCPacket:0
Received RPC Packet:0
Sending RPCPacket:1
Received RPC Packet:5
Received RPC Packet:1
Sending RPCPacket:2628963075
Received RPC Packet:1572964753
Sending RPCPacket:1783917889
Received RPC Packet:368553762
Unsupported rpcpacket type (in, 368553762)
Received RPC Packet:543911653
Unsupported rpcpacket type (in, 543911653)
Received RPC Packet:543911653
Unsupported rpcpacket type (in, 543911653)
Received RPC Packet:543911653
Unsupported rpcpacket type (in, 543911653)
Received RPC Packet:543911653
Unsupported rpcpacket type (in, 543911653)
Received RPC Packet:543911653
Unsupported rpcpacket type (in, 543911653)
Received RPC Packet:201968165
Sending RPCPacket:3755495822
Received RPC Packet:3289695727
Sending RPCPacket:4016139958
Received RPC Packet:4170821964
Received RPC Packet:1334945164
Received RPC Packet:590742969
Sending RPCPacket:1014796908
Received RPC Packet:1525492320
Received RPC Packet:598094586
Bot is now logged in.
Title: Re: TS3 Status Module
Post by: sarakant on March 02, 2011, 10:59:09 pm
I don't no If the problem of starting the bot correctly is a problem?
Do you remeber? I start it so:

/usr/bin/php -c ./  Main.php

Restart is also not possible. After restart I have to start the bot manually.
Title: Re: TS3 Status Module
Post by: Kentarii on March 03, 2011, 01:20:25 am
After 3 posts, I still don't know where and when you get the error...
Title: Re: TS3 Status Module
Post by: Getrix on March 03, 2011, 09:45:08 am
Restart is also not possible. After restart I have to start the bot manually.

Give us the last lines outputted after you perform "!restart". Does it shutdown completly?

Did you download the .phps or .zip from Kentarii's post?
If you did the .phps make sure you didnt just download it but copy pasted it into a .php file. And also make sure you didnt get wierd chars with you..
For you it would be safest to download the .zip and extract it so you can put the fil into your costumize folder to prevent any wrong chars there.

Title: Re: TS3 Status Module
Post by: sarakant on March 07, 2011, 06:11:31 pm
Hi Kentarii,

got it running. Had to do some reinstalls from php.
Now it works! Perfect work! Really!

regards
Title: Re: TS3 Status Module
Post by: Kentarii on March 07, 2011, 07:05:13 pm
Glad you got it working :)
Title: Re: TS3 Status Module
Post by: Iheaca on April 05, 2011, 09:42:07 am
Works great, thanks a lot
SimplePortal 2.3.7 © 2008-2024, SimplePortal