Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

25
LINES

< > BotCompany Repo | #1027400 // Eleu: Clear Blocked IPs [only on server]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (3889L/20K).

!7

cmodule ClearBlockedIPs > DynSingleFunction {
  transient Set<S> blockedIPs;
  transient JList list;
  
  start {
    // do it on boot because, sadly, during Eleu startup
    // legitimate clients may be blocked
    doIt(); 
    dm_doEveryAndNow(10.0, r getBlockedIPs);
  }
  
  void doIt {
    call(mainMainClass(), 'clearBlockedIPs);
    print("Done!");
  }

  visual centerAndSouthWithMargins(jCenteredSection("Blocked IPs", list = jlist()), super);

  void getBlockedIPs {
    setField(blockedIPs := sortInPlace(cloneList((Cl<S>) getOpt(mainMainClass(), "blockedIPs"))));
    fillListWithStrings(list, blockedIPs);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027400
Snippet name: Eleu: Clear Blocked IPs [only on server]
Eternal ID of this version: #1027400/5
Text MD5: 834a59887d381961fd0cd73b0905ecb3
Transpilation MD5: f0cce6f6cd0ed125fd8b32045a567978
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-03 12:22:57
Source code size: 628 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 104733
Version history: 4 change(s)
Referenced in: [show references]