Simplify DoSurgeProtection

This commit is contained in:
Alex Schroeder
2014-12-03 08:41:37 +01:00
parent 471994f7b1
commit aa77f2ce2f

View File

@@ -3893,8 +3893,7 @@ sub DoDebug {
sub DoSurgeProtection {
return unless $SurgeProtection;
my $name = GetParam('username', '');
$name = GetRemoteHost() if not $name and $SurgeProtection;
my $name = GetParam('username', GetRemoteHost());
return unless $name;
ReadRecentVisitors();
AddRecentVisitor($name);