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

26
LINES

< > BotCompany Repo | #1002979 // Save last question+answer in #talkingbots

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1597L/10K/35K).

1  
!752
2  
3  
static S lastInput;
4  
5  
p {
6  
  load("lastInput");
7  
}
8  
9  
synchronized answer {
10  
  if (neq(getChannel(), "devchannel, #talkingbots")) null;
11  
  
12  
  S answer = getSendingAnswer();
13  
  if (nempty(answer))
14  
    noteLast(answer);
15  
    
16  
  lastInput = s;
17  
  save("lastInput");
18  
}
19  
20  
static synchronized S getLastAnswer() {
21  
  ret noteLast_last;
22  
}
23  
24  
static synchronized S getLastQuestion() {
25  
  ret lastInput;
26  
}

Author comment

Began life as a copy of #1002977

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: #1002979
Snippet name: Save last question+answer in #talkingbots
Eternal ID of this version: #1002979/1
Text MD5: 686c6d5a86e57e6e57d6151cf27575de
Transpilation MD5: 9ca443e24399cd10128a0503b00beb9c
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-14 22:53:57
Source code size: 411 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 693 / 1355
Referenced in: [show references]