X-Git-Url: https://git.armaanb.net/?p=sic.git;a=blobdiff_plain;f=sic.c;fp=sic.c;h=7a3edee0a7a816d1e3f04878680f180fa952f6e6;hp=d93c2ec6f056a9e10fd1bc7f408a4f198e8f8db6;hb=f87d3f5bef896bc066d46170b6e124d2a2239fba;hpb=7cfa52d6eb11bd1c14e626806cce56c3faeadf26 diff --git a/sic.c b/sic.c index d93c2ec..7a3edee 100644 --- a/sic.c +++ b/sic.c @@ -8,8 +8,10 @@ #include #include -static char *host = "irc.oftc.net"; -static char *port = "6667"; +#include "config.h" + +static char *host = DEFAULT_HOST; +static char *port = DEFAULT_PORT; static char *password; static char nick[32]; static char bufin[4096]; @@ -22,7 +24,7 @@ static FILE *srv; static void pout(char *channel, char *fmt, ...) { - static char timestr[18]; + static char timestr[80]; time_t t; va_list ap; @@ -30,7 +32,7 @@ pout(char *channel, char *fmt, ...) { vsnprintf(bufout, sizeof bufout, fmt, ap); va_end(ap); t = time(NULL); - strftime(timestr, sizeof timestr, "%D %R", localtime(&t)); + strftime(timestr, sizeof timestr, TIMESTAMP_FORMAT, localtime(&t)); fprintf(stdout, "%-12s: %s %s\n", channel, timestr, bufout); }