merging
This commit is contained in:
parent
c490a1a0bc
commit
8dad78c313
@ -1,4 +1,2 @@
|
||||
#!/bin/sh
|
||||
# Tested to work 100% of the time when that file doesn't exist
|
||||
# probably
|
||||
sqlite3 probotic_data.sqlite -init init.sql -line '.quit'
|
||||
|
@ -1,4 +0,0 @@
|
||||
server=irc.rizon.net
|
||||
username=probotic
|
||||
port=6667
|
||||
channel=#stop_shitting_up_chad
|
8
docs/rizon_default.cfg
Normal file
8
docs/rizon_default.cfg
Normal file
@ -0,0 +1,8 @@
|
||||
server=irc.rizon.net
|
||||
username=probotic
|
||||
port=6667
|
||||
admins=anon8697 emilemilemil fa11_1eaf
|
||||
|
||||
; provide channel yourself
|
||||
; lines without an equal sign are dropped
|
||||
; prefix comments with a semicolon for future compat
|
@ -6,5 +6,7 @@ DECL void rope(void);
|
||||
DECL char * remind(char * who);
|
||||
DECL char * raw(char const * const sql);
|
||||
|
||||
extern char const * db;
|
||||
|
||||
#define API_H_
|
||||
#endif
|
||||
|
@ -6,6 +6,7 @@ typedef struct
|
||||
char * password;
|
||||
char * channel;
|
||||
char * server;
|
||||
char * admin;
|
||||
int port;
|
||||
} creds_t;
|
||||
|
||||
|
@ -21,7 +21,8 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char const * db = DBFILE;
|
||||
char const * db = DBFILE;
|
||||
|
||||
static sqlite3 * connection = NULL;
|
||||
|
||||
DECL int
|
||||
|
10
src/main.c
10
src/main.c
@ -81,15 +81,17 @@ main (int argc,
|
||||
if (strcmp(arg, "db") == 0)
|
||||
{ db = argv[1]; }
|
||||
else if (strcmp(arg, "server") == 0)
|
||||
{ FREE(creds.server); creds.server = argv[1]; }
|
||||
{ FREE(creds.server); creds.server = strdup(argv[1]); }
|
||||
else if (strcmp(arg, "port") == 0)
|
||||
{ creds.port = atoi(argv[1]); }
|
||||
else if (strcmp(arg, "channel") == 0)
|
||||
{ FREE(creds.channel);creds.channel = argv[1]; }
|
||||
{ FREE(creds.channel); creds.channel = strdup(argv[1]); }
|
||||
else if (strcmp(arg, "username") == 0)
|
||||
{ FREE(creds.username); creds.username = argv[1]; }
|
||||
{ FREE(creds.username); creds.username = strdup(argv[1]); }
|
||||
else if (strcmp(arg, "password") == 0)
|
||||
{ FREE(creds.password); creds.password = argv[1]; }
|
||||
{ FREE(creds.password); creds.password = strdup(argv[1]); }
|
||||
else if (strcmp(arg, "admin") == 0)
|
||||
{ FREE(creds.admin); creds.admin = strdup(argv[1]); }
|
||||
else if (strcmp(arg, "auth") == 0)
|
||||
{
|
||||
authfile = argv[1];
|
||||
|
Reference in New Issue
Block a user