Examples of TS3Query


Examples of com.github.theholywaffle.teamspeak3.TS3Query

        config.setDebugLevel( Level.ALL );
        config.setDebugToFile( true );
        config.setLoginCredentials( configMap.get( "queryname" ), configMap.get( "querypassword" ) );
        config.setFloodRate( TS3Query.FloodRate.DEFAULT );

        final TS3Query query = new TS3Query( config );
        query.connect();

        final TS3Api api = query.getApi();
        api.selectVirtualServerById( 1 );
        api.setNickname( "PutPutBot" );
        System.out.println( "send now!" );
        if( api.getChannels() == null )
            System.err.println( "null" );
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    // initially connects to the ts3-server so the ts3-objects which are needed to manage the ts3 server stuff
    private void initialConnect()
    {
        TS3Config config = getServerConfig();
        mQuery = new TS3Query( config );
        mQuery.connect();
        mApi   = mQuery.getApi();
        mApi.selectVirtualServerById( 1 );
        sfLogger.log( Level.INFO, "Connected to the TS3-server \"" + mBotConfiguration.getHostName() + "\" using " +
                        "the login name \"" + mBotConfiguration.getLoginName() + "\"" );
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query


    public ServerConnection() throws FileNotFoundException, IOException
    {
        this.mConfig = new BotConfiguration( "config/config.cfg" );
        this.mQuery  = new TS3Query( getConfig() );
        this.mQuery.connect();
        this.mApi    = this.mQuery.getApi();
        this.mApi.selectVirtualServerById( 1 );
    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

        config1.setDebugLevel( Level.OFF );
        config1.setDebugToFile( true );
        config1.setLoginCredentials( configMap.get( "loginnname" ), configMap.get( "loginpassword" ) );
        config1.setFloodRate( TS3Query.FloodRate.DEFAULT );

        TS3Query query = new TS3Query( config1 );
        query.connect();
        TS3Api api = query.getApi();
        api.selectVirtualServerById( 1 );
        api.setNickname( "test" );
        // api.sendChannelMessage( "test" );
        api.registerAllEvents();
        api.addTS3Listeners( new TS3ListenerAdapter()
        {
            @Override
            public void onTextMessage( TextMessageEvent e )
            {
                System.err.println( "hey!" );
            }
        } );
        System.err.println( "test" );

        List<Channel> l = api.getChannels();
        query.exit();

        HashMap<String, CallableFunction> map = new HashMap<>();
        map.put( "!echo", new EchoBotFunction() );
        map.put( "!fun", new FunBotFunction() );
        map.put( "!move", new MoveFunction() );
        CommandHandler handler = new CommandHandler( 1, map );
        handler.run();


        BotConfiguration conf = new BotConfiguration( "config\\config.cfg" );
        TS3Config config2 = new TS3Config();
        config2.setHost( configMap.get( "host" ) );
        config2.setDebugLevel( Level.ALL );
        config2.setDebugToFile( true );
        config2.setLoginCredentials(conf.getLoginName(), conf.getLoginPassword() );
        config2.setFloodRate( TS3Query.FloodRate.DEFAULT );

        TS3Query query1 = new TS3Query( config2 );
        TS3BotChannelListener bot1 = new TS3BotChannelListener( query1, true, handler, 26 );



    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

     * @param channelId
     *         id of the channel this ChannelListener has to work at.
     */
    public TS3BotChannelListener( TS3Config config, boolean connect, CommandHandler commandHandler, int channelId )
    {
        this( new TS3Query( config ), false, commandHandler, channelId );
    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    final TS3Config config = new TS3Config();
    config.setHost("77.77.77.77");
    config.setDebugLevel(Level.ALL);
    config.setLoginCredentials("serveradmin", "serveradminpassword");
   
    final TS3Query query = new TS3Query(config);
    query.connect();
   
    final TS3Api api = query.getApi();
    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");
   
    HashMap<ChannelProperty,String> properties = new HashMap<>();
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    final TS3Config config = new TS3Config();
    config.setHost("77.77.77.77");
    config.setDebugLevel(Level.ALL);
    config.setLoginCredentials("serveradmin", "serveradminpassword");
   
    final TS3Query query = new TS3Query(config);
    query.connect();
   
    final TS3Api api = query.getApi();
    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");

    api.registerAllEvents();
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    final TS3Config config = new TS3Config();
    config.setHost("77.77.77.77");
    config.setDebugLevel(Level.ALL);
    config.setLoginCredentials("serveradmin", "serveradminpassword");
   
    final TS3Query query = new TS3Query(config);
    query.connect();
   
    final TS3Api api = query.getApi();
    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");
   
    api.registerAllEvents();
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    final TS3Config config = new TS3Config();
    config.setHost("77.77.77.77");
    config.setDebugLevel(Level.ALL);
    config.setLoginCredentials("serveradmin", "serveradminpassword");
   
    final TS3Query query = new TS3Query(config);
    query.connect();
   
    final TS3Api api = query.getApi();
    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");

    for (Client c : api.getClients()) {
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Query

    final TS3Config config = new TS3Config();
    config.setHost("77.77.77.77");
    config.setDebugLevel(Level.ALL);
    config.setLoginCredentials("serveradmin", "serveradminpassword");
   
    final TS3Query query = new TS3Query(config);
    query.connect();
   
    final TS3Api api = query.getApi();
    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");

    api.registerAllEvents();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.