aboutsummaryrefslogtreecommitdiff
path: root/include/parse.h
diff options
context:
space:
mode:
authorEmil2023-08-04 09:13:47 -0600
committerEmil2023-08-04 09:13:47 -0600
commit935243d8b4ea992c50315f0c8fcb300365a5762d (patch)
treec22d800773997b7b267d5d6cba5931f22ee2be64 /include/parse.h
downloademil-probotic-master.tar.xz
emil-probotic-master.tar.zst
Initial commitHEADmaster
Diffstat (limited to 'include/parse.h')
-rw-r--r--include/parse.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/parse.h b/include/parse.h
new file mode 100644
index 0000000..e4bf83f
--- /dev/null
+++ b/include/parse.h
@@ -0,0 +1,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