#108 not only validate the PAUSE vote clientside but also server-side to reduce abuse

This commit is contained in:
drian
2021-04-14 09:47:48 +02:00
parent 8255bab870
commit 4fd14cf6c2
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -237,10 +237,11 @@ struct pauseaction : serveraction
{
int mode;
void perform() { setpausemode(mode); }
virtual bool isvalid() { return sg->mastermode == MM_MATCH; }
pauseaction(int mode) : mode(mode)
{
role = roleconf('p');
copystring(desc, (mode == 1) ? "pause the game" : "resume the game");
if(isvalid()) copystring(desc, (mode == 1) ? "pause the game" : "resume the game");
}
};