var minisrv_service_file = true; if (request_headers.query.url) { headers = `300 OK Location: ${request_headers.query.url}`; } else { headers = `200 OK Connection: Keep-Alive wtv-expire-all: wtv-home:/splash wtv-expire-all: wtv-flashrom: Content-type: text/html` var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted") var comp_type = wtvmime.shouldWeCompress(session_data, 'text/html'); var compstatus = "uncompressed"; switch (comp_type) { case 1: compstatus = "wtv-lzpf"; break; case 2: compstatus = "gzip (level 9)"; break; } var unread_mailcount = session_data.mailstore.countUnreadMessages(0) var mailbox_gif_num = 0; // no messages if (unread_mailcount > 0) { if (unread_mailcount == 1) mailbox_gif_num = 1; else mailbox_gif_num = 2; } data = ` Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}

Login
Setup
Discuss
`; data += `
Help (WIP)
Mail
Favorites
Flashroms
Search
Welcome to ${minisrv_config.config.service_name}`; if (session_data.getSessionData("registered")) data += ", " + session_data.getSessionData("subscriber_username") + "!"; data += `
Status: ${cryptstatus} (${compstatus})

  Main Menu

  • wtv-admin new!
  • `; if (session_data.hasCap("client-can-do-chat")) { data += "
  • IRC Chat Test
  • \n" } if (session_data.hasCap("client-has-disk")) { // only show disk stuff if client has disk data += "
  • DiskHax ~ VFatHax
  • \n"; if (session_data.hasCap("client-can-do-macromedia-flash2")) { // only show demo if client can do flash2 data += "
  • Old DealerDemo: Download ~ Access
  • \n"; } } data += `
`; // for development if (fs.existsSync(service_vaults[0] + "/" + service_name + "/home.zefie.html")) { data += fs.readFileSync(service_vaults[0] + "/" + service_name + "/home.zefie.html", { 'encoding': 'utf8' }); } data += `
Connection Speed: &rate;
minisrv v${minisrv_config.version}${(minisrv_config.config.git_commit) ? ' git-' + minisrv_config.config.git_commit : ''}, hosted by ${minisrv_config.config.service_owner}  
` }