5 #ifndef LIBSRSIRC_IRC_H 6 #define LIBSRSIRC_IRC_H 1 void irc_dispose(irc *ctx)
Destroy an IRC context, invalidating the provided pointer.
bool irc_set_uname(irc *ctx, const char *uname)
set IRC 'user name' (not the same as nickname).
bool irc_printf(irc *ctx, const char *fmt,...)
Send a formatted message to the IRC server, printf-style.
bool irc_set_nick(irc *ctx, const char *nick)
set IRC 'nickname' for the next connection.
struct irc_s irc
IRC context; pointers to this are our IRC context handle type.
Definition: defs.h:144
bool irc_write(irc *ctx, const char *line)
Send a protocol message to the IRC server.
char * tokarr[18]
Field array for the parts of incoming IRC protocol messages.
Definition: defs.h:174
int irc_read(irc *ctx, tokarr *tok, uint64_t to_us)
Read and process the next protocol message from the IRC server.
bool irc_set_server(irc *ctx, const char *host, uint16_t port)
Set IRC server and port to connect to.
const char * irc_mynick(irc *ctx)
Tell what our nickname is or was.
void irc_dump(irc *ctx)
Dump state for debugging purposes.
bool irc_set_fname(irc *ctx, const char *fname)
set IRC 'full name' for the next connection.
bool irc_set_pass(irc *ctx, const char *srvpass)
Set server password (NULL means no password).
irc * irc_init(void)
Allocate and initialize a new IRC context.
bool irc_connect(irc *ctx)
Connect and log on to IRC.
bool irc_online(irc *ctx)
Tell whether or not we (think we) are connected.
void irc_reset(irc *ctx)
Force a disconnect from the IRC server.