Implement /rangelock

More info: http://www.smogon.com/forums/threads/3517493/
Right, should have thought of that before. Updated