Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
17 stars 16 forks source link

Restrict !promote command when game is full #33

Closed FabriceFABS closed 7 years ago

FabriceFABS commented 7 years ago

When numbers of players are reached from nbTeams / Teamsize exactly. With this, it avoids %p (nil) value taking a blank space in the message, like on BlackHoleHost2 for instance below :

[16:53:55] * BlackHoleHost2 * player(s) needed for battle "The BlackHoleHost - Revenge" [Balanced Annihilation V9.43, DeltaSiegeDry] ([AFUS]Ares)
[16:54:32] * [FAST]AutoHost1 * 60 player(s) needed for battle "** Tech Annihilation **" [Tech Annihilation v2.41.0, techno lands 3v3 v2] ([DIE]Vatermoerder)

You can, for instance, reject !promote command with a message like : Promote command is not needed, game is already full.

Reported ("talked" exactly) here > https://springrts.com/phpbb/viewtopic.php?f=92&t=36420&p=583721#p583721

Yaribz commented 7 years ago

Afaik, the promote message configured on BlackHole hosts was modified to not print the number of "wanted" players computed by SPADS (nbTeams * teamSize - actualNumberOfPlayers). This has nothing to do with !promote being used while battle is full.

FabriceFABS commented 7 years ago

Sorry, no, I remember I noticed this, some years ago.

Sorry to re-open it, I did the test just now on [ACE]Metallic 1v1 autohost, 104, with Phoenix Annihilation 1.01.

I changed my state from spec to play, I need a player.

[10:48:16]  <[ACE]FabriceFABS>  !promote
[10:48:16]  <*> [ACE]Metallic * Promoting battle in #main, #fr, #[ACE]

[10:48:16]  <*> [ACE]Metallic * We need for | Phoenix Annihilation V1.01 | 1 players | on Tundra map | JOIN NOW to make SPRING Great Again *\o/* !

-

[10:49:44] <> [ACE]Metallic We need for | Phoenix Annihilation V1.01 | players | on Tundra map | JOIN NOW to make SPRING Great Again \o/ !


PS : And my promote msg got the %p as you noticed above.
So can you add eventually a little fix that, makes impossible to !promote when wanted players = 0 with an error message ?

Thank you
Yaribz commented 7 years ago

using !promote when a bot is in the battle = I want a human player to join to replace the bot

This is a perfectly correct use of !promote in my point of view...

Yaribz commented 7 years ago

Concerning the %p being empty when target number of players/bots is reached, it's normal, yes. What I was saying is just that %p had been removed on some hosts some time ago, because the autohost admins didn't want to print the number of missing players from SPADS point of view, they just wanted to promote the fact that "some players" are needed, not a specific number.

FabriceFABS commented 7 years ago

Sorry OK, I didn't understand it in that way.

FabriceFABS commented 7 years ago

0.12.2a: prevent using !promote command when battle is locked or full

I don't understand finally : Seems you did an update to prevent it in a such case ?

Yaribz commented 7 years ago

!promote should not be used when battle is full of human players. But if battle is full because of AI bots, it makes sense to use !promote if you want to replace AI bots by human players.

FabriceFABS commented 7 years ago

I agree totally for your last message just above mine's. For the following :

using !promote when a bot is in the battle = I want a human player to join to replace the bot

This is a perfectly correct use of !promote in my point of view...

I made this way totally by hazard, because I didn't got any player to make the test for showing the fact that %p disappear :)

And finally an update came... Good :+1: