#108 not only validate the PAUSE vote clientside but also server-side to reduce abuse
This commit is contained in:
@@ -524,6 +524,8 @@ const applygamma [
|
||||
|
||||
addOnLoadAlways applygamma
|
||||
|
||||
alias togglepause [pause (! (curpausemode) ) ]
|
||||
|
||||
// get optional scripts on demand
|
||||
tempalias load_autosave [ run opt/autosave ; alias load_autosave [] ]
|
||||
tempalias load_compatibility [ run opt/compatibility ; alias load_compatibility [] ]
|
||||
|
||||
@@ -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