Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Page 9 of 10 FirstFirst ... 78910 LastLast
Results 121 to 135 of 136
  1. #121
    Join Date
    October 2010
    Location
    Germany
    Posts
    67
    @Scordo Thanks for your fast reply to this problem.

    Quote Originally Posted by Johnny Crazy View Post
    This can be fixxed pretty easy, (...)
    Would be awesome if you could create a PR on github for this problem I couldn't figure out how to exactly fix it.

    See #1 GetLogEntries() exception (outdated). for further informations.
    Last edited by FireEmerald; July 5th, 2014 at 02:51 PM.

  2. #122
    Join Date
    August 2013
    Posts
    7
    Quote Originally Posted by FireEmerald View Post
    @Scordo Thanks for your fast reply to this problem.

    Would be awesome if you could create a PR on github for this problem I couldn't figure out how to exactly fix it.

    See #1 GetLogEntries() exception (outdated). for further informations.
    Done

    If you find another outdated or not working Call, just drop me a message and I will look at it

  3. #123
    Join Date
    August 2007
    Location
    SWEDEN
    Posts
    130
    Hey.

    I got stuck at the very beginning. I tried to establish async connection, however it throws me same error over and over.

    I have two snippets. First one i wrote myself (which led to an error), second one I nearly ripped from one of the projects on GitHub hoping it to work (apparently the person who uploaded it knew what he's doing). Actually both of them failed with exactly the same error.

    The exception occurs on "ReadyForSendingCommands"
    Code:
    Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
       at TS3QueryLib.Core.AsyncTcpDispatcher.OnReadyForSendingCommands() in c:\Projects\Codeplex\02\TS3QueryLib\Releases\V_1_0_5_0\TS3QueryLib.Core.Silverlight\AsyncTcpDispatcher.cs:line 430
       at TS3QueryLib.Core.AsyncTcpDispatcher.<HandleServerQueryGreeting>b__11(Object x) in c:\Projects\Codeplex\02\TS3QueryLib\Releases\V_1_0_5_0\TS3QueryLib.Core.Silverlight\AsyncTcpDispatcher.cs:line 335
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx
    )
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
    This is my snippet (short)
    http://pastebin.com/5GHj83Xw

    This is ripped one (longer)
    http://pastebin.com/Tt9SWvah


    Also
    In examples I found, devs always initiated Sync connection before Async, is that required?

    edit (solved):
    Okey, I looked into QueryLib.NET code and I see you are making use of SynchronizationContext class. This class is not by default called when not using winforms/wcf/?? hence the error. It's fixed.
    Last edited by Morfi; October 2nd, 2014 at 04:03 AM.

  4. #124
    Join Date
    August 2007
    Location
    SWEDEN
    Posts
    130
    double post <remove, please>
    Last edited by Morfi; October 2nd, 2014 at 04:04 AM.

  5. #125
    Join Date
    December 2014
    Posts
    1
    I've been reading over all of the documentation on the GitHub repository and other places and I cannot manage to figure out how to edit a server, or create one as I do not understand the parameters that need to be entered or what format to put them in. Can anyone give me some insight or guide me in the right direction for VB.Net or similar examples?

  6. #126
    Join Date
    February 2015
    Posts
    5

    I guess I'm stuck at the same place

    Quote Originally Posted by Morfi View Post
    edit (solved):
    Okey, I looked into QueryLib.NET code and I see you are making use of SynchronizationContext class. This class is not by default called when not using winforms/wcf/?? hence the error. It's fixed.
    Hi,
    Im currently stuck at the same point.. Background-story: I'm creating a little TS3Query Cleverbot and need to catch Channel-messages by users in order to process them.. At first I had the same problem as Events wouldnt fire even when assigned.. So I started using AsyncTcpDispatcher which will always (as you described) cause an NullReferenceException. As I understand you, I need an Winforms-app. for the error not to occur, but is there a way of doing this in ConsoleApplications too ? Because I intended to keep it simple.

    Thanks in Advance,
    ~Basic

  7. #127
    Join Date
    December 2009
    Location
    Germany
    Posts
    118
    I've added a sample for console applications:
    https://github.com/Scordo/TS3QueryLi...onsole/Connect

    Dont forget to call a dummy command regularly. Otherwise TS-Server will disconnect your client when idling to long.
    Last edited by Chris; February 9th, 2015 at 10:09 AM.

  8. #128
    Join Date
    February 2015
    Posts
    5
    Thank you very much, this helped alot.
    But now I have the next Problem:
    when using
    foreach (ClientListEntry cle in QueryRunner.GetClientList())
    cle.ClientUniqueId is always NULL.
    Of course before I logged in and selected the Server..
    I've double-checked the querys permissions and also tried the serveradmin-account and everything else e.g. the NickName-field works correctly.
    Any ideas

    [EDIT] Fixed:
    foreach (ClientListEntry cle in QueryRunner.GetClientList(true))
    "true" will force the receiving of all parameters. //reading documentation helps alot ._.
    Last edited by thexbasic; February 7th, 2015 at 07:31 PM.

  9. #129
    Join Date
    July 2015
    Posts
    3
    Hey everyone, I am having one hell of a headache trying to hack my way through a simple project of mine, basically I have this: http://pastebin.com/Cfi7vGJr

    What I need to get to is, when the bot sees a message posted in the channel it is in I want it to throw the error.

    Pretty much that's all I need it to do since I can do the rest of what I need to do, so pretty much that's it since I know the args being sent to the event contain Nickname which is all I need to know in terms of why I am doing this.


    Thanks to anyone who can help :/ and sorry I am such a scrubby programmer, I am guessing the solution is staring me in the fact and I don't know how to do it

  10. #130
    Join Date
    July 2015
    Posts
    3

    [TS3QueryLib.Net] Receiving Message Notifcations

    So, this is my source so far:
    http://pastebin.com/4JAJa7Mz

    I am trying to figure out, how can I work "Message received" notifications into this?

    Whenever I do this:
    http://prntscr.com/7ziohs

    I get the error: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll

    Additional information: An invalid argument was supplied Among other things, so any advice on how I can easily work this into my program, all I really need is if it sees a message in the channel it passes it onto the function, from there I know what I need to do to make my program do what I want. Thanks to anyone who help.

  11. #131
    Join Date
    July 2015
    Posts
    3
    Guessing no one can help?

  12. #132
    Join Date
    October 2016
    Posts
    2
    I'm also facing a problem with AsyncTcpDispatcher
    Code:
    System.NullReferenceException: Object reference not set to an instance of an object
      at TS3QueryLib.Core.AsyncTcpDispatcher.OnReadyForSendingCommands () [0x0000e] in <021f088f119e4b64b5390168d3275dd5>:0
      at TS3QueryLib.Core.AsyncTcpDispatcher.<HandleServerQueryGreeting>b__11 (System.Object x) [0x00000] in <021f088f119e4b64b5390168d3275dd5>:0
      at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
      at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
      at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
      at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
      at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
      at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
    Source Code: https://pastebin.gtanet.work/?f1a0aa...OK4ZL6Ep8Ml8Y=

    Can someone take a look and tell me what is the problem?

    method OnResourceStart() works similar as a Main method.

  13. #133
    Join Date
    October 2016
    Posts
    2
    I'll update it. Thank you very much for all you are doing.

  14. #134
    Join Date
    December 2016
    Posts
    4

    Help me Making ChannelTree!

    Does somebody know about making ChannelTree?

    C#

    public partial class UserControl1 : UserControl
    {
    public UserControl1()
    {
    InitializeComponent();

    QueryRunner TopQuery = new QueryRunner(new TS3QueryLib.Core.SyncTcpDispatcher("192.168.1.24", 10011));
    SimpleResponse loginResponse = TopQuery.Login("", "");
    TopQuery.SelectVirtualServerById(1);
    TreeView1.Items.Clear();
    TreeView1.ItemsSource = GetChannelTreeForTreeView(TopQuery);
    //TreeView1.ItemsSource = TopQuery.Utils.GetChannelTree(false);
    }

    private static IEnumerable<TreeItem> GetChannelTreeForTreeView(QueryRunner queryRunner)
    {
    List<ChannelTreeItem> channelTree = queryRunner.Utils.GetChannelTree(false);

    foreach (ChannelTreeItem channelTreeItem in channelTree)
    {
    TreeItem treeViewItem = new TreeItem { Data = channelTreeItem.Channel };
    FillTreeViewItem(treeViewItem, channelTreeItem);
    yield return treeViewItem;
    }
    }

    private static void FillTreeViewItem(TreeItem treeViewItem, ChannelTreeItem channelTreeItem)
    {
    foreach (ClientListEntry clientListEntry in channelTreeItem.Clients)
    treeViewItem.Children.Add(new TreeItem { Data = clientListEntry });

    foreach (ChannelTreeItem childChannelTreeItem in channelTreeItem.Children)
    {
    TreeItem childTreeViewItem = new TreeItem { Data = childChannelTreeItem.Channel };
    treeViewItem.Children.Add(childTreeViewItem);
    FillTreeViewItem(childTreeViewItem, childChannelTreeItem);
    }
    }

    public class TreeItem
    {
    public object Data { get; set; }
    public List<TreeItem> Children { get; private set; }

    public TreeItem()
    {
    Children = new List<TreeItem>();
    }
    }
    }



    XAML

    <UserControl x:Class="Ts3Tool.UserControl1"
    xmlns:Controls="using:EventTests.Controls"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:Ts3Tool"
    mc:Ignorable="d"
    designHeight="300" designWidth="300">
    <TreeView x:Name="TreeView1" HorizontalAlignment="Left" Height="237" VerticalAlignment="Top" Width="300">
    <Button x:Name="button1" Content="Button" VerticalAlignment="Top" Width="75"/>
    <TreeView.Resources>
    <HierarchicalDataTemplate DataType="{x:Type Controls:MainAreaControl+TreeItem}" ItemsSource="{Binding Children}">
    <ContentPresenter Content="{Binding Data}"/>
    </HierarchicalDataTemplate>
    <DataTemplate DataType="{x:Type HelperClasses:ChannelListEntry}">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    <DataTemplate DataType="{x:Type HelperClasses:ClientListEntry}" >
    <TextBlock Text="{Binding Path=Nickname}" />
    </DataTemplate>
    </TreeView.Resources>
    </TreeView>
    </UserControl>

    error : The 'UserControl' type does not support direct content.
    error : Common type with name 'MainAreaControl + TreeItem' can not be found in the type reference.
    Last edited by miuna3; February 17th, 2017 at 04:54 AM.

  15. #135
    Join Date
    August 2011
    Posts
    2

    Lightbulb Help Edit Maximum Client Allowed

    Hello, I would like to edit the maximum number of allowed users ..
    Example:
    // Create A New Object Named ServEdit Of "VirtualServerModification" Type That Will Apply Our Modification To The Server
    VirtualServerModification ServEdit = new VirtualServerModification();


    ServEdit.MaxClients = 50;
    // I want the limit of users to be only 50..

    How do I save and apply the changes?


    HELP PLEASE..

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
  •