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

28
LINES

< > BotCompany Repo | #1000935 // reportToChat

JavaX fragment (include)

static void reportToChat(final S s) {
  reportToChat(s, false);
}

static void reportToChat(final S s, boolean silent) {
  Class javax = getJavaX();
  if (!_inCore()) {
    call(javax, "reportToChat", s, silent);
    ret;
  }
  
  if (s == null || s.length() == 0) return;
  if (!silent)
    print("reportToChat: " + quote(s));
  reportToChat_getChatThread().add(runnable {
    startChatServerIfNotUp();
    waitForChatServer();
    chatSend(s);
  });
}

static Q reportToChat_q;

static Q reportToChat_getChatThread() {
  if (reportToChat_q == null)
    reportToChat_q = new Q("reportToChat", true);
  return reportToChat_q;
}

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

1 comment(s) hidden. show

Snippet ID: #1000935
Snippet name: reportToChat
Eternal ID of this version: #1000935/3
Text MD5: 49ad17ac01cf246d4aa69a2792f2bc68
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-20 16:42:09
Source code size: 654 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 1008 / 1254
Version history: 2 change(s)
Referenced in: [show references]