Forum

Page 8 of 10 FirstFirst ... 678910 LastLast
Results 106 to 120 of 136
  1. #106
    Join Date
    July 2012
    Posts
    3
    What I have to do with the '.pdb' and the '.xml' file?

  2. #107
    Join Date
    December 2012
    Posts
    1

    Get number of online users using TS3QueryLib

    I want to display the number of online Teamspeak users in my C# desktop application .

    I'm using the non-silverlight library and I tried with the following piece of code which doesn't seem to work
    Code:
                using (TS3QueryLib.Core.Server.QueryRunner queryRunner = new TS3QueryLib.Core.Server.QueryRunner(new SyncTcpDispatcher("my teamspeak address", 10011)))
                {
                    queryRunner.SelectVirtualServerById(1);
    
                    Console.WriteLine(queryRunner.GetServerInfo().NumberOfClientsOnline);
                }

  3. #108
    Join Date
    May 2006
    Location
    Nirgends
    Posts
    13
    maybe your guestquery rights doesn't allow this, try the following:

    Code:
                using (TS3QueryLib.Core.Server.QueryRunner queryRunner = new TS3QueryLib.Core.Server.QueryRunner(new SyncTcpDispatcher("my teamspeak address", 10011)))
                {
                    queryRunner.Login("serveradmin", "xxx");
                    queryRunner.SelectVirtualServerById(1);
                    Console.WriteLine(queryRunner.GetServerInfo().NumberOfClientsOnline);
                }

  4. #109
    Join Date
    January 2011
    Location
    Poland
    Posts
    11
    First, Scordo, i've realized that i didn't thank you, so Thank you very much...
    I have another question: How to use AsyncTcpDispatcher in console app?
    In winForms/WPF in window constructor i have new ATD, += event and ATD.Connect().
    Then in event new QueryRunner and operations, but i don't know how use it in console app... i have null exeption right after readytosend event fired.

  5. #110
    Join Date
    April 2013
    Posts
    13
    How fitting this is: I'll be doing some stuff with .net in the near future: I wonder if this library could be used in combination with maybe something else to create an ASP.Net interface for TS that could be integrated into other applications like Sueetie and YetAnotherForum?

  6. #111
    Join Date
    October 2013
    Posts
    6
    Hi:

    Is there any ChannelCreated Event? I'd like to make one but I don't know if TeamSpeak's Server Query can do that.

    Regards.

  7. #112
    Join Date
    October 2013
    Posts
    6

    Question ChannelCreated Event for TS3QueryLib.Net

    Hi:

    I wanted to make a Channel Name check (in case the Channel Name has bad words, delete the Channel and kick the User from the Server), but today, when I was trying to find an event related to ChannelCreated I couldn't find anyone.

    Is there any Event for the TeamSpeak's Server Query for ChannelCreated?

    Regards.

  8. #113
    Join Date
    September 2013
    Location
    Germany
    Posts
    63
    Is there an official documentation? I use C#. My Idea:

    If a servergroup (ID:10) tries to add anyone the channel group (ID:8), this user should be kicked from the server and the the "person" should not get the channel group.

    How can i do this? Is there a: ChannelGroupAddEvent?

  9. #114
    Join Date
    December 2013
    Posts
    1

    Angry [C#.NET] Bot TS3QueryLib.Core.Silverlight error

    I was trying to send and recive some chat-box messages, but i got stuck:

    i imported latest 1.0.5.0 silverlight dll (TS3QueryLib.Core.Silverlight) to my project reference.

    But this is not working for me:


    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows.Forms;
    
    
    using TS3QueryLib.Core;
    using TS3QueryLib.Core.Common;
    using TS3QueryLib.Core.Client;
    using TS3QueryLib.Core.CommandHandling;
    using TS3QueryLib.Core.Communication;
    
    
    using System.Runtime.InteropServices;
    using System.IO;
    using System.Threading;
    
    
    
    namespace AsmodatTS3QueryBot
    {
        
    
        public partial class Form1 : Form
        {
    
    
            Random R = new Random();
    
            public Form1()
            {
                InitializeComponent();
    
                SyncTcpDispatcher STDispatcher = new SyncTcpDispatcher("voice.teamspeak.com", 10011);
    
                
    
                QueryRunner QRunner = new QueryRunner(STDispatcher); //ERROR !!!
    
                STDispatcher.Connect();
                
    
                if (STDispatcher.IsConnected)
                {
                    //var v = QRunner.GetChannelList();
    
                   
                }

    this is error I am getting while trying to connect:

    Code:
    System.IO.FileNotFoundException was unhandled
      HResult=-2147024894
      Message=Could not load file or assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
      Source=TS3QueryLib.Core.Silverlight
      FileName=System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
      FusionLog==== Pre-bind state information ===
    LOG: DisplayName = System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
     (Fully-specified)
    LOG: Appbase = file:///C:/Users/Mateusz/Documents/Visual Studio 2012/Projects/AsmodatTS3QueryBot/AsmodatTS3QueryBot/bin/Debug/
    LOG: Initial PrivatePath = NULL
    Calling assembly : TS3QueryLib.Core.Silverlight, Version=1.0.5.0, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: No application configuration file found.
    LOG: Using host configuration file: 
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    LOG: Attempting download of new URL file:///C:/Users/Mateusz/Documents/Visual Studio 2012/Projects/AsmodatTS3QueryBot/AsmodatTS3QueryBot/bin/Debug/System.Net.DLL.
    LOG: Attempting download of new URL file:///C:/Users/Mateusz/Documents/Visual Studio 2012/Projects/AsmodatTS3QueryBot/AsmodatTS3QueryBot/bin/Debug/System.Net/System.Net.DLL.
    LOG: Attempting download of new URL file:///C:/Users/Mateusz/Documents/Visual Studio 2012/Projects/AsmodatTS3QueryBot/AsmodatTS3QueryBot/bin/Debug/System.Net.EXE.
    LOG: Attempting download of new URL file:///C:/Users/Mateusz/Documents/Visual Studio 2012/Projects/AsmodatTS3QueryBot/AsmodatTS3QueryBot/bin/Debug/System.Net/System.Net.EXE.
    
      StackTrace:
           at TS3QueryLib.Core.SyncTcpDispatcher.Connect()
           at AsmodatTS3QueryBot.Form1..ctor() in c:\Users\Mateusz\Documents\Visual Studio 2012\Projects\AsmodatTS3QueryBot\AsmodatTS3QueryBot\Form1.cs:line 45
           at AsmodatTS3QueryBot.Program.Main() in c:\Users\Mateusz\Documents\Visual Studio 2012\Projects\AsmodatTS3QueryBot\AsmodatTS3QueryBot\Program.cs:line 18
      InnerException:

    what am I doying wrong ?

  10. #115
    Join Date
    August 2013
    Posts
    7
    EDIT: Sorry for pullin of such an old Thread, but maybe someone can help me

    Can someone give me a quick hint, why receiving messages gets slower every time I send one to the Query-Client?

    Code:
    Code:
            public Form1()
            {
                InitializeComponent();
                SocketDispatcher = new AsyncTcpDispatcher("**", 10011);
                SocketDispatcher.ReadyForSendingCommands += SocketDispatcher_ReadyForSendingCommands;
                SocketDispatcher.ServerClosedConnection += SocketDispatcher_ServerClosedConnection;
                SocketDispatcher.SocketError += SocketDispatcher_SocketError;
                SocketDispatcher.BanDetected += SocketDispatcher_BanDetected;
    
                runner = new QueryRunner(SocketDispatcher);
                runner.UnknownNotificationReceived += runner_UnknownNotificationReceived;
    
                SocketDispatcher.Connect();
            }
    
            private void SocketDispatcher_ReadyForSendingCommands(object sender, EventArgs e)
            {
                SimpleResponse resp = runner.Login("serveradmin", "**");
                runner.SelectVirtualServerById(1);
                runner.Notifications.ClientMessageReceived += Notifications_ClientMessageReceived;
                runner.RegisterForNotifications(ServerNotifyRegisterEvent.TextPrivate);
            }
    
            void Notifications_ClientMessageReceived(object sender,MessageReceivedEventArgs e)
            {
                runner.SendTextMessage(MessageTarget.Client, e.InvokerClientId, "Folgende Nachricht erhalten: " + e.Message);
            }
    If Notifications_ClientMessageReceived is executed the first time, it's fast, but after 10 times it gets slower and slower (after 10 messages ~4sec)

    //EDIT:
    Fixxed it, it was receiving his own messages too, so it made an infinite loop...
    Last edited by Johnny Crazy; July 5th, 2014 at 12:22 PM.

  11. #116
    Join Date
    October 2010
    Location
    Germany
    Posts
    67

    Exclamation

    The TS3QueryLib.Net is partially outdated and doesn't work properly anymore. (Version: 1.0.5.0)

    For example this function:


    Public Function GetLogEntries(limitCount As UShort) As TS3QueryLib.Core.Common.Responses.ListResponse(Of TS3QueryLib.Core.Server.Entities.LogEntry)
    Member von TS3QueryLib.Core.Server.QueryRunner

    Zusammenfassung:
    Displays a specified number of entries from the servers log. Depending on your permissions, you'll receive
    entries from the server instance log and/or your virtual server log. Using a combination of the comparator and
    timestamp parameters allows you to filter for log entries based on a specific date/time.

    Parameter:
    limitCount: The max amount of entries to retrieve (30)


    If you use this function with GetLogEntries(1) the generated command will be: logview limitcount=1\n
    For sure you have to select first your virtual server. (SelectVirtualServerById(ServerID))

    limitcount was replaced by lines={1-100} - so you won't get only 1 log entry, you will get 100 log entrys.


    LOGVIEW
    Displays a specified number of entries from the servers log. If instance is set to 1, the server will return lines from the master logfile (ts3server_0.log) instead of the selected virtual server logfile.

    Permissions:
    b_serverinstance_log_view
    b_virtualserver_log_view

    Syntax:
    logview [lines={1-100}] [reverse={1|0}] [instance={1|0}] [begin_pos={n}]

    Example:
    logview lines=30
    last_pos=403788 file_size=411980 l=\p\slistening\son\s0.0.0.0:9987
    error id=0 msg=ok


    Later in the source code theres a sub called:
    public static LogEntry Parse(CommandParameterGroup currentParameterGroup, CommandParameterGroup firstParameterGroup)

    which will effect in an InvalidCastException in:
    public static T ConvertValue<T>(string parameterName, string parameterValue)

    Could not cast parameter with name 'timestamp' and value '' to target type of 'System.UInt64'.
    Due to changes in the logfile syntax?
    Attached Images Attached Images  
    Last edited by FireEmerald; July 5th, 2014 at 11:56 AM.

  12. #117
    Join Date
    August 2013
    Posts
    7
    This can be fixxed pretty easy, would be cool if the author would put this whole project on GitHub so we can help him.
    (I know CodePlex supports this too, but it's way more complicated...)
    Last edited by Chris; July 7th, 2014 at 04:57 PM. Reason: unnecessary fullquote removed

  13. #118
    Join Date
    December 2009
    Location
    Germany
    Posts
    118
    Hello,

    I've been very busy and I dont think that I'll have any time in the near future for the project.
    I'll put the project on github as soon as possible.. so you can fork and contribute with patches.

    Regards,
    Scordo

  14. #119
    Join Date
    August 2013
    Posts
    7
    Quote Originally Posted by Scordo View Post
    Hello,

    I've been very busy and I dont think that I'll have any time in the near future for the project.
    I'll put the project on github as soon as possible.. so you can fork and contribute with patches.

    Regards,
    Scordo
    That would be awsome!
    Looking forward to contribute!

  15. #120
    Join Date
    December 2009
    Location
    Germany
    Posts
    118
    Repository is online here:
    https://github.com/Scordo/TS3QueryLib.Net

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [WIP] JTS3ServerQuery - Java Server Query Library
    By Stefan1200 in forum Tools / Web Based
    Replies: 78
    Last Post: November 20th, 2016, 12:29 PM
  2. Replies: 6
    Last Post: May 21st, 2013, 02:10 PM
  3. Replies: 9
    Last Post: January 3rd, 2010, 02:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •