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).

!752

static S lastInput;

p {
  load("lastInput");
}

synchronized answer {
  if (neq(getChannel(), "devchannel, #talkingbots")) null;
  
  S answer = getSendingAnswer();
  if (nempty(answer))
    noteLast(answer);
    
  lastInput = s;
  save("lastInput");
}

static synchronized S getLastAnswer() {
  ret noteLast_last;
}

static synchronized S getLastQuestion() {
  ret lastInput;
}

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: 692 / 1354
Referenced in: [show references]