Package com.github.theholywaffle.teamspeak3.api.wrapper

Examples of com.github.theholywaffle.teamspeak3.api.wrapper.Binding


    public static void main( String[] args ) throws IOException
    {
        HashMap<String, String> configMap = ConfigLoader.getConfigLoader().configMap;
        int i = 0;

        TS3Config config1 = new TS3Config();
        config1.setHost( configMap.get( "host" ) );
        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


  public static void main(String[] args) {
    new ChatBotExample();
  }

  public CreateChannelExample() {
    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();
View Full Code Here

  public static void main(String[] args) {
    new EventListenerExample();
  }

  public EventListenerExample() {
    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();
View Full Code Here

  public static void main(String[] args) {
    new ChatBotExample();
  }

  public ChatBotExample() {
    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();
View Full Code Here

  public static void main(String[] args) {
    new ClientInfoExample();
  }

  public ClientInfoExample() {
    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();
View Full Code Here

        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

    // 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


    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

        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

     * @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

TOP

Related Classes of com.github.theholywaffle.teamspeak3.api.wrapper.Binding

Copyright © 2018 www.massapicom. 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.