Mercurial > irccd
diff man/irccd-api-hook.3 @ 1002:ec5461750efd
man: add Irccd.Rule and Irccd.Hook manual pages
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 13 Feb 2021 22:15:16 +0100 |
parents | |
children | f06e9761cc90 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/irccd-api-hook.3 Sat Feb 13 22:15:16 2021 +0100 @@ -0,0 +1,70 @@ +.\" +.\" 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