Plugin API: call SPADS commands & customize launchGame() checks

Plugin API: call SPADS commands & customize launchGame() checks

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Plugin API: call SPADS commands & customize launchGame() checks

Post 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.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post 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.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post 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.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post 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.
Post Reply

Return to “SPADS AutoHost”