add db
This commit is contained in:
parent
5f77a905fa
commit
ca4ef988e8
@ -1,6 +1,3 @@
|
||||
server=irc.rizon.net
|
||||
username=probotic
|
||||
port=6667
|
||||
;admins=anon8697 emilemilemil fa11_1eaf
|
||||
; these arent comments, but they work because
|
||||
; the parser is broken enough to make it just werk
|
||||
|
@ -99,7 +99,7 @@ event_connect(irc_session_t * session,
|
||||
/* msg ChanServ IDENTIFY? */
|
||||
irc_cmd_join(session, creds.channel, 0);
|
||||
if(is_no_assignment(creds.channel)){
|
||||
ircmsg(IRC_RED "No assignment for this channel. Finding a new...");
|
||||
ircmsg(IRC_RED "No assignment for this channel. Finding a new..." IRC_STOP);
|
||||
random_assign(creds.channel);
|
||||
}
|
||||
ircmsg(remind(creds.channel));
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
enum cred_names_map
|
||||
{
|
||||
DATABASE,
|
||||
USERNAME,
|
||||
PASSWORD,
|
||||
CHANNEL,
|
||||
@ -32,6 +33,7 @@ enum cred_names_map
|
||||
|
||||
VARDECL char const * cred_names[] =
|
||||
{
|
||||
"database",
|
||||
"username",
|
||||
"password",
|
||||
"channel",
|
||||
@ -44,6 +46,7 @@ VARDECL size_t const cred_names_len[] =
|
||||
{
|
||||
8,
|
||||
8,
|
||||
8,
|
||||
7,
|
||||
6,
|
||||
4,
|
||||
@ -238,6 +241,7 @@ parse_pair(char const * buf, size_t len)
|
||||
}
|
||||
switch (f)
|
||||
{
|
||||
case DATABASE: db = strndup(buf,x); break;
|
||||
case USERNAME: creds.username = strndup(buf,x); break;
|
||||
case PASSWORD: creds.password = strndup(buf,x); break;
|
||||
case CHANNEL: creds.channel = strndup(buf,x); break;
|
||||
|
Reference in New Issue
Block a user