$wgProxyMemcExpiry = 86400;
$wgProxyKey = 'W1svekXc5u6lZllTZOwnzEk1nbs';
$wgProxyList = array(); # big list of banned IP addresses, in the keys not the values
+$wgAccountCreationThrottle = 0; # Number of accounts each IP address may create, 0 to disable. Requires memcached
# Client-side caching:
$wgCachePages = true; # Allow client-side caching of pages
{
global $wgUser, $wgOut;
global $wgMaxNameChars;
+ global $wgMemc, $wgAccountCreationThrottle, $wgDBname, $wgIP;
+
+ if ( $wgAccountCreationThrottle ) {
+ $key = "$wgDBname:acctcreate:ip:$wgIP";
+ $value = $wgMemc->incr( $key );
+ if ( !$value ) {
+ $wgMemc->set( $key, 0, 86400 );
+ }
+ if ( $value > $wgAccountCreationThrottle ) ) {
+ $this->throttleHit();
+ return;
+ }
+ }
if (!$wgUser->isAllowedToCreateAccount()) {
$this->userNotPrivilegedMessage();
return $this->successfulLogin( wfMsg( "loginsuccess", $wgUser->getName() ) );
}
}
+
+ /* private */ function throttleHit( $limit ) {
+ global $wgOut;
+
+ $wgOut->addWikiText( wfMsg( 'acct_creation_throttle_hit', $limit ) );
+ }
}
?>
Please log in again after you receive it.",
'loginend' => ' ',
'mailerror' => "Error sending mail: $1",
+'acct_creation_throttle_hit' => 'Sorry, you have already created $1 accounts. You can\'t make any more.',
# Edit page toolbar
'bold_sample'=>'Bold text',