aboutsummaryrefslogtreecommitdiff
path: root/include/parse.h
blob: e4bf83f53230882f0975c7b0ed4555beed1536a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CREDS_PARSER_H

typedef struct
{
  size_t  admin_count;
  char *  username;
  char *  password;
  char *  channel;
  char *  server;
  char ** admins;
  int     port;
} creds_t;

VARDECL creds_t creds;

DECL char ** str_split(char const * s, char c);
DECL void    split_clean(char ** split);
DECL char *  dump(void);
DECL char *  raw(char const * const sql);
DECL char *  remind(char * who);
DECL char *  slurp(char const * fn);
DECL int  is_admin(char const * user);
DECL int  parse_pair(char const * buf, size_t const len);
DECL void creds_free_password(void);
DECL void creds_free_rest(void);
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);

#define CREDS_PARSER_H
#endif