mirror of
https://github.com/WCBROW01/zblock.git
synced 2025-12-11 20:18:07 -05:00
18 lines
409 B
C
18 lines
409 B
C
#define _GNU_SOURCE
|
|
#include <stdio.h>
|
|
|
|
#include <concord/discord.h>
|
|
|
|
#include "config.h"
|
|
|
|
struct zblock_config zblock_config;
|
|
|
|
int zblock_config_load(struct discord *client) {
|
|
struct ccord_szbuf_readonly conninfo = discord_config_get_field(client, (char *[2]){"zblock", "conninfo"}, 2);
|
|
if (asprintf(&zblock_config.conninfo, "%.*s", (int)conninfo.size, conninfo.start) < 0) {
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|