Jump to content
trainux

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

Recommended Posts

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.

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...