Jump to content

Error to auto start session with "A Simple Login Handler"


Recommended Posts

Posted
7 hours ago, FrostBug said:

Maybe didn't execute the event properly

Here as I have the code.

LoginEvent loginEvent;
@Override
public int onLoop() throws InterruptedException{
	if(!getClient().isLoggedIn()) {
		loginEvent = new LoginEvent(usuario,clave);
		getBot().addLoginListener(loginEvent);
		execute(loginEvent);
	}else {
		doTasks();
	}
	return 1000;
}

It is assumed that onLoop() is repeated in an interval as indicated in the "return", in this case 1 second.

 

Posted (edited)
16 minutes ago, trainux said:

Here as I have the code.


LoginEvent loginEvent;
@Override
public int onLoop() throws InterruptedException{
	if(!getClient().isLoggedIn()) {
		loginEvent = new LoginEvent(usuario,clave);
		getBot().addLoginListener(loginEvent);
		execute(loginEvent);
	}else {
		doTasks();
	}
	return 1000;
}

It is assumed that onLoop() is repeated in an interval as indicated in the "return", in this case 1 second.

 

The login handler seems to pause the ScriptExecutor. This would conflict with the fact that it's also a ResponseCode listener, as the ResponseCode listeners (I believe) are invoked between calls to onLoop (which will not happen when ScriptExecutor is paused).

Perhaps it's outdated.

Edited by FrostBug
Posted
54 minutes ago, FrostBug said:

The login handler seems to pause the ScriptExecutor. This would conflict with the fact that it's also a ResponseCode listener, as the ResponseCode listeners (I believe) are invoked between calls to onLoop (which will not happen when ScriptExecutor is paused).

Perhaps it's outdated.

any solution?
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...