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() );