11f4c738db85f16f6ceee20a8d7bd1d529cdb7f6
5 * @subpackage SpecialPage
11 function wfSpecialBlockme()
13 global $wgBlockOpenProxies, $wgOut, $wgProxyKey;
17 if ( !$wgBlockOpenProxies ||
$_REQUEST['ip'] != md5( $ip . $wgProxyKey ) ) {
18 $wgOut->addWikiText( wfMsg( "disabled" ) );
22 $blockerName = wfMsg( "proxyblocker" );
23 $reason = wfMsg( "proxyblockreason" );
24 $success = wfMsg( "proxyblocksuccess" );
26 $u = User
::newFromName( $blockerName );
27 $id = $u->idForName();
29 $u = User
::newFromName( $blockerName );
31 $u->setPassword( bin2hex( mt_rand(0, 0x7fffffff ) ) );
36 $block = new Block( $ip, 0, $id, $reason, wfTimestampNow() );
39 $wgOut->addWikiText( $success );