view man/irccd-api-hook.3 @ 1033:330a5db51c62

plugin links: remove basic entities
author David Demelier <markand@malikania.fr>
date Sun, 28 Mar 2021 15:02:56 +0200
parents ec5461750efd
children f06e9761cc90
line wrap: on
line source

.\"
.\" Copyright (c) 2013-2021 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