Package com.github.theholywaffle.teamspeak3

Examples of com.github.theholywaffle.teamspeak3.TS3Config


        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

    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

    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

    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

  private List<TS3Listener> listeners = new ArrayList<>();

  public EventManager() {
    map.put("notifytextmessage", new TextMessageEvent());
    map.put("notifycliententerview", new ClientJoinEvent());
    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
        new ChannelDescriptionEditedEvent());
    map.put("notifyclientmoved", new ClientMovedEvent());
View Full Code Here

    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
        new ChannelDescriptionEditedEvent());
    map.put("notifyclientmoved", new ClientMovedEvent());
  }
View Full Code Here

  public EventManager() {
    map.put("notifytextmessage", new TextMessageEvent());
    map.put("notifycliententerview", new ClientJoinEvent());
    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
        new ChannelDescriptionEditedEvent());
    map.put("notifyclientmoved", new ClientMovedEvent());
  }
View Full Code Here

      this.listeners.remove(l);
    }
  }

  public void fireEvent(String notifyName, String notifyBody) {
    TS3EventEmitter emitter = map.get(notifyName);
    if (emitter != null) {
      for (TS3Listener l : listeners) {
        emitter.fire(l, new DefaultArrayResponse(notifyBody).getArray()
            .get(0));
      }
    } else {
      throw new TS3UnknownEventException(notifyName + " " + notifyBody);
    }
View Full Code Here

    api.selectVirtualServerById(1);
    api.setNickname("PutPutBot");
    api.sendChannelMessage("PutPutBot is online!");

    api.registerAllEvents();
    api.addTS3Listeners(new TS3Listener() {

      public void onTextMessage(TextMessageEvent e) {
        System.out.println("Text message received in "
            + e.getTargetMode());
      }
View Full Code Here

TOP

Related Classes of com.github.theholywaffle.teamspeak3.TS3Config

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.