This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/include/parse.h

33 lines
855 B
C
Raw Normal View History

2023-08-02 10:44:10 -04:00
#ifndef CREDS_PARSER_H
typedef struct
{
2023-08-04 07:25:26 -04:00
size_t admin_count;
char * username;
char * password;
char * channel;
char * server;
char ** admins;
int port;
2023-08-02 10:44:10 -04:00
} creds_t;
2023-08-04 07:25:26 -04:00
VARDECL creds_t creds;
2023-08-03 02:16:39 -04:00
2023-08-04 07:21:59 -04:00
DECL char ** str_split(char const * s, char c);
2023-08-04 07:25:26 -04:00
DECL void split_clean(char ** split);
2023-08-04 07:21:59 -04:00
DECL char * dump(void);
DECL char * raw(char const * const sql);
DECL char * remind(char * who);
DECL char * slurp(char const * fn);
2023-08-03 23:27:25 -04:00
DECL int is_admin(char const * user);
2023-08-03 05:29:11 -04:00
DECL int parse_pair(char const * buf, size_t const len);
DECL void creds_free_password(void);
DECL void creds_free_rest(void);
2023-08-03 23:27:25 -04:00
DECL void parse_command(char const * const cmd);
DECL void purge_assignments(char const * const who);
DECL void random_assign(char const * const sql);
DECL void set_repo(char const * const who, char const * const link);
2023-08-02 10:44:10 -04:00
2023-08-02 11:09:34 -04:00
#define CREDS_PARSER_H
#endif