https://bugzilla.wikimedia.org/show_bug.cgi?id=62701

Nathan Larson <nathanlarson3...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|PATCH_TO_REVIEW             |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Nathan Larson <nathanlarson3...@gmail.com> ---
Darn, wish I'd known about that extension yesterday. Anyway, it looks like
you're right about the userCan hook; this adaptation of
[[mw:Extension:RudeProxyBlock]] works:

$wgHooks['userCan'][] = 'efBlockOpenProxies';
$wgRudeProxyBlockDelimiter = "\n";

function efBlockOpenProxies( &$title, &$user, $action, &$result ) {
    if ( $action == 'edit' ) {
        global $wgRudeProxyBlockDelimiter, $wgProxyList;
        $ip = $wgUser->getRequest()->getIP();
        $openProxies = explode( $wgRudeProxyBlockDelimiter, wfMsg(
'openproxylist' ) );
        if ( in_array( $ip, $openProxies ) ) {
            $wgProxyList[] = $ip;
        }
    }
    return true;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to