#108 not only validate the PAUSE vote clientside but also server-side to reduce abuse
This commit is contained in:
@@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user