Index: includes/Autopromote.php
===================================================================
--- includes/Autopromote.php	(revision 44543)
+++ includes/Autopromote.php	(working copy)
@@ -109,6 +109,10 @@
 			case APCOND_INGROUPS:
 				$groups = array_slice( $cond, 1 );
 				return count( array_intersect( $groups, $user->getGroups() ) ) == count( $groups );
+			case APCOND_ISIP:
+				return $cond[1] == wfGetIP();
+			case APCOND_IPINRANGE:
+				return IP::isInRange( wfGetIP(), $cond[1] );
 			default:
 				$result = null;
 				wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
Index: includes/Defines.php
===================================================================
--- includes/Defines.php	(revision 44543)
+++ includes/Defines.php	(working copy)
@@ -224,3 +224,5 @@
 define( 'APCOND_AGE', 2 );
 define( 'APCOND_EMAILCONFIRMED', 3 );
 define( 'APCOND_INGROUPS', 4 );
+define( 'APCOND_ISIP', 5 );
+define( 'APCOND_IPINRANGE', 6 );
