Page 1 of 1
Plugin API: call SPADS commands & customize launchGame() checks
Posted: 23 Jan 2015, 17:51
by Jools
One more short question: is there a similar command as "queuelobbycommand" for queing a spads command that was added with "addSpadsCommandHandler"?
I can use ::executeCommand($source, $user, $params), but I don't think that's meant to be used that way.
Re: SPADS AutoHost
Posted: 23 Jan 2015, 17:56
by Jools
And one request: would it be possible to add an option to the launchgame command, I think it would be like this:
sub launchGame {
my ($force,$checkOnly,$automatic,$ignoreUnready)=@_;
Here:
https://github.com/Yaribz/SPADS/blob/ma ... s.pl#L4048
So that a plugin can by pass the unready check without re-implementing the whole launch procedure. I hope I have understood this correctly but I think I have.
Re: SPADS AutoHost
Posted: 23 Jan 2015, 21:56
by bibim
Jools wrote:One more short question: is there a similar command as "queuelobbycommand" for queing a spads command that was added with "addSpadsCommandHandler"?
I can use ::executeCommand($source, $user, $params), but I don't think that's meant to be used that way.
There is no queue system for SPADS commands, they are executed directly.
You can indeed use executeCommand(), there shouldn't be any problem with that. Or you can even call your handler directly.
Jools wrote:And one request: would it be possible to add an option to the launchgame command, I think it would be like this:
sub launchGame {
my ($force,$checkOnly,$automatic,$ignoreUnready)=@_;
Here:
https://github.com/Yaribz/SPADS/blob/ma ... s.pl#L4048
So that a plugin can by pass the unready check without re-implementing the whole launch procedure. I hope I have understood this correctly but I think I have.
Yeah I guess this could be useful for customizations, I will take a look at this soon.
Re: SPADS AutoHost
Posted: 30 Jan 2015, 21:28
by bibim
Jools wrote:And one request: would it be possible to add an option to the launchgame command,
[...]
So that a plugin can by pass the unready check without re-implementing the whole launch procedure.
In SPADS 0.11.24a (available in unstable only for now), I modified the launchGame function to accept a $checkBypassLevel parameter. If you set this parameter to 1 it will bypass the ready check.