Implement /rangelock

More info: http://www.smogon.com/forums/threads/3517493/