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

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: another Teamspeak module  (Read 18570 times)

0 Members and 1 Guest are viewing this topic.

Offline exxie

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
another Teamspeak module
« on: February 28, 2007, 07:22:13 pm »
hi there.

i know there's another teamspeak module* out there, but it only provides a list of all connected players on the server. so i made one which looks like the original teamspeak channel/user tree (see screenshot below). *works with php4 only

it supports multiple servers so you can add as many server as you like to.
you can specify a channel so that only this channel and its subchannels will be displayed.
you can access all servers via the server list or by handing over the server id with the command.
you can set a default server which will be displayed by default if you don't hand over a server id and of course you can add/remove all servers within the bot.


« Last Edit: April 09, 2007, 03:33:43 pm by exxie »

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #1 on: March 01, 2007, 03:12:21 am »
loaded the module but none of the commands seem to be working... I've got the access set to superadmin (me) in tells, but nothing is responding.

I had the other TS module loaded, but i overwrote the .php file with yours, dunno if i had to unload it in any way? (I restarted the bot after I overwrote)

Also small note: the help file is named teamspeak.txt so its showing up as !teamspeak in the !help listings (atleast i think thats why its showing up as that). !help !ts returns that it doesnt have a help file.
Slynthia - General and Botmaster of Terminal Velocity - RK1

Offline exxie

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #2 on: March 01, 2007, 01:41:38 pm »
loaded the module but none of the commands seem to be working... I've got the access set to superadmin (me) in tells, but nothing is responding.

I had the other TS module loaded, but i overwrote the .php file with yours, dunno if i had to unload it in any way? (I restarted the bot after I overwrote)

Also small note: the help file is named teamspeak.txt so its showing up as !teamspeak in the !help listings (atleast i think thats why its showing up as that). !help !ts returns that it doesnt have a help file.

mh, that's odd. do you have access to the bot's console? maybe you can see there what's the reason for not responding.

unloading a module is not necessary, a restart of the bot should be sufficient.

and if you want the bot to reply to '!help !ts' just make a copy of the file and/or rename it to 'Ts.txt'.

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #3 on: March 02, 2007, 03:54:23 am »
the console wasnt showing anything, just the command showing up, not other output.

eg:

[TELL] [INC] Slynthia: !ts
[TELL] [INC] Slynthia: !ts list


nothing else shown.
Slynthia - General and Botmaster of Terminal Velocity - RK1

Offline exxie

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #4 on: March 02, 2007, 03:18:27 pm »
can't think of anything inside the code itself which could be a reason for such behaviour. must be something else ...

when the bot starts up, is there a '[MOD]   [LOAD]  Teamspeak.php' in the console without any error messages and is there a table named 'teamspeak' on the database with 6 colums named 'servername', 'channel', 'host', 'port', 'qport' and 'preset'?


Offline Snarfblatt

  • BeBot User
  • **
  • Posts: 63
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #5 on: March 02, 2007, 06:04:19 pm »
I have the exact same problem.. bot isn't responding to any of the !ts commands. The table is in the db and the columns are there.

Offline nebhyper

  • BeBot User
  • **
  • Posts: 62
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #6 on: March 02, 2007, 06:22:27 pm »
Here is your issue.

Code: [Select]
$ts = new Teamspeak($bot);

$commands["tell"]["ts"] = &$ts;
$commands["gc"]["ts"] = &$ts;
$commands["pgmsg"]["ts"] = &$ts;
$commands["tell"]["teamspeak"] = &$ts;
$commands["gc"]["teamspeak"] = &$ts;
$commands["pgmsg"]["teamspeak"] = &$ts;


/*
The Class itself...
*/
class Teamspeak {
var $bot;


/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function Teamspeak (&$bot) {
$this -> bot = &$bot;
}


Change it to:

Code: [Select]

$ts = new ts($bot);

$commands["tell"]["ts"] = &$ts;
$commands["gc"]["ts"] = &$ts;
$commands["pgmsg"]["ts"] = &$ts;
$commands["tell"]["teamspeak"] = &$ts;
$commands["gc"]["teamspeak"] = &$ts;
$commands["pgmsg"]["teamspeak"] = &$ts;


/*
The Class itself...
*/
class ts {
var $bot;


/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function ts (&$bot)
            {
$this -> bot = &$bot;
$this -> bot -> ts = &$this;
}


You named it Teamspeak but you told the bot to look for ts and teamspeak in chat and direct it to class ts.  Hard for the bot to direct a command to a class that does not exsist. :)


I changed it all to ts, but you can change it to teamspeak so long as they all match.

Also I added:
Code: [Select]
$this -> bot -> ts = &$this;

This allows other modules to call up the functions in this module.  An example of why you would want this would be say you want to rewrite the alts display, whois display, or online display to show if someone is on teamspeak.

Example for Online: Siocuffin blah blah blah (Squad Commander) (SuperAdmin) (On teamspeak)


« Last Edit: March 02, 2007, 06:27:02 pm by nebhyper »
Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.

Offline exxie

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #7 on: March 02, 2007, 07:26:51 pm »
aah, yes. my bad :/

i worked on the files directly on my server and uploaded an old copy from my harddrive and not the one from the server :)
that's why i said it couldn't be in the code itself since my bot worked without a flaw and the code looked good 8)

however i added the line nebhyper posted so the Teamspeak functions can be used in other modules.

links to the files updated.

... and thank you for the tip!
« Last Edit: March 02, 2007, 08:02:22 pm by exxie »

Offline nebhyper

  • BeBot User
  • **
  • Posts: 62
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #8 on: March 02, 2007, 08:43:17 pm »
You are more than welcome.  I made the same type of mistake on a module I wrote last night.  I copied and pasted from a template and forgot to change the class name.  I spent 30 minutes looking over teh code and rebooting the bot until I realized what I had done.  Only fair that I help out with the same problem here too.
Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #9 on: March 02, 2007, 09:13:02 pm »
Redownloade the from the link in the first post, still not getting any response from commands... Is the commands !ts or !teamspeak? neither work, just wanted to check, since the help file says !ts but unless im reading the code wrong the code is set up for !teamspeak?
Slynthia - General and Botmaster of Terminal Velocity - RK1

Offline nebhyper

  • BeBot User
  • **
  • Posts: 62
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #10 on: March 02, 2007, 09:23:13 pm »
according to the code it is looking for:

!ts add <info>
!ts del <info>
!ts default <info>
!ts list
!ts <ID>

!teamspeak is code to be looked for by the bot and to be directed to this module and class, however tell, gc, and pgroup of this module are not looking for teamspeak. (Just need to copy the code for each and replace ts with teamspeak.)

as for !ts doing anything, I do not think it will based on the code, unless you first set the default teamspeak id.  If defualt is not set !ts will not work.  if defualt has been set !ts will work.

Even with no defualt you should atleast get this message;
"No default server set. Please specify a server number or set a default server."
« Last Edit: March 02, 2007, 09:25:06 pm by nebhyper »
Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #11 on: March 02, 2007, 09:38:33 pm »
tried:
!ts add <serverinfo>
!ts list
!ts
!ts default 1
!ts 1

nothing had any kind of response from the bot(looking at the console there was nothing there either)

Oh also what format is the address in? would !ts add blah.blahblah.com:8767 work?
« Last Edit: March 02, 2007, 09:42:58 pm by Ozball »
Slynthia - General and Botmaster of Terminal Velocity - RK1

Offline exxie

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #12 on: March 02, 2007, 10:44:57 pm »
cleaned the file from obsolete code and updated the links on my 1st post.

the only working command should be 'ts' not 'teamspeak'. i just copied the file from the server to my desktop und uploaded it from there. that should avoid all wrong version uploads :)

when testing the bot with the module i get the following response:

To [Battlecom]: ts list
Battlecom: 4 servers on list. :: click to view
To [Battlecom]: ts default 5
Battlecom: Server #5 has been set as the default server.
To [Battlecom]: ts
Battlecom: 0 members on Teamspeak. :: click to view
To [Battlecom]: ts 7
Battlecom: 61 members on Teamspeak. :: click to view


works just fine :-/

Quote
Oh also what format is the address in? would !ts add blah.blahblah.com:8767 work?

nope. format has to be '<host> <port> <qport> <channel>(optional)'. e.g.: !ts add blah.blahblah.com 8767 51234
51234 is the standard query-port. servers may use another (secret) query-port so that people who don't know it can't get the serverinfo from the outside. thus you have to specifiy both ports.
« Last Edit: March 02, 2007, 11:57:19 pm by exxie »

Offline nebhyper

  • BeBot User
  • **
  • Posts: 62
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #13 on: March 03, 2007, 12:58:29 am »
@Ozball:

It sounds like the module is not loading.  When you start the bot at in console it shows every module it loaded, check for this one.
Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.

Offline Ozball

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: another Teamspeak module
« Reply #14 on: March 03, 2007, 01:27:47 am »
Still doesnt want to work :S

I'll give it a try on one of the hardcoded superadmins abit later. I wonder if its not liking the character im using, who's (according to FCs DB) still not in the org, but is set as a superadmin (and admin) and can do the other commands fine (but needs to be added to the guest list with !guest).
Slynthia - General and Botmaster of Terminal Velocity - RK1

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 448
  • 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-2024, SimplePortal