[ADD/WIP] Start having MUCwork half-decent

Still lots of things required(like using the users JIDs whenever
possible, otherwise dropping to occupant ID), images, replies, rich data
with HTML and whatever XMPP has, etc...
This commit is contained in:
LDA 2024-06-21 18:31:43 +02:00
commit a84ce05b9d
12 changed files with 329 additions and 40 deletions

View file

@ -57,6 +57,7 @@ Main(void)
"%s - v%s (Cytoplasm %s)",
NAME, VERSION, CytoplasmGetVersionStr()
);
Log(LOG_INFO, "=======================");
LogConfigIndent(LogConfigGlobal());
ParseeConfigLoad("parsee.json");
@ -102,6 +103,11 @@ Main(void)
goto end;
}
Log(LOG_NOTICE, "Listening to MUCs...");
LogConfigIndent(LogConfigGlobal());
ParseeSendPresence(conf.handlerArgs);
LogConfigUnindent(LogConfigGlobal());
sigAction.sa_handler = SignalHandler;
sigfillset(&sigAction.sa_mask);
sigAction.sa_flags = SA_RESTART;
@ -123,14 +129,13 @@ Main(void)
SIGACTION(SIGUSR1, &sigAction, NULL);
#undef SIGACTION
Log(LOG_INFO, "%d", XMPPQueryMUC(jabber, "rootard@muc.ari.lt", NULL));
server = HttpServerCreate(&conf);
HttpServerStart(server);
LogConfigUnindent(LogConfigGlobal());
Log(LOG_INFO, "=======================");
HttpServerJoin(server);
end:
LogConfigUnindent(LogConfigGlobal());
Log(LOG_INFO, "Exiting...");
HttpServerFree(server);
ParseeConfigFree();