Index: trunk/extensions/MWBlocker/MWBlockerHook.php |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +require_once( 'MWBlocker.php' ); |
| 5 | + |
| 6 | +$wgExtensionFunctions[] = 'mwBlockerHookSetup'; |
| 7 | + |
| 8 | +function mwBlockerHookSetup() { |
| 9 | + global $wgHooks; |
| 10 | + // create account |
| 11 | + $wgHooks['AddNewAccount'][] = 'mwBlockerCheck'; |
| 12 | +} |
| 13 | + |
| 14 | +function mwBlockerCheck() { |
| 15 | + $ip = wfGetIP(); |
| 16 | + MWBlocker::queueCheck( $ip, "creating account" ); |
| 17 | + return true; |
| 18 | +} |
| 19 | + |
| 20 | +?> |
Property changes on: trunk/extensions/MWBlocker/MWBlockerHook.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 21 | + native |
Added: svn:keywords |
2 | 22 | + Author Date Id Revision |