5 #ifndef LIBSRSIRC_IRC_EXT_H 6 #define LIBSRSIRC_IRC_EXT_H 1 384 bool irc_set_px(
irc *ctx,
const char *host, uint16_t port,
int ptype);
const char * irc_005modepfx(irc *ctx, bool symbols)
Tell what channel mode prefixes the ircd claims to support.
bool irc_set_service_dist(irc *ctx, const char *dist)
Set the "distribution" string for service log on.
bool irc_colon_trail(irc *ctx)
Deprecated. Please disregard.
bool(* fp_con_read)(tokarr *msg, void *tag)
Logon-time callback for incoming protocol messages.
Definition: defs.h:200
const char * irc_banmsg(irc *ctx)
Tell why we are banned, if the server was polite enough to let us know.
void irc_set_connect_timeout(irc *ctx, uint64_t soft, uint64_t hard)
Set timeout(s) for irc_connect()
bool irc_reg_msghnd(irc *ctx, const char *cmd, uhnd_fn hndfn, bool pre)
Register a protocol message handler.
void irc_set_service_connect(irc *ctx, bool enabled)
Log on as service? if not, we're a normal client.
const char * irc_get_fname(irc *ctx)
Tell the 'full name' we will use on the next log on.
bool irc_tracking_enab(irc *ctx)
Tell if channel- and user tracking is active.
bool irc_get_service_connect(irc *ctx)
Tell whether we'll next connect as a service.
int irc_get_px_type(irc *ctx)
Tell the type of the proxy we use or intend to use.
int irc_casemap(irc *ctx)
Tell how the IRC server maps lowercase to uppercase characters and vice-versa.
const char * irc_version(irc *ctx)
Tell what ircd version the IRC server claims to run.
void irc_regcb_mutnick(irc *ctx, fp_mut_nick mn)
Register a function to come up with an alternative nickname at logon time.
bool irc_get_dumb(irc *ctx)
Tell whether we're operating in "dumb mode".
bool irc_set_service_info(irc *ctx, const char *info)
Set the "service info" string for service log on.
uint16_t irc_get_px_port(irc *ctx)
Tell the port of the proxy we use or intend to use.
struct irc_s irc
IRC context; pointers to this are our IRC context handle type.
Definition: defs.h:144
const char * irc_lasterror(irc *ctx)
Tell what the last received ERROR message said.
const char * irc_cmodes(irc *ctx)
Lie about the available channel modes.
bool(* uhnd_fn)(irc *ctx, tokarr *msg, size_t nargs, bool pre)
User-registered protocol command callback type.
Definition: defs.h:240
int irc_sockfd(irc *ctx)
Deprecated. Please disregard.
bool irc_service(irc *ctx)
Tell whether or not we're a service (as opposed to a user).
const char * irc_005attr(irc *ctx, const char *name)
Tell the value of a given 005 attribute.
const char * irc_get_service_dist(irc *ctx)
Tell the 'dist' string we're going to use for the next service logon.
bool irc_get_ssl(irc *ctx)
Tell whether or not we will use SSL for the next connection.
bool irc_set_px(irc *ctx, const char *host, uint16_t port, int ptype)
Set proxy server to use.
void irc_regcb_conread(irc *ctx, fp_con_read cb, void *tag)
Register callback for protocol messages that are read at logon time.
char * tokarr[18]
Field array for the parts of incoming IRC protocol messages.
Definition: defs.h:174
const char * irc_get_nick(irc *ctx)
Tell the nick we will use on the next log on.
bool irc_banned(irc *ctx)
Determine whether we are banned, if the server was polite enough to let us know.
const char * irc_get_px_host(irc *ctx)
Tell the host of the proxy we use or intend to use.
bool irc_set_ssl(irc *ctx, bool on)
Enable or disable SSL.
const char * irc_get_pass(irc *ctx)
Tell the password we may have set earlier by irc_set_pass()
uint16_t irc_get_port(irc *ctx)
Tell the port of the IRC server we use or intend to use.
long irc_get_service_type(irc *ctx)
Tell the type we're going to use for the next service logon.
const char * irc_get_host(irc *ctx)
Tell the name or address of the IRC server we use or intend to use.
bool irc_eof(irc *ctx)
Tell whether the connection was closed gracefully.
bool irc_set_service_type(irc *ctx, long type)
Set the "service type" for service log on.
const char * irc_get_uname(irc *ctx)
Tell the 'user name' we will use on the next log on.
const char * irc_umodes(irc *ctx)
Determine the available user modes.
const char * irc_005chanmodes(irc *ctx, size_t mclass)
Tell what channel modes the ircd claims to support.
const char * irc_myhost(irc *ctx)
Tell who the IRC server claims to be.
void(* fp_mut_nick)(char *nick, size_t nick_sz)
Logon-time callback type for nickname problems.
Definition: defs.h:215
bool irc_set_track(irc *ctx, bool on)
Enable or disable channel- and user tracking.
void irc_set_conflags(irc *ctx, uint8_t flags)
Set flags for the USER message at log on time.
const char * irc_get_service_info(irc *ctx)
Tell the 'info' string we're going to use for the next service logon.
tokarr *(* irc_logonconv(irc *ctx))[4]
Give access to the "logon conversation" (see doc/terminology.txt).
uint8_t irc_get_conflags(irc *ctx)
Tell the USER flags we will use on the next log on.
void irc_set_dumb(irc *ctx, bool dumbmode)
Set or clear "dumb mode".