I'm doing something a little roundabout in my plugin, and wanted to ask if you thought it should become part of the normal API.
What I'm doing:
Code: Select all
my $builtin_start = $::spadsHandlers{start};
addSpadsCommandHandler({start => sub ($source, $username, $params, $checkOnly) {
my $backend_says_ok_start = 1; # <API call>
if ($backend_says_ok_start) {
$builtin_start->(@_);
} else {
sayBattle("NOT OK");
}
}}, 1);
Do you think there should be a more straightforward way of hooking !start? Either by exposing launchGame directly, or by some sort of command-chain-fallback thingy, where one !start hook could work and then yield to the next with a successful return val (or something). In either case (or some other one), let me know, I'd be happy to see about a pull request once I get this S44 zombies thing off the ground.