collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 987
  • stats Total Posts: 18350
  • stats Total Topics: 2494
  • stats Total Categories: 7
  • stats Total Boards: 33
  • stats Most Online: 1144

Author Topic: Teamspeak manager  (Read 20896 times)

0 Members and 1 Guest are viewing this topic.

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Teamspeak manager
« on: July 14, 2008, 02:39:32 pm »
Hi!

I decided to release my TS manager here. It's tested with BeBot Hyborian, but I guess it will work with AO bot too.

Along with my tsman.php comes libacts2 - The TeamSpeak 2 PHP library.

To get this running you must unzip the whole thing to ..\custom\modules. After that you should see tsman.php and tsman directory that is for Absurd library.

Settings are pretty obvious.
Code: [Select]
$address = '127.0.0.1'; //Default '127.0.0.1' aka localhost
$tcpport = 51234; //Default is 51234
$timeout = 5; //Default 5
$server='1'; //Default  1
$superadmin='superadmin'; //Default superadmin
$sapassword='YOURPASSWORDHERE';
$serverport=8767;//Default 8767 If multiple servers in same IP choose right port here

You do have to use superadmin account to run this.

Hope you like it!


Release notes:
0.22

Changes:
- Access controll added to commands.
Code: [Select]
//GUEST can only have list, LEADER can also move and kick ppl. Admin has powwa to ban.
  $this -> register_command('all', 'tsman', 'ADMIN', array('list' => 'GUEST', 'move' => 'LEADER', 'kick' => 'LEADER', 'ban' => 'ADMIN'));
- require("tsman/Absurd.php");

* * *
0.20 first public release

Features:
*list server channels and clients
*move clients from channel to channel
*kick client from server
*kickban client for x minutes

Commands:
*tsman  - treeview of server with channels and clients on them
*tsman list - same as above
*tsman move <client_id> <channel_id> - move client to another channel
*tsman kick <client_id> - kick client
*tsman ban <client_id> <##> - ban and kick client for ## minutes
« Last Edit: July 15, 2008, 08:21:12 pm by Yrmy »

Offline Dookie

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #1 on: July 15, 2008, 08:43:16 am »
Ok, this is a very cool one!
Unfortunately it won't connect to my server.
I'm always getting

Code: [Select]
Fatal error: Uncaught exception 'Absurd_TeamSpeak2_Exception' with message 'ERROR, invalid login' in /var/www/vhosts/censored.com/download/bebot/modules/tsman/Absurd/TeamSpeak2/TCPClient.php:106
Stack trace:
#0 /var/www/vhosts/censored.com/download/bebot/modules/tsman/Absurd/TeamSpeak2/Host.php(149): Absurd_TeamSpeak2_TCPClient->request('slogin Name...')
#1 /var/www/vhosts/censored.com/download/bebot/modules/tsman/Absurd/TeamSpeak2/Host.php(126): Absurd_TeamSpeak2_Host->request('slogin Name...')
#2 /var/www/vhosts/censored.com/download/bebot/modules/tsman.php(94): Absurd_TeamSpeak2_Host->login('Name', 'password')
#3 /var/www/vhosts/censored.com/download/bebot/modules/tsman.php(57): ts->connectTS('censored...', 51234, 5, 8767, 'Name', 'password')
#4 /var/www/vhosts/censored.com/download/bebot/main/02_BaseActiveModule.php(114): ts->command_handler('Someone', 'tsman', 'tell')
#5 /var/www/vhosts/censored.com/download/bebot/Sources/Bot.php(779): BaseActiveModule->tell('So in /var/www/vhosts/censored.com/download/bebot/modules/tsman/Absurd/TeamSpeak2/TCPClient.php on line 106

I created a new TS user with appropriate rights and I'm sure the login details are correct.
What can be wrong here?

BTW: Linux users running bebot have to change line 24 of tsman.php into
Code: [Select]
  require("tsman/Absurd.php");(slash and not backslash) or the bot will crash because he can't find and incluse that file!

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Teamspeak manager
« Reply #2 on: July 15, 2008, 08:54:48 am »
like it says invalid login
this module uses SuperAdmin not Admin

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #3 on: July 15, 2008, 11:01:53 am »
I will change line 24 to require("tsman/Absurd.php"); in next version. I will also add access level control for commands. It's probably a bad idea to give everyone kick/ban rights  ;D

Offline Dookie

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #4 on: July 15, 2008, 04:51:14 pm »
Quote
this module uses SuperAdmin not Admin
Well, I thought I will not have to use the superadmin account, because Yrmy said it's not required:
Quote
You don't have to use superadmin account to run this.

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #5 on: July 15, 2008, 08:24:36 pm »
My bad. It really does need superadmin access. I updated my original post and also uploaded the 0.22 version. It adds access control and fixes that backslash to slash.

Offline weipa

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #6 on: July 15, 2008, 10:49:31 pm »
have error message can't connet to teamspeak at 127.0.0.1:51234

but in config file i put ip from the ts-server

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #7 on: July 15, 2008, 11:10:10 pm »
have error message can't connet to teamspeak at 127.0.0.1:51234

but in config file i put ip from the ts-server

Did you edit tsman.php line 45 and restarted the bot after that. Because that error message really means the module is connecting to localhost.

Offline weipa

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #8 on: July 15, 2008, 11:25:39 pm »
now this errormessage in bot cmd line and then bot restart
i place login and login pw with xxxx

Code: [Select]
Fatal error: Uncaught exception 'Absurd_TeamSpeak2_Exception' with message 'ERRO
R, invalid login' in G:\aoc bot\neu\custom\modules\tsman\Absurd\TeamSpeak2\TCPCl
ient.php:106
Stack trace:
#0 G:\aoc bot\neu\custom\modules\tsman\Absurd\TeamSpeak2\Host.php(149): Absurd_T
eamSpeak2_TCPClient->request('slogin test cer...')
#1 G:\aoc bot\neu\custom\modules\tsman\Absurd\TeamSpeak2\Host.php(126): Absurd_T
eamSpeak2_Host->request('slogin test cer...')
#2 G:\aoc bot\neu\custom\modules\tsman.php(95): Absurd_TeamSpeak2_Host->login('t
est', 'cervix')
#3 G:\aoc bot\neu\custom\modules\tsman.php(58): ts->connectTS('81.169.184.220',
'51234', '5', '9019', 'xxxxx', 'xxxxx')
#4 G:\aoc bot\neu\main\02_BaseActiveModule.php(133): ts->command_handler('Neria'
, 'tsman', 'tell')
#5 G:\aoc bot\neu\Sources\Bot.php(786): BaseActiveModule->tell('Neria', 'tsman')

#6 G:\aoc bot\neu\Sources\Bot.php(846): Bot->check_access_and_execute('Neria', '
tsman', 'tsman', 'tell', NULL)
#7 G:\aoc bot\neu\Sources\Bot.php(972): Bot->handle_command_input('Neria', '!tsm
an', 'tell')
#8 G:\aoc bot\neu\Main.php(370): Bot->inc_tell(Array)
#9 [internal function]: callback(30, Array, NULL)
#10 G:\aoc bot\neu\Sources\AOChat.php(365): call_user_func('callback', 30, Array
, NULL)
#11 G:\aoc bot\neu\Sources\AOChat.php(249): AOChat->get_packet()
#12 G:\aoc bot\neu\Main.php(341): AOChat->wait_for_packet()
#13 {main}
  thrown in G:\aoc bot\neu\custom\modules\tsman\Absurd\TeamSpeak2\TCPClient.php
on line 106

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #9 on: July 16, 2008, 05:54:27 am »
You are not using superadmin to login.

Offline weipa

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #10 on: July 16, 2008, 09:43:21 am »
tried it with two accounts both has SA flag when  i use it to connect

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #11 on: July 16, 2008, 11:39:11 am »
I'd still say there's something wrong with your settings in tsman.php, teamspeak server or in your firewall.

Offline weipa

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #12 on: July 16, 2008, 11:47:06 am »
is there a specific port to open?
or manually allow startbot.bat in windows firewall?
maybe the $tcpport is not default port on this server, i am unable to reach the admin/owner of the ts server, is it possible to find out the port?
« Last Edit: July 16, 2008, 11:55:04 am by weipa »

Offline soccerboyis

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Teamspeak manager
« Reply #13 on: July 30, 2008, 06:56:32 am »
I'll probably get flamed but could this possibly work for Ventrilo with ventrilo's server status? I don't know much about coding so this probably was a stupid question lol. I know there was a mod that someone made for ventrilo but I'm not sure if it was for AoC and I could never get it working.

Offline Yrmy

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Clever quote here.
Re: Teamspeak manager
« Reply #14 on: July 30, 2008, 08:06:16 am »
Nope, only with teamspeak.

 

* Recent Posts
0.7.x updates for AO by bitnykk
[January 26, 2023, 03:00:58 pm]


0.7.x updates for AoC by bitnykk
[January 26, 2023, 03:00:39 pm]


Linked objects in chat by bitnykk
[November 02, 2022, 10:56:58 am]


Website back up and quick status update by bitnykk
[July 30, 2021, 04:56:19 pm]


AO Bots - discord server by bitnykk
[January 31, 2021, 03:50:48 am]

* Who's Online
  • Dot Guests: 111
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2023, SimplePortal