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

10
LINES

< > BotCompany Repo | #1010756 // stefansChat_readHistory

JavaX fragment (include)

please include function stefansChat_onLine.

// n = max number of lines to get (from most recent)
static L<S> stefansChat_readHistory(int n) {
  int b = stefansChat_onLine_firstRead;
  if (b < 0) b = stefansChat_n();
  int a = max(0, b-n);
  L<Map> msgs = (L) safeUnstruct(loadPage("http://botcompany.de/1008998/raw/msgs-from-to?a=" + a + "&b=" + b));
  ret collect(msgs, 'text);
}

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: #1010756
Snippet name: stefansChat_readHistory
Eternal ID of this version: #1010756/5
Text MD5: 3bab371db27d948755b6f2bb8dd7c456
Author: stefan
Category: javax / chat
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-14 21:48:30
Source code size: 390 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 431
Version history: 4 change(s)
Referenced in: [show references]