コード例 #1
0
ファイル: Voice.cs プロジェクト: yinlei/iss
    public void start()
    {
        if (started)
        {
            return;
        }

        bool isCaveSound = System.Environment.MachineName.Equals(clientSound, StringComparison.OrdinalIgnoreCase);

        started = (Config.Instance.IsStandalone || isCaveSound);
        if (started)
        {
            string[] muted;
            if (isCaveSound)
            {
                muted = new string[] { clientMic };
            }
            else
            {
                muted = new string[] { };
            }

            tsc = new TSClient(ip, port, "", muted);
            tsc.start();

            Logger.Log("Voice started");
        }
    }
コード例 #2
0
 public void EventShit()
 {
     TSClient.Subscribe <TextMessage>(data =>
     {
         //CommandStuff.CommandManager.ExecuteCommand(data);
     });
 }
コード例 #3
0
        public List <Lutador> listarLutadores()
        {
            List <Lutador> lutadores = new List <Lutador>();

            var t = Task.Run(() => TSClient.GetAllFighters());

            t.Wait();

            lutadores = t.Result;

            return(lutadores);
        }
コード例 #4
0
        public async Task StartBot(int sid)
        {
            await TSClient.UseServer(sid);

            await TSClient.ChangeNickName(this.Name);

            Who = await TSClient.WhoAmI();

            //await TSClient.RegisterServerNotification();
            await TSClient.RegisterChannelNotification(Who.ChannelId);

            await TSClient.RegisterTextChannelNotification();

            await TSClient.RegisterTextPrivateNotification();

            await TSClient.RegisterTextServerNotification();
        }