Mercurial > irccd
changeset 614:ebdc614db066
Docs: get rid of metadata
line wrap: on
line diff
--- a/doc/src/api/event/onCommand.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onCommand.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,17 +1,20 @@ ---- -event: onCommand -js: true -summary: "Execute special command." -synopsis: "function onCommand(server, origin, channel, message)" -arguments: - - "**server**: the current server," - - "**origin**: who invoked the command," - - "**channel**: the channel where the message comes from," - - "**message**: the real message, without the ! part." ---- +# Event onCommand + +Special commands are not real IRC events. They are called from channel messages +with a specific syntax using a delimiter and the plugin name. + +For instance, with default irccd parameters, saying on a channel `!ask foo` will +call the special command of the plugin named **ask**. + +# Synopsis -Special commands are not real IRC events. They are called from channel messages with a specific syntax using a delimiter -and the plugin name. +```javascript +function onCommand(server, origin, channel, message) +``` -For instance, with default irccd parameters, saying on a channel `!ask foo` will call the special command of the plugin -named **ask**. +# Arguments + + - **server**: the current server, + - **origin**: who invoked the command, + - **channel**: the channel where the message comes from, + - **message**: the real message, without the ! part.
--- a/doc/src/api/event/onConnect.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onConnect.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,14 @@ ---- -event: onConnect -js: true -summary: "This callback is called when the irccd instance successfully connect to a server." -synopsis: "function onConnect(server)" -arguments: - - "**server**: the current server." ---- +# Event onConnect + +This callback is called when the irccd instance successfully connect to a +server. + +# Synopsis + +```javascript +function onConnect(server) +``` + +# Arguments + + - **server**: the current server.
--- a/doc/src/api/event/onInvite.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onInvite.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onInvite -js: true -summary: "This event is called when someone is inviting you to a channel." -synopsis: "function onInvite(server, origin, channel)" -arguments: - - "**server**: the current server," - - "**origin**: who invited you," - - "**channel**: on which channel you are invited to." ---- +# Event onInvite + +This event is called when someone is inviting you to a channel. + +# Synopsis + +```javascript +function onInvite(server, origin, channel) +``` + +# Arguments + + - **server**: the current server, + - **origin**: who invited you, + - **channel**: on which channel you are invited to.
--- a/doc/src/api/event/onJoin.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onJoin.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onJoin -js: true -summary: "User join events, this function is called when someone joins a channel." -synopsis: "function onJoin(server, origin, channel)" -arguments: - - "**server**: the current server," - - "**origin**: the person who joined the channel," - - "**channel**: the channel the user has joined." ---- +# Event: onJoin + +User join events, this function is called when someone joins a channel. + +# Synopsis + +```javascript +function onJoin(server, origin, channel) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who joined the channel, + - **channel**: the channel the user has joined.
--- a/doc/src/api/event/onKick.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onKick.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,17 @@ ---- -event: onKick -js: true -summary: "This event is triggered when someone has been kicked from a channel." -synopsis: "function onKick(server, origin, channel, target, reason)" -arguments: - - "**server**: the current server," - - "**origin**: who kicked the person," - - "**channel**: the channel," - - "**target**: the kicked person," - - "**reason**: an optional reason." ---- +# Event onKick + +This event is triggered when someone has been kicked from a channel. + +# Synopsis + +```javascript +function onKick(server, origin, channel, target, reason) +``` + +# Arguments + + - **server**: the current server, + - **origin**: who kicked the person, + - **channel**: the channel, + - **target**: the kicked person, + - **reason**: an optional reason.
--- a/doc/src/api/event/onLoad.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onLoad.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,10 @@ ---- -event: onLoad -js: true -summary: "This function is called when irccd instance load a plugin. If this function throws an error, the script is not loaded." -synopsis: "function onLoad()" ---- +# Event onLoad + +This function is called when irccd instance load a plugin. If this function +throws an error, the script is not loaded. + +# Synopsis + +```javascript +function onLoad() +```
--- a/doc/src/api/event/onMe.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onMe.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,16 @@ ---- -event: onMe -js: true -summary: "Action emote." -synopsis: "function onMe(server, origin, channel, message)" -arguments: - - "**server**: the current server," - - "**origin**: the person who said something," - - "**channel**: the channel," - - "**message**: the message sent." ---- +# Event onMe + +Action emote. + +# Synopsis + +```javascript +function onMe(server, origin, channel, message) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who said something, + - **channel**: the channel, + - **message**: the message sent.
--- a/doc/src/api/event/onMessage.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onMessage.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,16 @@ ---- -event: onMessage -js: true -summary: "This event is triggered when someone said something on a specific channel." -synopsis: "function onMessage(server, origin, channel, message)" -arguments: - - "**server**: the current server," - - "**origin**: the person who said something," - - "**channel**: the channel," - - "**message**: the message sent." ---- +# Event onMessage + +This event is triggered when someone said something on a specific channel. + +# Synopsis + +```javascript +function onMessage(server, origin, channel, message) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who said something, + - **channel**: the channel, + - **message**: the message sent.
--- a/doc/src/api/event/onMode.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onMode.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onMode -js: true -summary: "This event is triggered when the server changed your mode." -synopsis: "function onMode(server, origin, mode)" -arguments: - - "**server**: the current server," - - "**origin**: the person who changed the mode," - - "**mode**: the new mode." ---- +# Event onMode + +This event is triggered when the server changed a channel mode or your mode. + +# Synopsis + +```javascript +function onMode(server, origin, channel, mode, limit, user, mask) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who changed the mode, + - **mode**: the new mode.
--- a/doc/src/api/event/onNames.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onNames.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onNames -js: true -summary: "This event is triggered when a list of names has come." -synopsis: "function onNames(server, channel, list)" -arguments: - - "**server**: he current server," - - "**channel**: which channel," - - "**list**: a sequence with all users." ---- +# Event onNames + +This event is triggered when a list of names has come. + +# Synopsis + +```javascript +function onNames(server, channel, list) +``` + +# Arguments + + - **server**: he current server, + - **channel**: which channel, + - **list**: a sequence with all users.
--- a/doc/src/api/event/onNick.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onNick.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onNick -js: true -summary: "This event is triggered when someone changed its nickname." -synopsis: "function onNick(server, origin, nickname)" -arguments: - - "**server**: the current server," - - "**origin**: the old nickname," - - "**nickname**: the new nickname." ---- +# Event onNick + +This event is triggered when someone changed its nickname. + +# Synopsis + +```javascript +function onNick(server, origin, nickname) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the old nickname, + - **nickname**: the new nickname.
--- a/doc/src/api/event/onNotice.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onNotice.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -event: onNotice -js: true -summary: "This event is triggered when someone sent a notice to you." -synopsis: "function onNotice(server, origin, notice)" -arguments: - - "**server**: the current server," - - "**origin**: the one who sent the notice," - - "**message**: the notice message." ---- +# Event onNotice + +This event is triggered when someone sent a notice to you. + +# Synopsis + +```javascript +function onNotice(server, origin, notice) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the one who sent the notice, + - **message**: the notice message.
--- a/doc/src/api/event/onPart.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onPart.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,16 @@ ---- -event: onPart -js: true -summary: "This event is triggered when someone has left a specific channel." -synopsis: "function onPart(server, origin, channel, reason)" -arguments: - - "**server**: the current server," - - "**origin**: the person who left the channel," - - "**channel**: the channel," - - "**reason**: an optional reason." ---- +# Event onPart + +This event is triggered when someone has left a specific channel. + +# Synopsis + +```javascript +function onPart(server, origin, channel, reason) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who left the channel, + - **channel**: the channel, + - **reason**: an optional reason.
--- a/doc/src/api/event/onReload.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onReload.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,13 +1,18 @@ ---- -event: onReload -js: true -summary: "Request to reload the plugin." -synopsis: "function onReload()" ---- +# Event onReload + +Request to reload the plugin. + +# Synopsis -This function is called when irccd instance reload a plugin. Thus, there are no IRC events that call this function. +```javascript +function onReload() +``` -This function does nothing in the irccd internals, it just calls a function that you can use to reload some data. It -does not delete anything. +This function is called when irccd instance reload a plugin. Thus, there are no +IRC events that call this function. -If you want to fully unload a plugin, use `irccdctl plugin-unload` then `irccdctl plugin-load`. +This function does nothing in the irccd internals, it just calls a function that +you can use to reload some data. It does not delete anything. + +If you want to fully unload a plugin, use `irccdctl plugin-unload` then +`irccdctl plugin-load`.
--- a/doc/src/api/event/onTopic.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onTopic.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,16 @@ ---- -event: onTopic -js: true -summary: "This event is triggered when someone changed the channel's topic." -synopsis: "function onTopic(server, origin, channel, topic)" -arguments: - - "**server**: the current server," - - "**origin**: the person who changed the topic," - - "**channel**: the channel," - - "**topic**: the new topic (may be empty)." ---- +# Event onTopic + +This event is triggered when someone changed the channel's topic. + +# Synopsis + +```javascript +function onTopic(server, origin, channel, topic) +``` + +# Arguments + + - **server**: the current server, + - **origin**: the person who changed the topic, + - **channel**: the channel, + - **topic**: the new topic (may be empty).
--- a/doc/src/api/event/onUnload.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onUnload.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -event: onUnload -js: true -summary: "This event is triggered when the plugin is about to be unloaded." -synopsis: "function onUnload()" ---- +# Event onUnload + +This event is triggered when the plugin is about to be unloaded. + +# Synopsis + +```javascript +function onUnload() +```
--- a/doc/src/api/event/onWhois.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/event/onWhois.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,17 @@ ---- -event: onWhois -js: true -summary: "This event is triggered when irccd gets information about a user." -synopsis: "function onWhois(server, info)" -arguments: - - "**server**: the current server," - - "**info**: the whois information." ---- +# Event onWhois + +This event is triggered when irccd gets information about a user. + +# Synopsis + +```javascript +function onWhois(server, info) +``` + +# Arguments + + - **server**: the current server, + - **info**: the whois information. The info is an object with the following properties:
--- a/doc/src/api/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,3 @@ ---- -js: yes ---- - # Welcome to the irccd JavaScript API documentation Select a target on the left.
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.find.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.find.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,13 +1,23 @@ ---- -function: find -js: true -summary: "Find an entry by a pattern or a regular expression." -synopsis: "Irccd.Directory.find(path, pattern, recursive)" -arguments: - - "**path**: the base path," - - "**pattern**: the regular expression or file name," - - "**recursive**: set to true to search recursively (Optional, default: false)." -returns: "The path to the file or undefined if not found." -throws: - - "Any exception on error." ---- +# Function Irccd.Directory.find + +Find an entry by a pattern or a regular expression. + +# Synopsis + +```javascript +Irccd.Directory.find(path, pattern, recursive) +``` + +# Arguments + + - **path**: the base path, + - **pattern**: the regular expression or file name, + - **recursive**: set to true to search recursively (Optional, default: false). + +# Returns + +The path to the file or undefined if not found. + +# Throws + +Any exception on error.
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.mkdir.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.mkdir.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,19 @@ ---- -function: mkdir -js: true -summary: "Create a directory specified by path. It will create needed subdirectories just like you have invoked `mkdir -p`." -synopsis: "Irccd.Directory.mkdir(path, mode = 0700)" -arguments: - - "**path**: the path to the directory," - - "**mode**: the mode, not available on all platforms." -throws: "Any exception on error." ---- +# Function Irccd.Directory.mkdir + +Create a directory specified by path. It will create needed subdirectories just +like you have invoked `mkdir -p`. + +# Synopsis + +```javascript +Irccd.Directory.mkdir(path, mode = 0700) +``` + +# Arguments + + - **path**: the path to the directory, + - **mode**: the mode, not available on all platforms. + +# Throws + +Any exception on error.
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.constructor.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.constructor.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,23 +1,31 @@ ---- -method: constructor -js: true -summary: "Open a directory." -synopsis: "Irccd.Directory(path, flags) /* constructor */" -arguments: - - "**path**: the path to the directory," - - "**flags**: the OR'ed flags: `Irccd.Directory.Dot`, `Irccd.Directory.DotDot` (Optional, default: none)." -throws: "Any exception on error." ---- +# Function Irccd.Directory (constructor) + +Open a directory. When constructed successfully, the object has the following properties: - - **count**: (int) the number of entries, - **path**: (string) the path to the directory, - **entries**: (array) an array for each entry containing: - **name**: (string) the base file name, - **type**: (int) the type of file (`Irccd.Directory.Type*`). -## Example +# Synopsis + +```javascript +Irccd.Directory(path, flags) +``` + +# Arguments + + - **path**: the path to the directory, + - **flags**: the OR'ed flags: `Irccd.Directory.Dot`, `Irccd.Directory.DotDot` + (Optional, default: none). + +# Throws + +Any exception on error. + +# Example ```javascript try { @@ -30,7 +38,3 @@ // Use the error } ``` - - - -
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,24 @@ ---- -method: find -js: true -summary: "Synonym of [Irccd.Directory.find](@baseurl@api/module/Irccd.Directory/function/find.html) but the path is taken from the directory object." -synopsis: "Directory.prototype.find(pattern, recursive)" -arguments: - - "**pattern**: the regular expression or file name," - - "**recursive**: set to true to search recursively (Optional, default: false)." -returns: "The path to the file or undefined if not found." -throws: - - "Any exception on error." ---- +# Method Irccd.Directory.prototype.find + +Synonym of [find][] but the path is taken from the directory object. + +# Synopsis + +```javascript +Directory.prototype.find(pattern, recursive) +``` + +# Arguments + + - **pattern**: the regular expression or file name, + - **recursive**: set to true to search recursively (Optional, default: false). + +# Returns + +The path to the file or undefined if not found. + +# Throws + +Any exception on error. + +[find]: @baseurl@api/module/Irccd.Directory/function/find.html
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,19 @@ ---- -method: remove -js: true -summary: "Synonym of [Irccd.Directory.remove](@baseurl@api/module/Irccd.Directory/function/remove.html) but the path is taken from the directory object." -synopsis: "Directory.prototype.remove(recursive)" -arguments: - - "**recursive**: recursively or not (Optional, default: false)." -throws: "Any exception on error" ---- +# Method Irccd.Directory.prototype.remove + +Synonym of [remove][] but the path is taken from the directory object. + +# Synopsis + +```javascript +Directory.prototype.remove(recursive) +``` + +# Arguments + + - **recursive**: recursively or not (Optional, default: false). + +# Throws + +Any exception on error. + +[remove]: @baseurl@api/module/Irccd.Directory/function/remove.html
--- a/doc/src/api/module/Irccd.Directory/Irccd.Directory.remove.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/Irccd.Directory.remove.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,16 +1,18 @@ ---- -function: remove -js: true -summary: "Remove the directory optionally recursively." -synopsis: "Irccd.Directory.remove(path, recursive)" -arguments: - - "**path**: the path to the directory," - - "**recursive**: recursively or not (Optional, default: false)." -throws: "Any exception on error." ---- +# Function Irccd.Directory.remove + +Remove the directory optionally recursively. + +# Synopsis -## Remarks +```javascript +Irccd.Directory.remove(path, recursive) +``` + +# Arguments -<div class="alert alert-danger" role="alert"> -**Danger**: use this function with care! -</div> + - **path**: the path to the directory, + - **recursive**: recursively or not (Optional, default: false). + +# Throws + +Any exception on error.
--- a/doc/src/api/module/Irccd.Directory/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Directory/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,16 +1,10 @@ ---- -module: Irccd.Directory -js: true -summary: Open an read directories. ---- - -## Usage +# Module Irccd.Directory This module can be used to iterate, find, remove or create directories. Use this module with care. -## Constants +# Constants The following properties are defined: @@ -21,13 +15,13 @@ - **TypeFile**: (int) entry is a file, - **TypeLink**: (int) entry is a link. -## Functions +# Functions - [find](Irccd.Directory.find.html) - [mkdir](Irccd.Directory.mkdir.html) - [remove](Irccd.Directory.remove.html) -## Methods +# Methods - [(constructor)](Irccd.Directory.prototype.constructor.html) - [find](Irccd.Directory.prototype.find.html)
--- a/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.constructor.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.constructor.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,11 @@ ---- -method: constructor -js: true -summary: "Construct a new ElapsedTimer object." -synopsis: "Irccd.ElapsedTimer() /* constructor */" ---- +# Function Irccd.ElapsedTimer (constructor) + +Construct a new ElapsedTimer object. The timer is constructed and started. + +# Synopsis + +```javascript +Irccd.ElapsedTimer() +```
--- a/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.elapsed.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.elapsed.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,13 @@ ---- -method: elapsed -js: true -summary: "Get the number of elapsed milliseconds." -synopsis: "ElapsedTimer.prototype.elapsed()" -returns: "The elapsed time in milliseconds." ---- +# Method Irccd.ElapsedTimer.prototype.elapsed + +Get the number of elapsed milliseconds. + +# Synopsis + +```javascript +ElapsedTimer.prototype.elapsed() +``` + +# Returns + +The elapsed time in milliseconds.
--- a/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.pause.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.pause.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: pause -js: true -summary: "Pause the timer, without resetting the current elapsed time stored." -synopsis: "ElapsedTimer.prototype.pause()" ---- +# Method Irccd.ElapsedTimer.prototype.pause + +Pause the timer, without resetting the current elapsed time stored. + +# Synopsis + +```javascript +ElapsedTimer.prototype.pause() +```
--- a/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.reset.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.reset.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: reset -js: true -summary: "Reset the elapsed time to 0, the status is not modified." -synopsis: "ElapsedTimer.prototype.reset()" ---- +# Method Irccd.ElapsedTimer.prototype.reset + +Reset the elapsed time to 0, the status is not modified. + +# Synopsis + +```javascript +ElapsedTimer.prototype.reset() +```
--- a/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.restart.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.restart.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: restart -js: true -summary: "Restart the timer without resetting the current elapsed time." -synopsis: "ElapsedTimer.prototype.restart()" ---- +# Method Irccd.ElapsedTimer.prototype.restart + +Restart the timer without resetting the current elapsed time. + +# Synopsis + +```javascript +ElapsedTimer.prototype.restart() +```
--- a/doc/src/api/module/Irccd.ElapsedTimer/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.ElapsedTimer/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,13 +1,8 @@ ---- -module: Irccd.ElapsedTimer -js: true ---- - -## Usage +# Module Irccd.ElapsedTimer This class let you measure the elapsed time. -## Methods +# Methods - [(constructor)](Irccd.ElapsedTimer.prototype.constructor.html) - [elapsed](Irccd.ElapsedTimer.prototype.elapsed.html)
--- a/doc/src/api/module/Irccd.File/Irccd.File.basename.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.basename.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: basename -js: true -summary: "Return the file basename as specified in `basename(3)` C function." -synopsis: "base = Irccd.File.basename(path)" -arguments: - - "**path**: the path to the file." -returns: "The base name." ---- +# Function Irccd.File.basename + +Return the file basename as specified in `basename(3)` C function. + +# Synopsis + +```javascript +base = Irccd.File.basename(path) +``` + +# Arguments + + - **path**: the path to the file. + +# Returns + +The base name.
--- a/doc/src/api/module/Irccd.File/Irccd.File.dirname.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.dirname.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: dirname -js: true -summary: "Return the file directory name as specified in `dirname(3)` C function." -synopsis: "path = Irccd.File.dirname(path)" -arguments: - - "**path**: the path to the file." -returns: "The directory name." ---- +# Function Irccd.File.dirname + +Return the file directory name as specified in `dirname(3)` C function. + +# Synopsis + +```javascript +path = Irccd.File.dirname(path) +``` + +# Arguments + + - **path**: the path to the file. + +# Returns + +The directory name.
--- a/doc/src/api/module/Irccd.File/Irccd.File.exists.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.exists.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,21 @@ ---- -function: exists -js: true -summary: "Check if the file exists." -synopsis: "ret = Irccd.File.exists(path)" -arguments: - - "**path**: the path to the file." -returns: "True if exists." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Function Irccd.File.exists + +Check if the file exists. + +# Synopsis + +```javascript +ret = Irccd.File.exists(path) +``` + +# Arguments + + - **path**: the path to the file. + +# Returns + +True if exists. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.basename.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.basename.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,15 @@ ---- -method: basename -js: true -summary: "Synonym of [Irccd.File.basename](@baseurl@api/module/Irccd.File/function/basename.html) but with the path from the file." -synopsis: "File.prototype.basename()" -returns: "The base name." ---- +# Method Irccd.File.prototype.basename + +Synonym of [basename][] but with the path from the file. + +# Synopsis + +```javascript +File.prototype.basename() +``` + +# Returns + +The base name. + +[basename]: @baseurl@api/module/Irccd.File/function/basename.html
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.close.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.close.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: close -js: true -summary: "Force close of the file, automatically called when object is collected." -synopsis: "File.prototype.close()" ---- +# Method Irccd.File.prototype.close + +Force close of the file, automatically called when object is collected. + +# Synopsis + +```javascript +File.prototype.close() +```
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.constructor.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.constructor.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,17 +1,23 @@ ---- -method: constructor -js: true -summary: "Open a file specified by path with the specified mode." -synopsis: "Irccd.File(path, mode) /* constructor */" -arguments: - - "**path**: the path to the file," - - "**mode**: the mode string." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Function Irccd.File (constructor) + +Open a file specified by path with the specified mode. + +# Synopsis + +```javascript +Irccd.File(path, mode) +``` -## Mode +# Arguments + + - **path**: the path to the file, + - **mode**: the mode string. -The mode is the same as the `fopen(3)`, see the documentation of [std::fopen(3)][fopen] for more information -about the mode string. +The mode is the same as the `fopen(3)`, see the documentation of +[std::fopen(3)][fopen] for more information about the mode string. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures. [fopen]: http://en.cppreference.com/w/cpp/io/c/fopen
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.dirname.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.dirname.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,15 @@ ---- -method: dirname -js: true -summary: "Synonym of [Irccd.File.dirname](@baseurl@api/module/Irccd.File/function/dirname.html) but with the path from the file." -synopsis: "File.prototype.dirname()" -returns: "The directory name." ---- +# Method Irccd.File.prototype.dirname + +Synonym of [dirname][] but with the path from the file. + +# Synopsis + +```javascript +File.prototype.dirname() +``` + +# Returns + +The directory name. + +[dirname]: @baseurl@api/module/Irccd.File/function/dirname.html
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.lines.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.lines.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,17 @@ ---- -method: lines -js: true -summary: "Read all lines and return an array." -synopsis: "File.prototype.lines()" -returns: "An array with all lines." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.lines + +Read all lines and return an array. + +# Synopsis + +```javascript +File.prototype.lines() +``` + +# Returns + +An array with all lines. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.read.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.read.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,22 @@ ---- -method: read -js: true -summary: "Read the specified amount of characters or the whole file." -synopsis: "File.prototype.read(amount)" -arguments: - - "**amount**: the amount of characters or -1 to read all (Optional, default: -1)." -returns: "The string." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.read + +Read the specified amount of characters or the whole file. + +# Synopsis + +```javascript +File.prototype.read(amount) +``` + +# Arguments + + - **amount**: the amount of characters or -1 to read all + (Optional, default: -1). + +# Returns + +The string. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.readline.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.readline.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,14 +1,19 @@ ---- -method: readline -js: true -summary: "Read the next line available." -synopsis: "File.prototype.readline()" -returns: "The next line or undefined if eof." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.readline + +Read the next line available. + +Warning: this method is slow and its usage is discouraged on large files. + +# Synopsis -## Remarks +```javascript +File.prototype.readline() +``` + +# Returns -<div class="alert alert-warning" role="alert"> -**Warning**: this method is slow and its usage is discouraged on large files. -</div> +The next line or undefined if eof. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.remove.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.remove.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,13 @@ ---- -method: remove -js: true -summary: "Synonym of File.remove(path) but with the path from the file." -synopsis: "File.prototype.remove()" -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.remove + +Synonym of File.remove(path) but with the path from the file. + +# Synopsis + +```javascript +File.prototype.remove() +``` + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.seek.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.seek.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,21 @@ ---- -method: seek -js: true -summary: "Sets the position in the file." -synopsis: "File.prototype.seek(type, amount)" -arguments: - - "**type**: the type of setting (`Irccd.File.SeekSet`, `Irccd.File.SeekCur`, `Irccd.File.SeekSet`)," - - "**amount**: the new offset." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.seek + +# Summary + +Sets the position in the file. + +# Synopsis + +```javascript +File.prototype.seek(type, amount) +``` + +# Arguments + + - **type**: the type of setting + (`Irccd.File.SeekSet`, `Irccd.File.SeekCur`, `Irccd.File.SeekSet`), + - **amount**: the new offset. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.stat.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.stat.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,14 +1,21 @@ ---- -method: stat -js: true -summary: "Synonym of [Irccd.File.stat](@baseurl@api/module/Irccd.File/function/stat.html) but with the path from the file." -synopsis: "File.prototype.stat()" -returns: "The stat information." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.stat + +Synonym of [stat][] but with the path from the file. + +Warning: this method is optional and may not be available on your system. + +# Synopsis -## Remarks +```javascript +File.prototype.stat() +``` + +# Returns -<div class="alert alert-warning" role="alert"> -**Warning**: this method is optional and may not be available on your system. -</div> +The stat information. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures. + +[stat]: @baseurl@api/module/Irccd.File/function/stat.html
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.tell.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.tell.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,17 @@ ---- -method: tell -js: true -summary: "Get the actual position in the file." -synopsis: "pos = File.prototype.tell()" -returns: "The position." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.tell + +Get the actual position in the file. + +# Synopsis + +```javascript +pos = File.prototype.tell() +``` + +# Returns + +The position. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.prototype.write.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.prototype.write.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,21 @@ ---- -method: write -js: true -summary: "Write some characters to the file." -synopsis: "File.prototype.write(data)" -arguments: - - "**data**: the character to write." -returns: "The number of bytes written." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Method Irccd.File.prototype.write + +Write some characters to the file. + +# Synopsis + +```javascript +File.prototype.write(data) +``` + +# Arguments + + - **data**: the character to write. + +# Returns + +The number of bytes written. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.remove.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.remove.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: remove -js: true -summary: "Remove the file at the specified path." -synopsis: "Irccd.File.remove(path)" -arguments: - - "**path**: the path to the file." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Function Irccd.File.remove + +Remove the file at the specified path. + +# Synopsis + +```javascript +Irccd.File.remove(path) +``` + +# Arguments + + - **path**: the path to the file. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/Irccd.File.stat.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/Irccd.File.stat.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,33 +1,39 @@ ---- -function: stat -js: true -summary: > - Get file information at the specified path. +# Function Irccd.File.stat + +Get file information at the specified path. + +The returned object may have the following properties if they are available on your system: - The returned object may have the following properties if they are available on your system: + - **atime**: (int) the last access time, + - **blksize**: (int) the block size, + - **blocks**: (int) the number of blocks, + - **ctime**: (int) the creation time, + - **dev**: (int) the device, + - **gid**: (int) the group, + - **ino**: (int) the inode, + - **mode**: (int) the mode, + - **mtime**: (int) the modification time, + - **nlink**: (int) the number of hard links, + - **rdev**: (int), + - **size**: (int) the file size, + - **uid**: (int) the user. - - **atime**: (int) the last access time, - - **blksize**: (int) the block size, - - **blocks**: (int) the number of blocks, - - **ctime**: (int) the creation time, - - **dev**: (int) the device, - - **gid**: (int) the group, - - **ino**: (int) the inode, - - **mode**: (int) the mode, - - **mtime**: (int) the modification time, - - **nlink**: (int) the number of hard links, - - **rdev**: (int), - - **size**: (int) the file size, - - **uid**: (int) the user. -synopsis: "info = Irccd.File.stat(path)" -arguments: - - "**path**: the path to the file." -returns: "The stat information." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +Warning: this function is optional and may not be available on your system. + +# Synopsis + +```javascript +info = Irccd.File.stat(path) +``` + +# Arguments -## Remarks + - **path**: the path to the file. + +# Returns -<div class="alert alert-warning" role="alert"> -**Warning**: this function is optional and may not be available on your system. -</div> +The stat information. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.File/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.File/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,22 +1,17 @@ ---- -module: Irccd.File -js: true -summary: "File opening and writing." ---- +# Module Irccd.File -## Usage - -This class and functions are available for opening and writing files on the disk. +This class and functions are available for opening and writing files on the +disk. -For convenience, some functions are available as free-functions and some as object methods. +For convenience, some functions are available as free-functions and some as +object methods. -## Remarks +# Remarks -<div class="alert alert-warning" role="alert"> -**Warning**: the stat function and method are optional and may not be available on your system. -</div> +Warning: the stat function and method are optional and may not be available on + your system. -## Constants +# Constants The following properties are defined: @@ -24,7 +19,7 @@ - **SeekEnd**: (int) seek from end of the file, - **SeekSet**: (int) seek from beginning of the file. -## Functions +# Functions - [basename](Irccd.File.basename.html) - [dirname](Irccd.File.dirname.html) @@ -32,7 +27,7 @@ - [remove](Irccd.File.remove.html) - [stat](Irccd.File.stat.html) (Optional) -## Methods +# Methods - [(constructor)](Irccd.File.prototype.constructor.html) - [basename](Irccd.File.prototype.basename.html)
--- a/doc/src/api/module/Irccd.Logger/Irccd.Logger.debug.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Logger/Irccd.Logger.debug.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,18 @@ ---- -function: debug -js: true -summary: "Adds a debug message, this is only appended to the journal if irccd was compiled in Debug mode." -synopsis: "Irccd.Logger.debug(message)" -arguments: - - "**message**: the message." ---- +# Function Irccd.Logger.debug + +Adds a debug message, this is only appended to the journal if irccd was compiled +in Debug mode. + +# Synopsis -## Remarks +```javascript +Irccd.Logger.debug(message) +``` + +# Arguments + + - **message**: the message. + +# Remarks This function targets irccd developers, the end user should not use it.
--- a/doc/src/api/module/Irccd.Logger/Irccd.Logger.info.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Logger/Irccd.Logger.info.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,14 @@ ---- -function: info -js: true -summary: "Log something. The message is logged only if irccd is running with verbose messages enabled." -synopsis: "Irccd.Logger.info(message)" -arguments: - - "**message**: the message." ---- +# Function Irccd.Logger.info + +Log something. The message is logged only if irccd is running with verbose +messages enabled. + +# Synopsis + +```javascript +Irccd.Logger.info(message) +``` + +# Arguments + + - **message**: the message.
--- a/doc/src/api/module/Irccd.Logger/Irccd.Logger.warning.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Logger/Irccd.Logger.warning.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -function: warning -js: true -summary: "Log a warning. The message will always be logged." -synopsis: "Irccd.Logger.warning(message)" -arguments: - - "**message**: the message." ---- +# Function Irccd.Logger.warning + +Log a warning. The message will always be logged. + +# Synopsis + +```javascript +Irccd.Logger.warning(message) +``` + +# Arguments + + - **message**: the message.
--- a/doc/src/api/module/Irccd.Logger/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Logger/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,24 +1,21 @@ ---- -module: Irccd.Logger -js: true -summary: "Logging functions." ---- +# Module Irccd.Logger -## Usage +This module must be used to log something. It will add messages to the logging +system configured in the irccd.conf file. -This module must be used to log something. It will add messages to the logging system configured in the irccd.conf file. - -For instance, if user has chosen to log into syslog, this module will log at syslog too. +For instance, if user has chosen to log into syslog, this module will log at +syslog too. -Any plugin can log messages, the message will be prepended by the plugin name to be easily identifiable. +Any plugin can log messages, the message will be prepended by the plugin name to +be easily identifiable. -## Functions +# Functions - [debug](Irccd.Logger.debug.html) - [info](Irccd.Logger.info.html) - [warning](Irccd.Logger.warning.html) -## Example +# Example ```javascript function onLoad()
--- a/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.info.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.info.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,21 @@ ---- -function: info -js: true -summary: "Get information about a plugin." -synopsis: "Irccd.Plugin.info(name)" -arguments: - - "**name**: the plugin identifier, if not specified the current plugin is selected." -returns: "The plugin information or undefined if the plugin was not found." ---- +# Function Irccd.Plugin.info + +Get information about a plugin. + +# Synopsis + +```javascript +Irccd.Plugin.info(name) +``` + +# Arguments + + - **name**: the plugin identifier, if not specified the current plugin is + selected. + +# Returns + +The plugin information or undefined if the plugin was not found. The returned object as the following properties:
--- a/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.list.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.list.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,13 @@ ---- -function: list -js: true -summary: "Get the list of plugins, the array returned contains all plugin names." -synopsis: "Irccd.Plugin.list()" -returns: "The list of all plugin names." ---- +# Function Irccd.Plugin.list + +Get the list of plugins, the array returned contains all plugin names. + +# Synopsis + +```javascript +Irccd.Plugin.list() +``` + +# Returns + +The list of all plugin names.
--- a/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.load.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.load.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,19 @@ ---- -function: load -js: true -summary: "Load a plugin by name. This function will search through the standard directories." -synopsis: "Irccd.Plugin.load(name)" -arguments: - - "**name**: the plugin identifier." -throws: - - "Error on errors," - - "ReferenceError if the plugin was not found." ---- +# Function Irccd.Plugin.load + +Load a plugin by name. This function will search through the standard +directories. + +# Synopsis + +```javascript +Irccd.Plugin.load(name) +``` + +# Arguments + + - **name**: the plugin identifier. + +# Throws + + - Error on errors, + - ReferenceError if the plugin was not found.
--- a/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.reload.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.reload.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,18 @@ ---- -function: reload -js: true -summary: "Reload a plugin by name." -synopsis: "Irccd.Plugin.reload(name)" -arguments: - - "**name**: the plugin identifier." -throws: - - "Error on errors," - - "ReferenceError if the plugin was not found." ---- +# Function Irccd.Plugin.reload + +Reload a plugin by name. + +# Synopsis + +```javascript +Irccd.Plugin.reload(name) +``` + +# Arguments + + - **name**: the plugin identifier. + +# Throws + + - Error on errors, + - ReferenceError if the plugin was not found.
--- a/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.unload.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/Irccd.Plugin.unload.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,18 @@ ---- -function: unload -js: true -summary: "Unload a plugin by name." -synopsis: "Irccd.Plugin.unload(name)" -arguments: - - "**name**: the plugin identifier." -throws: - - "Error on errors," - - "ReferenceError if the plugin was not found." ---- +# Function Irccd.Plugin.unload + +Unload a plugin by name. + +# Synopsis + +```javascript +Irccd.Plugin.unload(name) +``` + +# Arguments + + - **name**: the plugin identifier. + +# Throws + + - Error on errors, + - ReferenceError if the plugin was not found.
--- a/doc/src/api/module/Irccd.Plugin/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Plugin/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,14 +1,8 @@ ---- -module: Irccd.Plugin -js: true -summary: Plugin management and inspection. ---- - -## Usage +# Module Irccd.Plugin This module let you manage plugins. -## Objects +# Objects The following properties are defined as read in the configuration file: @@ -16,13 +10,18 @@ - **paths**: the `[paths.<name>]` section, - **format**: the `[format.<name>]` section. -### Example +# Functions + + - [info](Irccd.Plugin.info.html) + - [list](Irccd.Plugin.list.html) + - [load](Irccd.Plugin.load.html) + - [reload](Irccd.Plugin.reload.html) + - [unload](Irccd.Plugin.unload.html) + +# Example Assuming the configuration file is defined as following: -<div class="panel panel-info"> - <div class="panel-heading">~/.config/irccd/irccd.conf</div> - <div class="panel-body"> ```ini [plugin.xyz] foo = true @@ -31,8 +30,6 @@ [paths.xyz] config = "/etc/xyz" ``` - </div> -</div> The `Irccd.Plugin.config` will have the following properties: @@ -44,11 +41,3 @@ - **cache**: (string) set to the default cache directory, - **config**: (string) set to "/etc/xyz", - **data**: (string) set to the default data directory. - -## Functions - - - [info](Irccd.Plugin.info.html) - - [list](Irccd.Plugin.list.html) - - [load](Irccd.Plugin.load.html) - - [reload](Irccd.Plugin.reload.html) - - [unload](Irccd.Plugin.unload.html)
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.add.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.add.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -function: add -js: true -summary: "Add a new server to the irccd instance." -synopsis: "Irccd.Server.add(server)" -arguments: - - "**server**: the server object to add." ---- +# Function Irccd.Server.add + +Add a new server to the irccd instance. + +# Synopsis + +```javascript +Irccd.Server.add(server) +``` + +# Arguments + + - **server**: the server object to add.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.find.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.find.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: find -js: true -summary: "Find a server by name." -synopsis: "server = Irccd.Server.find(name)" -arguments: - - "**name**: the server name." -returns: "the server object or undefined if not found." ---- +# Function Irccd.Server.find + +Find a server by name. + +# Synopsis + +```javascript +server = Irccd.Server.find(name) +``` + +# Arguments + + - **name**: the server name. + +# Returns + +The server object or undefined if not found.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.list.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.list.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,18 @@ ---- -function: list -js: true -summary: "List all servers in a map." -synopsis: "table = Irccd.Server.list()" -returns: "the table of all servers." ---- +# Function Irccd.Server.list + +List all servers in a map. + +# Synopsis -## Example +```javascript +table = Irccd.Server.list() +``` + +# Returns + +The table of all servers. + +# Example ```javascript var table = Irccd.Server.list(); @@ -14,6 +20,6 @@ for (var name in table) { var server = table[name]; - /* Use server */ + // Use server. } ```
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.constructor.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.constructor.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,16 @@ ---- -method: constructor -js: true -summary: "Construct a new server" -synopsis: "Irccd.Server(params) /* constructor */" -arguments: - - "**params**: parameters." ---- +# Function Irccd.Server (constructor) + +Construct a new server + +# Synopsis + +```javascript +Irccd.Server(params) +``` + +# Arguments + + - **params**: parameters. The params argument may have the following properties: @@ -22,7 +27,7 @@ - **realname**: "real name", (Optional, default: IRC Client Daemon) - **commandChar**: "!", (Optional, the command char, default: "!") -## Example +# Example ```javascript var s = new Irccd.Server({
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.info.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.info.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,16 @@ ---- -method: info -js: true -summary: "Get server information." -synopsis: "info = Server.prototype.info()" -returns: "The server information." ---- +# Method Irccd.Server.prototype.info + +"Get server information. + +# Synopsis + +```javascript +info = Server.prototype.info() +``` + +# Returns + +The server information. The returned object has the following fields:
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.invite.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.invite.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: invite -js: true -summary: "Invite the specified target on the channel." -synopsis: "Server.prototype.invite(target, channel)" -arguments: - - "**target**: the target to invite," - - "**channel**: the channel." ---- +# Method Irccd.Server.prototype.invite + +Invite the specified target on the channel. + +# Synopsis + +```javascript +Server.prototype.invite(target, channel) +``` + +# Arguments + + - **target**: the target to invite, + - **channel**: the channel.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.isSelf.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.isSelf.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -method: isSelf -js: true -summary: "Check if the nickname targets the bot." -synopsis: "res = Server.prototype.isSelf(nickname)" -returns: "True if nickname is same as the bot" -arguments: - - "**nickname**: the nickname to check." ---- +# Method Irccd.Server.prototype.isSelf + +Check if the nickname targets the bot. + +# Synopsis + +```javascript +res = Server.prototype.isSelf(nickname) +``` + +# Returns + +True if nickname is same as the bot. + +# Arguments + + - **nickname**: the nickname to check.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.join.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.join.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: join -js: true -summary: "Join the specified channel, the password is optional." -synopsis: "Server.prototype.join(channel, password)" -arguments: - - "**channel**: the channel to join," - - "**password**: an optional password." ---- +# Method Irccd.Server.prototype.join + +Join the specified channel, the password is optional. + +# Synopsis + +```javascript +Server.prototype.join(channel, password) +``` + +# Arguments + + - **channel**: the channel to join, + - **password**: an optional password.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.kick.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.kick.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,15 @@ ---- -method: kick -js: true -summary: "Kick the specified target from the channel, the reason is optional." -synopsis: "Server.prototype.kick(nickname, channel, reason)" -arguments: - - "**nickname**: the person to kick," - - "**channel**: from which channel," - - "**reason**: an optional reason." ---- +# Method Irccd.Server.prototype.kick + +Kick the specified target from the channel, the reason is optional. + +# Synopsis + +```javascript +Server.prototype.kick(nickname, channel, reason) +``` + +# Arguments + + - **nickname**: the person to kick, + - **channel**: from which channel, + - **reason**: an optional reason.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.me.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.me.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: me -js: true -summary: "Send an action emote." -synopsis: "Server.prototype.me(target, message)" -arguments: - - "**target**: a nick or a channel," - - "**message**: the message to send." ---- +# Method Irccd.Server.prototype.me + +Send an action emote. + +# Synopsis + +```javascript +Server.prototype.me(target, message) +``` + +# Arguments + + - **target**: a nick or a channel, + - **message**: the message to send.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.message.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.message.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: message -js: true -summary: "Send a message to the specified target or channel." -synopsis: "Server.prototype.message(target, message)" -arguments: - - "**target**: the target," - - "**message**: the message to send." ---- +# Method Irccd.Server.prototype.message + +Send a message to the specified target or channel. + +# Synopsis + +```javascript +Server.prototype.message(target, message) +``` + +# Arguments + + - **target**: the target, + - **message**: the message to send.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.mode.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.mode.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -method: mode -js: true -summary: "Set the irccd's user mode." -synopsis: "Server.prototype.mode(mode)" -arguments: - - "**mode**: the new mode." ---- +# Method Irccd.Server.prototype.mode + +Set the irccd's user mode. + +# Synopsis + +```javascript +Server.prototype.mode(mode) +``` + +# Arguments + + - **mode**: the new mode.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.names.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.names.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,15 @@ ---- -method: names -js: true -summary: "Get the list of names. This function will generate the onNames event." -synopsis: "Server.prototype.names(channel)" -arguments: - - "**channel**: the channel name." ---- +# Method Irccd.Server.prototype.names + +# Summary + +Get the list of names. This function will generate the onNames event. + +# Synopsis + +```javascript +Server.prototype.names(channel) +``` + +# Arguments + + - **channel**: the channel name.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.nick.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.nick.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -method: nick -js: true -summary: "Change irccd's nickname." -synopsis: "Server.prototype.nick(nickname)" -arguments: - - "**nickname**: the new nickname." ---- +# Method Irccd.Server.prototype.nick + +Change irccd's nickname. + +# Synopsis + +```javascript +Server.prototype.nick(nickname) +``` + +# Arguments + + - **nickname**: the new nickname.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.notice.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.notice.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: notice -js: true -summary: "Send a private notice to the specified target." -synopsis: "Server.prototype.notice(nickname, message)" -arguments: - - "**nickname**: the target nickname," - - "**message**: the notice message." ---- +# Method Irccd.Server.prototype.notice + +Send a private notice to the specified target. + +# Synopsis + +```javascript +Server.prototype.notice(nickname, message) +``` + +# Arguments + + - **nickname**: the target nickname, + - **message**: the notice message.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.part.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.part.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,11 +1,17 @@ ---- -method: part -js: true -summary: "Leave the specified channel, the reason is optional." -synopsis: "Server.prototype.part(channel, reason)" -arguments: - - "**channel**: the channel to leave," - - "**reason**: an optional reason." ---- +# Method Irccd.Server.prototype.part + +Leave the specified channel, the reason is optional. + +Note: not all IRC servers support giving a reason to leave a channel, do not + specify it if this is a concern. + +# Synopsis -Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern. +```javascript +Server.prototype.part(channel, reason) +``` + +# Arguments + + - **channel**: the channel to leave, + - **reason**: an optional reason.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.toString.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.toString.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,10 +1,16 @@ ---- -method: toString -js: true -synopsis: "Server.prototype.toString()" -returns: "The server identifier" ---- +# Method Irccd.Server.prototype.toString Convert object as a string. -Because each server has a unique identifier, this method allows adding a server a property key. +Because each server has a unique identifier, this method allows adding a server +a property key. + +# Synopsis + +```javascript +Server.prototype.toString() +``` + +# Returns + +The server identifier.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.topic.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.topic.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,14 @@ ---- -method: topic -js: true -summary: "Change the topic of the specified channel." -synopsis: "Server.prototype.topic(channel, topic)" -arguments: - - "**channel**: the channel," - - "**topic**: the new topic." ---- +# Method Irccd.Server.prototype.topic + +Change the topic of the specified channel. + +# Synopsis + +```javascript +Server.prototype.topic(channel, topic) +``` + +# Arguments + + - **channel**: the channel, + - **topic**: the new topic.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.whois.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.prototype.whois.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,14 @@ ---- -method: whois -js: true -summary: "Get whois information from a user. The function will generate [onWhois](@baseurl@api/event/onWhois.html) event." -synopsis: "Server.prototype.whois(target)" -arguments: - - "**target**: the target." ---- +# Method Irccd.Server.prototype.whois + +Get whois information from a user. The function will generate +[onWhois](@baseurl@api/event/onWhois.html) event. + +# Synopsis + +```javascript +Server.prototype.whois(target) +``` + +# Arguments + + - **target**: the target.
--- a/doc/src/api/module/Irccd.Server/Irccd.Server.remove.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/Irccd.Server.remove.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,18 @@ ---- -function: remove -js: true -summary: "Remove a server from the irccd instance and disconnect it." -synopsis: "Irccd.Server.remove(name)" -arguments: - - "**name**: the server name." ---- +# Function Irccd.Server.remove + +Remove a server from the irccd instance and disconnect it. + +# Synopsis -## Remarks +```javascript +Irccd.Server.remove(name) +``` + +# Arguments -Since the server object has `toString` method, you can just pass a server object as well. + - **name**: the server name. + +# Remarks + +Since the server object has `toString` method, you can just pass a server object +as well.
--- a/doc/src/api/module/Irccd.Server/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Server/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,22 +1,17 @@ ---- -module: Irccd.Server -js: true -summary: "Server management." ---- +# Module Irccd.Server -## Usage +This module is the object that you received in almost all IRC event +(e.g. `onConnect`). You can use its methods to do your required actions on the +server. -This module is the object that you received in almost all IRC event (e.g. `onConnect`). You can use its methods to do -your required actions on the server. - -## Functions +# Functions - [add](Irccd.Server.add.html) - [find](Irccd.Server.find.html) - [list](Irccd.Server.list.html) - [remove](Irccd.Server.remove.html) -## Methods +# Methods - [(constructor)](Irccd.Server.prototype.constructor.html) - [info](Irccd.Server.prototype.info.html)
--- a/doc/src/api/module/Irccd.System/Irccd.System.env.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.env.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: env -js: true -summary: "Get a environment variable." -synopsis: "home = Irccd.System.env(name)" -arguments: - - "**name**: the environment variable name." -returns: "The variable or an empty string." ---- +# Function Irccd.System.env + +Get a environment variable. + +# Synopsis + +```javascript +home = Irccd.System.env(name) +``` + +# Arguments + + - **name**: the environment variable name. + +# Returns + +The variable or an empty string.
--- a/doc/src/api/module/Irccd.System/Irccd.System.exec.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.exec.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,15 @@ ---- -function: exec -js: true -summary: "Execute a system command." -synopsis: "Irccd.System.exec(cmd)" -arguments: - - "**cmd**: the command to execute." ---- +# Function Irccd.System.exec + +# Summary + +Execute a system command. + +# Synopsis + +```javascript +Irccd.System.exec(cmd) +``` + +# Arguments + + - **cmd**: the command to execute.
--- a/doc/src/api/module/Irccd.System/Irccd.System.home.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.home.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,14 @@ ---- -function: home -js: true -summary: "Get the home directory. This function should be used with care, plugin should not use user's home to store files." -synopsis: "home = Irccd.System.home()" -returns: "The user home directory." ---- +# Function Irccd.System.home + +Get the home directory. This function should be used with care, plugin should +not use user's home to store files. + +# Synopsis + +```javascript +home = Irccd.System.home() +``` + +# Returns + +The user home directory.
--- a/doc/src/api/module/Irccd.System/Irccd.System.name.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.name.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,13 @@ ---- -function: name -js: true -summary: "Get the operating system name. Usually Windows, FreeBSD, Linux and such." -synopsis: "name = Irccd.System.name()" -returns: "The operating system name." ---- +# Function Irccd.System.name + +Get the operating system name. Usually Windows, FreeBSD, Linux and such. + +# Synopsis + +```javascript +name = Irccd.System.name() +``` + +# Returns + +The operating system name.
--- a/doc/src/api/module/Irccd.System/Irccd.System.popen.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.popen.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,17 +1,24 @@ ---- -function: popen -js: true -summary: "Wrapper for `popen(3)` if the function is available." -synopsis: "Irccd.System.popen(cmd, mode) /* optional */" -arguments: - - "**cmd**: the command to execute," - - "**mode**: the mode (e.g. `r`)." -returns: "An [Irccd.File](@baseurl@api/module/Irccd.File/index.html) object." -throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---- +# Function Irccd.System.popen + +Wrapper for `popen(3)` if the function is available. + +**Note**: this function is optional and may not be available on your system. + +# Synopsis + +```javascript +Irccd.System.popen(cmd, mode) /* optional */ +``` -## Remarks +# Arguments + + - **cmd**: the command to execute, + - **mode**: the mode (e.g. `r`). -<div class="alert alert-warning" role="alert"> -**Warning**: this function is optional and may not be available on your system. -</div> +# Returns + +An [Irccd.File](@baseurl@api/module/Irccd.File/index.html) object. + +# Throws + +An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures.
--- a/doc/src/api/module/Irccd.System/Irccd.System.sleep.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.sleep.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -function: sleep -js: true -summary: "Sleep for seconds. Suspend the execution thread." -synopsis: "Irccd.System.sleep(sec)" -arguments: - - "**sec**: the number of seconds." ---- +# Function Irccd.System.sleep + +Sleep for seconds. Suspend the execution thread. + +# Synopsis + +```javascript +Irccd.System.sleep(sec) +``` + +# Arguments + + - **sec**: the number of seconds.
--- a/doc/src/api/module/Irccd.System/Irccd.System.ticks.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.ticks.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,14 @@ ---- -function: ticks -js: true -summary: "Get the time spent from start. Get how many milliseconds spent since the irccd startup." -synopsis: "msec = Irccd.System.ticks()" -returns: "The number of milliseconds." ---- +# Function Irccd.System.ticks + +Get the time spent from start. Get how many milliseconds spent since the irccd +startup. + +# Synopsis + +```javascript +msec = Irccd.System.ticks() +``` + +# Returns + +The number of milliseconds.
--- a/doc/src/api/module/Irccd.System/Irccd.System.uptime.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.uptime.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,14 @@ ---- -function: uptime -js: true -summary: "Get the system uptime. This function returns the number of seconds elapsed since the system boot up." -synopsis: "Irccd.System.uptime()" -returns: "The number of seconds." ---- +# Function Irccd.System.uptime + +Get the system uptime. This function returns the number of seconds elapsed since +the system boot up. + +# Synopsis + +```javascript +Irccd.System.uptime() +``` + +# Returns + +The number of seconds.
--- a/doc/src/api/module/Irccd.System/Irccd.System.usleep.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.usleep.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,8 +1,13 @@ ---- -function: usleep -js: true -summary: "Sleep for milliseconds. Suspend the execution thread." -synopsis: "Irccd.System.usleep(msec)" -arguments: - - "**msec**: the number of milliseconds." ---- +# Function Irccd.System.usleep + +Sleep for milliseconds. Suspend the execution thread. + +# Synopsis + +```javascript +Irccd.System.usleep(msec) +``` + +# Arguments + + - **msec**: the number of milliseconds.
--- a/doc/src/api/module/Irccd.System/Irccd.System.version.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/Irccd.System.version.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,7 +1,13 @@ ---- -function: version -js: true -summary: "Get the operating system version. This function is completely system dependent." -synopsis: "version = Irccd.System.version()" -returns: "The version as a string." ---- +# Function Irccd.System.version + +Get the operating system version. This function is completely system dependent. + +# Synopsis + +```javascript +version = Irccd.System.version() +``` + +# Returns + +The version as a string.
--- a/doc/src/api/module/Irccd.System/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.System/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,14 +1,12 @@ ---- -module: Irccd.System -js: true -summary: "System inspection." ---- +# Module Irccd.System -## Usage +System inspection. + +# Usage Use this module if you want to inspect the system independently. -## Functions +# Functions - [env](Irccd.System.env.html) - [exec](Irccd.System.exec.html)
--- a/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.constructor.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.constructor.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,20 +1,26 @@ ---- -method: constructor -js: true -summary: "Create a new timer object." -synopsis: "Irccd.Timer(type, delay, callback) /* constructor */" -arguments: - - "**type**: type of timer (`Irccd.Timer.Repeat` or `Irccd.Timer.Single`)," - - "**delay**: the interval in milliseconds," - - "**callback**: the function to call." ---- +# Function Irccd.Timer (constructor) -## Example +Create a new timer object. + +# Synopsis ```javascript -/* Execute an action every 1 second */ +Irccd.Timer(type, delay, callback) +``` + +# Arguments + + - **type**: type of timer (`Irccd.Timer.Repeat` or `Irccd.Timer.Single`), + - **delay**: the interval in milliseconds, + - **callback**: the function to call. + +# Example + +```javascript +// Execute an action every 1 second. + var t = new Irccd.Timer(Irccd.Timer.Repeat, 1000, function () { - /* Do your action */ + // Do your action. }); t.start();
--- a/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.start.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.start.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: start -js: true -summary: "Start the timer." -synopsis: "Timer.prototype.start()" ---- +# Method Irccd.Timer.prototype.start + +Start the timer. + +# Synopsis + +```javascript +Timer.prototype.start() +```
--- a/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.stop.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Timer/Irccd.Timer.prototype.stop.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,6 +1,9 @@ ---- -method: stop -js: true -summary: "Stop the timer." -synopsis: "Timer.prototype.stop()" ---- +# Method Irccd.Timer.prototype.stop + +Stop the timer. + +# Synopsis + +```javascript +Timer.prototype.stop() +```
--- a/doc/src/api/module/Irccd.Timer/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Timer/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,20 +1,17 @@ ---- -module: Irccd.Timer -js: true ---- +# Module Irccd.Timer -## Usage +# Usage Create repetitive or one-shot timers. -## Constants +# Constants The following properties are defined: - **Single**: (int) the timer is single-shot, - **Repeat**: (int) the timer is looping. -## Methods +# Methods - [(constructor)](Irccd.Timer.prototype.constructor.html) - [start](Irccd.Timer.prototype.start.html)
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isDigit.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isDigit.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isDigit -js: true -summary: "Check if the unicode character is a digit." -synopsis: "ret = Irccd.Unicode.isDigit(code)" -arguments: - - "**code**: the code point." -returns: "True if digit." ---- +# Function Irccd.Unicode.isDigit + +Check if the unicode character is a digit. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isDigit(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if digit.
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isLetter.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isLetter.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isLetter -js: true -summary: "Check if the unicode character is a letter." -synopsis: "ret = Irccd.Unicode.isLetter(code)" -arguments: - - "**code**: the code point." -returns: "True if letter." ---- +# Function Irccd.Unicode.isLetter + +Check if the unicode character is a letter. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isLetter(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if letter.
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isLower.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isLower.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isLower -js: true -summary: "Check if the unicode character is lower case." -synopsis: "ret = Irccd.Unicode.isLower(code)" -arguments: - - "**code**: the code point." -returns: "True if lower case." ---- +# Function Irccd.Unicode.isLower + +Check if the unicode character is lower case. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isLower(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if lower case.
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isSpace.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isSpace.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isSpace -js: true -summary: "Check if the unicode character is a space." -synopsis: "ret = Irccd.Unicode.isSpace(code)" -arguments: - - "**code**: the code point." -returns: "True if space." ---- +# Function Irccd.Unicode.isSpace + +Check if the unicode character is a space. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isSpace(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if space.
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isTitle.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isTitle.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isTitle -js: true -summary: "Check if the unicode character is title case." -synopsis: "ret = Irccd.Unicode.isTitle(code)" -arguments: - - "**code**: the code point." -returns: "True if title case." ---- +# Function Irccd.Unicode.isTitle + +Check if the unicode character is title case. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isTitle(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if title case.
--- a/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isUpper.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/Irccd.Unicode.isUpper.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,17 @@ ---- -function: isUpper -js: true -summary: "Check if the unicode character is upper case." -synopsis: "ret = Irccd.Unicode.isUpper(code)" -arguments: - - "**code**: the code point." -returns: "True if upper case." ---- +# Function Irccd.Unicode.isUpper + +Check if the unicode character is upper case. + +# Synopsis + +```javascript +ret = Irccd.Unicode.isUpper(code) +``` + +# Arguments + + - **code**: the code point. + +# Returns + +True if upper case.
--- a/doc/src/api/module/Irccd.Unicode/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Unicode/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,13 +1,10 @@ ---- -module: Irccd.Unicode -js: true ---- +# Module Irccd.Unicode -## Usage +# Usage Check for character categories. -## Functions +# Functions - [isDigit](Irccd.Unicode.isDigit.html) - [isLetter](Irccd.Unicode.isLetter.html)
--- a/doc/src/api/module/Irccd.Util/Irccd.Util.cut.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Util/Irccd.Util.cut.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,18 +1,6 @@ ---- -function: cut -js: true -summary: "Cut a piece of data into several lines." -synopsis: "lines = Irccd.Util.cut(data, maxc, maxl)" -arguments: - - "**data**: a string or an array of strings," - - "**maxc**: max number of colums (Optional, default: 72)," - - "**maxl**: max number of lines (Optional, default: undefined)." -returns: "A list of strings ready to be sent or undefined if the data is too big." -throws: - - "**RangeError** if maxl or maxc are negative numbers," - - "**RangeError** if one word length was bigger than maxc," - - "**TypeError** if data is not a string or a list of strings." ---- +# Function Irccd.Util.cut + +Cut a piece of data into several lines. The argument data is a string or a list of strings. In any case, all strings are first splitted by spaces and trimmed. This ensure that useless @@ -28,3 +16,26 @@ undefined is returned. An empty list may be returned if empty strings were found. + +# Synopsis + +```javascript +lines = Irccd.Util.cut(data, maxc, maxl) +``` + +# Arguments + + - "**data**: a string or an array of strings," + - "**maxc**: max number of colums (Optional, default: 72)," + - "**maxl**: max number of lines (Optional, default: undefined)." + +# Returns + +A list of strings ready to be sent or undefined if the data is too big. + +# Throws + + - **RangeError** if maxl or maxc are negative numbers, + - **RangeError** if one word length was bigger than maxc, + - **TypeError** if data is not a string or a list of strings. +
--- a/doc/src/api/module/Irccd.Util/Irccd.Util.format.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Util/Irccd.Util.format.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,17 +1,23 @@ ---- -function: format -js: true -summary: > - Format a string according to the [Common patterns and formatting](../../../../guide.html#common-patterns-and-formatting) - specification. -synopsis: "str = Irccd.Util.format(input, params)" -arguments: - - "**input**: the text to update," - - "**params**: the parameters." -returns: "The converted text." ---- +# Function Irccd.Util.format + +Format a string according to the template system. + +# Synopsis + +```javascript +str = Irccd.Util.format(input, params) +``` -## Example +# Arguments + + - **input**: the text to update, + - **params**: the parameters. + +# Returns + +The converted text. + +# Example Replaces the keyword `message` and formats it bold and red. @@ -26,34 +32,28 @@ Be very careful when you use this function with untrusted input. -<div class="panel panel-danger"> - <div class="panel-heading"> -**Bad code:** Do never pass untrusted content (e.g. user message) as input parameter. For example, the following code -is terribly dangerous: - </div> - <div class="panel-body"> +Danger: Do never pass untrusted content (e.g. user message) as input parameter. + +For example, the following code is terribly dangerous: + ```javascript function onMessage(server, channel, origin, message) { + // DANGEROUS. server.message(channel, Irccd.Util.format("@{red}" + message + "@{}"); } ``` -If a user sends a message like `${HOME}`, it will prints the user home directory, which is a high security issue -if you have environment variables with passwords. - </div> -</div> +If a user sends a message like `${HOME}`, it will prints the user home +directory, which is a high security issue if you have environment variables with +passwords. -<div class="panel panel-success"> - <div class="panel-heading"> -**Correct code**: Instead, always use a literal string using a replacement with the user input: - </div> - <div class="panel-body"> +Instead, always use a literal string using a replacement with the user input: + ```javascript function onMessage(server, channel, origin, message) { + // CORRECT. server.message(channel, Irccd.Util.format("@{red}#{message}@{}", { message: message }); } ``` - </div> -</div>
--- a/doc/src/api/module/Irccd.Util/Irccd.Util.splithost.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Util/Irccd.Util.splithost.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,18 @@ ---- -function: splithost -js: true -summary: "Extract the host from a user, for instance with foo!~foo@localhost, localhost will be returned." -synopsis: "host = Irccd.Util.splithost(user)" -arguments: - - "**user**: the user to split." -returns: "The hostname." ---- +# Function Irccd.Util.splithost + +Extract the host from a user, for instance with **foo!~foo@localhost**, +**localhost** will be returned. + +# Synopsis + +```javascript +host = Irccd.Util.splithost(user) +``` + +# Arguments + + - **user**: the user to split. + +# Returns + +The hostname.
--- a/doc/src/api/module/Irccd.Util/Irccd.Util.splituser.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Util/Irccd.Util.splituser.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,9 +1,18 @@ ---- -function: splituser -js: true -summary: "Extract the nickname, for instance with foo!~foo@localhost, foo will be returned." -synopsis: "nick = Irccd.Util.splituser(user)" -arguments: - - "**user**: the user to split." -returns: "The nickname." ---- +# Function Irccd.Util.splituser + +Extract the nickname, for instance with **foo!~foo@localhost**, **foo** will be +returned. + +# Synopsis + +```javascript +nick = Irccd.Util.splituser(user) +``` + +# Arguments + + - **user**: the user to split. + +# Returns + +The nickname.
--- a/doc/src/api/module/Irccd.Util/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd.Util/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,13 +1,10 @@ ---- -module: Irccd.Util -js: true ---- +# Module Irccd.Util -## Usage +# Usage Various utilities. -## Functions +# Functions - [cut](Irccd.Util.cut.html) - [format](Irccd.Util.format.html)
--- a/doc/src/api/module/Irccd/index.md Fri Dec 15 17:08:01 2017 +0100 +++ b/doc/src/api/module/Irccd/index.md Sun Dec 17 09:21:49 2017 +0100 @@ -1,12 +1,8 @@ ---- -module: Irccd ---- - -## Usage +# Module Irccd Contains general irccd variables and functions. -## Constants +# Constants The following properties are defined: @@ -15,11 +11,12 @@ - **minor**: (int) the minor irccd version, - **patch**: (int) the patch irccd version. -## Types +# Types - - **SystemError**: (function) an exception inheriting `Error` thrown by some functions. + - **SystemError**: (function) an exception inheriting `Error` thrown by some + functions. -## Example +# Example ```javascript var Logger = Irccd.Logger;