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

14
LINES

< > BotCompany Repo | #1010791 // ai1lol_onNewUAIP - on new user agent and IP seen

JavaX fragment (include)

1  
// f : voidfunc(S ua, S ip)
2  
static void ai1lol_onNewUAIP(double interval, fO f) {
3  
  doEvery(toMS(interval), 0, new Runnable {
4  
    S last;
5  
    
6  
    public void run() {
7  
      L<S> lines = tlft(loadPage("http://ai1.lol/1002157/raw/uaips?after=" + urlencode(last)));
8  
      L l = (L) map safeUnstructure(lines);
9  
      for (O x : l)
10  
        pcallF(f, getString(x, 'ua), getString(x, 'ip));
11  
      if (nempty(l)) last = last(lines);
12  
    }
13  
  });
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010791
Snippet name: ai1lol_onNewUAIP - on new user agent and IP seen
Eternal ID of this version: #1010791/8
Text MD5: 0b9dcada985c9bc37d9fee94d360d428
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-03 18:31:18
Source code size: 451 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 389 / 444
Version history: 7 change(s)
Referenced in: [show references]