diff --git a/dc b/dc new file mode 100755 index 0000000..7595fd2 Binary files /dev/null and b/dc differ diff --git a/src/main.c b/src/main.c index 1cdd3fb..960c426 100644 --- a/src/main.c +++ b/src/main.c @@ -6,14 +6,14 @@ #include #include -#include +#include #define SERVER "irc.rizon.net" #define PORT 6667 #define CHANNEL "#/g/chad" #define USERNAME "probotic" -#define ERR(msg,ret) do { fputs(msg); return ret; } while (0) +#define ERR(ret,msg) do { fputs(msg "\n", stderr); return ret; } while (0) irc_session_t * session; irc_callbacks_t callbacks; @@ -83,10 +83,10 @@ init(void) session = irc_create_session(&callbacks); if (!session) - { ERR("Error creating IRC session\n", 1); } + { ERR(1, "Error creating IRC session"); } irc_connect(session, SERVER, PORT, 0, USERNAME, USERNAME, USERNAME); if (irc_run(session) != 0) - { ERR("Error running IRC session\nNo net?", 1); } + { ERR(1, "Error running IRC session\nNo net?"); } return 0; }