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.
Plugin API: call SPADS commands & customize launchGame() checks
Moderators: Moderators, Lobby Developers, SPADS AutoHost
Re: SPADS AutoHost
And one request: would it be possible to add an option to the launchgame command, I think it would be like this:
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.
Here:sub launchGame {
my ($force,$checkOnly,$automatic,$ignoreUnready)=@_;
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
There is no queue system for SPADS commands, they are executed directly.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.
You can indeed use executeCommand(), there shouldn't be any problem with that. Or you can even call your handler directly.
Yeah I guess this could be useful for customizations, I will take a look at this soon.Jools wrote:And one request: would it be possible to add an option to the launchgame command, I think it would be like this:
Here:sub launchGame {
my ($force,$checkOnly,$automatic,$ignoreUnready)=@_;
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
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.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.