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

57
LINES

< > BotCompany Repo | #1002017 // Eleutheria Main, including Slack Bot (LIVE)

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

Libraryless. Click here for Pure Java version (14681L/112K/323K).

!7

!include once #1002615 // master()

// Options for smaller heap with limit to allow other VMs to start on 1GB machine. Also, headless to allow image rendering on server.
static S vmArgs = "-Xmx384m -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC -Djava.awt.headless=true";

// Options for smaller heap
//static S vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC";

// Options for max speed & reactivity - some claim this might cause problems (https://developer.jboss.org/thread/228920?start=75&tstart=0)
//static S vmArgs = "-server -XX:+TieredCompilation";

// Options for max longterm throughput
//static S vmArgs = "-server";

// Homepage, Talk to Eleu, Web Auth, Cookies
static L<S> seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157");

sbool doSlack = false;

!include #1002268 // Slack Bot
!include #1002576 // Web Serving
!include #1002578 // Eleu Core
!include #1013904 // Eleu web socket

static boolean actuallyPost = true;
static S botUserName = "eleu_learns_to_think";
static L<S> actualBotUserNames = litlist("eleu", "connector");

static int[] webServerPorts = {80};
static int httpsPort = 443; // set to 0 for no https serving

p {
  becomeBotVMIfFirst();
  webInit();
 
  eleu_webSocket_init();
  
  if (httpsPort != 0) pcall {
    File keystore = secretProgramFile(programID(), "keystore.jks");
    S pass = loadSecretTextFileMandatory("keystore-pass").trim();
    serveHttps(httpsPort, keystore, pass);
  }
  
  if (doSlack)
    initSlackBot();
  dediSay("Booting...");
  coreInit();
  
  for (S id : seedBots)
    call(getDispatcher(), "addSeedBot", id);
    
  dediSay("Yo, back online!");
  if (doSlack)
    slackBotLoop();
}

Author comment

Began life as a copy of #1001915

download  show line numbers  debug dex  old transpilations   

Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, etryasgzbotu, gwrvuhgaqvyk, iqyiutiwpefi, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002017
Snippet name: Eleutheria Main, including Slack Bot (LIVE)
Eternal ID of this version: #1002017/20
Text MD5: db4d81021f6fc02fa6761e021fd9e1f5
Transpilation MD5: 69e08cf0ac68b721a6140fb126064d57
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-02 13:11:08
Source code size: 1756 bytes / 57 lines
Pitched / IR pitched: No / No
Views / Downloads: 1859 / 10408
Version history: 19 change(s)
Referenced in: #1001989 - List User Feedback Bot
#1002278 - Eleutheria Main 2 (developing)
#1002335 - eleuSnippetPassword
#1002591 - Eleu Sister Main for tinybrain.de
#1002710 - Starter for #1002017 (Eleutheria Main), old server
#1012699 - Watch Dog for Eleu (only run on server) [OLD]
#1013896 - Eleutheria Main for butter.botcompany.de + Stefan's OS (LIVE)
#1022823 - Eleutheria Main for butter.botcompany.de as Dyn Module [dev.]
#3000190 - Answer for stefanreich(>> t 20 questions)
#3000195 - Answer for stefanreich (>> y)
#3000196 - Answer for stefanreich (>> y)
#3000197 - Answer for stefanreich (>> program data sizes)
#3000198 - Answer for stefanreich (>> program data sizes)
#3000199 - Answer for stefanreich (>> program data sizes)
#3000200 - Answer for stefanreich (>> program data sizes)
#3000201 - Answer for stefanreich (>> list all files)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)
#3000475 - Smart Bot's answer to: !fresh recentlyChangedSnippets()