Archive > BeBot Hyborian modules

Teamspeak manager

(1/6) > >>

Yrmy:
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: --- $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
--- End code ---

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: --- //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'));
--- End code ---
- 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

Dookie:
Ok, this is a very cool one!
Unfortunately it won't connect to my server.
I'm always getting


--- Code: ---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

--- End code ---

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: ---  require("tsman/Absurd.php");
--- End code ---
(slash and not backslash) or the bot will crash because he can't find and incluse that file!

Temar:
like it says invalid login
this module uses SuperAdmin not Admin

Yrmy:
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

Dookie:

--- Quote ---this module uses SuperAdmin not Admin
--- End quote ---
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.
--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version