# HG changeset patch # User David Demelier # Date 1473938165 -7200 # Node ID 48676ca7071c556c4c894e4280ff33c72a1bd896 # Parent 4c191ecfb94a4e457f30726b7e6f13ca2e8ffd57 Docs: use less hierarchy for less indexes diff -r 4c191ecfb94a -r 48676ca7071c cmake/function/IrccdDefinePlugin.cmake --- a/cmake/function/IrccdDefinePlugin.cmake Thu Sep 15 07:03:50 2016 +0200 +++ b/cmake/function/IrccdDefinePlugin.cmake Thu Sep 15 13:16:05 2016 +0200 @@ -135,7 +135,7 @@ pandoc( OUTPUT ${basedocdir}/plugin/${PLG_NAME}.html SOURCES ${PLG_DOCS} - TEMPLATE ${resources_SOURCE_DIR}/template.html + TEMPLATE ${html_SOURCE_DIR}/resources/template.html DEPENDS ${html_SOURCE_DIR}/resources/template.html ARGS -Vguide VARIABLE baseurl:${baseurl} diff -r 4c191ecfb94a -r 48676ca7071c doc/html/CMakeLists.txt --- a/doc/html/CMakeLists.txt Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/CMakeLists.txt Thu Sep 15 13:16:05 2016 +0200 @@ -22,96 +22,96 @@ HTML_SOURCES ${html_SOURCE_DIR}/index.md ${html_SOURCE_DIR}/api/module/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.remove.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.mkdir.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.find.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.prototype.constructor.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md + ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/index.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.pause.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.elapsed.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.constructor.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.restart.md + ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.reset.md ${html_SOURCE_DIR}/api/module/Irccd.File/index.md - ${html_SOURCE_DIR}/api/module/Irccd.File/function/stat.md - ${html_SOURCE_DIR}/api/module/Irccd.File/function/dirname.md - ${html_SOURCE_DIR}/api/module/Irccd.File/function/exists.md - ${html_SOURCE_DIR}/api/module/Irccd.File/function/remove.md - ${html_SOURCE_DIR}/api/module/Irccd.File/function/basename.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/read.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/seek.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/stat.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/constructor.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/tell.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/dirname.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/readline.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/write.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/lines.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/close.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/remove.md - ${html_SOURCE_DIR}/api/module/Irccd.File/method/basename.md - ${html_SOURCE_DIR}/api/module/Irccd.System/index.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/exec.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/sleep.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/popen.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/env.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/home.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/uptime.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/version.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/usleep.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/name.md - ${html_SOURCE_DIR}/api/module/Irccd.System/function/ticks.md - ${html_SOURCE_DIR}/api/module/Irccd.Timer/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Timer/method/start.md - ${html_SOURCE_DIR}/api/module/Irccd.Timer/method/constructor.md - ${html_SOURCE_DIR}/api/module/Irccd.Timer/method/stop.md - ${html_SOURCE_DIR}/api/module/Irccd/index.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.stat.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.dirname.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.exists.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.remove.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.basename.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.read.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.seek.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.stat.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.constructor.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.tell.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.dirname.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.readline.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.write.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.lines.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.close.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.remove.md + ${html_SOURCE_DIR}/api/module/Irccd.File/Irccd.File.prototype.basename.md + ${html_SOURCE_DIR}/api/module/Irccd.Logger/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Logger/Irccd.Logger.warning.md + ${html_SOURCE_DIR}/api/module/Irccd.Logger/Irccd.Logger.info.md + ${html_SOURCE_DIR}/api/module/Irccd.Logger/Irccd.Logger.debug.md ${html_SOURCE_DIR}/api/module/Irccd.Plugin/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Plugin/function/unload.md - ${html_SOURCE_DIR}/api/module/Irccd.Plugin/function/load.md - ${html_SOURCE_DIR}/api/module/Irccd.Plugin/function/reload.md - ${html_SOURCE_DIR}/api/module/Irccd.Plugin/function/info.md - ${html_SOURCE_DIR}/api/module/Irccd.Plugin/function/list.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/function/remove.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/function/mkdir.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/function/find.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/method/constructor.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/method/remove.md - ${html_SOURCE_DIR}/api/module/Irccd.Directory/method/find.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isSpace.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isTitle.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isUpper.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isLetter.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isDigit.md - ${html_SOURCE_DIR}/api/module/Irccd.Unicode/function/isLower.md - ${html_SOURCE_DIR}/api/module/Irccd.Util/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Util/function/splithost.md - ${html_SOURCE_DIR}/api/module/Irccd.Util/function/format.md - ${html_SOURCE_DIR}/api/module/Irccd.Util/function/splituser.md + ${html_SOURCE_DIR}/api/module/Irccd.Plugin/Irccd.Plugin.unload.md + ${html_SOURCE_DIR}/api/module/Irccd.Plugin/Irccd.Plugin.load.md + ${html_SOURCE_DIR}/api/module/Irccd.Plugin/Irccd.Plugin.reload.md + ${html_SOURCE_DIR}/api/module/Irccd.Plugin/Irccd.Plugin.info.md + ${html_SOURCE_DIR}/api/module/Irccd.Plugin/Irccd.Plugin.list.md ${html_SOURCE_DIR}/api/module/Irccd.Server/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/function/remove.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/function/list.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/function/find.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/function/add.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/me.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/cmode.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/mode.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/part.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/message.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/topic.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/whois.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/nick.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/constructor.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/join.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/invite.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/cnotice.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/info.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/notice.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/kick.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/toString.md - ${html_SOURCE_DIR}/api/module/Irccd.Server/method/names.md - ${html_SOURCE_DIR}/api/module/Irccd.Logger/index.md - ${html_SOURCE_DIR}/api/module/Irccd.Logger/function/warning.md - ${html_SOURCE_DIR}/api/module/Irccd.Logger/function/info.md - ${html_SOURCE_DIR}/api/module/Irccd.Logger/function/debug.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/index.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/method/pause.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/method/elapsed.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/method/constructor.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/method/restart.md - ${html_SOURCE_DIR}/api/module/Irccd.ElapsedTimer/method/reset.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.remove.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.list.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.find.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.add.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.me.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.cmode.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.mode.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.part.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.message.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.topic.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.whois.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.nick.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.constructor.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.join.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.invite.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.cnotice.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.info.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.notice.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.kick.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.toString.md + ${html_SOURCE_DIR}/api/module/Irccd.Server/Irccd.Server.prototype.names.md + ${html_SOURCE_DIR}/api/module/Irccd.System/index.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.exec.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.sleep.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.popen.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.env.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.home.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.uptime.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.version.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.usleep.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.name.md + ${html_SOURCE_DIR}/api/module/Irccd.System/Irccd.System.ticks.md + ${html_SOURCE_DIR}/api/module/Irccd.Timer/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Timer/Irccd.Timer.prototype.start.md + ${html_SOURCE_DIR}/api/module/Irccd.Timer/Irccd.Timer.prototype.constructor.md + ${html_SOURCE_DIR}/api/module/Irccd.Timer/Irccd.Timer.prototype.stop.md + ${html_SOURCE_DIR}/api/module/Irccd/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isSpace.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isTitle.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isUpper.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isLetter.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isDigit.md + ${html_SOURCE_DIR}/api/module/Irccd.Unicode/Irccd.Unicode.isLower.md + ${html_SOURCE_DIR}/api/module/Irccd.Util/index.md + ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.splithost.md + ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.format.md + ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.splituser.md ${html_SOURCE_DIR}/api/index.md ${html_SOURCE_DIR}/api/event/index.md ${html_SOURCE_DIR}/api/event/onWhois.md diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.find.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.find.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,13 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.mkdir.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.mkdir.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.constructor.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.constructor.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,36 @@ +--- +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." +--- + +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 + +````javascript +try { + var d = new Irccd.Directory("/usr/share/games"); + + for (var i = 0; i < d.count; ++i) + if (d.entries[i].type == Irccd.Directory.TypeFile) + // use d.entries[i].name which is a file. +} catch (e) { + // Use the error +} +```` + + + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,12 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/Irccd.Directory.remove.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.remove.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,16 @@ +--- +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." +--- + +## Remarks + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/function/find.md --- a/doc/html/api/module/Irccd.Directory/function/find.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/function/mkdir.md --- a/doc/html/api/module/Irccd.Directory/function/mkdir.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/function/remove.md --- a/doc/html/api/module/Irccd.Directory/function/remove.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ ---- -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." ---- - -## Remarks - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/index.md --- a/doc/html/api/module/Irccd.Directory/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Directory/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -23,12 +23,12 @@ ## Functions - - [find](function/find.html) - - [mkdir](function/mkdir.html) - - [remove](function/remove.html) + - [find](Irccd.Directory.find.html) + - [mkdir](Irccd.Directory.mkdir.html) + - [remove](Irccd.Directory.remove.html) ## Methods - - [(constructor)](method/constructor.html) - - [find](method/find.html) - - [remove](method/remove.html) + - [(constructor)](Irccd.Directory.prototype.constructor.html) + - [find](Irccd.Directory.prototype.find.html) + - [remove](Irccd.Directory.prototype.remove.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/method/constructor.md --- a/doc/html/api/module/Irccd.Directory/method/constructor.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ ---- -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." ---- - -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 - -````javascript -try { - var d = new Irccd.Directory("/usr/share/games"); - - for (var i = 0; i < d.count; ++i) - if (d.entries[i].type == Irccd.Directory.TypeFile) - // use d.entries[i].name which is a file. -} catch (e) { - // Use the error -} -```` - - - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/method/find.md --- a/doc/html/api/module/Irccd.Directory/method/find.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Directory/method/remove.md --- a/doc/html/api/module/Irccd.Directory/method/remove.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.constructor.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.constructor.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +method: constructor +js: true +summary: "Construct a new ElapsedTimer object." +synopsis: "Irccd.ElapsedTimer() /* constructor */" +--- + +The timer is constructed and started. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.elapsed.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.elapsed.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +method: elapsed +js: true +summary: "Get the number of elapsed milliseconds." +synopsis: "ElapsedTimer.prototype.elapsed()" +returns: "The elapsed time in milliseconds." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.pause.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.pause.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: pause +js: true +summary: "Pause the timer, without resetting the current elapsed time stored." +synopsis: "ElapsedTimer.prototype.pause()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.reset.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.reset.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: reset +js: true +summary: "Reset the elapsed time to 0, the status is not modified." +synopsis: "ElapsedTimer.prototype.reset()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.restart.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.ElapsedTimer/Irccd.ElapsedTimer.prototype.restart.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: restart +js: true +summary: "Restart the timer without resetting the current elapsed time." +synopsis: "ElapsedTimer.prototype.restart()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/index.md --- a/doc/html/api/module/Irccd.ElapsedTimer/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.ElapsedTimer/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -5,12 +5,12 @@ ## Usage -This class let you measure the elpased time. +This class let you measure the elapsed time. ## Methods - - [(constructor)](method/constructor.html) - - [elapsed](method/elapsed.html) - - [pause](method/pause.html) - - [reset](method/reset.html) - - [restart](method/restart.html) + - [(constructor)](Irccd.ElapsedTimer.prototype.constructor.html) + - [elapsed](Irccd.ElapsedTimer.prototype.elapsed.html) + - [pause](Irccd.ElapsedTimer.prototype.pause.html) + - [reset](Irccd.ElapsedTimer.prototype.reset.html) + - [restart](Irccd.ElapsedTimer.prototype.restart.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/method/constructor.md --- a/doc/html/api/module/Irccd.ElapsedTimer/method/constructor.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -method: constructor -js: true -summary: "Construct a new ElapsedTimer object." -synopsis: "Irccd.ElapsedTimer() /* constructor */" ---- - -The timer is constructed and started. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/method/elapsed.md --- a/doc/html/api/module/Irccd.ElapsedTimer/method/elapsed.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -method: elapsed -js: true -summary: "Get the number of elapsed milliseconds." -synopsis: "ElapsedTimer.prototype.elapsed()" -returns: "The elapsed time in milliseconds." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/method/pause.md --- a/doc/html/api/module/Irccd.ElapsedTimer/method/pause.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: pause -js: true -summary: "Pause the timer, without resetting the current elapsed time stored." -synopsis: "ElapsedTimer.prototype.pause()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/method/reset.md --- a/doc/html/api/module/Irccd.ElapsedTimer/method/reset.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: reset -js: true -summary: "Reset the elapsed time to 0, the status is not modified." -synopsis: "ElapsedTimer.prototype.reset()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.ElapsedTimer/method/restart.md --- a/doc/html/api/module/Irccd.ElapsedTimer/method/restart.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: restart -js: true -summary: "Restart the timer without resetting the current elapsed time." -synopsis: "ElapsedTimer.prototype.restart()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.basename.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.basename.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.dirname.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.dirname.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.exists.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.exists.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.basename.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.basename.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.close.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.close.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: close +js: true +summary: "Force close of the file, automatically called when object is collected." +synopsis: "File.prototype.close()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.constructor.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.constructor.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,17 @@ +--- +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." +--- + +## Mode + +The mode is the same as the `fopen(3)`, see the documentation of [std::fopen(3)][fopen] for more information +about the mode string. + +[fopen]: http://en.cppreference.com/w/cpp/io/c/fopen diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.dirname.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.dirname.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.lines.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.lines.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.read.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.read.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.readline.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.readline.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,14 @@ +--- +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." +--- + +## Remarks + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.remove.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.remove.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.seek.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.seek.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.stat.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.stat.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,14 @@ +--- +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." +--- + +## Remarks + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.tell.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.tell.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.prototype.write.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.write.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.remove.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.remove.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/Irccd.File.stat.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.File/Irccd.File.stat.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,33 @@ +--- +function: stat +js: true +summary: > + Get file information at the specified path. + + 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. +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." +--- + +## Remarks + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/function/basename.md --- a/doc/html/api/module/Irccd.File/function/basename.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/function/dirname.md --- a/doc/html/api/module/Irccd.File/function/dirname.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/function/exists.md --- a/doc/html/api/module/Irccd.File/function/exists.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/function/remove.md --- a/doc/html/api/module/Irccd.File/function/remove.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/function/stat.md --- a/doc/html/api/module/Irccd.File/function/stat.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ ---- -function: stat -js: true -summary: > - Get file information at the specified path. - - 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. -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." ---- - -## Remarks - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/index.md --- a/doc/html/api/module/Irccd.File/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.File/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -26,23 +26,23 @@ ## Functions - - [basename](function/basename.html) - - [dirname](function/dirname.html) - - [exists](function/exists.html) - - [remove](function/remove.html) - - [stat](function/stat.html) (Optional) + - [basename](Irccd.File.basename.html) + - [dirname](Irccd.File.dirname.html) + - [exists](Irccd.File.exists.html) + - [remove](Irccd.File.remove.html) + - [stat](Irccd.File.stat.html) (Optional) ## Methods - - [(constructor)](method/constructor.html) - - [basename](method/basename.html) - - [close](method/close.html) - - [dirname](method/dirname.html) - - [lines](method/lines.html) - - [read](method/read.html) - - [readline](method/readline.html) - - [remove](method/remove.html) - - [seek](method/seek.html) - - [stat](method/stat.html) (Optional) - - [tell](method/tell.html) - - [write](method/write.html) + - [(constructor)](Irccd.File.prototype.constructor.html) + - [basename](Irccd.File.prototype.basename.html) + - [close](Irccd.File.prototype.close.html) + - [dirname](Irccd.File.prototype.dirname.html) + - [lines](Irccd.File.prototype.lines.html) + - [read](Irccd.File.prototype.read.html) + - [readline](Irccd.File.prototype.readline.html) + - [remove](Irccd.File.prototype.remove.html) + - [seek](Irccd.File.prototype.seek.html) + - [stat](Irccd.File.prototype.stat.html) (Optional) + - [tell](Irccd.File.prototype.tell.html) + - [write](Irccd.File.prototype.write.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/basename.md --- a/doc/html/api/module/Irccd.File/method/basename.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/close.md --- a/doc/html/api/module/Irccd.File/method/close.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: close -js: true -summary: "Force close of the file, automatically called when object is collected." -synopsis: "File.prototype.close()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/constructor.md --- a/doc/html/api/module/Irccd.File/method/constructor.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ---- -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." ---- - -## Mode - -The mode is the same as the `fopen(3)`, see the documentation of [std::fopen(3)][fopen] for more information -about the mode string. - -[fopen]: http://en.cppreference.com/w/cpp/io/c/fopen diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/dirname.md --- a/doc/html/api/module/Irccd.File/method/dirname.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/lines.md --- a/doc/html/api/module/Irccd.File/method/lines.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/read.md --- a/doc/html/api/module/Irccd.File/method/read.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/readline.md --- a/doc/html/api/module/Irccd.File/method/readline.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ ---- -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." ---- - -## Remarks - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/remove.md --- a/doc/html/api/module/Irccd.File/method/remove.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/seek.md --- a/doc/html/api/module/Irccd.File/method/seek.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/stat.md --- a/doc/html/api/module/Irccd.File/method/stat.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ ---- -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." ---- - -## Remarks - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/tell.md --- a/doc/html/api/module/Irccd.File/method/tell.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.File/method/write.md --- a/doc/html/api/module/Irccd.File/method/write.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/Irccd.Logger.debug.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Logger/Irccd.Logger.debug.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,12 @@ +--- +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." +--- + +## Remarks + +This function targets irccd developers, the end user should not use it. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/Irccd.Logger.info.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Logger/Irccd.Logger.info.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/Irccd.Logger.warning.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Logger/Irccd.Logger.warning.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +function: warning +js: true +summary: "Log a warning. The message will always be logged." +synopsis: "Irccd.Logger.warning(message)" +arguments: + - "**message**: the message." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/function/debug.md --- a/doc/html/api/module/Irccd.Logger/function/debug.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- -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." ---- - -## Remarks - -This function targets irccd developers, the end user should not use it. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/function/info.md --- a/doc/html/api/module/Irccd.Logger/function/info.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/function/warning.md --- a/doc/html/api/module/Irccd.Logger/function/warning.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -function: warning -js: true -summary: "Log a warning. The message will always be logged." -synopsis: "Irccd.Logger.warning(message)" -arguments: - - "**message**: the message." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Logger/index.md --- a/doc/html/api/module/Irccd.Logger/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Logger/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -14,9 +14,9 @@ ## Functions - - [debug](function/debug.html) - - [info](function/info.html) - - [warning](function/warning.html) + - [debug](Irccd.Logger.debug.html) + - [info](Irccd.Logger.info.html) + - [warning](Irccd.Logger.warning.html) ## Example diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/Irccd.Plugin.info.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Plugin/Irccd.Plugin.info.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,17 @@ +--- +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." +--- + +The returned object as the following properties: + + - **name**: (string) the plugin identifier, + - **author**: (string) the author, + - **license**: (string) the license, + - **summary**: (string) a short description, + - **version**: (string) the version diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/Irccd.Plugin.list.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Plugin/Irccd.Plugin.list.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/Irccd.Plugin.load.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Plugin/Irccd.Plugin.load.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,11 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/Irccd.Plugin.reload.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Plugin/Irccd.Plugin.reload.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,11 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/Irccd.Plugin.unload.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Plugin/Irccd.Plugin.unload.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,11 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/function/info.md --- a/doc/html/api/module/Irccd.Plugin/function/info.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ---- -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." ---- - -The returned object as the following properties: - - - **name**: (string) the plugin identifier, - - **author**: (string) the author, - - **license**: (string) the license, - - **summary**: (string) a short description, - - **version**: (string) the version diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/function/list.md --- a/doc/html/api/module/Irccd.Plugin/function/list.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/function/load.md --- a/doc/html/api/module/Irccd.Plugin/function/load.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/function/reload.md --- a/doc/html/api/module/Irccd.Plugin/function/reload.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/function/unload.md --- a/doc/html/api/module/Irccd.Plugin/function/unload.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Plugin/index.md --- a/doc/html/api/module/Irccd.Plugin/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Plugin/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -43,8 +43,8 @@ ## Functions - - [info](function/info.html) - - [list](function/list.html) - - [load](function/load.html) - - [reload](function/reload.html) - - [unload](function/unload.html) + - [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) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.add.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.add.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.find.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.find.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.list.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.list.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,19 @@ +--- +function: list +js: true +summary: "List all servers in a map." +synopsis: "table = Irccd.Server.list()" +returns: "the table of all servers." +--- + +## Example + +````javascript +var table = Irccd.Server.list(); + +for (var name in table) { + var server = table[name]; + + /* Use server */ +} +```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.cmode.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.cmode.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +method: cmode +js: true +summary: "Change the mode of the specified channel." +synopsis: "Server.prototype.cmode(channel, mode)" +arguments: + - "**channel**: the channel target," + - "**mode**: the mode." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.cnotice.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.cnotice.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +method: cnotice +js: true +summary: "Send a message notice on a channel." +synopsis: "Server.prototype.cnotice(channel, message)" +arguments: + - "**channel**: the target channel," + - "**message**: the message." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.constructor.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.constructor.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,35 @@ +--- +method: constructor +js: true +summary: "Construct a new server" +synopsis: "Irccd.Server(params) /* constructor */" +arguments: + - "**params**: parameters." +--- + +The params argument may have the following properties: + + - **name**: the name, + - **host**: the host, + - **ipv6**: true to use ipv6, (Optional: default false) + - **port**: the port number, (Optional: default 6667) + - **password**: the password, (Optional: default none) + - **channels**: array of channels (Optiona: default empty) + - **ssl**: true to use ssl, (Optional: default false) + - **sslVerify**: true to verify (Optional: default true) + - **nickname**: "nickname", (Optional, default: irccd) + - **username**: "user name", (Optional, default: irccd) + - **realname**: "real name", (Optional, default: IRC Client Daemon) + - **commandChar**: "!", (Optional, the command char, default: "!") + +## Example + +````javascript +var s = new Irccd.Server({ + name: "localhost", + host: "localhost", + nickname: "kevin", + ssl: true, + sslVerify: false +}); +```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.info.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.info.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,19 @@ +--- +method: info +js: true +summary: "Get server information." +synopsis: "info = Server.prototype.info()" +returns: "The server information." +--- + +The returned object has the following fields: + + - **name**: (string) the server unique name, + - **host**: (string) the host name, + - **port**: (int) the port number, + - **ssl**: (bool) true if using ssl, + - **sslVerify**: (bool) true if ssl was verified, + - **channels**: (string list) an array of all channels, + - **realname**: (string) the current real name, + - **username**: (string) the user name, + - **nickname**: (string) the current nickname. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.invite.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.invite.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.join.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.join.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.kick.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.kick.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.me.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.me.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.message.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.message.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.mode.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.mode.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +method: mode +js: true +summary: "Set the irccd's user mode." +synopsis: "Server.prototype.mode(mode)" +arguments: + - "**mode**: the new mode." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.names.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.names.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.nick.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.nick.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +method: nick +js: true +summary: "Change irccd's nickname." +synopsis: "Server.prototype.nick(nickname)" +arguments: + - "**nickname**: the new nickname." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.notice.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.notice.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.part.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.part.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,11 @@ +--- +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." +--- + +Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.toString.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.toString.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,10 @@ +--- +method: toString +js: true +synopsis: "Server.prototype.toString()" +returns: "The server identifier" +--- + +Convert object as a string. + +Because each server has a unique identifier, this method allows adding a server a property key. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.topic.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.topic.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.prototype.whois.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.whois.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/Irccd.Server.remove.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.remove.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,12 @@ +--- +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." +--- + +## Remarks + +Since the server object has `toString` method, you can just pass a server object as well. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/function/add.md --- a/doc/html/api/module/Irccd.Server/function/add.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/function/find.md --- a/doc/html/api/module/Irccd.Server/function/find.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/function/list.md --- a/doc/html/api/module/Irccd.Server/function/list.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ ---- -function: list -js: true -summary: "List all servers in a map." -synopsis: "table = Irccd.Server.list()" -returns: "the table of all servers." ---- - -## Example - -````javascript -var table = Irccd.Server.list(); - -for (var name in table) { - var server = table[name]; - - /* Use server */ -} -```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/function/remove.md --- a/doc/html/api/module/Irccd.Server/function/remove.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- -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." ---- - -## Remarks - -Since the server object has `toString` method, you can just pass a server object as well. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/index.md --- a/doc/html/api/module/Irccd.Server/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Server/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -11,27 +11,27 @@ ## Functions - - [add](function/add.html) - - [find](function/find.html) - - [list](function/list.html) - - [remove](function/remove.html) + - [add](Irccd.Server.add.html) + - [find](Irccd.Server.find.html) + - [list](Irccd.Server.list.html) + - [remove](Irccd.Server.remove.html) ## Methods - - [(constructor)](method/constructor.html) - - [cmode](method/cmode.html) - - [cnotice](method/cnotice.html) - - [info](method/info.html) - - [invite](method/invite.html) - - [join](method/join.html) - - [kick](method/kick.html) - - [me](method/me.html) - - [message](method/message.html) - - [mode](method/mode.html) - - [names](method/names.html) - - [nick](method/nick.html) - - [notice](method/notice.html) - - [part](method/part.html) - - [topic](method/topic.html) - - [whois](method/whois.html) - - [toString](method/toString.html) + - [(constructor)](Irccd.Server.prototype.constructor.html) + - [cmode](Irccd.Server.prototype.cmode.html) + - [cnotice](Irccd.Server.prototype.cnotice.html) + - [info](Irccd.Server.prototype.info.html) + - [invite](Irccd.Server.prototype.invite.html) + - [join](Irccd.Server.prototype.join.html) + - [kick](Irccd.Server.prototype.kick.html) + - [me](Irccd.Server.prototype.me.html) + - [message](Irccd.Server.prototype.message.html) + - [mode](Irccd.Server.prototype.mode.html) + - [names](Irccd.Server.prototype.names.html) + - [nick](Irccd.Server.prototype.nick.html) + - [notice](Irccd.Server.prototype.notice.html) + - [part](Irccd.Server.prototype.part.html) + - [topic](Irccd.Server.prototype.topic.html) + - [whois](Irccd.Server.prototype.whois.html) + - [toString](Irccd.Server.prototype.toString.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/cmode.md --- a/doc/html/api/module/Irccd.Server/method/cmode.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -method: cmode -js: true -summary: "Change the mode of the specified channel." -synopsis: "Server.prototype.cmode(channel, mode)" -arguments: - - "**channel**: the channel target," - - "**mode**: the mode." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/cnotice.md --- a/doc/html/api/module/Irccd.Server/method/cnotice.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -method: cnotice -js: true -summary: "Send a message notice on a channel." -synopsis: "Server.prototype.cnotice(channel, message)" -arguments: - - "**channel**: the target channel," - - "**message**: the message." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/constructor.md --- a/doc/html/api/module/Irccd.Server/method/constructor.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ ---- -method: constructor -js: true -summary: "Construct a new server" -synopsis: "Irccd.Server(params) /* constructor */" -arguments: - - "**params**: parameters." ---- - -The params argument may have the following properties: - - - **name**: the name, - - **host**: the host, - - **ipv6**: true to use ipv6, (Optional: default false) - - **port**: the port number, (Optional: default 6667) - - **password**: the password, (Optional: default none) - - **channels**: array of channels (Optiona: default empty) - - **ssl**: true to use ssl, (Optional: default false) - - **sslVerify**: true to verify (Optional: default true) - - **nickname**: "nickname", (Optional, default: irccd) - - **username**: "user name", (Optional, default: irccd) - - **realname**: "real name", (Optional, default: IRC Client Daemon) - - **commandChar**: "!", (Optional, the command char, default: "!") - -## Example - -````javascript -var s = new Irccd.Server({ - name: "localhost", - host: "localhost", - nickname: "kevin", - ssl: true, - sslVerify: false -}); -```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/info.md --- a/doc/html/api/module/Irccd.Server/method/info.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ ---- -method: info -js: true -summary: "Get server information." -synopsis: "info = Server.prototype.info()" -returns: "The server information." ---- - -The returned object has the following fields: - - - **name**: (string) the server unique name, - - **host**: (string) the host name, - - **port**: (int) the port number, - - **ssl**: (bool) true if using ssl, - - **sslVerify**: (bool) true if ssl was verified, - - **channels**: (string list) an array of all channels, - - **realname**: (string) the current real name, - - **username**: (string) the user name, - - **nickname**: (string) the current nickname. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/invite.md --- a/doc/html/api/module/Irccd.Server/method/invite.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/join.md --- a/doc/html/api/module/Irccd.Server/method/join.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/kick.md --- a/doc/html/api/module/Irccd.Server/method/kick.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/me.md --- a/doc/html/api/module/Irccd.Server/method/me.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/message.md --- a/doc/html/api/module/Irccd.Server/method/message.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/mode.md --- a/doc/html/api/module/Irccd.Server/method/mode.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -method: mode -js: true -summary: "Set the irccd's user mode." -synopsis: "Server.prototype.mode(mode)" -arguments: - - "**mode**: the new mode." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/names.md --- a/doc/html/api/module/Irccd.Server/method/names.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/nick.md --- a/doc/html/api/module/Irccd.Server/method/nick.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -method: nick -js: true -summary: "Change irccd's nickname." -synopsis: "Server.prototype.nick(nickname)" -arguments: - - "**nickname**: the new nickname." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/notice.md --- a/doc/html/api/module/Irccd.Server/method/notice.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/part.md --- a/doc/html/api/module/Irccd.Server/method/part.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- -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." ---- - -Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/toString.md --- a/doc/html/api/module/Irccd.Server/method/toString.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- -method: toString -js: true -synopsis: "Server.prototype.toString()" -returns: "The server identifier" ---- - -Convert object as a string. - -Because each server has a unique identifier, this method allows adding a server a property key. diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/topic.md --- a/doc/html/api/module/Irccd.Server/method/topic.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Server/method/whois.md --- a/doc/html/api/module/Irccd.Server/method/whois.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.env.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.env.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.exec.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.exec.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +function: exec +js: true +summary: "Execute a system command." +synopsis: "Irccd.System.exec(cmd)" +arguments: + - "**cmd**: the command to execute." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.home.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.home.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.name.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.name.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.popen.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.popen.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,17 @@ +--- +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." +--- + +## Remarks + + diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.sleep.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.sleep.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +function: sleep +js: true +summary: "Sleep for seconds. Suspend the execution thread." +synopsis: "Irccd.System.sleep(sec)" +arguments: + - "**sec**: the number of seconds." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.ticks.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.ticks.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.uptime.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.uptime.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.usleep.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.usleep.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,8 @@ +--- +function: usleep +js: true +summary: "Sleep for milliseconds. Suspend the execution thread." +synopsis: "Irccd.System.usleep(msec)" +arguments: + - "**msec**: the number of milliseconds." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/Irccd.System.version.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.System/Irccd.System.version.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,7 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/env.md --- a/doc/html/api/module/Irccd.System/function/env.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/exec.md --- a/doc/html/api/module/Irccd.System/function/exec.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -function: exec -js: true -summary: "Execute a system command." -synopsis: "Irccd.System.exec(cmd)" -arguments: - - "**cmd**: the command to execute." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/home.md --- a/doc/html/api/module/Irccd.System/function/home.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/name.md --- a/doc/html/api/module/Irccd.System/function/name.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/popen.md --- a/doc/html/api/module/Irccd.System/function/popen.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ---- -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." ---- - -## Remarks - - diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/sleep.md --- a/doc/html/api/module/Irccd.System/function/sleep.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -function: sleep -js: true -summary: "Sleep for seconds. Suspend the execution thread." -synopsis: "Irccd.System.sleep(sec)" -arguments: - - "**sec**: the number of seconds." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/ticks.md --- a/doc/html/api/module/Irccd.System/function/ticks.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/uptime.md --- a/doc/html/api/module/Irccd.System/function/uptime.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/usleep.md --- a/doc/html/api/module/Irccd.System/function/usleep.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -function: usleep -js: true -summary: "Sleep for milliseconds. Suspend the execution thread." -synopsis: "Irccd.System.usleep(msec)" -arguments: - - "**msec**: the number of milliseconds." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/function/version.md --- a/doc/html/api/module/Irccd.System/function/version.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.System/index.md --- a/doc/html/api/module/Irccd.System/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.System/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -10,13 +10,13 @@ ## Functions - - [env](function/env.html) - - [exec](function/exec.html) - - [home](function/home.html) - - [name](function/name.html) - - [popen](function/popen.html) (Optional) - - [sleep](function/sleep.html) - - [ticks](function/ticks.html) - - [uptime](function/uptime.html) - - [usleep](function/usleep.html) - - [version](function/version.html) + - [env](Irccd.System.env.html) + - [exec](Irccd.System.exec.html) + - [home](Irccd.System.home.html) + - [name](Irccd.System.name.html) + - [popen](Irccd.System.popen.html) (Optional) + - [sleep](Irccd.System.sleep.html) + - [ticks](Irccd.System.ticks.html) + - [uptime](Irccd.System.uptime.html) + - [usleep](Irccd.System.usleep.html) + - [version](Irccd.System.version.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.constructor.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.constructor.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,21 @@ +--- +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." +--- + +## Example + +````javascript +/* Execute an action every 1 second */ +var t = new Irccd.Timer(Irccd.Timer.Repeat, 1000, function () { + /* Do your action */ +}); + +t.start(); +```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.start.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.start.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: start +js: true +summary: "Start the timer." +synopsis: "Timer.prototype.start()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.stop.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Timer/Irccd.Timer.prototype.stop.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,6 @@ +--- +method: stop +js: true +summary: "Stop the timer." +synopsis: "Timer.prototype.stop()" +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/index.md --- a/doc/html/api/module/Irccd.Timer/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Timer/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -16,6 +16,6 @@ ## Methods - - [(constructor)](method/constructor.html) - - [start](method/start.html) - - [stop](method/stop.html) + - [(constructor)](Irccd.Timer.prototype.constructor.html) + - [start](Irccd.Timer.prototype.start.html) + - [stop](Irccd.Timer.prototype.stop.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/method/constructor.md --- a/doc/html/api/module/Irccd.Timer/method/constructor.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ ---- -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." ---- - -## Example - -````javascript -/* Execute an action every 1 second */ -var t = new Irccd.Timer(Irccd.Timer.Repeat, 1000, function () { - /* Do your action */ -}); - -t.start(); -```` diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/method/start.md --- a/doc/html/api/module/Irccd.Timer/method/start.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: start -js: true -summary: "Start the timer." -synopsis: "Timer.prototype.start()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Timer/method/stop.md --- a/doc/html/api/module/Irccd.Timer/method/stop.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -method: stop -js: true -summary: "Stop the timer." -synopsis: "Timer.prototype.stop()" ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isDigit.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isDigit.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isLetter.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isLetter.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isLower.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isLower.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isSpace.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isSpace.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isTitle.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isTitle.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isUpper.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Unicode/Irccd.Unicode.isUpper.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isDigit.md --- a/doc/html/api/module/Irccd.Unicode/function/isDigit.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isLetter.md --- a/doc/html/api/module/Irccd.Unicode/function/isLetter.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isLower.md --- a/doc/html/api/module/Irccd.Unicode/function/isLower.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isSpace.md --- a/doc/html/api/module/Irccd.Unicode/function/isSpace.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isTitle.md --- a/doc/html/api/module/Irccd.Unicode/function/isTitle.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/function/isUpper.md --- a/doc/html/api/module/Irccd.Unicode/function/isUpper.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Unicode/index.md --- a/doc/html/api/module/Irccd.Unicode/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Unicode/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -9,9 +9,9 @@ ## Functions - - [isDigit](function/isDigit.html) - - [isLetter](function/isLetter.html) - - [isLower](function/isLower.html) - - [isSpace](function/isSpace.html) - - [isTitle](function/isTitle.html) - - [isUpper](function/isUpper.html) + - [isDigit](Irccd.Unicode.isDigit.html) + - [isLetter](Irccd.Unicode.isLetter.html) + - [isLower](Irccd.Unicode.isLower.html) + - [isSpace](Irccd.Unicode.isSpace.html) + - [isTitle](Irccd.Unicode.isTitle.html) + - [isUpper](Irccd.Unicode.isUpper.html) diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/Irccd.Util.format.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Util/Irccd.Util.format.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,59 @@ +--- +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." +--- + +## Example + +Replaces the keyword `message` and formats it bold and red. + +````javascript +function onMessage(server, channel, origin, message) +{ + var s = Irccd.Util.format("@{red,default,bold}#{message}@{}", { message: message }) +} +```` + +## Security + +Be very careful when you use this function with untrusted input. + +
+
+**Bad code:** 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) +{ + 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. +
+
+ +
+
+**Correct code**: Instead, always use a literal string using a replacement with the user input: +
+
+````javascript +function onMessage(server, channel, origin, message) +{ + server.message(channel, Irccd.Util.format("@{red}#{message}@{}", { message: message }); +} +```` +
+
diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/Irccd.Util.splithost.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Util/Irccd.Util.splithost.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/Irccd.Util.splituser.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/html/api/module/Irccd.Util/Irccd.Util.splituser.md Thu Sep 15 13:16:05 2016 +0200 @@ -0,0 +1,9 @@ +--- +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." +--- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/function/format.md --- a/doc/html/api/module/Irccd.Util/function/format.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ ---- -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." ---- - -## Example - -Replaces the keyword `message` and formats it bold and red. - -````javascript -function onMessage(server, channel, origin, message) -{ - var s = Irccd.Util.format("@{red,default,bold}#{message}@{}", { message: message }) -} -```` - -## Security - -Be very careful when you use this function with untrusted input. - -
-
-**Bad code:** 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) -{ - 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. -
-
- -
-
-**Correct code**: Instead, always use a literal string using a replacement with the user input: -
-
-````javascript -function onMessage(server, channel, origin, message) -{ - server.message(channel, Irccd.Util.format("@{red}#{message}@{}", { message: message }); -} -```` -
-
diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/function/splithost.md --- a/doc/html/api/module/Irccd.Util/function/splithost.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/function/splituser.md --- a/doc/html/api/module/Irccd.Util/function/splituser.md Thu Sep 15 07:03:50 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -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." ---- diff -r 4c191ecfb94a -r 48676ca7071c doc/html/api/module/Irccd.Util/index.md --- a/doc/html/api/module/Irccd.Util/index.md Thu Sep 15 07:03:50 2016 +0200 +++ b/doc/html/api/module/Irccd.Util/index.md Thu Sep 15 13:16:05 2016 +0200 @@ -9,6 +9,6 @@ ## Functions - - [format](function/format.html) - - [splituser](function/splituser.html) - - [splithost](function/splithost.html) + - [format](Irccd.Util.format.html) + - [splituser](Irccd.Util.splituser.html) + - [splithost](Irccd.Util.splithost.html)