mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
[MOD] Hash-based name conflict resolution
Still basic, but should prevent basic name issues.
This commit is contained in:
parent
c0c13883d1
commit
59cbd8b22d
11 changed files with 147 additions and 109 deletions
16
src/Main.c
16
src/Main.c
|
|
@ -101,15 +101,25 @@ Main(Array *args, HashMap *env)
|
|||
ParseeInitialiseOIDTable();
|
||||
ParseeInitialiseHeadTable();
|
||||
|
||||
Log(LOG_NOTICE, "Setting up local Matrix user...");
|
||||
ASRegisterUser(parsee_conf, parsee_conf->sender_localpart);
|
||||
|
||||
conf.port = parsee_conf->port;
|
||||
conf.threads = parsee_conf->http_threads;
|
||||
conf.maxConnections = conf.threads << 2;
|
||||
conf.handlerArgs = ParseeInitData(jabber);
|
||||
conf.handler = ParseeRequest;
|
||||
|
||||
Log(LOG_NOTICE, "Setting up local Matrix user...");
|
||||
if (ASRegisterUser(parsee_conf, parsee_conf->sender_localpart))
|
||||
{
|
||||
char *parsee = ParseeMXID(conf.handlerArgs);
|
||||
ASSetAvatar(parsee_conf,
|
||||
parsee,
|
||||
"mxc://tedomum.net/"
|
||||
"7e228734ec8e792960bb5633e43f0cb845f709f61825130490034651136"
|
||||
);
|
||||
ASSetName(parsee_conf, parsee, "Parsee bridge");
|
||||
Free(parsee);
|
||||
}
|
||||
|
||||
Log(LOG_NOTICE, "Starting up local cronjobs...");
|
||||
cron = CronCreate( 10 SECONDS );
|
||||
CronEvery(cron, 5 MINUTES, ParseeCleanup, conf.handlerArgs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue