Map.Entry<String, TrappedUser> e = it.next();
TrappedUser t = e.getValue();
- /* how many days have passed */
- int days = (int)((now.getTime() - t.lastTrap.getTime()) / (1000 * 60 * 60 * 24));
+ /* how many minutes have passed */
+ int minutes = (int)((now.getTime() - t.lastTrap.getTime()) / (1000 * 60));
- if (days >= trapbot.conf.expire)
+ if (minutes >= trapbot.conf.expire)
it.remove();
}
}
reload();
- expireTimer = Acidictive.scheduleWithFixedDelay(new ExpireTimer(), 1, TimeUnit.DAYS);
+ expireTimer = Acidictive.scheduleWithFixedDelay(new ExpireTimer(), 10, TimeUnit.MINUTES);
// magic!
releaseTimer = Acidictive.schedule(new ReleaseTimer(), new Random().nextInt(2700) + 2700, TimeUnit.SECONDS);
trapbot: TrapBot
# Our name for the channel that is the trap channel
trapchan: trapchan
-# Number of days before IPs added to the trap list are forgotten
-expire: 2
+# Number of minutes before IPs added to the trap list are forgotten
+expire: 30