libsrsirc  0.0.14
Lightweight, cross-platform IRC library
Functions
irc.h File Reference
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <libsrsirc/defs.h>

Go to the source code of this file.

Functions

ircirc_init (void)
 Allocate and initialize a new IRC context. More...
 
void irc_dispose (irc *ctx)
 Destroy an IRC context, invalidating the provided pointer. More...
 
bool irc_connect (irc *ctx)
 Connect and log on to IRC. More...
 
void irc_reset (irc *ctx)
 Force a disconnect from the IRC server. More...
 
bool irc_online (irc *ctx)
 Tell whether or not we (think we) are connected. More...
 
int irc_read (irc *ctx, tokarr *tok, uint64_t to_us)
 Read and process the next protocol message from the IRC server. More...
 
bool irc_write (irc *ctx, const char *line)
 Send a protocol message to the IRC server. More...
 
bool irc_printf (irc *ctx, const char *fmt,...)
 Send a formatted message to the IRC server, printf-style. More...
 
const char * irc_mynick (irc *ctx)
 Tell what our nickname is or was. More...
 
bool irc_set_server (irc *ctx, const char *host, uint16_t port)
 Set IRC server and port to connect to. More...
 
bool irc_set_pass (irc *ctx, const char *srvpass)
 Set server password (NULL means no password). More...
 
bool irc_set_uname (irc *ctx, const char *uname)
 set IRC 'user name' (not the same as nickname). More...
 
bool irc_set_fname (irc *ctx, const char *fname)
 set IRC 'full name' for the next connection. More...
 
bool irc_set_nick (irc *ctx, const char *nick)
 set IRC 'nickname' for the next connection. More...
 
void irc_dump (irc *ctx)
 Dump state for debugging purposes. More...