!7

html {
  File pwFile = javaxSecretDir("eezee-password.txt");
  S realPass = loadTextFileTrim(pwFile);
  if (empty(realPass)) ret subBot_serve500("Pls define password: " + pwFile);
  if (!eq(params.get('_pass), realPass)) ret subBot_serve500("Bad password");
  
  S server = params.get('server);
  if (empty(server)) ret "No server given";
  
  O eezee = objectWhereIC(vmBus_queryAll('eeZee), serverName := server);
  if (eezee == null) ret subBot_serve500("eeZee for " + quote(server) + " not found");
  
  S post = params.get('post);
  long channelID = parseLong(params.get('channel));
  
  if (nempty(post) && channelID != 0) {
    dm_call(eezee, 'postInChannel, channelID, post);
    ret "OK, posted";
  }
  
  //ret "No command given";
  ret subBot_serveText(dm_call(eezee, '_actualPrintLog));
}