automatic !stats into battleroom at end of game?
Moderators: Moderators, Lobby Developers, SPADS AutoHost
automatic !stats into battleroom at end of game?
Is there a quick way to do this or would it involve a plug-in? I guess the spads.pl/hstats subroutine could not be used directly due to the SayPrivate call. Should it not use answer() instead?
Re: automatic !stats into battleroom at end of game?
Would be easy to achieve with a plugin. IIRC it's called sayBattle or something like that.
Re: automatic !stats into battleroom at end of game?
The hStats subroutine doesn't use answer() because it would be too easy to flood the battleroom with a few !stats commands (so that the antiflood protection wouldn't be effective). Basically only commands which generate small output use answer().
The easiest way to do what you want is indeed to create a plugin starting from the simple plugin template and implement the onGameEnd callback by copy pasting the relevant parts of the hStats subroutine code (and replacing the sayPrivate call by a sayBattle call).
I could isolate the stats output generating code into a new subroutine if you want, so that you can re-use the code in a plugin without duplicating it.
The easiest way to do what you want is indeed to create a plugin starting from the simple plugin template and implement the onGameEnd callback by copy pasting the relevant parts of the hStats subroutine code (and replacing the sayPrivate call by a sayBattle call).
I could isolate the stats output generating code into a new subroutine if you want, so that you can re-use the code in a plugin without duplicating it.
Re: automatic !stats into battleroom at end of game?
Could the flood happen together with the awards printout? It would be appropriate there. Similarly, issuing !stats could output both the stats and awards into PM.