about summary refs log tree commit diff stats
path: root/client/trunk/src/com/fourisland
diff options
context:
space:
mode:
Diffstat (limited to 'client/trunk/src/com/fourisland')
-rw-r--r--client/trunk/src/com/fourisland/instadisc/InstaDiscView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java index b706126..24d18ee 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java
@@ -378,16 +378,18 @@ public class InstaDiscView extends FrameView {
378 } 378 }
379 379
380 public void updateTimer() { 380 public void updateTimer() {
381 int delay = 0; 381 int delay = (1000 * 60 * 60);
382 382
383 if (ipCheckTimer.isRunning()) { 383 try {
384 ipCheckTimer.stop(); 384 ipCheckTimer.stop();
385 } catch (NullPointerException ex) {
386
385 } 387 }
386 388
387 if (Wrapper.getConfig("ipCheckUnit").equals("day")) { 389 if (Wrapper.getConfig("ipCheckUnit").equals("day")) {
388 delay = 1000 * 60 * 60 * 24 * Integer.decode(Wrapper.getConfig("ipCheckValue")); 390 delay *= (24 * Integer.decode(Wrapper.getConfig("ipCheckValue")));
389 } else if (Wrapper.getConfig("ipCheckUnit").equals("hour")) { 391 } else if (Wrapper.getConfig("ipCheckUnit").equals("hour")) {
390 delay = 1000 * 60 * 60 * Integer.decode(Wrapper.getConfig("ipCheckValue")); 392 delay *= Integer.decode(Wrapper.getConfig("ipCheckValue"));
391 } 393 }
392 394
393 ipCheckTimer = new Timer(delay, new ActionListener() { 395 ipCheckTimer = new Timer(delay, new ActionListener() {