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: 2804
Joined: 23 Feb 2009, 16:29

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

Post by Jools » 23 Jan 2015, 17:51

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.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools » 23 Jan 2015, 17:56

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.
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim » 23 Jan 2015, 21:56

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.
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim » 30 Jan 2015, 21:28

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.
0 x

Post Reply

Return to “SPADS AutoHost”

cron