changeset 260:904ee87bc808

CMake: split documentation into several topic, closes #535
author David Demelier <markand@malikania.fr>
date Wed, 14 Sep 2016 13:36:06 +0200
parents 0fd0290d61b4
children 803e7e990b4b
files CMakeLists.txt cmake/function/IrccdDefineHtml.cmake cmake/function/IrccdDefinePlugin.cmake doc/html/CMakeLists.txt doc/html/api/CMakeLists.txt doc/html/api/event/Files.cmake doc/html/api/event/onChannelMode.md doc/html/api/event/onChannelNotice.md doc/html/api/event/onCommand.md doc/html/api/event/onConnect.md doc/html/api/event/onInvite.md doc/html/api/event/onJoin.md doc/html/api/event/onKick.md doc/html/api/event/onLoad.md doc/html/api/event/onMe.md doc/html/api/event/onMessage.md doc/html/api/event/onMode.md doc/html/api/event/onNames.md doc/html/api/event/onNick.md doc/html/api/event/onNotice.md doc/html/api/event/onPart.md doc/html/api/event/onQuery.md doc/html/api/event/onQueryCommand.md doc/html/api/event/onReload.md doc/html/api/event/onTopic.md doc/html/api/event/onUnload.md doc/html/api/event/onWhois.md doc/html/api/index.md doc/html/api/module/Irccd.Directory/Files.cmake doc/html/api/module/Irccd.Directory/function/find.md doc/html/api/module/Irccd.Directory/function/mkdir.md doc/html/api/module/Irccd.Directory/function/remove.md doc/html/api/module/Irccd.Directory/index.md doc/html/api/module/Irccd.Directory/method/constructor.md doc/html/api/module/Irccd.Directory/method/find.md doc/html/api/module/Irccd.Directory/method/remove.md doc/html/api/module/Irccd.ElapsedTimer/Files.cmake doc/html/api/module/Irccd.ElapsedTimer/index.md doc/html/api/module/Irccd.ElapsedTimer/method/constructor.md doc/html/api/module/Irccd.ElapsedTimer/method/elapsed.md doc/html/api/module/Irccd.ElapsedTimer/method/pause.md doc/html/api/module/Irccd.ElapsedTimer/method/reset.md doc/html/api/module/Irccd.ElapsedTimer/method/restart.md doc/html/api/module/Irccd.File/Files.cmake doc/html/api/module/Irccd.File/function/basename.md doc/html/api/module/Irccd.File/function/dirname.md doc/html/api/module/Irccd.File/function/exists.md doc/html/api/module/Irccd.File/function/remove.md doc/html/api/module/Irccd.File/function/stat.md doc/html/api/module/Irccd.File/index.md doc/html/api/module/Irccd.File/method/basename.md doc/html/api/module/Irccd.File/method/close.md doc/html/api/module/Irccd.File/method/constructor.md doc/html/api/module/Irccd.File/method/dirname.md doc/html/api/module/Irccd.File/method/lines.md doc/html/api/module/Irccd.File/method/read.md doc/html/api/module/Irccd.File/method/readline.md doc/html/api/module/Irccd.File/method/remove.md doc/html/api/module/Irccd.File/method/seek.md doc/html/api/module/Irccd.File/method/stat.md doc/html/api/module/Irccd.File/method/tell.md doc/html/api/module/Irccd.File/method/write.md doc/html/api/module/Irccd.Logger/Files.cmake doc/html/api/module/Irccd.Logger/function/debug.md doc/html/api/module/Irccd.Logger/function/info.md doc/html/api/module/Irccd.Logger/function/warning.md doc/html/api/module/Irccd.Logger/index.md doc/html/api/module/Irccd.Plugin/Files.cmake doc/html/api/module/Irccd.Plugin/function/info.md doc/html/api/module/Irccd.Plugin/function/list.md doc/html/api/module/Irccd.Plugin/function/load.md doc/html/api/module/Irccd.Plugin/function/reload.md doc/html/api/module/Irccd.Plugin/function/unload.md doc/html/api/module/Irccd.Plugin/index.md doc/html/api/module/Irccd.Server/Files.cmake doc/html/api/module/Irccd.Server/function/add.md doc/html/api/module/Irccd.Server/function/find.md doc/html/api/module/Irccd.Server/function/list.md doc/html/api/module/Irccd.Server/function/remove.md doc/html/api/module/Irccd.Server/index.md doc/html/api/module/Irccd.Server/method/cmode.md doc/html/api/module/Irccd.Server/method/cnotice.md doc/html/api/module/Irccd.Server/method/constructor.md doc/html/api/module/Irccd.Server/method/info.md doc/html/api/module/Irccd.Server/method/invite.md doc/html/api/module/Irccd.Server/method/join.md doc/html/api/module/Irccd.Server/method/kick.md doc/html/api/module/Irccd.Server/method/me.md doc/html/api/module/Irccd.Server/method/message.md doc/html/api/module/Irccd.Server/method/mode.md doc/html/api/module/Irccd.Server/method/names.md doc/html/api/module/Irccd.Server/method/nick.md doc/html/api/module/Irccd.Server/method/notice.md doc/html/api/module/Irccd.Server/method/part.md doc/html/api/module/Irccd.Server/method/toString.md doc/html/api/module/Irccd.Server/method/topic.md doc/html/api/module/Irccd.Server/method/whois.md doc/html/api/module/Irccd.System/Files.cmake doc/html/api/module/Irccd.System/function/env.md doc/html/api/module/Irccd.System/function/exec.md doc/html/api/module/Irccd.System/function/home.md doc/html/api/module/Irccd.System/function/name.md doc/html/api/module/Irccd.System/function/popen.md doc/html/api/module/Irccd.System/function/sleep.md doc/html/api/module/Irccd.System/function/ticks.md doc/html/api/module/Irccd.System/function/uptime.md doc/html/api/module/Irccd.System/function/usleep.md doc/html/api/module/Irccd.System/function/version.md doc/html/api/module/Irccd.System/index.md doc/html/api/module/Irccd.Timer/Files.cmake doc/html/api/module/Irccd.Timer/index.md doc/html/api/module/Irccd.Timer/method/constructor.md doc/html/api/module/Irccd.Timer/method/start.md doc/html/api/module/Irccd.Timer/method/stop.md doc/html/api/module/Irccd.Unicode/Files.cmake doc/html/api/module/Irccd.Unicode/function/isDigit.md doc/html/api/module/Irccd.Unicode/function/isLetter.md doc/html/api/module/Irccd.Unicode/function/isLower.md doc/html/api/module/Irccd.Unicode/function/isSpace.md doc/html/api/module/Irccd.Unicode/function/isTitle.md doc/html/api/module/Irccd.Unicode/function/isUpper.md doc/html/api/module/Irccd.Unicode/index.md doc/html/api/module/Irccd.Util/Files.cmake doc/html/api/module/Irccd.Util/function/format.md doc/html/api/module/Irccd.Util/function/splithost.md doc/html/api/module/Irccd.Util/function/splituser.md doc/html/api/module/Irccd.Util/index.md doc/html/api/module/Irccd/Files.cmake doc/html/api/module/Irccd/index.md doc/html/build/build-from-sources.md doc/html/build/build-options.md doc/html/dev/plugin-javascript-introduction.md doc/html/dev/socket-commands.md doc/html/dev/socket-protocol.md doc/html/guide/01-intro/01-what-is-irc.md doc/html/guide/01-intro/02-what-is-irccd.md doc/html/guide/01-intro/Files.cmake doc/html/guide/02-install/01-building-from-sources.md doc/html/guide/02-install/02-customize.md doc/html/guide/02-install/Files.cmake doc/html/guide/03-config-format/01-basics.md doc/html/guide/03-config-format/02-include.md doc/html/guide/03-config-format/03-lists.md doc/html/guide/03-config-format/Files.cmake doc/html/guide/04-irccd/01-config.md doc/html/guide/04-irccd/Files.cmake doc/html/guide/05-irccdctl/01-config.md doc/html/guide/05-irccdctl/02-usage.md doc/html/guide/05-irccdctl/03-commands.md doc/html/guide/05-irccdctl/Files.cmake doc/html/guide/06-plugin/01-intro.md doc/html/guide/06-plugin/02-paths.md doc/html/guide/06-plugin/03-patterns.md doc/html/guide/06-plugin/04-metadata.md doc/html/guide/06-plugin/05-sample-plugin.md doc/html/guide/06-plugin/06-do-and-avoid.md doc/html/guide/06-plugin/Files.cmake doc/html/guide/07-socket/01-syntax.md doc/html/guide/07-socket/02-commands.md doc/html/guide/07-socket/03-messages.md doc/html/guide/07-socket/Files.cmake doc/html/guide/CMakeLists.txt doc/html/index.md doc/html/irccd/configuring.md doc/html/irccdctl/commands.md doc/html/irccdctl/configuring.md doc/html/irccdctl/usage.md doc/html/misc/common-patterns-and-formatting.md doc/html/misc/configuration-syntax.md doc/html/resources/CMakeLists.txt doc/html/resources/template.html
diffstat 171 files changed, 2076 insertions(+), 2683 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Tue Sep 13 13:01:31 2016 +0200
+++ b/CMakeLists.txt	Wed Sep 14 13:36:06 2016 +0200
@@ -61,7 +61,6 @@
 include(CMakeParseArguments)
 
 include(cmake/function/IrccdDefineExecutable.cmake)
-include(cmake/function/IrccdDefineHtml.cmake)
 include(cmake/function/IrccdDefineLibrary.cmake)
 include(cmake/function/IrccdDefineMan.cmake)
 include(cmake/function/IrccdDefinePlugin.cmake)
--- a/cmake/function/IrccdDefineHtml.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-#
-# IrccdDefineHtml.cmake -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-#
-# irccd_define_html
-# -------------------------------------------------------------------
-#
-# irccd_define_html(
-#    SOURCES the source files
-#    DIRECTORY the base directory relative to the WITH_DOCDIR
-#    TARGET the target name
-#    VARS (Optional) variables to pass
-# )
-#
-# This first signature processes all files and compile them one per one. Files are placed in the same hierarchy where
-# the function is invoked.
-#
-# irccd_define_html(
-#    SOURCES the source files
-#    OUTPUT the output file
-#    TARGET the target name
-#    VARS (Optional) variables to pass
-# )
-#
-# This second signature generated only one file from all sources. Usually for a book, guide and such.
-#
-# Note: do not pass an absolute path for the output.
-#
-
-function(irccd_define_html)
-    set(options)
-    set(oneValueArgs DIRECTORY OUTPUT TARGET)
-    set(multiValueArgs ARGS SOURCES)
-
-    cmake_parse_arguments(HTML "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    # Required arguments
-    if (NOT HTML_SOURCES)
-        message(FATAL_ERROR "Please specify source files")
-    endif ()
-    if (NOT HTML_TARGET)
-        message(FATAL_ERROR "Please specify a target")
-    endif ()
-
-    set(base ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR})
-
-    if (HTML_OUTPUT)
-        #
-        # First signature.
-        #
-        if (IS_ABSOLUTE)
-            message(FATAL_ERROR "Do not pass absolute path for OUTPUT")
-        endif ()
-
-        get_filename_component(directory ${base}/${HTML_OUTPUT} DIRECTORY)
-        file(RELATIVE_PATH baseurl ${directory} ${base})
-
-        if (baseurl STREQUAL "")
-            set(baseurl "./")
-        endif ()
-
-        # Configure sources
-        foreach (s ${HTML_SOURCES})
-            file(RELATIVE_PATH basepath ${CMAKE_CURRENT_SOURCE_DIR} ${s})
-            configure_file(${s} ${CMAKE_CURRENT_BINARY_DIR}/${basepath} @ONLY)
-            list(APPEND REAL_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${basepath})
-        endforeach ()
-
-        pandoc(
-            OUTPUT ${base}/${HTML_OUTPUT}
-            TARGET ${HTML_TARGET}
-            SOURCES ${REAL_SOURCES}
-            TEMPLATE ${resources_SOURCE_DIR}/template.html
-            DEPENDS
-                ${resources_SOURCE_DIR}/template.html
-                docs-resources
-            ARGS ${HTML_ARGS}
-            VARIABLE baseurl:${baseurl}
-            FROM markdown TO html5
-            STANTALONE MAKE_DIRECTORY
-        )
-
-        install(
-            FILES ${base}/${HTML_OUTPUT}
-            DESTINATION ${WITH_DOCDIR}
-        )
-    else ()
-        if (NOT HTML_DIRECTORY)
-            message(FATAL_ERROR "Please specify the directory")
-        endif ()
-
-        #
-        # Second signature.
-        #
-        foreach (s ${HTML_SOURCES})
-            file(RELATIVE_PATH input ${CMAKE_CURRENT_SOURCE_DIR} ${s})
-            string(REGEX REPLACE "^(.*)\\.md$" "\\1.html" filename ${input})
-            get_filename_component(directory ${base}/${HTML_DIRECTORY}/${filename} DIRECTORY)
-            file(RELATIVE_PATH baseurl ${directory} ${base})
-            file(RELATIVE_PATH basepath ${CMAKE_CURRENT_SOURCE_DIR} ${s})
-            list(APPEND outputs ${base}/${HTML_DIRECTORY}/${filename})
-            configure_file(${s} ${CMAKE_CURRENT_BINARY_DIR}/${basepath} @ONLY)
-
-            pandoc(
-                OUTPUT ${base}/${HTML_DIRECTORY}/${filename}
-                SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${basepath}
-                TEMPLATE ${resources_SOURCE_DIR}/template.html
-                DEPENDS
-                    ${resources_SOURCE_DIR}/template.html
-                    docs-resources
-                ARGS ${HTML_ARGS}
-                VARIABLE baseurl:${baseurl}
-                FROM markdown TO html5
-                STANTALONE MAKE_DIRECTORY
-            )
-        endforeach ()
-
-        add_custom_target(
-            ${HTML_TARGET}
-            DEPENDS ${outputs}
-            SOURCES ${HTML_SOURCES}
-        )
-
-        install(
-            DIRECTORY ${base}/${HTML_DIRECTORY}
-            DESTINATION ${WITH_DOCDIR}
-        )
-    endif ()
-
-    add_dependencies(all-docs ${HTML_TARGET})
-endfunction()
--- a/cmake/function/IrccdDefinePlugin.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ b/cmake/function/IrccdDefinePlugin.cmake	Wed Sep 14 13:36:06 2016 +0200
@@ -136,9 +136,7 @@
                 OUTPUT ${basedocdir}/plugin/${PLG_NAME}.html
                 SOURCES ${PLG_DOCS}
                 TEMPLATE ${resources_SOURCE_DIR}/template.html
-                DEPENDS
-                    ${resources_SOURCE_DIR}/template.html
-                    docs-resources
+                DEPENDS ${html_SOURCE_DIR}/resources/template.html
                 ARGS -Vguide
                 VARIABLE baseurl:${baseurl}
                 FROM markdown TO html5
--- a/doc/html/CMakeLists.txt	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/CMakeLists.txt	Wed Sep 14 13:36:06 2016 +0200
@@ -18,12 +18,226 @@
 
 project(html)
 
-# Tools and resources
-add_subdirectory(resources)
+set(
+    HTML_SOURCES
+    ${html_SOURCE_DIR}/index.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.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.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/index.md
+    ${html_SOURCE_DIR}/api/event/onWhois.md
+    ${html_SOURCE_DIR}/api/event/onMessage.md
+    ${html_SOURCE_DIR}/api/event/onPart.md
+    ${html_SOURCE_DIR}/api/event/onQueryCommand.md
+    ${html_SOURCE_DIR}/api/event/onMode.md
+    ${html_SOURCE_DIR}/api/event/onNotice.md
+    ${html_SOURCE_DIR}/api/event/onLoad.md
+    ${html_SOURCE_DIR}/api/event/onInvite.md
+    ${html_SOURCE_DIR}/api/event/onChannelNotice.md
+    ${html_SOURCE_DIR}/api/event/onCommand.md
+    ${html_SOURCE_DIR}/api/event/onKick.md
+    ${html_SOURCE_DIR}/api/event/onReload.md
+    ${html_SOURCE_DIR}/api/event/onChannelMode.md
+    ${html_SOURCE_DIR}/api/event/onTopic.md
+    ${html_SOURCE_DIR}/api/event/onConnect.md
+    ${html_SOURCE_DIR}/api/event/onJoin.md
+    ${html_SOURCE_DIR}/api/event/onMe.md
+    ${html_SOURCE_DIR}/api/event/onNick.md
+    ${html_SOURCE_DIR}/api/event/onNames.md
+    ${html_SOURCE_DIR}/api/event/onUnload.md
+    ${html_SOURCE_DIR}/api/event/onQuery.md
+    ${html_SOURCE_DIR}/build/build-from-sources.md
+    ${html_SOURCE_DIR}/build/build-options.md
+    ${html_SOURCE_DIR}/dev/plugin-javascript-introduction.md
+    ${html_SOURCE_DIR}/dev/socket-commands.md
+    ${html_SOURCE_DIR}/dev/socket-protocol.md
+    ${html_SOURCE_DIR}/irccd/configuring.md
+    ${html_SOURCE_DIR}/irccdctl/commands.md
+    ${html_SOURCE_DIR}/irccdctl/configuring.md
+    ${html_SOURCE_DIR}/irccdctl/usage.md
+    ${html_SOURCE_DIR}/misc/common-patterns-and-formatting.md
+    ${html_SOURCE_DIR}/misc/configuration-syntax.md
+)
 
-# JavaScript API and user guide
-if (WITH_JS)
-    add_subdirectory(api)
+set(
+    CSS
+    ${html_SOURCE_DIR}/resources/css/bootstrap.min.css
+    ${html_SOURCE_DIR}/resources/css/doc-guide.css
+    ${html_SOURCE_DIR}/resources/css/doc.css
+    ${html_SOURCE_DIR}/resources/css/tomorrow.css
+)
+
+set(
+    JS
+    ${html_SOURCE_DIR}/resources/js/bootstrap.min.js
+    ${html_SOURCE_DIR}/resources/js/highlight.js
+    ${html_SOURCE_DIR}/resources/js/jquery.min.js
+)
+
+#
+# For each files, define the following variables:
+#
+# - baseurl: relative path to get climb to the root documentation (e.g. ../../)
+# - inputbase: file name with it's base directory (e.g. api/event/onMessage.md)
+# - inputname: file name without it's directory (e.g. onMessage.md)
+# - outputbase: file name, directory and html extension
+#   (e.g api/event/onMessage.html)
+#
+if (WITH_HTML)
+    foreach (file ${HTML_SOURCES})
+        # 'baseurl': compute the tree from the file to this directory.
+        get_filename_component(fulldirectory ${file} DIRECTORY)
+        file(RELATIVE_PATH baseurl ${fulldirectory} ${html_SOURCE_DIR})
+
+        # 'inputname': relative to this source directory.
+        file(RELATIVE_PATH inputbase ${html_SOURCE_DIR} ${file})
+
+        # 'outputbase': replace .md to .html as file extension.
+        string(REGEX REPLACE "^(.*)\\.md$" "\\1.html" outputbase ${inputbase})
+
+        # If file is located at root, replace empty baseurl with "./".
+        if (baseurl STREQUAL "")
+            set(baseurl "./")
+        endif ()
+
+        # Configure the file so it can resolve CMake variables.
+        configure_file(
+            ${file}
+            ${html_BINARY_DIR}/${inputbase}
+        )
+
+        # Create an output target to that file.
+        pandoc(
+            OUTPUT ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${outputbase}
+            SOURCES ${html_BINARY_DIR}/${inputbase}
+            DEPENDS ${file}
+            TEMPLATE ${html_SOURCE_DIR}/resources/template.html
+            VARIABLE baseurl:${baseurl}
+            FROM markdown
+            TO html5
+            STANDALONE TOC MAKE_DIRECTORY
+        )
+
+        list(APPEND OUTPUTS ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${outputbase})
+        install(
+            FILES ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${outputbase}
+            COMPONENT docs
+            DESTINATION ${WITH_DOCDIR}
+            RENAME ${outputbase}
+        )
+    endforeach ()
+
+    add_custom_target(
+        html ALL
+        SOURCES
+            ${HTML_SOURCES} ${CSS} ${JS} ${OUTPUTS}
+            ${html_SOURCE_DIR}/resources/template.html
+        COMMAND
+            ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/css
+        COMMAND
+            ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/js
+        COMMAND
+            ${CMAKE_COMMAND} -E copy ${CSS} ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/css
+        COMMAND
+            ${CMAKE_COMMAND} -E copy ${JS} ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/js
+    )
+
+    # Install resources files.
+    install(
+        FILES ${CSS}
+        COMPONENT docs
+        DESTINATION ${WITH_DOCDIR}/css
+    )
+    install(
+        FILES ${JS}
+        COMPONENT docs
+        DESTINATION ${WITH_DOCDIR}/js
+    )
 endif ()
-
-add_subdirectory(guide)
--- a/doc/html/api/CMakeLists.txt	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-project(api)
-
-include(event/Files.cmake)
-include(module/Irccd/Files.cmake)
-include(module/Irccd.Directory/Files.cmake)
-include(module/Irccd.ElapsedTimer/Files.cmake)
-include(module/Irccd.File/Files.cmake)
-include(module/Irccd.Logger/Files.cmake)
-include(module/Irccd.Plugin/Files.cmake)
-include(module/Irccd.Server/Files.cmake)
-include(module/Irccd.System/Files.cmake)
-include(module/Irccd.Timer/Files.cmake)
-include(module/Irccd.Unicode/Files.cmake)
-include(module/Irccd.Util/Files.cmake)
-
-set(
-    SOURCES
-    ${api_SOURCE_DIR}/index.md
-    ${IRCCD_SOURCES}
-    ${DIRECTORY_SOURCES}
-    ${ELAPSED_TIMER_SOURCES}
-    ${FILE_SOURCES}
-    ${EVENT_SOURCES}
-    ${LOGGER_SOURCES}
-    ${PLUGIN_SOURCES}
-    ${SERVER_SOURCES}
-    ${SYSTEM_SOURCES}
-    ${TIMER_SOURCES}
-    ${UNICODE_SOURCES}
-    ${UTIL_SOURCES}
-)
-
-#
-# Each JavaScript API file is generated by pandoc.
-#
-irccd_define_html(
-    SOURCES ${SOURCES}
-    DIRECTORY api
-    TARGET docs-api
-    ARGS -Vjs
-)
-
-set_target_properties(
-    docs-api
-    PROPERTIES
-        PROJECT_LABEL api
-        FOLDER docs
-)
\ No newline at end of file
--- a/doc/html/api/event/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    EVENT_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/onCommand.md
-    ${CMAKE_CURRENT_LIST_DIR}/onConnect.md
-    ${CMAKE_CURRENT_LIST_DIR}/onChannelMode.md
-    ${CMAKE_CURRENT_LIST_DIR}/onChannelNotice.md
-    ${CMAKE_CURRENT_LIST_DIR}/onInvite.md
-    ${CMAKE_CURRENT_LIST_DIR}/onJoin.md
-    ${CMAKE_CURRENT_LIST_DIR}/onKick.md
-    ${CMAKE_CURRENT_LIST_DIR}/onLoad.md
-    ${CMAKE_CURRENT_LIST_DIR}/onMessage.md
-    ${CMAKE_CURRENT_LIST_DIR}/onMe.md
-    ${CMAKE_CURRENT_LIST_DIR}/onMode.md
-    ${CMAKE_CURRENT_LIST_DIR}/onNames.md
-    ${CMAKE_CURRENT_LIST_DIR}/onNick.md
-    ${CMAKE_CURRENT_LIST_DIR}/onNotice.md
-    ${CMAKE_CURRENT_LIST_DIR}/onPart.md
-    ${CMAKE_CURRENT_LIST_DIR}/onQuery.md
-    ${CMAKE_CURRENT_LIST_DIR}/onQueryCommand.md
-    ${CMAKE_CURRENT_LIST_DIR}/onReload.md
-    ${CMAKE_CURRENT_LIST_DIR}/onTopic.md
-    ${CMAKE_CURRENT_LIST_DIR}/onUnload.md
-    ${CMAKE_CURRENT_LIST_DIR}/onWhois.md
-)
--- a/doc/html/api/event/onChannelMode.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onChannelMode.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onChannelMode
+js: true
 summary: "This event is triggered when someone changed the channel's mode."
 synopsis: "function onChannelMode(server, origin, channel, mode, arg)"
 arguments:
--- a/doc/html/api/event/onChannelNotice.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onChannelNotice.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onChannelNotice
+js: true
 summary: "This callback is called when someone sent a notice on a channel."
 synopsis: "function onChannelNotice(server, origin, channel, notice)"
 arguments:
--- a/doc/html/api/event/onCommand.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onCommand.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onCommand
+js: true
 summary: "Execute special command."
 synopsis: "function onCommand(server, origin, channel, message)"
 arguments:
--- a/doc/html/api/event/onConnect.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onConnect.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onConnect
+js: true
 summary: "This callback is called when the irccd instance successfully connect to a server."
 synopsis: "function onConnect(server)"
 arguments:
--- a/doc/html/api/event/onInvite.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onInvite.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onInvite
+js: true
 summary: "This event is called when someone is inviting you to a channel."
 synopsis: "function onInvite(server, origin, channel)"
 arguments:
--- a/doc/html/api/event/onJoin.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onJoin.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onJoin
+js: true
 summary: "User join events, this function is called when someone joins a channel."
 synopsis: "function onJoin(server, origin, channel)"
 arguments:
--- a/doc/html/api/event/onKick.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onKick.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onKick
+js: true
 summary: "This event is triggered when someone has been kicked from a channel."
 synopsis: "function onKick(server, origin, channel, target, reason)"
 arguments:
--- a/doc/html/api/event/onLoad.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onLoad.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onLoad
+js: true
 summary: "This function is called when irccd instance load a plugin. If this function throws an error, the script is not loaded."
 synopsis: "function onLoad()"
 ---
--- a/doc/html/api/event/onMe.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onMe.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onMe
+js: true
 summary: "Action emote."
 synopsis: "function onMe(server, origin, channel, message)"
 arguments:
--- a/doc/html/api/event/onMessage.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onMessage.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onMessage
+js: true
 summary: "This event is triggered when someone said something on a specific channel."
 synopsis: "function onMessage(server, origin, channel, message)"
 arguments:
--- a/doc/html/api/event/onMode.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onMode.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onMode
+js: true
 summary: "This event is triggered when the server changed your mode."
 synopsis: "function onMode(server, origin, mode)"
 arguments:
--- a/doc/html/api/event/onNames.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onNames.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onNames
+js: true
 summary: "This event is triggered when a list of names has come."
 synopsis: "function onNames(server, channel, list)"
 arguments:
--- a/doc/html/api/event/onNick.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onNick.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onNick
+js: true
 summary: "This event is triggered when someone changed its nickname."
 synopsis: "function onNick(server, origin, nickname)"
 arguments:
--- a/doc/html/api/event/onNotice.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onNotice.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onNotice
+js: true
 summary: "This event is triggered when someone sent a notice to you."
 synopsis: "function onNotice(server, origin, notice)"
 arguments:
--- a/doc/html/api/event/onPart.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onPart.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onPart
+js: true
 summary: "This event is triggered when someone has left a specific channel."
 synopsis: "function onPart(server, origin, channel, reason)"
 arguments:
--- a/doc/html/api/event/onQuery.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onQuery.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onQuery
+js: true
 summary: "This event is triggered when someone sent a private message to you."
 synopsis: "function onQuery(server, origin, message)"
 arguments:
--- a/doc/html/api/event/onQueryCommand.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onQueryCommand.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onQueryCommand
+js: true
 summary: "Execute special command in query."
 synopsis: "function onQueryCommand(server, origin, message)"
 arguments:
--- a/doc/html/api/event/onReload.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onReload.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onReload
+js: true
 summary: "Request to reload the plugin."
 synopsis: "function onReload()"
 ---
--- a/doc/html/api/event/onTopic.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onTopic.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onTopic
+js: true
 summary: "This event is triggered when someone changed the channel's topic."
 synopsis: "function onTopic(server, origin, channel, topic)"
 arguments:
--- a/doc/html/api/event/onUnload.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onUnload.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onUnload
+js: true
 summary: "This event is triggered when the plugin is about to be unloaded."
 synopsis: "function onUnload()"
 ---
--- a/doc/html/api/event/onWhois.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/event/onWhois.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 event: onWhois
+js: true
 summary: "This event is triggered when irccd gets information about a user."
 synopsis: "function onWhois(server, info)"
 arguments:
--- a/doc/html/api/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,3 +1,7 @@
+---
+js: yes
+---
+
 # Welcome to the irccd JavaScript API documentation
 
 Select a target on the left.
--- a/doc/html/api/module/Irccd.Directory/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    DIRECTORY_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/find.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/mkdir.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/remove.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/constructor.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/find.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/remove.md
-)
--- a/doc/html/api/module/Irccd.Directory/function/find.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/function/find.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: find
+js: true
 summary: "Find an entry by a pattern or a regular expression."
 synopsis: "Irccd.Directory.find(path, pattern, recursive)"
 arguments:
--- a/doc/html/api/module/Irccd.Directory/function/mkdir.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/function/mkdir.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Directory/function/remove.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/function/remove.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: remove
+js: true
 summary: "Remove the directory optionally recursively."
 synopsis: "Irccd.Directory.remove(path, recursive)"
 arguments:
--- a/doc/html/api/module/Irccd.Directory/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Directory
+js: true
 summary: Open an read directories.
 ---
 
--- a/doc/html/api/module/Irccd.Directory/method/constructor.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/method/constructor.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: constructor
+js: true
 summary: "Open a directory."
 synopsis: "Irccd.Directory(path, flags) /* constructor */"
 arguments:
--- a/doc/html/api/module/Irccd.Directory/method/find.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/method/find.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Directory/method/remove.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/method/remove.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.ElapsedTimer/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    ELAPSED_TIMER_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/constructor.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/elapsed.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/pause.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/reset.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/restart.md
-)
--- a/doc/html/api/module/Irccd.ElapsedTimer/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.ElapsedTimer
+js: true
 ---
 
 ## Usage
--- a/doc/html/api/module/Irccd.ElapsedTimer/method/constructor.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/method/constructor.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: constructor
+js: true
 summary: "Construct a new ElapsedTimer object."
 synopsis: "Irccd.ElapsedTimer() /* constructor */"
 ---
--- a/doc/html/api/module/Irccd.ElapsedTimer/method/elapsed.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/method/elapsed.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: elapsed
+js: true
 summary: "Get the number of elapsed milliseconds."
 synopsis: "ElapsedTimer.prototype.elapsed()"
 returns: "The elapsed time in milliseconds."
--- a/doc/html/api/module/Irccd.ElapsedTimer/method/pause.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/method/pause.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: pause
+js: true
 summary: "Pause the timer, without resetting the current elapsed time stored."
 synopsis: "ElapsedTimer.prototype.pause()"
 ---
--- a/doc/html/api/module/Irccd.ElapsedTimer/method/reset.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/method/reset.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: reset
+js: true
 summary: "Reset the elapsed time to 0, the status is not modified."
 synopsis: "ElapsedTimer.prototype.reset()"
 ---
--- a/doc/html/api/module/Irccd.ElapsedTimer/method/restart.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/method/restart.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: restart
+js: true
 summary: "Restart the timer without resetting the current elapsed time."
 synopsis: "ElapsedTimer.prototype.restart()"
 ---
--- a/doc/html/api/module/Irccd.File/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    FILE_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/basename.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/dirname.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/exists.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/remove.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/stat.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/basename.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/close.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/constructor.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/dirname.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/lines.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/read.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/readline.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/remove.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/seek.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/stat.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/tell.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/write.md
-)
--- a/doc/html/api/module/Irccd.File/function/basename.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/function/basename.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: basename
+js: true
 summary: "Return the file basename as specified in `basename(3)` C function."
 synopsis: "base = Irccd.File.basename(path)"
 arguments:
--- a/doc/html/api/module/Irccd.File/function/dirname.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/function/dirname.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: dirname
+js: true
 summary: "Return the file directory name as specified in `dirname(3)` C function."
 synopsis: "path = Irccd.File.dirname(path)"
 arguments:
--- a/doc/html/api/module/Irccd.File/function/exists.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/function/exists.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: exists
+js: true
 summary: "Check if the file exists."
 synopsis: "ret = Irccd.File.exists(path)"
 arguments:
--- a/doc/html/api/module/Irccd.File/function/remove.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/function/remove.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: remove
+js: true
 summary: "Remove the file at the specified path."
 synopsis: "Irccd.File.remove(path)"
 arguments:
--- a/doc/html/api/module/Irccd.File/function/stat.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/function/stat.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: stat
+js: true
 summary: >
   Get file information at the specified path.
 
--- a/doc/html/api/module/Irccd.File/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.File
+js: true
 summary: "File opening and writing."
 ---
 
--- a/doc/html/api/module/Irccd.File/method/basename.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/basename.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.File/method/close.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/close.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: close
+js: true
 summary: "Force close of the file, automatically called when object is collected."
 synopsis: "File.prototype.close()"
 ---
--- a/doc/html/api/module/Irccd.File/method/constructor.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/constructor.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: constructor
+js: true
 summary: "Open a file specified by path with the specified mode."
 synopsis: "Irccd.File(path, mode) /* constructor */"
 arguments:
--- a/doc/html/api/module/Irccd.File/method/dirname.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/dirname.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.File/method/lines.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/lines.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: lines
+js: true
 summary: "Read all lines and return an array."
 synopsis: "File.prototype.lines()"
 returns: "An array with all lines."
--- a/doc/html/api/module/Irccd.File/method/read.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/read.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: read
+js: true
 summary: "Read the specified amount of characters or the whole file."
 synopsis: "File.prototype.read(amount)"
 arguments:
--- a/doc/html/api/module/Irccd.File/method/readline.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/readline.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: readline
+js: true
 summary: "Read the next line available."
 synopsis: "File.prototype.readline()"
 returns: "The next line or undefined if eof."
--- a/doc/html/api/module/Irccd.File/method/remove.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/remove.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.File/method/seek.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/seek.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: seek
+js: true
 summary: "Sets the position in the file."
 synopsis: "File.prototype.seek(type, amount)"
 arguments:
--- a/doc/html/api/module/Irccd.File/method/stat.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/stat.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.File/method/tell.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/tell.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: tell
+js: true
 summary: "Get the actual position in the file."
 synopsis: "pos = File.prototype.tell()"
 returns: "The position."
--- a/doc/html/api/module/Irccd.File/method/write.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.File/method/write.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: write
+js: true
 summary: "Write some characters to the file."
 synopsis: "File.prototype.write(data)"
 arguments:
--- a/doc/html/api/module/Irccd.Logger/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    LOGGER_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/debug.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/info.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/warning.md
-)
--- a/doc/html/api/module/Irccd.Logger/function/debug.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/function/debug.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Logger/function/info.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/function/info.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Logger/function/warning.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/function/warning.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: warning
+js: true
 summary: "Log a warning. The message will always be logged."
 synopsis: "Irccd.Logger.warning(message)"
 arguments:
--- a/doc/html/api/module/Irccd.Logger/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Logger
+js: true
 summary: "Logging functions."
 ---
 
--- a/doc/html/api/module/Irccd.Plugin/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    PLUGIN_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/info.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/list.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/load.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/reload.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/unload.md
-)
--- a/doc/html/api/module/Irccd.Plugin/function/info.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/function/info.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: info
+js: true
 summary: "Get information about a plugin."
 synopsis: "Irccd.Plugin.info(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Plugin/function/list.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/function/list.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.Plugin/function/load.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/function/load.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: load
+js: true
 summary: "Load a plugin by name. This function will search through the standard directories."
 synopsis: "Irccd.Plugin.load(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Plugin/function/reload.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/function/reload.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: reload
+js: true
 summary: "Reload a plugin by name."
 synopsis: "Irccd.Plugin.reload(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Plugin/function/unload.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/function/unload.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: unload
+js: true
 summary: "Unload a plugin by name."
 synopsis: "Irccd.Plugin.unload(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Plugin/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Plugin
+js: true
 summary: Plugin management and inspection.
 ---
 
--- a/doc/html/api/module/Irccd.Server/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    SERVER_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/add.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/find.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/list.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/remove.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/cmode.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/constructor.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/cnotice.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/info.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/invite.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/join.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/kick.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/me.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/message.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/mode.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/names.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/nick.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/notice.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/part.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/topic.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/whois.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/toString.md
-)
--- a/doc/html/api/module/Irccd.Server/function/add.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/function/add.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: add
+js: true
 summary: "Add a new server to the irccd instance."
 synopsis: "Irccd.Server.add(server)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/function/find.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/function/find.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: find
+js: true
 summary: "Find a server by name."
 synopsis: "server = Irccd.Server.find(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/function/list.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/function/list.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: list
+js: true
 summary: "List all servers in a map."
 synopsis: "table = Irccd.Server.list()"
 returns: "the table of all servers."
--- a/doc/html/api/module/Irccd.Server/function/remove.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/function/remove.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: remove
+js: true
 summary: "Remove a server from the irccd instance and disconnect it."
 synopsis: "Irccd.Server.remove(name)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Server
+js: true
 summary: "Server management."
 ---
 
--- a/doc/html/api/module/Irccd.Server/method/cmode.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/cmode.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: cmode
+js: true
 summary: "Change the mode of the specified channel."
 synopsis: "Server.prototype.cmode(channel, mode)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/cnotice.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/cnotice.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: cnotice
+js: true
 summary: "Send a message notice on a channel."
 synopsis: "Server.prototype.cnotice(channel, message)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/constructor.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/constructor.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: constructor
+js: true
 summary: "Construct a new server"
 synopsis: "Irccd.Server(params) /* constructor */"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/info.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/info.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: info
+js: true
 summary: "Get server information."
 synopsis: "info = Server.prototype.info()"
 returns: "The server information."
--- a/doc/html/api/module/Irccd.Server/method/invite.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/invite.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: invite
+js: true
 summary: "Invite the specified target on the channel."
 synopsis: "Server.prototype.invite(target, channel)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/join.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/join.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: join
+js: true
 summary: "Join the specified channel, the password is optional."
 synopsis: "Server.prototype.join(channel, password)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/kick.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/kick.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: kick
+js: true
 summary: "Kick the specified target from the channel, the reason is optional."
 synopsis: "Server.prototype.kick(nickname, channel, reason)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/me.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/me.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: me
+js: true
 summary: "Send an action emote."
 synopsis: "Server.prototype.me(target, message)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/message.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/message.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: message
+js: true
 summary: "Send a message to the specified target or channel."
 synopsis: "Server.prototype.message(target, message)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/mode.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/mode.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: mode
+js: true
 summary: "Set the irccd's user mode."
 synopsis: "Server.prototype.mode(mode)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/names.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/names.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: names
+js: true
 summary: "Get the list of names. This function will generate the onNames event."
 synopsis: "Server.prototype.names(channel)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/nick.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/nick.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: nick
+js: true
 summary: "Change irccd's nickname."
 synopsis: "Server.prototype.nick(nickname)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/notice.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/notice.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: notice
+js: true
 summary: "Send a private notice to the specified target."
 synopsis: "Server.prototype.notice(nickname, message)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/part.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/part.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: part
+js: true
 summary: "Leave the specified channel, the reason is optional."
 synopsis: "Server.prototype.part(channel, reason)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/toString.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/toString.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: toString
+js: true
 synopsis: "Server.prototype.toString()"
 returns: "The server identifier"
 ---
--- a/doc/html/api/module/Irccd.Server/method/topic.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/topic.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: topic
+js: true
 summary: "Change the topic of the specified channel."
 synopsis: "Server.prototype.topic(channel, topic)"
 arguments:
--- a/doc/html/api/module/Irccd.Server/method/whois.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/whois.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.System/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    SYSTEM_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/env.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/exec.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/home.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/name.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/popen.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/sleep.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/ticks.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/uptime.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/usleep.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/version.md
-)
\ No newline at end of file
--- a/doc/html/api/module/Irccd.System/function/env.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/env.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: env
+js: true
 summary: "Get a environment variable."
 synopsis: "home = Irccd.System.env(name)"
 arguments:
--- a/doc/html/api/module/Irccd.System/function/exec.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/exec.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: exec
+js: true
 summary: "Execute a system command."
 synopsis: "Irccd.System.exec(cmd)"
 arguments:
--- a/doc/html/api/module/Irccd.System/function/home.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/home.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.System/function/name.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/name.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.System/function/popen.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/popen.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: popen
+js: true
 summary: "Wrapper for `popen(3)` if the function is available."
 synopsis: "Irccd.System.popen(cmd, mode) /* optional */"
 arguments:
--- a/doc/html/api/module/Irccd.System/function/sleep.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/sleep.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: sleep
+js: true
 summary: "Sleep for seconds. Suspend the execution thread."
 synopsis: "Irccd.System.sleep(sec)"
 arguments:
--- a/doc/html/api/module/Irccd.System/function/ticks.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/ticks.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.System/function/uptime.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/uptime.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.System/function/usleep.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/usleep.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: usleep
+js: true
 summary: "Sleep for milliseconds. Suspend the execution thread."
 synopsis: "Irccd.System.usleep(msec)"
 arguments:
--- a/doc/html/api/module/Irccd.System/function/version.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/function/version.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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."
--- a/doc/html/api/module/Irccd.System/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.System/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.System
+js: true
 summary: "System inspection."
 ---
 
--- a/doc/html/api/module/Irccd.Timer/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    TIMER_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/constructor.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/start.md
-    ${CMAKE_CURRENT_LIST_DIR}/method/stop.md
-)
--- a/doc/html/api/module/Irccd.Timer/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Timer
+js: true
 ---
 
 ## Usage
--- a/doc/html/api/module/Irccd.Timer/method/constructor.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/method/constructor.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: constructor
+js: true
 summary: "Create a new timer object."
 synopsis: "Irccd.Timer(type, delay, callback) /* constructor */"
 arguments:
--- a/doc/html/api/module/Irccd.Timer/method/start.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/method/start.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: start
+js: true
 summary: "Start the timer."
 synopsis: "Timer.prototype.start()"
 ---
--- a/doc/html/api/module/Irccd.Timer/method/stop.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/method/stop.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 method: stop
+js: true
 summary: "Stop the timer."
 synopsis: "Timer.prototype.stop()"
 ---
--- a/doc/html/api/module/Irccd.Unicode/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#
-# CMakeLists.md -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    UNICODE_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isDigit.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isLetter.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isLower.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isSpace.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isTitle.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/isUpper.md
-)
--- a/doc/html/api/module/Irccd.Unicode/function/isDigit.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isDigit.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isDigit
+js: true
 summary: "Check if the unicode character is a digit."
 synopsis: "ret = Irccd.Unicode.isDigit(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/function/isLetter.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isLetter.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isLetter
+js: true
 summary: "Check if the unicode character is a letter."
 synopsis: "ret = Irccd.Unicode.isLetter(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/function/isLower.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isLower.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isLower
+js: true
 summary: "Check if the unicode character is lower case."
 synopsis: "ret = Irccd.Unicode.isLower(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/function/isSpace.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isSpace.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isSpace
+js: true
 summary: "Check if the unicode character is a space."
 synopsis: "ret = Irccd.Unicode.isSpace(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/function/isTitle.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isTitle.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isTitle
+js: true
 summary: "Check if the unicode character is title case."
 synopsis: "ret = Irccd.Unicode.isTitle(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/function/isUpper.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/function/isUpper.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: isUpper
+js: true
 summary: "Check if the unicode character is upper case."
 synopsis: "ret = Irccd.Unicode.isUpper(code)"
 arguments:
--- a/doc/html/api/module/Irccd.Unicode/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Unicode
+js: true
 ---
 
 ## Usage
--- a/doc/html/api/module/Irccd.Util/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    UTIL_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/format.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/splithost.md
-    ${CMAKE_CURRENT_LIST_DIR}/function/splituser.md
-)
--- a/doc/html/api/module/Irccd.Util/function/format.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/function/format.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 function: format
+js: true
 summary: >
   Format a string according to the [Common patterns and formatting](../../../../guide.html#common-patterns-and-formatting)
   specification.
--- a/doc/html/api/module/Irccd.Util/function/splithost.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/function/splithost.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Util/function/splituser.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/function/splituser.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 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:
--- a/doc/html/api/module/Irccd.Util/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd.Util
+js: true
 ---
 
 ## Usage
--- a/doc/html/api/module/Irccd/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    IRCCD_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/index.md
-)
--- a/doc/html/api/module/Irccd/index.md	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/api/module/Irccd/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -1,5 +1,6 @@
 ---
 module: Irccd
+js: true
 ---
 
 ## Usage
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/build/build-from-sources.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,35 @@
+---
+title: Building from sources
+guide: yes
+---
+
+You should use the irccd version provided by your package manger if possible. If
+irccd is not available, you can build it from sources.
+
+# Requirements
+
+To build from sources, you need the following installed on your system:
+
+  - [CMake](http://www.cmake.org),
+  - [OpenSSL](https://www.openssl.org) (Optional) for connecting with SSL,
+  - [Pandoc](http://pandoc.org) (Optional) for building the documentation,
+  - At least **GCC 5.1** or **clang 3.4**
+
+<div class="alert alert-warning" role="alert">
+**Warning**: don't even try to compile with GCC 4.x, it will not work due to missing C++14 features.
+</div>
+
+# Running the build
+
+When you're ready, extract the **irccd-x.y.z.tar.gz** where **x.y.z** is the current version. Go to that directory,
+then type the following commands:
+
+````nohighlight
+$ mkdir _build_
+$ cd _build_
+$ cmake ..
+$ make
+$ sudo make install
+````
+
+This is the quick way of compiling and installing. It's also possible to set some options to customize the build.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/build/build-options.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,77 @@
+---
+title: Build options
+guide: yes
+---
+
+# Customizing the build
+
+You can configure some features when compiling irccd.
+
+## Disabling JavaScript
+
+You can disable JavaScript support.
+
+````nohighlight
+$ cmake .. -DWITH_JS=Off
+````
+
+## Disabling SSL
+
+You can disable OpenSSL support, it is automatically unset if OpenSSL is not found.
+
+<div class="alert alert-warning" role="alert">
+**Warning**: this is not recommended.
+</div>
+
+````nohighlight
+$ cmake .. -DWITH_SSL=Off
+````
+
+## Disabling all documentation
+
+You can disable all the documentation.
+
+````nohighlight
+$ cmake .. -DWITH_DOCS=Off
+````
+
+See below to disable only specific parts of the documentation.
+
+## Disabling HTML documentation
+
+By default if Pandoc is available, the HTML documentation is built, you can disable it.
+
+````nohighlight
+$ cmake .. -DWITH_HTML=Off
+````
+
+## Disabling man pages
+
+You can disable installation of manuals.
+
+````nohighlight
+$ cmake .. -DWITH_MAN=Off
+````
+
+## Installation path
+
+Sometimes, you may need to install irccd over other place, for that, you can
+specify the prefix where to install files.
+
+On Unix systems, it's usually **/usr/local** and **C:/Program Files/Irccd** on Windows.
+
+To change this, use the following:
+
+````nohighlight
+$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/some/directory
+````
+
+## Manual pages path
+
+By default, irccd use **${CMAKE_INSTALL_PREFIX}/share/man** for manual pages. Some systems use different one.
+
+For example, on FreeBSD the typical use would be:
+
+````nohighlight
+$ cmake .. -DWITH_MANDIR=/usr/local/man
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/dev/plugin-javascript-introduction.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,174 @@
+---
+title: JavaScript plugin introduction
+guide: yes
+---
+
+Irccd can be extended with JavaScript plugins. This chapter will tell you how
+plugins work within irccd and how to create your first plugin.
+
+This chapter covers also some things to do and to avoid in plugins.
+
+# Why JavaScript?
+
+You may wonder why JavaScript was chosen in irccd. Originally, irccd used Lua as
+the scripting language but for many reasons, it has been replaced with
+Javascript.
+
+However, many aspects between Lua and JavaScript are similar:
+
+  - Both languages are extremly small with very light API,
+  - It is easy to sandbox the interpreter for security reasons,
+  - It is very easy to implement your own API from C++ code.
+
+The current JavaScript interpreter is powered by [Duktape][duktape].
+
+[duktape]: http://duktape.org
+
+# Paths
+
+Irccd will find plugins in many paths depending on the configuration or the
+operating system.
+
+## Unix paths
+
+  1. `${XDG_DATA_HOME}/irccd/plugins`
+  2. `${HOME}/.local/share/irccd/plugins`
+  3. `/usr/local/share/irccd/plugins`
+
+## Windows paths
+
+  1. `C:\\Users\\YourUser\\irccd\\plugins`
+  2. `Path\\To\\Irccd\\Directory\\share\\plugins`
+
+# Plugin metadata
+
+While it's not mandatory, please set the following variables in a global `info`
+object:
+
+  - **author**: (string) your name, usually mail address,
+  - **license**: (string) an arbitrary license name,
+  - **summary**: (string) a short comment about your plugin,
+  - **version**: (string) the plugin version.
+
+Example:
+
+````javascript
+info = {
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "A FPS game for IRC",
+    version: "0.0.0.0.0.0.1"
+};
+````
+
+# Plugin creation
+
+Now, we will write a simple plugin that repeat every sentences said on a
+channel, it's quite easy but you should not use it on a real channel or you'll
+probably get kicked.
+
+We will create our new plugin under the home user plugin path. If you're running
+on Unix systems it is usually **${XDG_CONFIG_HOME}/.local/share/irccd/plugins**.
+
+So let start by creating a plugin named **repeater.js**. On my system the file
+will live as **/home/markand/.local/share/irccd/plugins/repeater.js**.
+
+# First event
+
+## Registering the callback
+
+Remember, plugins are made through the event driven mechanism, so we must define
+a function that will be called when a user said something on the channel. The
+function defined on channel message is called `onMessage`.
+
+It has the following signature:
+
+````javascript
+function onMessage(server, origin, channel, message)
+````
+
+The parameters are defined as following:
+
+  - **server**, on which server the message happened
+  - **origin**, who emit the message (full nickname with host)
+  - **channel**, on which channel
+  - **message**, and the message content
+
+## Send the response
+
+Now that we have the message, the channel and the server, we can send the copy
+of the message. For this, you must take care of the server parameter. The server
+is one of defined in the server section from the configuration file.
+
+There are several methods available for the object, they are defined in the
+[Irccd.Server][server-api] documentation.
+
+But the on we are interested in is [Server.prototype.message][server-message].
+This function takes two parameters, the target which can be a nickname or a
+hannel and the message.
+
+So the only thing to do is the following:
+
+````javascript
+function onMessage(server, origin, channel, message)
+{
+    server.message(channel, message)
+}
+````
+
+That's it!
+
+You've just made a brand new plugin, of course it's not a very powerful one but
+at least you understood the way it works. With the powerful API provided you
+will be able to create a bunch of plugins that can fits your needs, such as
+a content provider, a moderator, a calculator and so on.
+
+[server-api]: @baseurl@/api/module/Irccd.Server/index.html
+[server-message]: @baseurl@/api/module/Irccd.Server/method/message.html
+
+# Do and do not
+
+There are things which should be avoided if possible.
+
+## Error and load
+
+Since irccd 1.1, one should not write code outside Javascript supported events
+functions. Internally, irccd store the plugin information the complete read. If
+a plugin has an syntax error or a bad API call, irccd looks for the plugin
+metadata information and since it is not currently stored, it generate the
+"unitialized state" error.
+
+## Handling error
+
+There are two ways of handling error.
+
+### Your plugin can't continue running
+
+If you need a file, specific resource so your plugin.
+
+If you call the error function while you are in the `onLoad` callback, the
+plugin is not added to the registry. However, if the function is called in any
+other event, the plugin remains in the list.
+
+### Your plugin has errors but can run
+
+If for instance, the plugin has errors but can still run for any reason. One
+should use the `Irccd.Logger` API. The function in this API will write a message
+in the irccd output.
+
+**Example**
+
+````javascript
+function onCommand()
+{
+    if (something_is_wrong)
+        Irccd.Logger.warning("error condition")
+}
+````
+
+This will output to the irccd log something like:
+
+````nohighlight
+plugin foo: error condition
+````
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/dev/socket-commands.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,380 @@
+## Commands
+
+The following commands are available. Please note that a lot of commands require a server as the first argument, it’s
+one of defined in the **irccd.conf** file in the server section.
+
+### server-cnotice
+
+Send a message notice on a channel.
+
+#### Properties
+
+  - **command**: (string) "server-cnotice",
+  - **server**: (string) the server unique id,
+  - **channel**: (string) the channel name,
+  - **message**: (string) the notice message.
+
+#### Example
+
+````json
+{
+  "command": "server-cnotice",
+  "server": "myserver",
+  "channel": "#staff",
+  "message": "please be quiet"
+}
+````
+
+### server-connect
+
+Connect to a server.
+
+#### Properties
+
+  - **command**: (string) "server-connect",
+  - **name**: (string) the server unique id,
+  - **host**: (string) the host address,
+  - **port**: (int) the port number (Optional, default: 6667),
+  - **ssl**: (bool) use SSL (Optional, default: false),
+  - **sslVerify**: (bool) verify SSL (Optional, default: false),
+  - **nickname**: (string) the nickname to use (Optional, default: irccd),
+  - **username**: (string) the user name to use (Optional, default: irccd),
+  - **realname**: (string) the real name to use (Optional, default: IRC Client Daemon),
+  - **ctcpVersion**: (string) the CTCP Version to answer (Optional, default: the irccd's version),
+  - **commandChar**: (string) the command character to use to invoke commands (Optional, default: !),
+  - **reconnectTries**: (int) the number of reconnection to try (Optional, default: -1),
+  - **reconnectTimeout**: (int) the number of seconds to wait before retrying to connect (Optional, default: 30).
+
+#### Example
+
+````json
+{
+  "command": "server-connect",
+  "name": "myserver",
+  "host": "localhost",
+  "nickname": "edouard"
+}
+````
+
+### server-disconnect
+
+Disconnect from a server.
+
+If server is not specified, irccd disconnects all servers.
+
+#### Properties
+
+  - **command**: (string) "server-disconnect",
+  - **server**: (string) the server unique id (Optional, default: none).
+
+#### Example
+
+````json
+{
+  "command": "server-disconnect",
+  "server": "myserver"
+}
+````
+
+### server-info
+
+Get server information.
+
+#### Properties
+
+  - **command**: (string) "server-info",
+  - **server**: (string) the server unique id.
+
+#### Example
+
+````json
+{
+  "command": "server-info",
+  "server": "myserver"
+}
+````
+
+#### Responses
+
+  - **name**: (string) the server unique id,
+  - **host**: (string) the server hostname,
+  - **port**: (int) the port,
+  - **ipv6**: (bool) true if using IPv6,
+  - **ssl**: (bool) true if connection is using SSL,
+  - **sslVerify**: (bool) true if SSL was verified,
+  - **channels**: (string list) list of channels.
+  - **nickname**: (string) the current nickname in use,
+  - **username**: (string) the username in use,
+  - **realname**: (string) the realname in use.
+
+### server-invite
+
+Invite the specified target on the channel.
+
+#### Properties
+
+  - **command**: (string) "server-invite",
+  - **server**: (string) the server unique id,
+  - **target**: (string) the nickname to invite,
+  - **channel**: (string) the channel.
+
+#### Example
+
+````json
+{
+  "command": "server-invite",
+  "server": "myserver",
+  "target": "edouard",
+  "channel": "#staff"
+}
+````
+
+### server-join
+
+Join the specified channel, the password is optional.
+
+#### Properties
+
+  - **command**: (string) "server-join",
+  - **server**: (string) the server unique id,
+  - **channel**: (string) the channel to join,
+  - **password**: (string) the password (Optional, default: none).
+
+#### Example
+
+````json
+{
+  "command": "server-join",
+  "server": "myserver",
+  "channel": "#games"
+}
+````
+
+### server-kick
+
+Kick the specified target from the channel, the reason is optional.
+
+#### Properties
+
+  - **command**: (string) "server-kick",
+  - **server**: (string) the server unique id,
+  - **target**: (string) the target nickname,
+  - **channel**: (string) the channel,
+  - **reason**: (string) the reason (Optional, default: none).
+
+#### Example
+
+````json
+{
+  "command": "server-kick",
+  "server": "myserver",
+  "target": "edouard",
+  "channel": "#staff",
+  "reason": "please be nice"
+}
+````
+
+### server-list
+
+Get the list of all connected servers.
+
+#### Properties
+
+- **command**: (string) "server-list".
+
+#### Example
+
+````json
+{
+  "command": "server-list"
+}
+````
+
+#### Responses
+
+  - The following properties:
+    - **list**: (string list) the list of all server unique ids.
+
+### server-me
+
+Send an action emote.
+
+#### Properties
+
+  - **command**: (string) "server-me",
+  - **server**: (string) the server unique id,
+  - **target**: (string) the target or channel,
+  - **message**: (string) the message.
+
+#### Example
+
+````json
+{
+  "command": "server-me",
+  "server": "myserver",
+  "channel": "#staff",
+  "message": "like that"
+}
+````
+
+### server-message
+
+Send a message to the specified target or channel.
+
+#### Properties
+
+  - **command**: (string) "server-message",
+  - **server**: (string) the server unique id,
+  - **target**: (string) the target or channel,
+  - **message**: (string) the message.
+
+#### Example
+
+````json
+{
+  "command": "server-message",
+  "server": "myserver",
+  "target": "#staff",
+  "message": "this channel is nice"
+}
+````
+
+### server-mode
+
+Set the irccd's user mode.
+
+#### Properties
+
+  - **command**: (string) "server-mode",
+  - **server**: (string) the server unique id,
+  - **mode**: (string) the mode.
+
+#### Example
+
+````json
+{
+  "command": "server-mode",
+  "server": "myserver",
+  "mode": "mode"
+}
+````
+
+### server-nick
+
+Change irccd's nickname.
+
+#### Properties
+
+  - **command**: (string) "server-nick",
+  - **server**: (string) the server unique id,
+  - **nickname**: (string) the new nickname.
+
+#### Example
+
+````json
+{
+  "command": "server-nick",
+  "server": "myserver",
+  "nickname": "edouard"
+}
+````
+
+### server-notice
+
+Send a private notice to the specified target.
+
+#### Properties
+
+  - **command**: (string) "server-notice",
+  - **server**: (string) the server unique id,
+  - **target**: (string) the target,
+  - **message**: (string) the notice message.
+
+#### Example
+
+````json
+{
+  "command": "server-notice",
+  "server": "myserver",
+  "target": "edouard",
+  "message": "hello dude"
+}
+````
+
+### server-part
+
+Leave the specified channel, the reason is optional.
+
+Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern.
+
+#### Properties
+
+  - **command**: (string) "server-part",
+  - **server**: (string) the unique server id,
+  - **channel**: (string) the channel to leave,
+  - **reason**: (string) the reason (Optional, default: none).
+
+#### Example
+
+````json
+{
+  "command": "server-part",
+  "server": "myserver",
+  "channel": "#staff",
+  "reason": "the reason"
+}
+````
+
+### server-reconnect
+
+Force reconnection of one or all servers.
+
+If server is not specified, all servers will try to reconnect.
+
+#### Properties
+
+  - **command**: (string) "server-reconnect",
+  - **server**: (string) the server unique id (Optional, default: none).
+
+#### Example
+
+````json
+{
+  "command": "server-reconnect",
+  "server": "myserver"
+}
+````
+
+### server-topic
+
+Change the topic of the specified channel.
+
+#### Properties
+
+  - **command**: (string) "server-topic",
+  - **server**: (string) the unique server id,
+  - **channel**: (string) the channel,
+  - **topic**: (string) the new topic.
+
+#### Example
+
+````json
+{
+  "command": "server-topic",
+  "server": "myserver",
+  "channel": "#staff",
+  "topic": "the new topic"
+}
+````
+
+### server-umode
+
+Change your irccd user mode for the specified server.
+
+````json
+{
+  "command": "umode",
+  "server": "the server name",
+  "mode": "the mode"
+}
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/dev/socket-protocol.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,68 @@
+---
+title: Irccd socket API
+guide: true
+---
+
+This guide will help you controlling irccd via sockets.
+
+Currently, irccd supports internet and unix sockets, you need at least one
+transport defined in your **irccd.conf**.
+
+# Syntax
+
+Irccd use JSON as protocol for sending and receiving data. A message must ends
+with `\r\n\r\n` to be complete, thus it's possible to write JSON messages in
+multiple lines.
+
+For example, this buffer will be parsed as two different messages.
+
+<div class="alert alert-success" role="alert">
+**Example**: two commands issued
+
+````json
+{
+  "param1": "value1"
+}
+
+{
+  "param1": "value1"
+}
+
+````
+</div>
+
+<div class="alert alert-warning" role="alert">
+**Warning:** please note that the `\r\n\r\n`characters are the escape characters of line feed and new line, not the
+concatenation of `\` and `r`.
+</div>
+
+## Responses
+
+All commands emit a response with the following properties:
+
+  - **command**: (string) the result of the issued command,
+  - **status**: (string) **error** or **ok**,
+  - **error**: (string) the error message if status is set to **error**.
+
+<div class="alert alert-success" role="alert">
+**Example**: command issued with no errors
+
+````json
+{
+  "command": "server-message",
+  "status": "ok"
+}
+````
+</div>
+
+<div class="alert alert-danger" role="alert">
+**Example**: command issued with errors
+
+````json
+{
+  "command": "server-message",
+  "status": "error",
+  "error": "server xyz not found"
+}
+````
+</div>
--- a/doc/html/guide/01-intro/01-what-is-irc.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# Introduction
-
-## What is IRC?
-
-IRC stands for [Internet Relay Chat][irc], it is a protocol for communicating on the internet in the form of text. IRC
-has been widely used over the world and is still used in many places.
-
-[irc]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
--- a/doc/html/guide/01-intro/02-what-is-irccd.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-## What is irccd?
-
-Irccd is an [IRC bot][ircbot] written in [C++14][cpp14] and using [JavaScript][js] for its plugins.
-
-It is developed in mind of being as portable as possible, light, fast, extensible.
-
-Irccd also tries to be small and efficient. It is not uncommon to see more than twenty plugins loaded without eating
-all your memory.
-
-Irccd also tries to have the best JavaScript API for writing the funniest plugins ever.
-
-### Irccd's features
-
-  - Can use JavaScript to create plugins,
-  - Can connect to multiple servers,
-  - Support multiple identities,
-  - Can be controlled by sockets and irccdctl,
-  - Runs on Linux, Windows and *BSD,
-  - Extremely well documented,
-  - Clean and powerful JavaScript API,
-  - Very fast and light.
-
-[ircbot]: https://en.wikipedia.org/wiki/IRC_bot
-[cpp14]: http://en.wikipedia.org/wiki/C%2B%2B14
-[js]: https://en.wikipedia.org/wiki/JavaScript
--- a/doc/html/guide/01-intro/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    INTRO_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-what-is-irc.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-what-is-irccd.md
-)
\ No newline at end of file
--- a/doc/html/guide/02-install/01-building-from-sources.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# Installation
-
-You should use the irccd version provided by your package manger if possible. If irccd is not available, you can build
-it from sources.
-
-## Building from sources
-
-### Requirements
-
-To build from sources, you need the following installed on your system:
-
-  - [CMake](http://www.cmake.org),
-  - [OpenSSL](https://www.openssl.org) (Optional) for connecting with SSL,
-  - [Pandoc](http://pandoc.org) (Optional) for building the documentation,
-  - At least **GCC 5.1** or **clang 3.4**
-
-<div class="alert alert-warning" role="alert">
-**Warning**: don't even try to compile with GCC 4.x, it will not work due to missing C++14 features.
-</div>
-
-### Running the build
-
-When you're ready, extract the **irccd-x.y.z.tar.gz** where **x.y.z** is the current version. Go to that directory,
-then type the following commands:
-
-````nohighlight
-$ mkdir _build_
-$ cd _build_
-$ cmake ..
-$ make
-$ sudo make install
-````
-
-This is the quick way of compiling and installing. It's also possible to set some options to customize the build.
--- a/doc/html/guide/02-install/02-customize.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-## Customizing the build
-
-You can configure some features when compiling irccd.
-
-### Disabling JavaScript
-
-You can disable JavaScript support.
-
-````nohighlight
-$ cmake .. -DWITH_JS=Off
-````
-
-### Disabling SSL
-
-You can disable OpenSSL support, it is automatically unset if OpenSSL is not found.
-
-<div class="alert alert-warning" role="alert">
-**Warning**: this is not recommended.
-</div>
-
-````nohighlight
-$ cmake .. -DWITH_SSL=Off
-````
-
-### Disabling all documentation
-
-You can disable all the documentation.
-
-````nohighlight
-$ cmake .. -DWITH_DOCS=Off
-````
-
-See below to disable only specific parts of the documentation.
-
-### Disabling HTML documentation
-
-By default if Pandoc is available, the HTML documentation is built, you can disable it.
-
-````nohighlight
-$ cmake .. -DWITH_HTML=Off
-````
-
-### Disabling man pages
-
-You can disable installation of manuals.
-
-````nohighlight
-$ cmake .. -DWITH_MAN=Off
-````
-
-### Installation path
-
-Sometimes, you may need to install irccd over other place, for that, you can
-specify the prefix where to install files.
-
-On Unix systems, it's usually **/usr/local** and **C:/Program Files/Irccd** on Windows.
-
-To change this, use the following:
-
-````nohighlight
-$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/some/directory
-````
-
-### Manual pages path
-
-By default, irccd use **${CMAKE_INSTALL_PREFIX}/share/man** for manual pages. Some systems use different one.
-
-For example, on FreeBSD the typical use would be:
-
-````nohighlight
-$ cmake .. -DWITH_MANDIR=/usr/local/man
-````
--- a/doc/html/guide/02-install/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    INSTALL_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-building-from-sources.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-customize.md
-)
\ No newline at end of file
--- a/doc/html/guide/03-config-format/01-basics.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# Configuration file format
-
-Both `irccd` and `irccdctl` use configuration file in a extended [INI][ini] format.
-
-## General syntax
-
-The file syntax has following rules:
-
-  1. Each option is stored in a section,
-  2. Some sections may be redefined multiple times,
-  3. Empty option must have quotes (e.g. `option = ""`).
-
-[ini]: https://en.wikipedia.org/wiki/INI_file
--- a/doc/html/guide/03-config-format/02-include.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-## The @include statement
-
-Irccd adds an extension to this format by adding an `@include` keyword which let you splitting your configuration file.
-
-<div class="alert alert-info" role="alert">
-**Note:** this `@include` statement must be at the beginning of the file and must be surrounded by quotes if the file
-name has spaces.
-</div>
-
-You can use both relative or absolute paths. If relative paths are used, they are relative to the current file being
-parsed.
-
-### Example
-
-````ini
-@include "rules.conf"
-@include "servers.conf"
-
-[mysection]
-myoption = "1"
-````
--- a/doc/html/guide/03-config-format/03-lists.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-## The list construct
-
-When requested, an option can have multiples values in a list. The syntax uses parentheses and values are separated
-by commas.
-
-If the list have only one value, you can just use a simple string.
-
-### Examples
-
-<div class="panel panel-success">
- <div class="panel-heading">**Example:** two servers defined in a rule</div>
- <div class="panel-body">
-````ini
-[rule]
-servers = ( "server1", "server2" )
-````
- </div>
-</div>
-
-<div class="panel panel-success">
- <div class="panel-heading">**Example:** only one server</div>
- <div class="panel-body">
-````ini
-[rule]
-servers = "only-one-server"
-````
- </div>
-</div>
-
-<div class="alert alert-info" role="alert">
-**Note:** spaces are completely optional.
-</div>
--- a/doc/html/guide/03-config-format/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    CONFIG_FORMAT_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-basics.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-include.md
-    ${CMAKE_CURRENT_LIST_DIR}/03-lists.md
-)
\ No newline at end of file
--- a/doc/html/guide/04-irccd/01-config.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-# Irccd
-
-Now that you've successfully installed irccd, let's add a configuration file
-so we can run it.
-
-## Configure irccd
-
-Options that have a default value are optional and can be omitted.
-
-## Identifiers
-
-Some sections require an identifier (specified as id) as parameter. They must be unique, not empty and can only
-contain characters, numbers, '-' and '_'.
-
-Example:
-
-  - abc
-  - server-tz2
-
-<div class="alert alert-info" role="alert">
-**Note**: the regular expression is defined as `[A-Za-z0-9-_]+`.
-</div>
-
-### The general section
-
-This section contains global options that are used in the whole irccd application.
-
-The available options:
-
-  - **uid**: (string or number) the user id to use (Optional, default: none),
-  - **gid**: (string or number) the group id to use (Optional, default: none),
-  - **foreground**: (bool) set to true to not daemonize (Optional, default: false)
-  - **pidfile**: (string) path to a file where to store the irccd pid (Optional, default: none).
-
-<div class="alert alert-warning" role="alert">
-**Warning:** these options are available only if the system supports them.
-</div>
-
-**Example**
-
-````ini
-[general]
-pidfile = "/var/run/irccd/pid"
-uid = "nobody"
-gid = 1002
-````
-
-### The logs section
-
-This section can let you configure how irccd should log the messages.
-
-The available options:
-
-  - **verbose**: (bool) be verbose (Optional, default: false),
-  - **type**: (string) which kind of logging, console, file or syslog (Optional, default: console).
-
-The options for **file** type:
-
-  - **path-logs**: (string) path to the normal messages,
-  - **path-errors**: (string) path to the error messages.
-
-<div class="alert alert-info" role="alert">
-**Note:** syslog is not available on all platforms.
-</div>
-
-**Example**
-
-````ini
-[logs]
-type = file
-verbose = true
-path-logs = "/var/log/irccd/log.txt"
-path-errors = "/var/log/irccd/errors.txt"
-````
-
-### The format section
-
-The format section let you change the irccd's output. It uses the [common patterns](#common-patterns-and-formatting).
-
-Only one keyword is defined, `message` which contains the message that irccd wants to output.
-
-<div class="alert alert-info" role="alert">
-**Note:** the colors and attributes are not supported.
-</div>
-
-The available options:
-
-  - **debug**: (string) template to use to format debug messages (Optional, default: none),
-  - **info**: (string) template to use to format information messages (Optional, default: none),
-  - **warning**: (string) template to use to format warnings (Optional, default: none).
-
-**Example**
-
-````ini
-[format]
-debug = "%H:%M debug: #{message}"
-info = "%H:%M info: #{message}"
-warning = "%H:%M warning: #{message}"
-````
-
-### The identity section
-
-This section is completely optional, if you don't provide one, irccd will use a default identity with **irccd** as
-nickname and username. This section is redefinable, you can create one or more.
-
-<div class="alert alert-warning" role="alert">
-**Warning:** it is encouraged to set a different identity because irccd nickname may be already used in some servers.
-</div>
-
-The available options:
-
-  - **name**: (id) the identity unique id,
-  - **nickname**: (string) the nickname (Optional, default: irccd),
-  - **realname**: (string) the realname (Optional, default: IRC Client daemon),
-  - **username**: (string) the username name (Optional, default: irccd),
-  - **ctcp-version**: (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
-  - **ctcp-autoreply**: (bool) enable auto CTCP VERSION reply, (Optional, default: true).
-
-**Example**
-
-````ini
-[identity]
-name = "default"
-nickname = "jean"
-
-[identity]
-name = "development"
-nickname = "unstable"
-username = "un"
-````
-
-### The server section
-
-This section is used to connect to one or more server. Thus, this section is also redefinable.
-
-The available options:
-
-  - **name**: (id) the unique id,
-  - **host**: (string) the server address,
-  - **port**: (int) the server port (Optional, default: 6667),
-  - **identity**: (string) an identity to use (Optional, default: irccd's default),
-  - **password**: (string) an optional password (Optional, default: none),
-  - **join-invite**: (bool) join channels upon invitation (Optional, default: false),
-  - **channels**: (list) list of channels to auto join, (Optional, default: empty),
-  - **command-char**: (string) the prefix for invoking special commands (Optional, default: !),
-  - **ssl**: (bool) enable or disable SSL (Optional, default: false),
-  - **ssl-verify**: (bool) verify the SSL certificates (Optional, default: true),
-  - **reconnect**: (bool) enable reconnection after failure (Optional, default: true),
-  - **reconnect-tries**: (int) number of tries before giving up. A value of -1 means indefinitely (Optional, default: -1),
-  - **reconnect-timeout**: (int) number of seconds to wait before retrying (Optional, default: 30),
-  - **ping-timeout** (int) number of seconds before ping timeout (Optional, default: 300).
-
-<div class="alert alert-info" role="alert">
-**Note:** if a channel requires a password, add it after a colon (e.g. "#channel:password").
-</div>
-
-**Example**
-
-````ini
-[server]
-name = "local"
-host = "localhost"
-port = 6667
-channels = ( "#staff", "#club:secret" )
-````
-
-### The plugins section
-
-This section is used to load plugins.
-
-Just add any key you like to load a plugin. If the value is not specified, the plugin is searched through the standard
-directories, otherwise, provide the full path (including the .js extension).
-
-<div class="alert alert-warning" role="alert">
-**Warning:** remember to add an empty string for searching plugins.
-</div>
-
-**Example**
-
-````ini
-[plugins]
-history = ""
-myplugin = /tmp/myplugin.js
-````
-
-The `history` plugin will be searched while `myplugin` will be load from **/tmp/myplugin.js**.
-
-### The transport section
-
-This section defines transports, you may use sockets to do a basic IPC system within irccd.
-
-With transports, you can may ask `irccd` to send a message, a notice or even kicking someone from a channel. Irccd
-will also notify all clients connected to this transport on IRC events.
-
-See [irccdctl chapter](#irccdctl) and the [socket chapter](#irccd-socket-api) for more information.
-
-There are two type of listeners availables:
-
-  1. Internet sockets, IPv4 and IPv6
-  2. Unix sockets, based on files (not available on Windows)
-
-The available options:
-
-  - **type**: (string) type of listener "ip" or "unix"
-
-The options for **ip** type:
-
-  - **port**: (int) port number.
-  - **address**: (string) address to bind or "*" for any (Optional, default: *).
-  - **family**: (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4)
-
-The options for **unix** type:
-
-  - **path**: (string) the file path to the socket.
-
-**Example of internet transports**
-
-````ini
-[transport]
-type = "ip"
-address = "*"
-family = ( "ipv4", "ipv6" )
-port = 9999
-````
-
-This will let you controlling irccd on port 9999 with both IPv4 and IPv6 families.
-
-<div class="alert alert-warning" role="alert">
-**Warning**: consider using internet sockets with care, especially if you are running your bot on a server with
-multiple users. If your bot has operator rights and you bind on any address, almost every users can do a kick or a ban.
-</div>
-
-**Example of unix transports**
-
-````ini
-[transport]
-type = "unix"
-path = "/tmp/irccd.sock"
-````
-
-This will let you controlling irccd on path **/tmp/irccd.sock**, the file is automatically deleted when irccd starts,
-but not when it stops.
-
-### The rule section
-
-The rule section is one of the most powerful within irccd configuration. It let you enable or disable plugins and IRC
-events for specific criterias. For instance, you may want to disable a plugin only for a specific channel on a specific
-server. And because rules are evaluated in the order they are defined, you can override rules.
-
-The available options:
-
-  - **servers**, (list) a list of servers that will match the rule (Optional, default: empty),
-  - **channels**, (list) a list of channel (Optional, default: empty),
-  - **plugins**, (list) which plugins (Optional, default: empty),
-  - **events**, (list) which events (e.g onCommand, onMessage, ...) (Optional, default: empty),
-  - **action**, (string) set to **accept** or **drop**.
-
-#### Basic rules example
-
-This first rule disable the plugin reboot on **all** servers and channels.
-
-````ini
-[rule]
-plugins = "reboot"
-action = drop
-````
-
-This rule enable the reboot plugin again on the server **localhost**, channel **#staff**.
-
-````ini
-[rule]
-servers = "localhost"
-channels = "#staff"
-plugins = "reboot"
-action = accept
-````
-
-### Full example of configuration file
-
-````ini
-# Add a transport that bind only to IPv6.
-[transport]
-type = ip
-family = ipv6
-port = 12000
-
-# A transport that binds to both IPv4 and IPv6.
-[transport]
-type = ip
-family = ( ipv4, ipv6 )
-port = 15000
-
-# Identity reused by many servers.
-[identity]
-name = "myIdentity"
-nickname = "superbot"
-realname = "SuperBot v1.0"
-username = "sp"
-
-# A server.
-[server]
-name = "foo"
-host = "irc.foo.org"
-port = "6667"
-identity = myIdentity
-
-# An other server.
-[server]
-name = "wanadoo"
-host = "chat.wanadoo.fr"
-port = "6667"
-identity = myIdentity
-
-# Load some plugins.
-[plugins]
-ask = ""                # This search for plugin ask
-myplugin = /path/to/myplugin.js        # This use absolute path
-````
--- a/doc/html/guide/04-irccd/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    IRCCD_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-config.md
-)
\ No newline at end of file
--- a/doc/html/guide/05-irccdctl/01-config.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-# Irccdctl
-
-The `irccdctl` utility let you controlling a running `irccd` instance. It uses sockets to perform any operation.
-
-You need to define at least one transport before using `irccdctl`.
-
-## Configuration
-
-Configuration of irccdctl is done in the same rules than `irccd`.
-
-### The general section
-
-This section defines the global irccdctl parameters.
-
-The available options:
-
-- **verbose**: (bool) enable verbose message (Optional, default: false).
-
-**Example**
-
-````ini
-[general]
-verbose = true
-````
-
-## The connect section
-
-The section socket permit irccdctl to connect to a specific irccd listener, only one may be defined. Just like
-transports you can connect to Unix or internet sockets.
-
-The available options:
-
-  - **type**: (string) type of listener "ip" or "unix"
-
-The options for **internet** type:
-
-  - **host**: (string) host to connect,
-  - **port**: (int) port number,
-  - **family**: (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
-
-The options for **unix** type:
-
-  - **path**: (string) Required. The file path to the socket.
-
-**Example for internet transports**
-
-````ini
-[connect]
-type = "internet"
-host = "localhost"
-port = "9999"
-family = "ipv6"
-````
-
-**Example for unix transports**
-
-````ini
-[connect]
-type = "unix"
-path = "/tmp/irccd.sock"
-````
--- a/doc/html/guide/05-irccdctl/02-usage.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-## Usage
-
-Usage of irccdctl.
-
-### Syntax
-
-The general syntax for running an irccdctl command is:
-
-````nohighlight
-irccdctl commandname arg1 arg2 arg3 ... argn
-````
-
-You can have the online documentation by typing `irccdctl help commandname`.
-
-### Shell escaping issue
-
-Some shells may discard arguments if they begins with a hash. For instance, `bash` will not understand the following
-command:
-
-````nohighlight
-$ irccdctl server-join localhost #staff
-````
-
-Instead, enclose the arguments with quotes
-
-````nohighlight
-$ irccdctl server-join localhost "#staff"
-````
--- a/doc/html/guide/05-irccdctl/03-commands.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-## Irccdctl commands
-
-The following commands are available.
-
-### help
-
-Get the help.
-
-**Usage**
-
-````nohighlight
-$ irccdctl help subject
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl help server-message
-````
-
-### plugin-info
-
-Get plugin information.
-
-**Usage**
-
-````nohighlight
-$ irccdctl plugin-info name
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl plugin-info ask
-````
-
-### plugin-list
-
-Get the list of all loaded plugins.
-
-**Usage**
-
-````nohighlight
-$ irccdctl plugin-list
-````
-
-### plugin-load
-
-Load a plugin into the irccd instance.
-
-**Usage**
-
-````nohighlight
-$ irccdctl plugin-load plugin
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl load ask
-````
-
-### plugin-reload
-
-Reload a plugin by calling the appropriate onReload event, the plugin is not unloaded and must be already loaded.
-
-**Usage**
-
-````nohighlight
-$ irccdctl plugin-reload name
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl plugin-reload logger
-````
-
-### plugin-unload
-
-Unload a loaded plugin from the irccd instance.
-
-**Usage**
-
-````nohighlight
-$ irccdctl plugin-unload name
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl plugin-unload logger
-````
-
-### server-cmode
-
-Change the mode of the specified channel.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-cmode server channel mode
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-cmode freenode #staff +t
-````
-
-### server-cnotice
-
-Send a notice to a public channel. This is a notice that everyone will be notified by.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-cnotice server channel message
-````
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-cnotice freenode #staff "Don't flood"
-````
-
-### server-connect
-
-Connect to a new IRC server.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-connect [options] name host port
-````
-
-Available options:
-
-- **-c, --command**: specify the command char
-- **-n, --nickname**: specify a nickname
-- **-r, --realname**: specify a real name
-- **-S, --ssl-verify**: verify SSL
-- **-s, --ssl**: connect using SSL
-- **-u, --username**: specify a user name
-
-**Example**
-
-````nohighlight
-$ irccdctl server-connect wanadoo chat.wanadoo.fr 6667
-$ irccdctl server-connect -s -S -n "undead" wanadoo chat.wanadoo.fr 6697
-````
-
-### server-disconnect
-
-Disconnect from a connected server.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-disconnect name
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-disconnect wanadoo
-````
-
-### server-invite
-
-Invite someone to a channel, needed for channel with mode +i
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-invite server nickname channel
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-invite freenode xorg62 #staff
-````
-
-### server-join
-
-Join the specified channel, the password is optional.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-join server channel [password]
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-join freenode #staff
-````
-
-### server-kick
-
-Kick the specified target from the channel, the reason is optional.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-kick server target channel [reason]
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl kick freenode jean #staff "Stop flooding"
-````
-
-### server-list
-
-Get the list of all connected servers.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-list
-````
-
-### server-me
-
-Send an action emote.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-me server target message
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-me freenode #staff "going back soon"
-````
-
-### server-message
-
-Send a message to the specified target or channel.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-message server target message
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-message freenode #staff "Hello from irccd"
-````
-
-### server-mode
-
-Set the irccd's user mode.
-
-**Usage**
-
-````nohighlight
-$ server-mode server mode
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-mode +i
-````
-
-### server-nick
-
-Change irccd's nickname.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-nick server nickname
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-nick freenode david
-````
-
-### server-notice
-
-Send a private notice to the specified target.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-notice server target message
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-notice freenode jean "I know you are here."
-````
-
-### server-part
-
-Leave the specified channel, the reason is optional.
-
-<div class="alert alert-warning" role="alert">
-**Warning**: not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern.
-</div>
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-part server channel [reason]
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-part freenode #staff
-$ irccdctl server-part freenode #botwar "too noisy"
-````
-
-### server-reconnect
-
-Force reconnection of one or all servers.
-
-If server is not specified, all servers will try to reconnect.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-reconnect [server]
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-reconnect
-$ irccdctl server-reconnect wanadoo
-````
-
-### server-topic
-
-Change the topic of the specified channel.
-
-**Usage**
-
-````nohighlight
-$ irccdctl server-topic server channel topic
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl server-topic freenode #wmfs "This is the best channel"
-````
-
-### watch
-
-Start watching irccd events. You can use different output formats, native is human readable format, json is pretty
-formatted json.
-
-**Usage**
-
-````nohighlight
-$ irccdctl watch [-f|--format native|json]
-````
-
-**Example**
-
-````nohighlight
-$ irccdctl watch
-$ irccdctl watch -f json
-````
--- a/doc/html/guide/05-irccdctl/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    IRCCDCTL_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-config.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-usage.md
-    ${CMAKE_CURRENT_LIST_DIR}/03-commands.md
-)
\ No newline at end of file
--- a/doc/html/guide/06-plugin/01-intro.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# Plugins
-
-Irccd can be extended with JavaScript plugins. This chapter will tell you how plugins work within irccd and how to
-create your first plugin.
-
-This chapter covers also some things to do and to avoid in plugins.
-
-## Why JavaScript?
-
-You may wonder why JavaScript was chosen in irccd. Originally, irccd used Lua as the scripting language but for many
-reasons, it has been replaced with JavaScript.
-
-However, many aspects between Lua and JavaScript are similar:
-
-  - Both languages are extremly small with very light API,
-  - It is easy to sandbox the interpreter for security reasons,
-  - It is very easy to implement your own API from C++ code.
-
-The current JavaScript interpreter is powered by [Duktape][duktape].
-
-[duktape]: http://duktape.org
--- a/doc/html/guide/06-plugin/02-paths.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-## Paths
-
-Irccd will find plugins in many paths depending on the configuration or the operating system.
-
-### Unix paths
-
-  1. `${XDG_DATA_HOME}/irccd/plugins`
-  2. `${HOME}/.local/share/irccd/plugins`
-  3. `/usr/local/share/irccd/plugins`
-
-### Windows paths
-
-  1. `C:\\Users\\YourUser\\irccd\\plugins`
-  2. `Path\\To\\Irccd\\Directory\\share\\plugins`
--- a/doc/html/guide/06-plugin/03-patterns.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-## Common patterns and formatting
-
-Some plugins can be configured, and some of them can use patterns to substitute variables.
-
-### Syntax
-
-The syntax is `?{}` where `?` is replaced by one of the token defined below. Braces are mandatory and cannot be ommited.
-To write a literal template construct, prepend the token twice.
-
-### Availables templates
-
-The following templates are available:
-
-  - `%`, date and time (see [Time](#time)),
-  - `#{name}`, name will be substituted from the keywords (see [Keywords](#keywords)),
-  - `${name}`, name will be substituted from the environment variable (see [Environment variables](#environment-variables)),
-  - `@{attributes}`, the attributes will be substituted to IRC colors (see [Attributes](#attributes)),
-
-### Time
-
-When you can use patterns, the date and time may be used just like `strftime(3)` so for the hours and minutes,
-you can use **%H:%M**.
-
-### Environment variables
-
-If supported, you can use environment variables like **${HOME}**. Please note that braces are mandatory.
-
-### Attributes
-
-The attribute format is composed of three parts, foreground, background and modifiers, each separated by a comma.
-
-<div class="alert alert-info" role="alert">
-**Note**: attributes and colors are not supported by all IRC clients.
-</div>
-
-<div class="alert alert-warning" role="alert">
-**Warning**: do not use colors and attributes outside IRC (e.g. for storing text in files) because escape codes are
-only valid in IRC context.
-</div>
-
-#### Available colors
-
-  - white,
-  - black,
-  - blue,
-  - green,
-  - red,
-  - brown,
-  - purple,
-  - orange,
-  - yellow,
-  - lightgreen,
-  - cyan,
-  - lightcyan,
-  - lightblue,
-  - pink,
-  - grey,
-  - lightgrey.
-
-#### Available attributes
-
-  - bold,
-  - italic,
-  - strike,
-  - reset,
-  - underline,
-  - underline2,
-  - reverse.
-
-### Keywords
-
-Keywords are arbitrary names that are replaced depending on the context. They are usually available to configure
-plugins.
-
-#### Predefined keywords
-
-Here's the list of keywords that a lot of plugins uses:
-
-  - **#{channel}**, the channel name,
-  - **#{command}**, the command to invoke the plugin, e.g. `!ask`,
-  - **#{message}**, a message (depending on context),
-  - **#{origin}**, the full user, e.g. `markand!~mkd@localhost`,
-  - **#{nickname}**, the short nickname,
-  - **#{plugin}**, the plugin name,
-  - **#{server}**, the current server name,
-  - **#{topic}**, the topic,
-  - **#{target}**, a target, e.g. a person who gets kicked.
-
-<div class="alert alert-info" role="alert">
-**Warning**: these keywords can be overriden by plugins.
-</div>
-
-### Examples
-
-#### Valid constructs
-
-  - `#{target}, welcome`: if target is set to "irccd", becomes "irccd, welcome",
-  - `@{red}#{target}`: if target is specified, it is written in red.
-
-#### Invalid or literals constructs
-
-  - `##{target}`: will output "#{target}",
-  - `##`: will output "##",
-  - `#target`: will output "#target",
-  - `#{target`: will throw an error.
-
-#### Colors & attributes
-
-  - `@{red,blue}`: will write text red on blue background,
-  - `@{default,yellow}`: will write default color text on yellow background,
-  - `@{white,black,bold,underline}`: will write white text on black in both bold and underline.
-
-#### In the logger plugin
-
-For instance, using the **logger** plugin, it's possible to customize the pattern to use when someone joins a channel
-like that:
-
-````nohighlight
-#{origin} joined #{channel}
-````
-
-The keyword **#{origin}** will be substituted to the nickname and **#{channel}** to the channel name.
--- a/doc/html/guide/06-plugin/04-metadata.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-## Plugin metadata
-
-While it's not mandatory, please set the following variables in a global `info` object:
-
-  - **author**: (string) your name, usually mail address,
-  - **license**: (string) an arbitrary license name,
-  - **summary**: (string) a short comment about your plugin,
-  - **version**: (string) the plugin version.
-
-Example:
-
-````javascript
-/* Plugin information */
-info = {
-    author: "David Demelier <markand@malikania.fr>",
-    license: "ISC",
-    summary: "A FPS game for IRC",
-    version: "0.0.0.0.0.0.1"
-};
-````
--- a/doc/html/guide/06-plugin/05-sample-plugin.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-## Your first plugin
-
-Now, we will write a simple plugin that repeat every sentences said on a
-channel, it's quite easy but you should not use it on a real channel or you'll
-probably get kicked.
-
-### Requirements
-
-First of all, you need to be a little familiar with the JavaScript syntax.
-
-### Create your plugin
-
-We will create our new plugin under the home user plugin path. If you're running
-on Unix systems it is usually **${XDG_CONFIG_HOME}/.local/share/irccd/plugins**.
-
-So let start by creating a plugin named **repeater.js**. On my system the file
-will live as **/home/markand/.local/share/irccd/plugins/repeater.js**.
-
-### First event
-
-#### Registering the callback
-
-Remember, plugins are made through the event driven mechanism, so we must define a function that will be called when
-a user said something on the channel. The function defined on channel message is called `onMessage`.
-
-It has the following signature:
-
-````javascript
-function onMessage(server, origin, channel, message)
-````
-
-The parameters are defined as following:
-
-  - **server**, on which server the message happened
-  - **origin**, who emit the message (full nickname with host)
-  - **channel**, on which channel
-  - **message**, and the message content
-
-#### Send the response
-
-Now that we have the message, the channel and the server, we can send the copy of the message. For this, you must take
-care of the server parameter. The server is one of defined in the server section from the configuration file.
-
-There are several methods available for the object, they are defined in the [Irccd.Server][server-api] documentation.
-
-But the on we are interested in is [Server.prototype.message][server-message]. This function takes two parameters, the
-target which can be a nickname or a channel and the message.
-
-So the only thing to do is the following:
-
-````javascript
-function onMessage(server, origin, channel, message)
-{
-    server.message(channel, message)
-}
-````
-
-That's it!
-
-You've just made a brand new plugin, of course it's not a very powerful one but at least you understood the way it
-works. With the powerful API provided you will be able to create a bunch of plugins that can fits your needs, such as
-a content provider, a moderator, a calculator and so on.
-
-[server-api]: @baseurl@/api/module/Irccd.Server/index.html
-[server-message]: @baseurl@/api/module/Irccd.Server/method/message.html
--- a/doc/html/guide/06-plugin/06-do-and-avoid.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-## Do and do not
-
-There are things which should be avoided if possible.
-
-### Error and load
-
-Since irccd 1.1, one should not write code outside JavaScript supported events functions. Internally, irccd store the
-plugin information the complete read. If a plugin has an syntax error or a bad API call, irccd looks for the plugin
-metadata information and since it is not currently stored, it generate the "unitialized state" error.
-
-### Handling error
-
-There are two ways of handling error.
-
-#### Your plugin can't continue running
-
-If you need a file, specific resource so your plugin.
-
-If you call the error function while you are in the `onLoad` callback, the plugin is not added to the registry.
-However, if the function is called in any other event, the plugin remains in the list.
-
-#### Your plugin has errors but can run
-
-If for instance, the plugin has errors but can still run for any reason. One should use the `Irccd.Logger` API. The
-function in this API will write a message in the irccd output.
-
-**Example**
-
-````javascript
-function onCommand()
-{
-    if (something_is_wrong)
-        Irccd.Logger.warning("error condition")
-}
-````
-
-This will output to the irccd log something like:
-
-````nohighlight
-plugin foo: error condition
-````
--- a/doc/html/guide/06-plugin/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    PLUGIN_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-intro.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-paths.md
-    ${CMAKE_CURRENT_LIST_DIR}/03-patterns.md
-    ${CMAKE_CURRENT_LIST_DIR}/04-metadata.md
-    ${CMAKE_CURRENT_LIST_DIR}/05-sample-plugin.md
-    ${CMAKE_CURRENT_LIST_DIR}/06-do-and-avoid.md
-)
\ No newline at end of file
--- a/doc/html/guide/07-socket/01-syntax.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-# Irccd socket API
-
-This guide will help you controlling irccd via sockets.
-
-Currently, irccd supports internet and unix sockets, you need at least one listener defined in your **irccd.conf**.
-
-## Syntax
-
-Irccd use JSON as protocol for sending and receiving data. A message must ends with `\r\n\r\n` to be complete, thus
-it's possible to write JSON messages in multiple lines.
-
-For example, this buffer will be parsed as two different messages.
-
-<div class="alert alert-success" role="alert">
-**Example**: two commands issued
-
-````json
-{
-  "param1": "value1"
-}
-
-{
-  "param1": "value1"
-}
-
-````
-</div>
-
-<div class="alert alert-warning" role="alert">
-**Warning:** please note that the `\r\n\r\n`characters are the escape characters of line feed and new line, not the
-concatenation of `\` and `r`.
-</div>
-
-## Responses
-
-All commands emit a response with the following properties:
-
-  - **command**: (string) the result of the issued command,
-  - **status**: (string) **error** or **ok**,
-  - **error**: (string) the error message if status is set to **error**.
-
-<div class="alert alert-success" role="alert">
-**Example**: command issued with no errors
-
-````json
-{
-  "command": "server-message",
-  "status": "ok"
-}
-````
-</div>
-
-<div class="alert alert-danger" role="alert">
-**Example**: command issued with errors
-
-````json
-{
-  "command": "server-message",
-  "status": "error",
-  "error": "server xyz not found"
-}
-````
-</div>
--- a/doc/html/guide/07-socket/02-commands.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,380 +0,0 @@
-## Commands
-
-The following commands are available. Please note that a lot of commands require a server as the first argument, it’s
-one of defined in the **irccd.conf** file in the server section.
-
-### server-cnotice
-
-Send a message notice on a channel.
-
-#### Properties
-
-  - **command**: (string) "server-cnotice",
-  - **server**: (string) the server unique id,
-  - **channel**: (string) the channel name,
-  - **message**: (string) the notice message.
-
-#### Example
-
-````json
-{
-  "command": "server-cnotice",
-  "server": "myserver",
-  "channel": "#staff",
-  "message": "please be quiet"
-}
-````
-
-### server-connect
-
-Connect to a server.
-
-#### Properties
-
-  - **command**: (string) "server-connect",
-  - **name**: (string) the server unique id,
-  - **host**: (string) the host address,
-  - **port**: (int) the port number (Optional, default: 6667),
-  - **ssl**: (bool) use SSL (Optional, default: false),
-  - **sslVerify**: (bool) verify SSL (Optional, default: false),
-  - **nickname**: (string) the nickname to use (Optional, default: irccd),
-  - **username**: (string) the user name to use (Optional, default: irccd),
-  - **realname**: (string) the real name to use (Optional, default: IRC Client Daemon),
-  - **ctcpVersion**: (string) the CTCP Version to answer (Optional, default: the irccd's version),
-  - **commandChar**: (string) the command character to use to invoke commands (Optional, default: !),
-  - **reconnectTries**: (int) the number of reconnection to try (Optional, default: -1),
-  - **reconnectTimeout**: (int) the number of seconds to wait before retrying to connect (Optional, default: 30).
-
-#### Example
-
-````json
-{
-  "command": "server-connect",
-  "name": "myserver",
-  "host": "localhost",
-  "nickname": "edouard"
-}
-````
-
-### server-disconnect
-
-Disconnect from a server.
-
-If server is not specified, irccd disconnects all servers.
-
-#### Properties
-
-  - **command**: (string) "server-disconnect",
-  - **server**: (string) the server unique id (Optional, default: none).
-
-#### Example
-
-````json
-{
-  "command": "server-disconnect",
-  "server": "myserver"
-}
-````
-
-### server-info
-
-Get server information.
-
-#### Properties
-
-  - **command**: (string) "server-info",
-  - **server**: (string) the server unique id.
-
-#### Example
-
-````json
-{
-  "command": "server-info",
-  "server": "myserver"
-}
-````
-
-#### Responses
-
-  - **name**: (string) the server unique id,
-  - **host**: (string) the server hostname,
-  - **port**: (int) the port,
-  - **ipv6**: (bool) true if using IPv6,
-  - **ssl**: (bool) true if connection is using SSL,
-  - **sslVerify**: (bool) true if SSL was verified,
-  - **channels**: (string list) list of channels.
-  - **nickname**: (string) the current nickname in use,
-  - **username**: (string) the username in use,
-  - **realname**: (string) the realname in use.
-
-### server-invite
-
-Invite the specified target on the channel.
-
-#### Properties
-
-  - **command**: (string) "server-invite",
-  - **server**: (string) the server unique id,
-  - **target**: (string) the nickname to invite,
-  - **channel**: (string) the channel.
-
-#### Example
-
-````json
-{
-  "command": "server-invite",
-  "server": "myserver",
-  "target": "edouard",
-  "channel": "#staff"
-}
-````
-
-### server-join
-
-Join the specified channel, the password is optional.
-
-#### Properties
-
-  - **command**: (string) "server-join",
-  - **server**: (string) the server unique id,
-  - **channel**: (string) the channel to join,
-  - **password**: (string) the password (Optional, default: none).
-
-#### Example
-
-````json
-{
-  "command": "server-join",
-  "server": "myserver",
-  "channel": "#games"
-}
-````
-
-### server-kick
-
-Kick the specified target from the channel, the reason is optional.
-
-#### Properties
-
-  - **command**: (string) "server-kick",
-  - **server**: (string) the server unique id,
-  - **target**: (string) the target nickname,
-  - **channel**: (string) the channel,
-  - **reason**: (string) the reason (Optional, default: none).
-
-#### Example
-
-````json
-{
-  "command": "server-kick",
-  "server": "myserver",
-  "target": "edouard",
-  "channel": "#staff",
-  "reason": "please be nice"
-}
-````
-
-### server-list
-
-Get the list of all connected servers.
-
-#### Properties
-
-- **command**: (string) "server-list".
-
-#### Example
-
-````json
-{
-  "command": "server-list"
-}
-````
-
-#### Responses
-
-  - The following properties:
-    - **list**: (string list) the list of all server unique ids.
-
-### server-me
-
-Send an action emote.
-
-#### Properties
-
-  - **command**: (string) "server-me",
-  - **server**: (string) the server unique id,
-  - **target**: (string) the target or channel,
-  - **message**: (string) the message.
-
-#### Example
-
-````json
-{
-  "command": "server-me",
-  "server": "myserver",
-  "channel": "#staff",
-  "message": "like that"
-}
-````
-
-### server-message
-
-Send a message to the specified target or channel.
-
-#### Properties
-
-  - **command**: (string) "server-message",
-  - **server**: (string) the server unique id,
-  - **target**: (string) the target or channel,
-  - **message**: (string) the message.
-
-#### Example
-
-````json
-{
-  "command": "server-message",
-  "server": "myserver",
-  "target": "#staff",
-  "message": "this channel is nice"
-}
-````
-
-### server-mode
-
-Set the irccd's user mode.
-
-#### Properties
-
-  - **command**: (string) "server-mode",
-  - **server**: (string) the server unique id,
-  - **mode**: (string) the mode.
-
-#### Example
-
-````json
-{
-  "command": "server-mode",
-  "server": "myserver",
-  "mode": "mode"
-}
-````
-
-### server-nick
-
-Change irccd's nickname.
-
-#### Properties
-
-  - **command**: (string) "server-nick",
-  - **server**: (string) the server unique id,
-  - **nickname**: (string) the new nickname.
-
-#### Example
-
-````json
-{
-  "command": "server-nick",
-  "server": "myserver",
-  "nickname": "edouard"
-}
-````
-
-### server-notice
-
-Send a private notice to the specified target.
-
-#### Properties
-
-  - **command**: (string) "server-notice",
-  - **server**: (string) the server unique id,
-  - **target**: (string) the target,
-  - **message**: (string) the notice message.
-
-#### Example
-
-````json
-{
-  "command": "server-notice",
-  "server": "myserver",
-  "target": "edouard",
-  "message": "hello dude"
-}
-````
-
-### server-part
-
-Leave the specified channel, the reason is optional.
-
-Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern.
-
-#### Properties
-
-  - **command**: (string) "server-part",
-  - **server**: (string) the unique server id,
-  - **channel**: (string) the channel to leave,
-  - **reason**: (string) the reason (Optional, default: none).
-
-#### Example
-
-````json
-{
-  "command": "server-part",
-  "server": "myserver",
-  "channel": "#staff",
-  "reason": "the reason"
-}
-````
-
-### server-reconnect
-
-Force reconnection of one or all servers.
-
-If server is not specified, all servers will try to reconnect.
-
-#### Properties
-
-  - **command**: (string) "server-reconnect",
-  - **server**: (string) the server unique id (Optional, default: none).
-
-#### Example
-
-````json
-{
-  "command": "server-reconnect",
-  "server": "myserver"
-}
-````
-
-### server-topic
-
-Change the topic of the specified channel.
-
-#### Properties
-
-  - **command**: (string) "server-topic",
-  - **server**: (string) the unique server id,
-  - **channel**: (string) the channel,
-  - **topic**: (string) the new topic.
-
-#### Example
-
-````json
-{
-  "command": "server-topic",
-  "server": "myserver",
-  "channel": "#staff",
-  "topic": "the new topic"
-}
-````
-
-### server-umode
-
-Change your irccd user mode for the specified server.
-
-````json
-{
-  "command": "umode",
-  "server": "the server name",
-  "mode": "the mode"
-}
-````
--- a/doc/html/guide/07-socket/03-messages.md	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-## Messages
-
-The following messages are broadcasted to the clients on specific events.
-
-Events are very close to the [JavaScript events][events], refer to the documentation for more information.
-
-### onChannelMode
-
-#### Properties
-
-  - **event**: (string) "onChannelMode",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **mode**: (string) the mode,
-  - **argument**: (string) the argument.
-
-### onChannelNotice
-
-#### Properties
-
-  - **event**: (string) "onChannelNotice",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **message**: (string) the notice.
-
-### onConnect
-
-#### Properties
-
-  - **event**: (string) "onConnect",
-  - **server**: (string) the server id.
-
-### onInvite
-
-#### Properties
-
-  - **event**: (string) "onInvite"
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel.
-
-### onJoin
-
-#### Properties
-
-  - **event**: (string) "onJoin",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel.
-
-### onKick
-
-#### Properties
-
-  - **event**: (string) "onKick",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **target**: (string) the target,
-  - **reason**: (string) the reason.
-
-### onMessage
-
-#### Properties
-
-  - **event**: (string) "onMessage",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **message**: (string) the message.
-
-### onMe
-
-#### Properties
-
-  - **event**: (string) "onMe",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **target**: (string) the target,
-  - **message**: (string) the message.
-
-### onMode
-
-#### Properties
-
-  - **event**: (string) "onMode",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **mode**: (string) the mode.
-
-### onNames
-
-#### Properties
-
-  - **event**: (string) "onNames",
-  - **server**: (string) the server id,
-  - **channel**: (string) the channel,
-  - **names**: (string list) the list of names.
-
-### onNick
-
-#### Properties
-
-  - **event**: (string) "onNick",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **nickname**: (string) the new nickname.
-
-### onNotice
-
-#### Properties
-
-  - **event**: (string) "onNotice",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **message**: (string) the message.
-
-### onPart
-
-#### Properties
-
-  - **event**: (string) "onPart",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **reason**: (string) the reason.
-
-### onQuery
-
-#### Properties
-
-  - **event**: (string) "onQuery",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **message**: (string) the message.
-
-### onTopic
-
-#### Properties
-
-  - **event**: (string) "onTopic",
-  - **server**: (string) the server id,
-  - **origin**: (string) the originator,
-  - **channel**: (string) the channel,
-  - **topic**: (string) the topic.
-
-### onWhois
-
-#### Properties
-
-  - **event**: (string) "onWhois",
-  - **server**: (string) the server id,
-  - **nickname**: (string) the nickname,
-  - **username**: (string) the username,
-  - **host**: (string) the hostname,
-  - **realname**: (string) the realname.
-
-[events]: @baseurl@/api/index.html
--- a/doc/html/guide/07-socket/Files.cmake	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-set(
-    SOCKET_SOURCES
-    ${CMAKE_CURRENT_LIST_DIR}/01-syntax.md
-    ${CMAKE_CURRENT_LIST_DIR}/02-commands.md
-    ${CMAKE_CURRENT_LIST_DIR}/03-messages.md
-)
--- a/doc/html/guide/CMakeLists.txt	Tue Sep 13 13:01:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-project(guide)
-
-include(01-intro/Files.cmake)
-include(02-install/Files.cmake)
-include(03-config-format/Files.cmake)
-include(04-irccd/Files.cmake)
-include(05-irccdctl/Files.cmake)
-include(06-plugin/Files.cmake)
-include(07-socket/Files.cmake)
-
-set(
-    SOURCES
-    ${INTRO_SOURCES}
-    ${INSTALL_SOURCES}
-    ${CONFIG_FORMAT_SOURCES}
-    ${IRCCD_SOURCES}
-    ${IRCCDCTL_SOURCES}
-    ${PLUGIN_SOURCES}
-    ${SOCKET_SOURCES}
-)
-
-irccd_define_html(
-    OUTPUT guide.html
-    TARGET docs-guide
-    SOURCES ${SOURCES}
-    ARGS --toc --toc-depth=2 -Vguide
-)
-
-set_target_properties(
-    docs-guide
-    PROPERTIES
-        PROJECT_LABEL guide
-        FOLDER docs
-)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/index.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,6 @@
+---
+header: Irccd documentation
+guide: true
+---
+
+Welcome to the irccd documentation.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/irccd/configuring.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,316 @@
+---
+title: Configuring irccd
+guide: yes
+---
+
+Options that have a default value are optional and can be omitted.
+
+# Identifiers
+
+Some sections require an identifier (specified as id) as parameter. They must be unique, not empty and can only
+contain characters, numbers, '-' and '_'.
+
+Example:
+
+  - abc
+  - server-tz2
+
+<div class="alert alert-info" role="alert">
+**Note**: the regular expression is defined as `[A-Za-z0-9-_]+`.
+</div>
+
+# The general section
+
+This section contains global options that are used in the whole irccd application.
+
+The available options:
+
+  - **uid**: (string or number) the user id to use (Optional, default: none),
+  - **gid**: (string or number) the group id to use (Optional, default: none),
+  - **foreground**: (bool) set to true to not daemonize (Optional, default: false)
+  - **pidfile**: (string) path to a file where to store the irccd pid (Optional, default: none).
+
+<div class="alert alert-warning" role="alert">
+**Warning:** these options are available only if the system supports them.
+</div>
+
+**Example**
+
+````ini
+[general]
+pidfile = "/var/run/irccd/pid"
+uid = "nobody"
+gid = 1002
+````
+
+# The logs section
+
+This section can let you configure how irccd should log the messages.
+
+The available options:
+
+  - **verbose**: (bool) be verbose (Optional, default: false),
+  - **type**: (string) which kind of logging, console, file or syslog (Optional, default: console).
+
+The options for **file** type:
+
+  - **path-logs**: (string) path to the normal messages,
+  - **path-errors**: (string) path to the error messages.
+
+<div class="alert alert-info" role="alert">
+**Note:** syslog is not available on all platforms.
+</div>
+
+**Example**
+
+````ini
+[logs]
+type = file
+verbose = true
+path-logs = "/var/log/irccd/log.txt"
+path-errors = "/var/log/irccd/errors.txt"
+````
+
+# The format section
+
+The format section let you change the irccd's output. It uses the [common patterns](#common-patterns-and-formatting).
+
+Only one keyword is defined, `message` which contains the message that irccd wants to output.
+
+<div class="alert alert-info" role="alert">
+**Note:** the colors and attributes are not supported.
+</div>
+
+The available options:
+
+  - **debug**: (string) template to use to format debug messages (Optional, default: none),
+  - **info**: (string) template to use to format information messages (Optional, default: none),
+  - **warning**: (string) template to use to format warnings (Optional, default: none).
+
+**Example**
+
+````ini
+[format]
+debug = "%H:%M debug: #{message}"
+info = "%H:%M info: #{message}"
+warning = "%H:%M warning: #{message}"
+````
+
+# The identity section
+
+This section is completely optional, if you don't provide one, irccd will use a default identity with **irccd** as
+nickname and username. This section is redefinable, you can create one or more.
+
+<div class="alert alert-warning" role="alert">
+**Warning:** it is encouraged to set a different identity because irccd nickname may be already used in some servers.
+</div>
+
+The available options:
+
+  - **name**: (id) the identity unique id,
+  - **nickname**: (string) the nickname (Optional, default: irccd),
+  - **realname**: (string) the realname (Optional, default: IRC Client daemon),
+  - **username**: (string) the username name (Optional, default: irccd),
+  - **ctcp-version**: (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
+  - **ctcp-autoreply**: (bool) enable auto CTCP VERSION reply, (Optional, default: true).
+
+**Example**
+
+````ini
+[identity]
+name = "default"
+nickname = "jean"
+
+[identity]
+name = "development"
+nickname = "unstable"
+username = "un"
+````
+
+# The server section
+
+This section is used to connect to one or more server. Thus, this section is also redefinable.
+
+The available options:
+
+  - **name**: (id) the unique id,
+  - **host**: (string) the server address,
+  - **port**: (int) the server port (Optional, default: 6667),
+  - **identity**: (string) an identity to use (Optional, default: irccd's default),
+  - **password**: (string) an optional password (Optional, default: none),
+  - **join-invite**: (bool) join channels upon invitation (Optional, default: false),
+  - **channels**: (list) list of channels to auto join, (Optional, default: empty),
+  - **command-char**: (string) the prefix for invoking special commands (Optional, default: !),
+  - **ssl**: (bool) enable or disable SSL (Optional, default: false),
+  - **ssl-verify**: (bool) verify the SSL certificates (Optional, default: true),
+  - **reconnect**: (bool) enable reconnection after failure (Optional, default: true),
+  - **reconnect-tries**: (int) number of tries before giving up. A value of -1 means indefinitely (Optional, default: -1),
+  - **reconnect-timeout**: (int) number of seconds to wait before retrying (Optional, default: 30),
+  - **ping-timeout** (int) number of seconds before ping timeout (Optional, default: 300).
+
+<div class="alert alert-info" role="alert">
+**Note:** if a channel requires a password, add it after a colon (e.g. "#channel:password").
+</div>
+
+**Example**
+
+````ini
+[server]
+name = "local"
+host = "localhost"
+port = 6667
+channels = ( "#staff", "#club:secret" )
+````
+
+# The plugins section
+
+This section is used to load plugins.
+
+Just add any key you like to load a plugin. If the value is not specified, the plugin is searched through the standard
+directories, otherwise, provide the full path (including the .js extension).
+
+<div class="alert alert-warning" role="alert">
+**Warning:** remember to add an empty string for searching plugins.
+</div>
+
+**Example**
+
+````ini
+[plugins]
+history = ""
+myplugin = /tmp/myplugin.js
+````
+
+The `history` plugin will be searched while `myplugin` will be load from **/tmp/myplugin.js**.
+
+# The transport section
+
+This section defines transports, you may use sockets to do a basic IPC system within irccd.
+
+With transports, you can may ask `irccd` to send a message, a notice or even kicking someone from a channel. Irccd
+will also notify all clients connected to this transport on IRC events.
+
+See [irccdctl chapter](#irccdctl) and the [socket chapter](#irccd-socket-api) for more information.
+
+There are two type of listeners availables:
+
+  1. Internet sockets, IPv4 and IPv6
+  2. Unix sockets, based on files (not available on Windows)
+
+The available options:
+
+  - **type**: (string) type of listener "ip" or "unix"
+
+The options for **ip** type:
+
+  - **port**: (int) port number.
+  - **address**: (string) address to bind or "*" for any (Optional, default: *).
+  - **family**: (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4)
+
+The options for **unix** type:
+
+  - **path**: (string) the file path to the socket.
+
+**Example of internet transports**
+
+````ini
+[transport]
+type = "ip"
+address = "*"
+family = ( "ipv4", "ipv6" )
+port = 9999
+````
+
+This will let you controlling irccd on port 9999 with both IPv4 and IPv6 families.
+
+<div class="alert alert-warning" role="alert">
+**Warning**: consider using internet sockets with care, especially if you are running your bot on a server with
+multiple users. If your bot has operator rights and you bind on any address, almost every users can do a kick or a ban.
+</div>
+
+**Example of unix transports**
+
+````ini
+[transport]
+type = "unix"
+path = "/tmp/irccd.sock"
+````
+
+This will let you controlling irccd on path **/tmp/irccd.sock**, the file is automatically deleted when irccd starts,
+but not when it stops.
+
+# The rule section
+
+The rule section is one of the most powerful within irccd configuration. It let you enable or disable plugins and IRC
+events for specific criterias. For instance, you may want to disable a plugin only for a specific channel on a specific
+server. And because rules are evaluated in the order they are defined, you can override rules.
+
+The available options:
+
+  - **servers**, (list) a list of servers that will match the rule (Optional, default: empty),
+  - **channels**, (list) a list of channel (Optional, default: empty),
+  - **plugins**, (list) which plugins (Optional, default: empty),
+  - **events**, (list) which events (e.g onCommand, onMessage, ...) (Optional, default: empty),
+  - **action**, (string) set to **accept** or **drop**.
+
+## Basic rules example
+
+This first rule disable the plugin reboot on **all** servers and channels.
+
+````ini
+[rule]
+plugins = "reboot"
+action = drop
+````
+
+This rule enable the reboot plugin again on the server **localhost**, channel **#staff**.
+
+````ini
+[rule]
+servers = "localhost"
+channels = "#staff"
+plugins = "reboot"
+action = accept
+````
+
+# Full example of configuration file
+
+````ini
+# Add a transport that bind only to IPv6.
+[transport]
+type = ip
+family = ipv6
+port = 12000
+
+# A transport that binds to both IPv4 and IPv6.
+[transport]
+type = ip
+family = ( ipv4, ipv6 )
+port = 15000
+
+# Identity reused by many servers.
+[identity]
+name = "myIdentity"
+nickname = "superbot"
+realname = "SuperBot v1.0"
+username = "sp"
+
+# A server.
+[server]
+name = "foo"
+host = "irc.foo.org"
+port = "6667"
+identity = myIdentity
+
+# An other server.
+[server]
+name = "wanadoo"
+host = "chat.wanadoo.fr"
+port = "6667"
+identity = myIdentity
+
+# Load some plugins.
+[plugins]
+ask = ""                # This search for plugin ask
+myplugin = /path/to/myplugin.js        # This use absolute path
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/irccdctl/commands.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,380 @@
+---
+title: Irccdctl commands
+guide: yes
+---
+
+# help
+
+Get the help.
+
+**Usage**
+
+````nohighlight
+$ irccdctl help subject
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl help server-message
+````
+
+# plugin-info
+
+Get plugin information.
+
+**Usage**
+
+````nohighlight
+$ irccdctl plugin-info name
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl plugin-info ask
+````
+
+# plugin-list
+
+Get the list of all loaded plugins.
+
+**Usage**
+
+````nohighlight
+$ irccdctl plugin-list
+````
+
+# plugin-load
+
+Load a plugin into the irccd instance.
+
+**Usage**
+
+````nohighlight
+$ irccdctl plugin-load plugin
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl load ask
+````
+
+# plugin-reload
+
+Reload a plugin by calling the appropriate onReload event, the plugin is not unloaded and must be already loaded.
+
+**Usage**
+
+````nohighlight
+$ irccdctl plugin-reload name
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl plugin-reload logger
+````
+
+# plugin-unload
+
+Unload a loaded plugin from the irccd instance.
+
+**Usage**
+
+````nohighlight
+$ irccdctl plugin-unload name
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl plugin-unload logger
+````
+
+# server-cmode
+
+Change the mode of the specified channel.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-cmode server channel mode
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-cmode freenode #staff +t
+````
+
+# server-cnotice
+
+Send a notice to a public channel. This is a notice that everyone will be notified by.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-cnotice server channel message
+````
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-cnotice freenode #staff "Don't flood"
+````
+
+# server-connect
+
+Connect to a new IRC server.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-connect [options] name host port
+````
+
+Available options:
+
+- **-c, --command**: specify the command char
+- **-n, --nickname**: specify a nickname
+- **-r, --realname**: specify a real name
+- **-S, --ssl-verify**: verify SSL
+- **-s, --ssl**: connect using SSL
+- **-u, --username**: specify a user name
+
+**Example**
+
+````nohighlight
+$ irccdctl server-connect wanadoo chat.wanadoo.fr 6667
+$ irccdctl server-connect -s -S -n "undead" wanadoo chat.wanadoo.fr 6697
+````
+
+# server-disconnect
+
+Disconnect from a connected server.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-disconnect name
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-disconnect wanadoo
+````
+
+# server-invite
+
+Invite someone to a channel, needed for channel with mode +i
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-invite server nickname channel
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-invite freenode xorg62 #staff
+````
+
+# server-join
+
+Join the specified channel, the password is optional.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-join server channel [password]
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-join freenode #staff
+````
+
+# server-kick
+
+Kick the specified target from the channel, the reason is optional.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-kick server target channel [reason]
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl kick freenode jean #staff "Stop flooding"
+````
+
+# server-list
+
+Get the list of all connected servers.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-list
+````
+
+# server-me
+
+Send an action emote.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-me server target message
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-me freenode #staff "going back soon"
+````
+
+# server-message
+
+Send a message to the specified target or channel.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-message server target message
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-message freenode #staff "Hello from irccd"
+````
+
+# server-mode
+
+Set the irccd's user mode.
+
+**Usage**
+
+````nohighlight
+$ server-mode server mode
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-mode +i
+````
+
+# server-nick
+
+Change irccd's nickname.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-nick server nickname
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-nick freenode david
+````
+
+# server-notice
+
+Send a private notice to the specified target.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-notice server target message
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-notice freenode jean "I know you are here."
+````
+
+# server-part
+
+Leave the specified channel, the reason is optional.
+
+<div class="alert alert-warning" role="alert">
+**Warning**: not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern.
+</div>
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-part server channel [reason]
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-part freenode #staff
+$ irccdctl server-part freenode #botwar "too noisy"
+````
+
+# server-reconnect
+
+Force reconnection of one or all servers.
+
+If server is not specified, all servers will try to reconnect.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-reconnect [server]
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-reconnect
+$ irccdctl server-reconnect wanadoo
+````
+
+# server-topic
+
+Change the topic of the specified channel.
+
+**Usage**
+
+````nohighlight
+$ irccdctl server-topic server channel topic
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl server-topic freenode #wmfs "This is the best channel"
+````
+
+# watch
+
+Start watching irccd events. You can use different output formats, native is human readable format, json is pretty
+formatted json.
+
+**Usage**
+
+````nohighlight
+$ irccdctl watch [-f|--format native|json]
+````
+
+**Example**
+
+````nohighlight
+$ irccdctl watch
+$ irccdctl watch -f json
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/irccdctl/configuring.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,64 @@
+---
+title: Configuring irccdctl
+guide: yes
+---
+
+The `irccdctl` utility let you controlling a running `irccd` instance. It uses sockets to perform any operation.
+
+You need to define at least one transport before using `irccdctl`.
+
+## Configuration
+
+Configuration of irccdctl is done in the same rules than `irccd`.
+
+### The general section
+
+This section defines the global irccdctl parameters.
+
+The available options:
+
+- **verbose**: (bool) enable verbose message (Optional, default: false).
+
+**Example**
+
+````ini
+[general]
+verbose = true
+````
+
+## The connect section
+
+The section socket permit irccdctl to connect to a specific irccd listener, only one may be defined. Just like
+transports you can connect to Unix or internet sockets.
+
+The available options:
+
+  - **type**: (string) type of listener "ip" or "unix"
+
+The options for **internet** type:
+
+  - **host**: (string) host to connect,
+  - **port**: (int) port number,
+  - **family**: (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
+
+The options for **unix** type:
+
+  - **path**: (string) Required. The file path to the socket.
+
+**Example for internet transports**
+
+````ini
+[connect]
+type = "internet"
+host = "localhost"
+port = "9999"
+family = "ipv6"
+````
+
+**Example for unix transports**
+
+````ini
+[connect]
+type = "unix"
+path = "/tmp/irccd.sock"
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/irccdctl/usage.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,33 @@
+---
+title: Irccdctl usage and options
+guide: yes
+---
+
+## Usage
+
+Usage of irccdctl.
+
+### Syntax
+
+The general syntax for running an irccdctl command is:
+
+````nohighlight
+irccdctl commandname arg1 arg2 arg3 ... argn
+````
+
+You can have the online documentation by typing `irccdctl help commandname`.
+
+### Shell escaping issue
+
+Some shells may discard arguments if they begins with a hash. For instance, `bash` will not understand the following
+command:
+
+````nohighlight
+$ irccdctl server-join localhost #staff
+````
+
+Instead, enclose the arguments with quotes
+
+````nohighlight
+$ irccdctl server-join localhost "#staff"
+````
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/misc/common-patterns-and-formatting.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,126 @@
+---
+title: Common patterns and formatting
+guide: yes
+---
+
+Some plugins can be configured, and some of them can use patterns to substitute variables.
+
+# Syntax
+
+The syntax is `?{}` where `?` is replaced by one of the token defined below. Braces are mandatory and cannot be ommited.
+To write a literal template construct, prepend the token twice.
+
+# Availables templates
+
+The following templates are available:
+
+  - `%`, date and time (see [Time](#time)),
+  - `#{name}`, name will be substituted from the keywords (see [Keywords](#keywords)),
+  - `${name}`, name will be substituted from the environment variable (see [Environment variables](#environment-variables)),
+  - `@{attributes}`, the attributes will be substituted to IRC colors (see [Attributes](#attributes)),
+
+# Time
+
+When you can use patterns, the date and time may be used just like `strftime(3)` so for the hours and minutes,
+you can use **%H:%M**.
+
+# Environment variables
+
+If supported, you can use environment variables like **${HOME}**. Please note that braces are mandatory.
+
+# Attributes
+
+The attribute format is composed of three parts, foreground, background and modifiers, each separated by a comma.
+
+<div class="alert alert-info" role="alert">
+**Note**: attributes and colors are not supported by all IRC clients.
+</div>
+
+<div class="alert alert-warning" role="alert">
+**Warning**: do not use colors and attributes outside IRC (e.g. for storing text in files) because escape codes are
+only valid in IRC context.
+</div>
+
+## Available colors
+
+  - white,
+  - black,
+  - blue,
+  - green,
+  - red,
+  - brown,
+  - purple,
+  - orange,
+  - yellow,
+  - lightgreen,
+  - cyan,
+  - lightcyan,
+  - lightblue,
+  - pink,
+  - grey,
+  - lightgrey.
+
+## Available attributes
+
+  - bold,
+  - italic,
+  - strike,
+  - reset,
+  - underline,
+  - underline2,
+  - reverse.
+
+# Keywords
+
+Keywords are arbitrary names that are replaced depending on the context. They are usually available to configure
+plugins.
+
+## Predefined keywords
+
+Here's the list of keywords that a lot of plugins uses:
+
+  - **#{channel}**, the channel name,
+  - **#{command}**, the command to invoke the plugin, e.g. `!ask`,
+  - **#{message}**, a message (depending on context),
+  - **#{origin}**, the full user, e.g. `markand!~mkd@localhost`,
+  - **#{nickname}**, the short nickname,
+  - **#{plugin}**, the plugin name,
+  - **#{server}**, the current server name,
+  - **#{topic}**, the topic,
+  - **#{target}**, a target, e.g. a person who gets kicked.
+
+<div class="alert alert-info" role="alert">
+**Warning**: these keywords can be overriden by plugins.
+</div>
+
+# Examples
+
+## Valid constructs
+
+  - `#{target}, welcome`: if target is set to "irccd", becomes "irccd, welcome",
+  - `@{red}#{target}`: if target is specified, it is written in red.
+
+## Invalid or literals constructs
+
+  - `##{target}`: will output "#{target}",
+  - `##`: will output "##",
+  - `#target`: will output "#target",
+  - `#{target`: will throw an error.
+
+## Colors & attributes
+
+  - `@{red,blue}`: will write text red on blue background,
+  - `@{default,yellow}`: will write default color text on yellow background,
+  - `@{white,black,bold,underline}`: will write white text on black in both bold and underline.
+
+## In the logger plugin
+
+For instance, using the **logger** plugin, it's possible to customize the pattern to use when someone joins a channel
+like that:
+
+````nohighlight
+#{origin} joined #{channel}
+````
+
+The keyword **#{origin}** will be substituted to the nickname and **#{channel}** to the channel name.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/html/misc/configuration-syntax.md	Wed Sep 14 13:36:06 2016 +0200
@@ -0,0 +1,72 @@
+---
+title: Configuration file format
+guide: yes
+toc: yes
+---
+
+Both `irccd` and `irccdctl` use configuration file in a extended [INI][ini] format.
+
+# General syntax
+
+The file syntax has following rules:
+
+  1. Each option is stored in a section,
+  2. Some sections may be redefined multiple times,
+  3. Empty option must have quotes (e.g. `option = ""`).
+
+# The @include statement
+
+Irccd adds an extension to this format by adding an `@include` keyword which let you splitting your configuration file.
+
+<div class="alert alert-info" role="alert">
+**Note:** this `@include` statement must be at the beginning of the file and must be surrounded by quotes if the file
+name has spaces.
+</div>
+
+You can use both relative or absolute paths. If relative paths are used, they are relative to the current file being
+parsed.
+
+## Example
+
+````ini
+@include "rules.conf"
+@include "servers.conf"
+
+[mysection]
+myoption = "1"
+````
+
+# The list construct
+
+When requested, an option can have multiples values in a list. The syntax uses parentheses and values are separated
+by commas.
+
+If the list have only one value, you can just use a simple string.
+
+## Examples
+
+<div class="panel panel-success">
+ <div class="panel-heading">**Example:** two servers defined in a rule</div>
+ <div class="panel-body">
+````ini
+[rule]
+servers = ( "server1", "server2" )
+````
+ </div>
+</div>
+
+<div class="panel panel-success">
+ <div class="panel-heading">**Example:** only one server</div>
+ <div class="panel-body">
+````ini
+[rule]
+servers = "only-one-server"
+````
+ </div>
+</div>
+
+<div class="alert alert-info" role="alert">
+**Note:** spaces are completely optional.
+</div>
+
+[ini]: https://en.wikipedia.org/wiki/INI_file
--- a/doc/html/resources/CMakeLists.txt	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/resources/CMakeLists.txt	Wed Sep 14 13:36:06 2016 +0200
@@ -58,7 +58,9 @@
 
 add_custom_target(
     docs-resources
-    SOURCES ${SOURCES}
+    SOURCES
+        ${SOURCES}
+        ${resources_SOURCE_DIR}/template.html
     DEPENDS ${OUTPUTS}
 )
 
--- a/doc/html/resources/template.html	Tue Sep 13 13:01:31 2016 +0200
+++ b/doc/html/resources/template.html	Wed Sep 14 13:36:06 2016 +0200
@@ -77,7 +77,9 @@
 
     <!-- Side bar for guide -->
 $if(guide)$
+<nav id="toc">
 $toc$
+</nav>
 $endif$ <!-- endif guide -->
 
     </div><!-- Side bar -->
@@ -176,5 +178,8 @@
     <script src="$baseurl$/js/highlight.js"></script>
     <script>hljs.initHighlightingOnLoad();</script>
     <script>jQuery("table").addClass("table");</script>
+    <script>jQuery("#toc").addClass("nav");</script>
+    <script>jQuery("#toc").addClass("nav-sidebar");</script>
+    <script>jQuery("nav ul").addClass("nav");</script>
   </body>
 </html>