From 4245aca4000164dbac8ce105ae10a78c94cc4f90 Mon Sep 17 00:00:00 2001 From: anon Date: Sun, 17 Dec 2023 02:51:49 +0100 Subject: [PATCH] meh --- source/bot.h | 6 ++++-- source/config.inc | 2 ++ source/main.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/bot.h b/source/bot.h index 1b002fd..c63a075 100644 --- a/source/bot.h +++ b/source/bot.h @@ -7,8 +7,8 @@ extern syntax_setter_t syntax_functions[]; -irc_session_t * session; -irc_callbacks_t callbacks; +static irc_session_t * session; +static irc_callbacks_t callbacks; void ircmsg(const char * const message) { irc_cmd_msg(session, channel, message); @@ -25,6 +25,7 @@ language_t translate_language(const char * const language) { } // XXX: msg ChanServ IDENTIFY? +static void event_connect(irc_session_t * session, const char * event, const char * origin, @@ -43,6 +44,7 @@ void event_connect(irc_session_t * session, free(buffer); } +static void event_privmsg(irc_session_t * session, const char * event, const char * origin, diff --git a/source/config.inc b/source/config.inc index b0e95ec..d72b594 100644 --- a/source/config.inc +++ b/source/config.inc @@ -2,6 +2,8 @@ const char * const username = PROGRAM_NAME; const char * const password = ""; +#define DEFAULT_LANGUAGE C +#define LOG_FILE stdout #define CONFIG_INC #endif diff --git a/source/main.c b/source/main.c index 876f1c4..f85a60d 100644 --- a/source/main.c +++ b/source/main.c @@ -12,7 +12,7 @@ typedef enum { ADA, } language_t; -language_t language = ADA; +language_t language = DEFAULT_LANGUAGE; typedef void (*syntax_setter_t)(void); @@ -52,7 +52,7 @@ signed main(int argc, char * * argv) { goto USAGE_ERROR; } - log_file = stdout; + log_file = LOG_FILE; syntax_functions[language]();