2 function wfSpecialBlockme()
4 global $wgIP, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
6 if ( !$wgBlockOpenProxies ||
$_REQUEST['ip'] != md5( $wgIP . $wgProxyKey ) ) {
7 $wgOut->addWikiText( wfMsg( "disabled" ) );
11 $blockerName = wfMsg( "proxyblocker" );
12 $reason = wfMsg( "proxyblockreason" );
13 $success = wfMsg( "proxyblocksuccess" );
15 $u = User
::newFromName( $blockerName );
16 $id = $u->idForName();
18 $u = User
::newFromName( $blockerName );
20 $u->setPassword( bin2hex( mt_rand(0, 0x7fffffff ) ) );
25 $block = new Block( $wgIP, 0, $id, $reason, wfTimestampNow() );
28 $wgOut->addWikiText( $success );