Examples of TS3Config


Examples of com.github.theholywaffle.teamspeak3.TS3Config


    // 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 " +
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Config


    // returns a TS3Config, configurated to connect to the server given by the BotConfiguration
    private TS3Config getServerConfig()
    {
        TS3Config config = new TS3Config();
        config.setHost( mBotConfiguration.getHostName() );
        config.setLoginCredentials( mBotConfiguration.getLoginName(), mBotConfiguration.getLoginPassword() );

        return config;
    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Config

    }


    public TS3Config getConfig()
    {
        TS3Config cfg = new TS3Config();
        cfg.setHost( this.mConfig.getHostName() );
        cfg.setLoginCredentials( this.mConfig.getLoginName(), this.mConfig.getLoginPassword() );
        cfg.setDebugLevel( Level.ALL );

        return cfg;
    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.TS3Config

    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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

  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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

  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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

  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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

  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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

import com.github.theholywaffle.teamspeak3.api.wrapper.Channel;

public class TrollExample {

  public static void main(String[] args) {
    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

Examples of com.github.theholywaffle.teamspeak3.TS3Config

        newTroll();
    }

    public static void newTroll() throws IOException
    {
        final TS3Config config = new TS3Config();
        final HashMap<String, String> configMap = ConfigLoader.getConfigLoader().configMap;

        config.setHost( configMap.get( "host" ) );
        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();
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.