BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Age of Conan Archive => BeBot Hyborian modules => Topic started by: Yrmy 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 (http://libacts2.absurdcoding.org/manual/ric_README.html).
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.
$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.
//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
-
Ok, this is a very cool one!
Unfortunately it won't connect to my server.
I'm always getting
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 require("tsman/Absurd.php");
(slash and not backslash) or the bot will crash because he can't find and incluse that file!
-
like it says invalid login
this module uses SuperAdmin not Admin
-
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
-
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:
You don't have to use superadmin account to run this.
-
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.
-
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
-
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.
-
now this errormessage in bot cmd line and then bot restart
i place login and login pw with xxxx
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
-
You are not using superadmin to login.
-
tried it with two accounts both has SA flag when i use it to connect
-
I'd still say there's something wrong with your settings in tsman.php, teamspeak server or in your firewall.
-
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?
-
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.
-
Nope, only with teamspeak.
-
Why does this need superadmin? Is there any way to get this running in a limited form with just a normal server admin? Most rented TS servers do not allow you to have or make superadmins.
-
Answering my own question...
Replacing the line:
$host->login($superadmin, $sapassword); //Authenticate as SuperAdmin on this host
With:
$server=$host->getServerByUdp($serverport);
$server->login($superadmin, $sapassword); //Authenticate as Server Admin on this server
Will make it work as a server admin, and not a superadmin.
Also, the \d in the preg_matches needs to be changed to \d*. That way it can match multiple digit ids.
-
I know this dont help me much but I installed the module and edited the tsman.php and all seems fine, except I dont get any responce from the bot when trying a "!tsman" or "!tsman list", not even an error message.
in !help I see tsman and I can do a "!help tsman" and get the info, but none of the commands work.
does anyone have the slightest clue to what might cause this?
would relly like this module to work :) would be so much easier in raids
//Barlyman
-
nice tool ... but where i can download it ???
sry for the question :(
-
At the End of the first Thread ';)
-
tx a lot ... works wunderful :D
-
just so you know there is a Huge problem with this module
it wasn't designed for use on a Bot
this module creates objects every time you use it, and the memory use your bot is using increases each time
-
It is nevertheless a great Bot, one of the few providing a clear view of channels and users. I use it a lot.
Hopefully an updated version or new TS Manager will emerge with no bug/issues :)
-
It is nevertheless a great Bot, one of the few providing a clear view of channels and users. I use it a lot.
Hopefully an updated version or new TS Manager will emerge with no bug/issues :)
Nice to hear you find this usefull. Unfortunately I'm not playing aoc anymore so if anyone is willing to improve this bot you have blessing.
-
Work on TeamSpeak 3?
-
don't think so ... haven't seen any mod for ts3 so far :(
-
aa:/
-
can non make a mod to TS3