view man/irccd-api-hook.3 @ 1155:f1adf94eb0fc release-4.0

tests: fix test-bot
author David Demelier <markand@malikania.fr>
date Mon, 07 Feb 2022 08:39:32 +0100
parents c165e975f144
children 1845a0509a93
line wrap: on
line source

.\"
.\" Copyright (c) 2013-2022 David Demelier <markand@malikania.fr>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd @IRCCD_MAN_DATE@
.Dt IRCCD-API-HOOK 3
.Os
.\" NAME
.Sh NAME
.Nm Irccd.Hook
.Nd irccd hook API
.\" SYNOPSIS
.Sh SYNOPSIS
.Fn Irccd.Hook.add "name, path"
.Fn Irccd.Hook.list
.Fn irccd.Hook.remove "name"
.\" DESCRIPTION
.Sh DESCRIPTION
Add, remove and list hooks.
.\" METHODS
.Sh METHODS
.\" Irccd.Hook.add
The
.Fn Irccd.Hook.add
method adds the rule specified by
.Fa path
with the identifier
.Fa name .
The API does not check the presence of the hook file and therefore can be used
before the hook actually exists on the filesystem.
.Pp
.\" Irccd.Hook.list
The
.Fn Irccd.Hook.list
method return an array of object for all hooks loaded. Each entry consists of
two properties:
.Fa name
and
.Fa path
which denotes the hook's name and its filesystem path respectively.
.Pp
.\" Irccd.Hook.remove
The
.Fn Irccd.Hook.remove
method removes the hook specified by
.Fa name .
.\" EXCEPTIONS
.Sh EXCEPTIONS
.Bl -tag -width Er
.It Bq Er Error
Thrown from
.Fn Irccd.Hook.add
if a hook with
.Fa name
already exists.
.El
.\" SEE ALSO
.Sh SEE ALSO
.Xr irccd-api 3
.\" AUTHORS
.Sh AUTHORS
The
.Nm irccd
daemon was written by
.An David Demelier Aq Mt markand@malikania.fr .