Prevent massive amount of mails being send.

Added new config: mails-per-minute, default 1000
This commit is contained in:
snowleo 2012-10-07 22:46:15 +02:00
parent 98d657ec4b
commit 0097f961b4
4 changed files with 36 additions and 2 deletions

View file

@ -439,6 +439,7 @@ public class Settings implements ISettings
chatRadius = _getChatRadius();
commandCosts = _getCommandCosts();
warnOnBuildDisallow = _warnOnBuildDisallow();
mailsPerMinute = _getMailsPerMinute();
}
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
@ -936,4 +937,15 @@ public class Settings implements ISettings
double maxSpeed = config.getDouble("max-walk-speed", 0.8);
return maxSpeed > 1.0 ? 1.0 : Math.abs(maxSpeed);
}
private int mailsPerMinute;
private int _getMailsPerMinute() {
return config.getInt("mails-per-minute", 1000);
}
@Override
public int getMailsPerMinute()
{
return mailsPerMinute;
}
}