Function

Ibissource_parse

since: 0.1

Declaration [src]

void
ibis_source_parse (
  const char* source,
  char** nick,
  char** user,
  char** host
)

Description [src]

Parses a source string like pidgy!~u@53unc8n42i868.irc into its nick, user, and host parts per https://modern.ircdocs.horse/#source.

If the user or host aren’t present in source, but a return address is provided for them, that pointer will be set to NULL.

Available since: 0.1

Parameters

source

Type: const char*

The source to parse.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
nick

Type: char**

A return address for the nick.

The argument will be set by the function.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
user

Type: char**

A return address for the user.

The argument will be set by the function.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
host

Type: char**

A return address for the host.

The argument will be set by the function.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.