Skip to content
Permalink
Browse files

競技中にこれができないあたり残念

- githubでraw扱いされて、コード見づらいので修正しとく
  • Loading branch information
kfly8 committed Sep 28, 2014
1 parent faacb1f commit 7c6e6d2a1df780f6cfaa2d0c66f8797a85cb9ad2
Showing with 29 additions and 200,050 deletions.
  1. +1 −1 init.sh
  2. +2 −2 perl/init.pl
  3. +26 −200,047 perl/lib/Isu4Qualifier/Web.pm
@@ -11,7 +11,7 @@ myhost=127.0.0.1
myport=3306
mysql -h ${myhost} -P ${myport} -u ${myuser} -e "DROP DATABASE IF EXISTS ${mydb}; CREATE DATABASE ${mydb}"
mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/schema.sql
#mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/dummy_users.sql
mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/dummy_users.sql
mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/dummy_log.sql
mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/ip_login_last_failure_count.sql
mysql -h ${myhost} -P ${myport} -u ${myuser} ${mydb} < sql/user_login_last_failure_count.sql
@@ -30,8 +30,8 @@
for my $user_id (keys %last_failure_count) {
$redis->set("user_login_last_failure_count:$user_id", $last_failure_count{$user_id}, $noop);
if ($last_failure_count{$user_id} >= $config->{user_lock_threshold}) {
my $user = $Isu4Qualifier::Web::USERS[$user_id - 1];
$redis->sadd(locked_user => $user->[Isu4Qualifier::Web::LOGIN()]);
my $user = $Isu4Qualifier::Web::USERS->[$user_id - 1];
$redis->sadd(locked_user => $user->{login});
}
}
$redis->wait_all_responses;

0 comments on commit 7c6e6d2

Please sign in to comment.
You can’t perform that action at this time.