Updated ERR function

This commit is contained in:
Emil 2023-08-02 07:29:45 -06:00
parent f62c8d4f75
commit 77d5a79c73
2 changed files with 4 additions and 4 deletions

BIN
dc Executable file

Binary file not shown.

View File

@ -6,14 +6,14 @@
#include <string.h>
#include <stdarg.h>
#include <libircclient/libircclient.h>
#include <libircclient.h>
#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;
}