4 * @addtogroup SpecialPage
10 function wfSpecialBlockme() {
11 global $wgRequest, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
15 if( !$wgBlockOpenProxies ||
$wgRequest->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) {
16 $wgOut->addWikiText( wfMsg( 'disabled' ) );
20 $blockerName = wfMsg( "proxyblocker" );
21 $reason = wfMsg( "proxyblockreason" );
22 $success = wfMsg( "proxyblocksuccess" );
24 $u = User
::newFromName( $blockerName );
25 $id = $u->idForName();
27 $u = User
::newFromName( $blockerName );
29 $u->setPassword( bin2hex( mt_rand(0, 0x7fffffff ) ) );
34 $block = new Block( $ip, 0, $id, $reason, wfTimestampNow() );
37 $wgOut->addWikiText( $success );