changeset 207:6635b9187d71

Irccd: switch to 4 spaces indent, #518
author David Demelier <markand@malikania.fr>
date Tue, 21 Jun 2016 20:52:17 +0200
parents 11808e98218f
children b9c3a58d193b
files .editorconfig CMakeLists.txt cmake/IrccdOptions.cmake cmake/IrccdPackage.cmake cmake/IrccdSystem.cmake cmake/IrccdVersion.cmake cmake/check/PutTime.cmake cmake/function/IrccdDefineExecutable.cmake cmake/function/IrccdDefineHtml.cmake cmake/function/IrccdDefineLibrary.cmake cmake/function/IrccdDefineMan.cmake cmake/function/IrccdDefinePlugin.cmake cmake/function/IrccdDefineTest.cmake cmake/installer/config/config.xml.in cmake/installer/packages/docs.xml.in cmake/installer/packages/irccd.xml.in cmake/installer/packages/irccdctl.xml.in cmake/installer/packages/meta-plugins.xml.in cmake/installer/packages/meta-programs.xml.in cmake/installer/packages/plugin.xml.in cmake/internal/sysconfig.hpp.in cmake/packages/FindPandoc.cmake contrib/CMakeLists.txt doc/CMakeLists.txt doc/doxygen/CMakeLists.txt doc/doxygen/Doxyfile.in doc/examples/CMakeLists.txt doc/examples/irccd.conf doc/examples/irccdctl.conf doc/examples/template-plugin.cpp doc/html/CMakeLists.txt doc/html/api/CMakeLists.txt doc/html/api/event/Files.cmake doc/html/api/module/Irccd.Directory/Files.cmake doc/html/api/module/Irccd.ElapsedTimer/Files.cmake doc/html/api/module/Irccd.File/Files.cmake doc/html/api/module/Irccd.Logger/Files.cmake doc/html/api/module/Irccd.Logger/index.md doc/html/api/module/Irccd.Plugin/Files.cmake doc/html/api/module/Irccd.Server/Files.cmake doc/html/api/module/Irccd.Server/function/list.md doc/html/api/module/Irccd.Server/method/constructor.md doc/html/api/module/Irccd.System/Files.cmake doc/html/api/module/Irccd.Timer/Files.cmake doc/html/api/module/Irccd.Timer/method/constructor.md doc/html/api/module/Irccd.Unicode/Files.cmake doc/html/api/module/Irccd.Util/Files.cmake doc/html/api/module/Irccd.Util/function/format.md doc/html/api/module/Irccd/Files.cmake doc/html/api/module/Irccd/index.md doc/html/guide/01-intro/Files.cmake doc/html/guide/02-install/Files.cmake 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/Files.cmake doc/html/guide/06-plugin/04-metadata.md doc/html/guide/06-plugin/Files.cmake doc/html/guide/07-socket/Files.cmake doc/html/guide/CMakeLists.txt doc/html/resources/CMakeLists.txt doc/html/resources/css/doc-guide.css doc/html/resources/css/doc.css doc/html/resources/fonts/glyphicons-halflings-regular.eot doc/html/resources/fonts/glyphicons-halflings-regular.ttf doc/html/resources/fonts/glyphicons-halflings-regular.woff doc/html/resources/fonts/glyphicons-halflings-regular.woff2 doc/html/resources/js/highlight.js doc/man/CMakeLists.txt extern/cppformat/CMakeLists.txt extern/duktape/CMakeLists.txt extern/gtest/CMakeLists.txt extern/jansson/CMakeLists.txt extern/libircclient/CMakeLists.txt irccd/CMakeLists.txt irccd/main.cpp irccdctl/CMakeLists.txt irccdctl/main.cpp lib/CMakeLists.txt lib/irccd/CMakeSources.cmake lib/irccd/alias.cpp lib/irccd/alias.hpp lib/irccd/cmd-help.cpp lib/irccd/cmd-help.hpp lib/irccd/cmd-plugin-config.cpp lib/irccd/cmd-plugin-config.hpp lib/irccd/cmd-plugin-info.cpp lib/irccd/cmd-plugin-info.hpp lib/irccd/cmd-plugin-list.cpp lib/irccd/cmd-plugin-list.hpp lib/irccd/cmd-plugin-load.cpp lib/irccd/cmd-plugin-load.hpp lib/irccd/cmd-plugin-reload.cpp lib/irccd/cmd-plugin-reload.hpp lib/irccd/cmd-plugin-unload.cpp lib/irccd/cmd-plugin-unload.hpp lib/irccd/cmd-server-cmode.cpp lib/irccd/cmd-server-cmode.hpp lib/irccd/cmd-server-cnotice.cpp lib/irccd/cmd-server-cnotice.hpp lib/irccd/cmd-server-connect.cpp lib/irccd/cmd-server-connect.hpp lib/irccd/cmd-server-disconnect.cpp lib/irccd/cmd-server-disconnect.hpp lib/irccd/cmd-server-info.cpp lib/irccd/cmd-server-info.hpp lib/irccd/cmd-server-invite.cpp lib/irccd/cmd-server-invite.hpp lib/irccd/cmd-server-join.cpp lib/irccd/cmd-server-join.hpp lib/irccd/cmd-server-kick.cpp lib/irccd/cmd-server-kick.hpp lib/irccd/cmd-server-list.cpp lib/irccd/cmd-server-list.hpp lib/irccd/cmd-server-me.cpp lib/irccd/cmd-server-me.hpp lib/irccd/cmd-server-message.cpp lib/irccd/cmd-server-message.hpp lib/irccd/cmd-server-mode.cpp lib/irccd/cmd-server-mode.hpp lib/irccd/cmd-server-nick.cpp lib/irccd/cmd-server-nick.hpp lib/irccd/cmd-server-notice.cpp lib/irccd/cmd-server-notice.hpp lib/irccd/cmd-server-part.cpp lib/irccd/cmd-server-part.hpp lib/irccd/cmd-server-reconnect.cpp lib/irccd/cmd-server-reconnect.hpp lib/irccd/cmd-server-topic.cpp lib/irccd/cmd-server-topic.hpp lib/irccd/cmd-watch.cpp lib/irccd/cmd-watch.hpp lib/irccd/command.cpp lib/irccd/command.hpp lib/irccd/config.cpp lib/irccd/config.hpp lib/irccd/connection.cpp lib/irccd/connection.hpp lib/irccd/duktape.hpp lib/irccd/dynlib.hpp lib/irccd/elapsed-timer.cpp lib/irccd/elapsed-timer.hpp lib/irccd/fs.cpp lib/irccd/fs.hpp lib/irccd/ini.cpp lib/irccd/ini.hpp lib/irccd/irccd.cpp lib/irccd/irccd.hpp lib/irccd/irccdctl.cpp lib/irccd/irccdctl.hpp lib/irccd/json.cpp lib/irccd/json.hpp lib/irccd/logger.cpp lib/irccd/logger.hpp lib/irccd/mod-directory.cpp lib/irccd/mod-directory.hpp lib/irccd/mod-elapsed-timer.cpp lib/irccd/mod-elapsed-timer.hpp lib/irccd/mod-file.cpp lib/irccd/mod-file.hpp lib/irccd/mod-irccd.cpp lib/irccd/mod-irccd.hpp lib/irccd/mod-logger.cpp lib/irccd/mod-logger.hpp lib/irccd/mod-plugin.cpp lib/irccd/mod-plugin.hpp lib/irccd/mod-server.cpp lib/irccd/mod-server.hpp lib/irccd/mod-system.cpp lib/irccd/mod-system.hpp lib/irccd/mod-timer.cpp lib/irccd/mod-timer.hpp lib/irccd/mod-unicode.cpp lib/irccd/mod-unicode.hpp lib/irccd/mod-util.cpp lib/irccd/mod-util.hpp lib/irccd/module.hpp lib/irccd/net.hpp lib/irccd/options.cpp lib/irccd/options.hpp lib/irccd/path.cpp lib/irccd/path.hpp lib/irccd/plugin-dynlib.cpp lib/irccd/plugin-dynlib.hpp lib/irccd/plugin-js.cpp lib/irccd/plugin-js.hpp lib/irccd/plugin.hpp lib/irccd/rule.cpp lib/irccd/rule.hpp lib/irccd/server-event.cpp lib/irccd/server-event.hpp lib/irccd/server-private.hpp lib/irccd/server-state-connected.cpp lib/irccd/server-state-connected.hpp lib/irccd/server-state-connecting.cpp lib/irccd/server-state-connecting.hpp lib/irccd/server-state-disconnected.cpp lib/irccd/server-state-disconnected.hpp lib/irccd/server-state.hpp lib/irccd/server.cpp lib/irccd/server.hpp lib/irccd/service-command.cpp lib/irccd/service-command.hpp lib/irccd/service-interrupt.cpp lib/irccd/service-interrupt.hpp lib/irccd/service-module.cpp lib/irccd/service-module.hpp lib/irccd/service-plugin.cpp lib/irccd/service-plugin.hpp lib/irccd/service-rule.cpp lib/irccd/service-rule.hpp lib/irccd/service-server.cpp lib/irccd/service-server.hpp lib/irccd/service-transport.cpp lib/irccd/service-transport.hpp lib/irccd/service.hpp lib/irccd/signals.hpp lib/irccd/system.cpp lib/irccd/timer.cpp lib/irccd/timer.hpp lib/irccd/transport-client.cpp lib/irccd/transport-client.hpp lib/irccd/transport-server.cpp lib/irccd/transport-server.hpp lib/irccd/unicode.cpp lib/irccd/unicode.hpp lib/irccd/util.cpp lib/irccd/util.hpp lib/irccd/xdg.hpp plugins/CMakeLists.txt plugins/ask/ask.js plugins/auth/auth.js plugins/hangman/hangman.js plugins/history/history.js plugins/logger/logger.js plugins/plugin/plugin.js plugins/roulette/roulette.js tests/CMakeLists.txt tests/command/CMakeLists.txt tests/command/main.cpp tests/elapsedtimer/CMakeLists.txt tests/elapsedtimer/main.cpp tests/js-elapsedtimer/CMakeLists.txt tests/js-elapsedtimer/main.cpp tests/js-file/CMakeLists.txt tests/js-file/main.cpp tests/js-irccd/CMakeLists.txt tests/js-irccd/main.cpp tests/js-logger/CMakeLists.txt tests/js-logger/main.cpp tests/js-system/CMakeLists.txt tests/js-system/main.cpp tests/js-timer/CMakeLists.txt tests/js-timer/main.cpp tests/js-timer/timer-pending.js tests/js-timer/timer-repeat.js tests/js-timer/timer-single.js tests/js-unicode/CMakeLists.txt tests/js-unicode/main.cpp tests/js-util/CMakeLists.txt tests/js-util/main.cpp tests/logger/CMakeLists.txt tests/logger/main.cpp tests/path/CMakeLists.txt tests/path/main.cpp tests/plugin-ask/CMakeLists.txt tests/plugin-ask/main.cpp tests/plugin-auth/CMakeLists.txt tests/plugin-auth/main.cpp tests/plugin-hangman/CMakeLists.txt tests/plugin-hangman/main.cpp tests/plugin-history/CMakeLists.txt tests/plugin-history/main.cpp tests/plugin-logger/CMakeLists.txt tests/plugin-logger/main.cpp tests/plugin-plugin/CMakeLists.txt tests/plugin-plugin/main.cpp tests/rules/CMakeLists.txt tests/rules/main.cpp tests/timer/CMakeLists.txt tests/timer/main.cpp tests/util/CMakeLists.txt tests/util/main.cpp win32/CMakeLists.txt
diffstat 284 files changed, 23062 insertions(+), 23086 deletions(-) [+]
line wrap: on
line diff
--- a/.editorconfig	Tue Jun 21 12:36:46 2016 +0200
+++ b/.editorconfig	Tue Jun 21 20:52:17 2016 +0200
@@ -1,11 +1,9 @@
 root = true
 
 [*]
+charset = utf-8
 end_of_line = lf
 insert_final_newline = true
-charset = utf-8
+indent_style = space
+indent_size = 4
 trim_trailing_whitespace = true
-
-[*.md]
-indent_style = space
-indent_size = 2
--- a/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -22,27 +22,27 @@
 #
 # If you plan to modify the build system there are several places to look to do what you want.
 #
-# cmake/IrccdOptions.cmake	- User definable options.
-# cmake/IrccdPackage.cmake	- Package creation.
-# cmake/IrccdSystem.cmake	- Contains some platforms checks and compile flags.
-# cmake/IrccdVersion.cmake	- Defines the Irccd version and its plugins.
-# cmake/check			- Platform checks in separate files.
-# cmake/function		- Custom functions.
-# cmake/installer		- Some files for the QtIFW installer.
-# cmake/internal		- Some internal files (e.g. the sysconfig.h)
-# cmake/packages		- Additional find_package modules.
+# cmake/IrccdOptions.cmake    - User definable options.
+# cmake/IrccdPackage.cmake    - Package creation.
+# cmake/IrccdSystem.cmake    - Contains some platforms checks and compile flags.
+# cmake/IrccdVersion.cmake    - Defines the Irccd version and its plugins.
+# cmake/check            - Platform checks in separate files.
+# cmake/function        - Custom functions.
+# cmake/installer        - Some files for the QtIFW installer.
+# cmake/internal        - Some internal files (e.g. the sysconfig.h)
+# cmake/packages        - Additional find_package modules.
 #
 # Build system is then processed in different directories:
 #
-# contrib			- User contributions not maintained by irccd authors.
-# doc				- The documentation process.
-# extern			- External libraries.
-# lib				- The irccd library
-# irccd				- The irccd executable.
-# irccdctl			- The irccdctl utility.
-# plugins			- Official irccd plugins.
-# tests				- The unit tests.
-# win32				- Additional files for Windows platform.
+# contrib            - User contributions not maintained by irccd authors.
+# doc                - The documentation process.
+# extern            - External libraries.
+# lib                - The irccd library
+# irccd                - The irccd executable.
+# irccdctl            - The irccdctl utility.
+# plugins            - Official irccd plugins.
+# tests                - The unit tests.
+# win32                - Additional files for Windows platform.
 #
 
 cmake_minimum_required(VERSION 3.3)
@@ -78,12 +78,12 @@
 add_subdirectory(contrib)
 
 if (WITH_JS)
-	add_subdirectory(plugins)
+    add_subdirectory(plugins)
 endif ()
 
 # Platform specific.
 if (WIN32)
-	add_subdirectory(win32)
+    add_subdirectory(win32)
 endif ()
 
 # Tests.
@@ -107,20 +107,20 @@
 
 message("Installing plugins:")
 foreach (plugin ${IRCCD_PLUGINS})
-	string(TOUPPER ${plugin} name)
-	string(LENGTH ${plugin} length)
-	set(str "    ${plugin}:")
+    string(TOUPPER ${plugin} name)
+    string(LENGTH ${plugin} length)
+    set(str "    ${plugin}:")
 
-	#
-	# Build a string to indent the output correctly because tabs do not work well in all windows
-	# (e.g. CMake's GUI, QtCreator...)
-	#
-	while (${length} LESS 17)
-		math(EXPR length "${length} + 1")
-		set(str "${str} ")
-	endwhile ()
+    #
+    # Build a string to indent the output correctly because tabs do not work well in all windows
+    # (e.g. CMake's GUI, QtCreator...)
+    #
+    while (${length} LESS 17)
+        math(EXPR length "${length} + 1")
+        set(str "${str} ")
+    endwhile ()
 
-	message("${str}${WITH_PLUGIN_${name}_MSG}")
+    message("${str}${WITH_PLUGIN_${name}_MSG}")
 endforeach ()
 
 message("")
@@ -131,12 +131,12 @@
 
 # Meta release target.
 #if (IRCCD_PACKAGE)
-#	add_custom_target(
-#		release
-#		COMMENT "Releasing irccd ${IRCCD_VERSION}"
-#		COMMAND
-#			${CMAKE_MAKE_PROGRAM} package_source
-#	)
+#    add_custom_target(
+#        release
+#        COMMENT "Releasing irccd ${IRCCD_VERSION}"
+#        COMMAND
+#            ${CMAKE_MAKE_PROGRAM} package_source
+#    )
 #
-#	add_dependencies(release package_ifw)
+#    add_dependencies(release package_ifw)
 #endif ()
--- a/cmake/IrccdOptions.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/IrccdOptions.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -19,16 +19,16 @@
 #
 # Options that controls the build:
 #
-# WITH_SSL		Enable OpenSSL (default: on)
-# WITH_JS		Enable JavaScript (default: on)
-# WITH_TESTS		Enable unit testing (default: off)
-# WITH_SYSTEMD		Install systemd service (default: on for Linux)
-# WITH_DOCS		Enable building of all documentation (default: on)
-# WITH_DOXYGEN		Enable internal irccd documentation (default: on)
-# WITH_HTML		Enable HTML documentation
-# WITH_MAN		Install manpages (default: on, off for Windows)
-# WITH_PKGCONFIG	Install pkg-config files (default: on, off for Windows (except MinGW))
-# WITH_PLUGIN_<NAME>	Enable or disable the specified plugin (default: on)
+# WITH_SSL              Enable OpenSSL (default: on)
+# WITH_JS               Enable JavaScript (default: on)
+# WITH_TESTS            Enable unit testing (default: off)
+# WITH_SYSTEMD          Install systemd service (default: on for Linux)
+# WITH_DOCS             Enable building of all documentation (default: on)
+# WITH_DOXYGEN          Enable internal irccd documentation (default: on)
+# WITH_HTML             Enable HTML documentation
+# WITH_MAN              Install manpages (default: on, off for Windows)
+# WITH_PKGCONFIG        Install pkg-config files (default: on, off for Windows (except MinGW))
+# WITH_PLUGIN_<NAME>    Enable or disable the specified plugin (default: on)
 #
 # Note: the option() commands for WITH_PLUGIN_<name> variables are defined automatically from the IRCCD_PLUGINS
 # list.
@@ -37,42 +37,42 @@
 #
 # Options that controls both installations and the irccd runtime:
 #
-# WITH_BINDIR		Binary directory for irccd, irccdctl
-# WITH_PLUGINDIR	Path where plugins must be installed
-# WITH_DOCDIR		Path where to install documentation
-# WITH_MANDIR		Path where to install manuals
-# WITH_CONFDIR		Path where to search configuration files
-# WITH_CACHEDIR		Path where to store temporary files
-# WITH_PKGCONFIGDIR	Path where to install pkg-config files
-# WITH_SYSTEMDDIR	Path where to install systemd unit file
+# WITH_BINDIR           Binary directory for irccd, irccdctl
+# WITH_PLUGINDIR        Path where plugins must be installed
+# WITH_DOCDIR           Path where to install documentation
+# WITH_MANDIR           Path where to install manuals
+# WITH_CONFDIR          Path where to search configuration files
+# WITH_CACHEDIR         Path where to store temporary files
+# WITH_PKGCONFIGDIR     Path where to install pkg-config files
+# WITH_SYSTEMDDIR       Path where to install systemd unit file
 #
 
 #
 # Options for unit tests only:
 #
-# WITH_TEST_IRCHOST	Which IRC server to use for tests (default: 127.0.0.1)
-# WITH_TEST_IRCPORT	Which IRC server port to use for tests (default: 6667)
+# WITH_TEST_IRCHOST     Which IRC server to use for tests (default: 127.0.0.1)
+# WITH_TEST_IRCPORT     Which IRC server port to use for tests (default: 6667)
 #
 
 # Manual pages on Windows are pretty useless.
 if (WIN32)
-	set(DEFAULT_MAN "No")
+    set(DEFAULT_MAN "No")
 else ()
-	set(DEFAULT_MAN "Yes")
+    set(DEFAULT_MAN "Yes")
 endif ()
 
 # Systemd unit file
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")
-	set(DEFAULT_SYSTEMD "Yes")
+    set(DEFAULT_SYSTEMD "Yes")
 else ()
-	set(DEFAULT_SYSTEMD "No")
+    set(DEFAULT_SYSTEMD "No")
 endif ()
 
 # pkg-config is only relevant on UNIX or MinGW
 if (MINGW OR UNIX)
-	set(DEFAULT_PKGCONFIG "Yes")
+    set(DEFAULT_PKGCONFIG "Yes")
 else ()
-	set(DEFAULT_PKGCONFIG "No")
+    set(DEFAULT_PKGCONFIG "No")
 endif ()
 
 option(WITH_SSL "Enable SSL" On)
@@ -87,14 +87,14 @@
 
 # Build options for all plugins.
 foreach (plugin ${IRCCD_PLUGINS})
-	string(TOUPPER ${plugin} optname)
-	option(WITH_PLUGIN_${optname} "Enable ${plugin} plugin" On)
+    string(TOUPPER ${plugin} optname)
+    option(WITH_PLUGIN_${optname} "Enable ${plugin} plugin" On)
 
-	if (NOT WITH_PLUGIN_${optname})
-		set(WITH_PLUGIN_${optname}_MSG "No (disabled by user)")
-	else ()
-		set(WITH_PLUGIN_${optname}_MSG "Yes")
-	endif ()
+    if (NOT WITH_PLUGIN_${optname})
+        set(WITH_PLUGIN_${optname}_MSG "No (disabled by user)")
+    else ()
+        set(WITH_PLUGIN_${optname}_MSG "Yes")
+    endif ()
 endforeach ()
 
 set(WITH_TEST_IRCHOST "127.0.0.1" CACHE STRING "IRC host for tests")
@@ -116,24 +116,24 @@
 # directories again.
 #
 if (WIN32)
-	set(WITH_DATADIR "share" CACHE STRING "Data directory")
-	set(WITH_CACHEDIR "var" CACHE STRING "Temporary files directory")
-	set(WITH_PLUGINDIR "share/plugins" CACHE STRING "Module prefix where to install")
-	set(WITH_DOCDIR "share/doc" CACHE STRING "Documentation directory")
+    set(WITH_DATADIR "share" CACHE STRING "Data directory")
+    set(WITH_CACHEDIR "var" CACHE STRING "Temporary files directory")
+    set(WITH_PLUGINDIR "share/plugins" CACHE STRING "Module prefix where to install")
+    set(WITH_DOCDIR "share/doc" CACHE STRING "Documentation directory")
 else ()
-	set(WITH_DATADIR "share/irccd" CACHE STRING "Data directory")
-	set(WITH_CACHEDIR "var/irccd" CACHE STRING "Temporary files directory")
-	set(WITH_PLUGINDIR "share/irccd/plugins" CACHE STRING "Module prefix where to install")
-	set(WITH_DOCDIR "share/doc/irccd" CACHE STRING "Documentation directory")
+    set(WITH_DATADIR "share/irccd" CACHE STRING "Data directory")
+    set(WITH_CACHEDIR "var/irccd" CACHE STRING "Temporary files directory")
+    set(WITH_PLUGINDIR "share/irccd/plugins" CACHE STRING "Module prefix where to install")
+    set(WITH_DOCDIR "share/doc/irccd" CACHE STRING "Documentation directory")
 endif ()
 
 #
 # Check if any of these path is absolute and raise an error if true.
 #
 foreach (d WITH_BINDIR WITH_CACHEDIR WITH_DATADIR WITH_CONFDIR WITH_PLUGINDIR)
-	if (IS_ABSOLUTE ${${d}})
-		message(FATAL_ERROR "${d} can not be absolute (${${d}} given)")
-	endif ()
+    if (IS_ABSOLUTE ${${d}})
+        message(FATAL_ERROR "${d} can not be absolute (${${d}} given)")
+    endif ()
 endforeach ()
 
 # ---------------------------------------------------------
@@ -141,17 +141,17 @@
 # ---------------------------------------------------------
 
 if (WITH_JS)
-	add_subdirectory(extern/duktape)
-	set(WITH_JS_MSG "Yes")
+    add_subdirectory(extern/duktape)
+    set(WITH_JS_MSG "Yes")
 else ()
-	set(WITH_JS_MSG "No")
+    set(WITH_JS_MSG "No")
 endif ()
 
 if (WITH_TESTS)
-	add_subdirectory(extern/gtest)
-	set(WITH_TESTS_MSG "Yes")
+    add_subdirectory(extern/gtest)
+    set(WITH_TESTS_MSG "Yes")
 else ()
-	set(WITH_TESTS_MSG "No")
+    set(WITH_TESTS_MSG "No")
 endif ()
 
 # ---------------------------------------------------------
@@ -163,43 +163,43 @@
 find_package(OpenSSL)
 
 if (NOT WITH_DOCS)
-	set(WITH_HTML FALSE)
-	set(WITH_DOXYGEN FALSE)
-	set(WITH_MAN FALSE)
+    set(WITH_HTML FALSE)
+    set(WITH_DOXYGEN FALSE)
+    set(WITH_MAN FALSE)
 endif ()
 
 if (WITH_SSL)
-	if (OPENSSL_FOUND)
-		set(WITH_SSL_MSG "Yes")
-	else ()
-		set(WITH_SSL_MSG "No (OpenSSL not found)")
-		set(WITH_SSL FALSE)
-	endif ()
+    if (OPENSSL_FOUND)
+        set(WITH_SSL_MSG "Yes")
+    else ()
+        set(WITH_SSL_MSG "No (OpenSSL not found)")
+        set(WITH_SSL FALSE)
+    endif ()
 else()
-	set(WITH_SSL_MSG "No (disabled by user)")
+    set(WITH_SSL_MSG "No (disabled by user)")
 endif ()
 
 if (WITH_DOXYGEN)
-	if (DOXYGEN_FOUND)
-		set(WITH_DOXYGEN_MSG "Yes")
-	else ()
-		set(WITH_DOXYGEN_MSG "No (doxygen not found)")
-		set(WITH_DOXYGEN FALSE)
-	endif ()
+    if (DOXYGEN_FOUND)
+        set(WITH_DOXYGEN_MSG "Yes")
+    else ()
+        set(WITH_DOXYGEN_MSG "No (doxygen not found)")
+        set(WITH_DOXYGEN FALSE)
+    endif ()
 else ()
-	set(WITH_DOXYGEN_MSG "No (disabled by user)")
+    set(WITH_DOXYGEN_MSG "No (disabled by user)")
 endif ()
 
 if (WITH_HTML)
-	if (Pandoc_FOUND)
-		set(WITH_HTML_MSG "Yes")
-	else ()
-		set(WITH_HTML_MSG "No (pandoc not found)")
-		set(WITH_HTML FALSE)
-	endif ()
+    if (Pandoc_FOUND)
+        set(WITH_HTML_MSG "Yes")
+    else ()
+        set(WITH_HTML_MSG "No (pandoc not found)")
+        set(WITH_HTML FALSE)
+    endif ()
 else ()
-	set(WITH_HTML_MSG "No (disabled by user)")
-	set(WITH_HTML FALSE)
+    set(WITH_HTML_MSG "No (disabled by user)")
+    set(WITH_HTML FALSE)
 endif ()
 
 #
@@ -214,22 +214,22 @@
 set(IRCCD_PACKAGE FALSE)
 
 if (NOT WITH_HTML)
-	set(IRCCD_PACKAGE_MSG "No (HTML documentation disabled)")
+    set(IRCCD_PACKAGE_MSG "No (HTML documentation disabled)")
 elseif (NOT WIN32)
-	set(IRCCD_PACKAGE_MSG "No (only for Windows)")
+    set(IRCCD_PACKAGE_MSG "No (only for Windows)")
 elseif (NOT QtIFW_FOUND)
-	set(IRCCD_PACKAGE_MSG "No (QtIFW not found)")
+    set(IRCCD_PACKAGE_MSG "No (QtIFW not found)")
 else ()
-	# Now check that a plugin has not been disabled.
-	set(IRCCD_PACKAGE TRUE)
-	set(IRCCD_PACKAGE_MSG "Yes")
+    # Now check that a plugin has not been disabled.
+    set(IRCCD_PACKAGE TRUE)
+    set(IRCCD_PACKAGE_MSG "Yes")
 
-	foreach (plugin ${IRCCD_PLUGINS})
-		string(TOUPPER ${plugin} optname)
+    foreach (plugin ${IRCCD_PLUGINS})
+        string(TOUPPER ${plugin} optname)
 
-		if (NOT WITH_PLUGIN_${optname})
-			set(IRCCD_PACKAGE FALSE)
-			set(IRCCD_PACKAGE_MSG "No (Plugin ${plugin} disabled)")
-		endif ()
-	endforeach ()
+        if (NOT WITH_PLUGIN_${optname})
+            set(IRCCD_PACKAGE FALSE)
+            set(IRCCD_PACKAGE_MSG "No (Plugin ${plugin} disabled)")
+        endif ()
+    endforeach ()
 endif ()
--- a/cmake/IrccdPackage.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/IrccdPackage.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -26,20 +26,20 @@
 #
 
 if (WIN32)
-	set(PKGSYS "Windows")
-	set(PKGSUFFIX "exe")
+    set(PKGSYS "Windows")
+    set(PKGSUFFIX "exe")
 
-	if (IRCCD_64BITS)
-		set(PKGTARGETDIR "C:/Program Files/irccd-${IRCCD_VERSION}")
-	else ()
-		set(PKGTARGETDIR "C:/Program Files (x86)/irccd-${IRCCD_VERSION}")
-	endif ()
+    if (IRCCD_64BITS)
+        set(PKGTARGETDIR "C:/Program Files/irccd-${IRCCD_VERSION}")
+    else ()
+        set(PKGTARGETDIR "C:/Program Files (x86)/irccd-${IRCCD_VERSION}")
+    endif ()
 endif ()
 
 if (IRCCD_64BITS)
-	set(PKGARCH "amd64")
+    set(PKGARCH "amd64")
 else ()
-	set(PKGARCH "x86")
+    set(PKGARCH "x86")
 endif ()
 
 #
@@ -49,62 +49,62 @@
 
 # Custom package_ifw on Windows
 if (IRCCD_PACKAGE)
-	set(CONFDIR ${CMAKE_BINARY_DIR}/installer/config)
-	set(PKGDIR ${CMAKE_BINARY_DIR}/installer/packages)
-	set(PKGNAME "irccd-${IRCCD_VERSION}-${PKGSYS}-${PKGARCH}.${PKGSUFFIX}")
+    set(CONFDIR ${CMAKE_BINARY_DIR}/installer/config)
+    set(PKGDIR ${CMAKE_BINARY_DIR}/installer/packages)
+    set(PKGNAME "irccd-${IRCCD_VERSION}-${PKGSYS}-${PKGARCH}.${PKGSUFFIX}")
 
-	# Configure some QtIFW files and their meta packages.
-	file(COPY cmake/installer/LICENSE DESTINATION ${PKGDIR}/base/meta)
+    # Configure some QtIFW files and their meta packages.
+    file(COPY cmake/installer/LICENSE DESTINATION ${PKGDIR}/base/meta)
 
-	# QtIFW configuration file
-	configure_file(cmake/installer/config/config.xml.in ${CONFDIR}/config.xml)
+    # QtIFW configuration file
+    configure_file(cmake/installer/config/config.xml.in ${CONFDIR}/config.xml)
 
-	# Meta packages
-	configure_file(cmake/installer/packages/meta-programs.xml.in ${PKGDIR}/base/meta/package.xml)
-	configure_file(cmake/installer/packages/meta-plugins.xml.in ${PKGDIR}/plugins/meta/package.xml)
+    # Meta packages
+    configure_file(cmake/installer/packages/meta-programs.xml.in ${PKGDIR}/base/meta/package.xml)
+    configure_file(cmake/installer/packages/meta-plugins.xml.in ${PKGDIR}/plugins/meta/package.xml)
 
-	# Irccd, irccdctl and docs
-	file(
-		MAKE_DIRECTORY 
-		${PKGDIR}/base.irccd/data/${WITH_BINDIR}
-		${PKGDIR}/base.irccdctl/data/${WITH_BINDIR}
-		${PKGDIR}/docs/data/${WITH_DOCDIR}
-	)
+    # Irccd, irccdctl and docs
+    file(
+        MAKE_DIRECTORY 
+        ${PKGDIR}/base.irccd/data/${WITH_BINDIR}
+        ${PKGDIR}/base.irccdctl/data/${WITH_BINDIR}
+        ${PKGDIR}/docs/data/${WITH_DOCDIR}
+    )
 
-	configure_file(cmake/installer/packages/irccd.xml.in ${PKGDIR}/base.irccd/meta/package.xml)
-	configure_file(cmake/installer/packages/irccd.xml.in ${PKGDIR}/base.irccdctl/meta/package.xml)
-	configure_file(cmake/installer/packages/docs.xml.in ${PKGDIR}/docs/meta/package.xml)
+    configure_file(cmake/installer/packages/irccd.xml.in ${PKGDIR}/base.irccd/meta/package.xml)
+    configure_file(cmake/installer/packages/irccd.xml.in ${PKGDIR}/base.irccdctl/meta/package.xml)
+    configure_file(cmake/installer/packages/docs.xml.in ${PKGDIR}/docs/meta/package.xml)
 
-	# Main dependencies.
-	set(dependencies irccd irccdctl all-docs)
+    # Main dependencies.
+    set(dependencies irccd irccdctl all-docs)
 
-	# Build commands for plugins.
-	foreach (plugin ${IRCCD_PLUGINS})
-		list(APPEND dependencies plugin-${plugin})
-		file(MAKE_DIRECTORY ${PKGDIR}/plugins.${plugin}/data/${WITH_PLUGINDIR})
-		set(IRCCD_PLUGIN_NAME ${plugin})
-		configure_file(cmake/installer/packages/plugin.xml.in ${PKGDIR}/plugins.${plugin}/meta/package.xml)
-		list(
-			APPEND
-			PLUGIN_COMMANDS
-			COMMAND ${CMAKE_COMMAND} -E copy ${IRCCD_FAKEDIR}/${WITH_PLUGINDIR}/${plugin}.js ${PKGDIR}/plugins.${plugin}/data/${WITH_PLUGINDIR}
-		)
-	endforeach ()
+    # Build commands for plugins.
+    foreach (plugin ${IRCCD_PLUGINS})
+        list(APPEND dependencies plugin-${plugin})
+        file(MAKE_DIRECTORY ${PKGDIR}/plugins.${plugin}/data/${WITH_PLUGINDIR})
+        set(IRCCD_PLUGIN_NAME ${plugin})
+        configure_file(cmake/installer/packages/plugin.xml.in ${PKGDIR}/plugins.${plugin}/meta/package.xml)
+        list(
+            APPEND
+            PLUGIN_COMMANDS
+            COMMAND ${CMAKE_COMMAND} -E copy ${IRCCD_FAKEDIR}/${WITH_PLUGINDIR}/${plugin}.js ${PKGDIR}/plugins.${plugin}/data/${WITH_PLUGINDIR}
+        )
+    endforeach ()
 
-	# Target for building the package.
-	add_custom_target(
-		package_ifw
-		${PLUGIN_COMMANDS}
-		COMMAND
-			${CMAKE_COMMAND} -E copy $<TARGET_FILE:irccd> ${PKGDIR}/base.irccd/data/${WITH_BINDIR}
-		COMMAND
-			${CMAKE_COMMAND} -E copy $<TARGET_FILE:irccdctl> ${PKGDIR}/base.irccdctl/data/${WITH_BINDIR}
-		COMMAND
-			${CMAKE_COMMAND} -E copy_directory ${IRCCD_FAKEDIR}/${WITH_DOCDIR} ${PKGDIR}/docs/data/${WITH_DOCDIR}
-		COMMAND
-			${QtIFW_CREATOR} -c ${CONFDIR}/config.xml -p ${PKGDIR} ${CMAKE_BINARY_DIR}/${PKGNAME}
-		COMMENT "Generating ${CMAKE_BINARY_DIR}/${PKGNAME}"
-		DEPENDS ${dependencies}
-		VERBATIM
-	)
+    # Target for building the package.
+    add_custom_target(
+        package_ifw
+        ${PLUGIN_COMMANDS}
+        COMMAND
+            ${CMAKE_COMMAND} -E copy $<TARGET_FILE:irccd> ${PKGDIR}/base.irccd/data/${WITH_BINDIR}
+        COMMAND
+            ${CMAKE_COMMAND} -E copy $<TARGET_FILE:irccdctl> ${PKGDIR}/base.irccdctl/data/${WITH_BINDIR}
+        COMMAND
+            ${CMAKE_COMMAND} -E copy_directory ${IRCCD_FAKEDIR}/${WITH_DOCDIR} ${PKGDIR}/docs/data/${WITH_DOCDIR}
+        COMMAND
+            ${QtIFW_CREATOR} -c ${CONFDIR}/config.xml -p ${PKGDIR} ${CMAKE_BINARY_DIR}/${PKGNAME}
+        COMMENT "Generating ${CMAKE_BINARY_DIR}/${PKGNAME}"
+        DEPENDS ${dependencies}
+        VERBATIM
+    )
 endif ()
--- a/cmake/IrccdSystem.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/IrccdSystem.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -32,49 +32,49 @@
 # instead.
 #
 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-	#
-	# For GCC, we require at least GCC 5.1
-	#
-	if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
-		message(FATAL_ERROR "You need at least GCC 5.1")
-	endif ()
+    #
+    # For GCC, we require at least GCC 5.1
+    #
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
+        message(FATAL_ERROR "You need at least GCC 5.1")
+    endif ()
 
-	set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14 ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14 ${CMAKE_CXX_FLAGS}")
 elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-	#
-	# LLVM/clang implemented C++14 starting from version 3.4 but the
-	# switch -std=c++14 was not available.
-	#
-	if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4")
-		message(FATAL_ERROR "You need at least Clang 3.4")
-	endif ()
+    #
+    # LLVM/clang implemented C++14 starting from version 3.4 but the
+    # switch -std=c++14 was not available.
+    #
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4")
+        message(FATAL_ERROR "You need at least Clang 3.4")
+    endif ()
 
-	if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5")
-		set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++1y ${CMAKE_CXX_FLAGS}")
-	else ()
-		set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14 ${CMAKE_CXX_FLAGS}")
-	endif ()
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5")
+        set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++1y ${CMAKE_CXX_FLAGS}")
+    else ()
+        set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14 ${CMAKE_CXX_FLAGS}")
+    endif ()
 elseif (MSVC14)
-	set(CMAKE_C_FLAGS "/DWIN32_LEAN_AND_MEAN /DNOMINMAX /wd4267 /wd4800 /D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
-	set(CMAKE_CXX_FLAGS "/DWIN32_LEAN_AND_MEAN /DNOMINMAX /wd4267 /wd4800 /D_CRT_SECURE_NO_WARNINGS /EHsc ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "/DWIN32_LEAN_AND_MEAN /DNOMINMAX /wd4267 /wd4800 /D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "/DWIN32_LEAN_AND_MEAN /DNOMINMAX /wd4267 /wd4800 /D_CRT_SECURE_NO_WARNINGS /EHsc ${CMAKE_CXX_FLAGS}")
 else ()
-	message(WARNING "Unsupported ${CMAKE_CXX_COMPILER_ID}, may not build correctly.")
+    message(WARNING "Unsupported ${CMAKE_CXX_COMPILER_ID}, may not build correctly.")
 endif ()
 
 if (MINGW)
-	set(CMAKE_CXX_FLAGS "-D_WIN32_WINNT=0x0600 ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-D_WIN32_WINNT=0x0600 ${CMAKE_CXX_FLAGS}")
 endif ()
 
 if (CMAKE_SIZEOF_VOID_P MATCHES "8")
-	set(IRCCD_64BITS TRUE)
+    set(IRCCD_64BITS TRUE)
 else ()
-	set(IRCCD_64BITS FALSE)
+    set(IRCCD_64BITS FALSE)
 endif ()
 
 set(IRCCD_FAKEROOTDIR ${CMAKE_BINARY_DIR}/fakeroot)
 
 if (NOT EXISTS ${IRCCD_FAKEROOTDIR})
-	file(MAKE_DIRECTORY ${IRCCD_FAKEROOTDIR})
+    file(MAKE_DIRECTORY ${IRCCD_FAKEROOTDIR})
 endif ()
 
 # ---------------------------------------------------------
@@ -82,17 +82,17 @@
 # ---------------------------------------------------------
 
 if (WIN32)
-	set(IRCCD_SYSTEM_WINDOWS TRUE)
+    set(IRCCD_SYSTEM_WINDOWS TRUE)
 elseif (APPLE)
-	set(IRCCD_SYSTEM_MAC TRUE)
+    set(IRCCD_SYSTEM_MAC TRUE)
 elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-	set(IRCCD_SYSTEM_FREEBSD TRUE)
+    set(IRCCD_SYSTEM_FREEBSD TRUE)
 elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
-	set(IRCCD_SYSTEM_NETBSD TRUE)
+    set(IRCCD_SYSTEM_NETBSD TRUE)
 elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-	set(IRCCD_SYSTEM_OPENBSD TRUE)
+    set(IRCCD_SYSTEM_OPENBSD TRUE)
 elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
-	set(IRCCD_SYSTEM_LINUX TRUE)
+    set(IRCCD_SYSTEM_LINUX TRUE)
 endif ()
 
 # ---------------------------------------------------------
@@ -109,7 +109,7 @@
 check_type_size(uint64_t HAVE_UINT64)
 
 if (NOT HAVE_STDINT_H)
-	message("irccd requires stdint.h or cstdint header")
+    message("irccd requires stdint.h or cstdint header")
 endif ()
 
 #
@@ -117,26 +117,26 @@
 #
 # The following variables are defined in irccd/sysconfig.h
 #
-# HAVE_ACCESS		- True if has access(2) function (and sys/types.h and sys/stat.h),
-# HAVE_DAEMON		- True if daemon(3),
-# HAVE_GETPID		- True if has getpid(2) function (and sys/types.h and unistd.h and grp.h),
-# HAVE_POPEN		- True if has popen(3) function (in stdio.h)
-# HAVE_SETGID		- True if has setgid(2) function and getgrnam(3) (and sys/types.h and unistd.h and pwd.h),
-# HAVE_SETPROGNAME	- True if setprogname(3) is available from C library,
-# HAVE_SETUID		- True if has setuid(2) function and getpwnam(3) (and sys/types.h and unistd.h and pwd.h),
-# HAVE_STAT		- True if has stat(2) function (and sys/types.h and sys/stat.h),
-# HAVE_STAT_ST_DEV	- The struct stat has st_dev field,
-# HAVE_STAT_ST_INO	- The struct stat has st_ino field,
-# HAVE_STAT_ST_NLINK	- The struct stat has st_nlink field,
-# HAVE_STAT_ST_UID	- The struct stat has st_uid field,
-# HAVE_STAT_ST_GID	- The struct stat has st_gid field,
-# HAVE_STAT_ST_ATIME	- The struct stat has st_atime field,
-# HAVE_STAT_ST_MTIME	- The struct stat has st_mtime field,
-# HAVE_STAT_ST_CTIME	- The struct stat has st_ctime field,
-# HAVE_STAT_ST_SIZE	- The struct stat has st_size field,
-# HAVE_STAT_ST_BLKSIZE	- The struct stat has st_blksize field,
-# HAVE_STAT_ST_BLOCKS	- The struct stat has st_blocks field,
-# HAVE_SYSLOG		- True if syslog functions are available (and syslog.h),
+# HAVE_ACCESS           True if has access(2) function (and sys/types.h and sys/stat.h),
+# HAVE_DAEMON           True if daemon(3),
+# HAVE_GETPID           True if has getpid(2) function (and sys/types.h and unistd.h and grp.h),
+# HAVE_POPEN            True if has popen(3) function (in stdio.h)
+# HAVE_SETGID           True if has setgid(2) function and getgrnam(3) (and sys/types.h and unistd.h and pwd.h),
+# HAVE_SETPROGNAME      True if setprogname(3) is available from C library,
+# HAVE_SETUID           True if has setuid(2) function and getpwnam(3) (and sys/types.h and unistd.h and pwd.h),
+# HAVE_STAT             True if has stat(2) function (and sys/types.h and sys/stat.h),
+# HAVE_STAT_ST_DEV      The struct stat has st_dev field,
+# HAVE_STAT_ST_INO      The struct stat has st_ino field,
+# HAVE_STAT_ST_NLINK    The struct stat has st_nlink field,
+# HAVE_STAT_ST_UID      The struct stat has st_uid field,
+# HAVE_STAT_ST_GID      The struct stat has st_gid field,
+# HAVE_STAT_ST_ATIME    The struct stat has st_atime field,
+# HAVE_STAT_ST_MTIME    The struct stat has st_mtime field,
+# HAVE_STAT_ST_CTIME    The struct stat has st_ctime field,
+# HAVE_STAT_ST_SIZE     The struct stat has st_size field,
+# HAVE_STAT_ST_BLKSIZE  The struct stat has st_blksize field,
+# HAVE_STAT_ST_BLOCKS   The struct stat has st_blocks field,
+# HAVE_SYSLOG           True if syslog functions are available (and syslog.h),
 #
 
 # Check for unistd.h
@@ -163,7 +163,7 @@
 check_function_exists(access HAVE_ACCESS)
 
 if (NOT HAVE_UNISTD_H)
-	set(HAVE_ACCESS FALSE)
+    set(HAVE_ACCESS FALSE)
 endif ()
 
 # getpid() function
@@ -175,7 +175,7 @@
 check_function_exists(getpid HAVE_GETPID)
 
 if (NOT HAVE_UNISTD_H OR NOT HAVE_SYS_TYPES_H)
-	set(HAVE_GETPID FALSE)
+    set(HAVE_GETPID FALSE)
 endif ()
 
 # setgid() function (and getgrnam)
@@ -184,13 +184,13 @@
 #
 # #include <sys/types.h>
 # #include <unistd.h>
-# #include <grp.h>		// only for getgrnam
+# #include <grp.h>        // only for getgrnam
 check_include_file(grp.h HAVE_GRP_H)
 check_function_exists(getgrnam HAVE_GETGRNAM)
 check_function_exists(setgid HAVE_SETGID)
 
 if (NOT HAVE_UNISTD_H OR NOT HAVE_SYS_TYPES_H OR NOT HAVE_GETGRNAM OR NOT HAVE_GRP_H)
-	set(HAVE_SETGID FALSE)
+    set(HAVE_SETGID FALSE)
 endif ()
 
 # popen() function
@@ -206,13 +206,13 @@
 #
 # #include <sys/types.h>
 # #include <unistd.h>
-# #include <pwd.h>		// only for getpwnam
+# #include <pwd.h>        // only for getpwnam
 check_include_file(pwd.h HAVE_PWD_H)
 check_function_exists(getpwnam HAVE_GETPWNAM)
 check_function_exists(setuid HAVE_SETUID)
 
 if (NOT HAVE_UNISTD_H OR NOT HAVE_SYS_TYPES_H OR NOT HAVE_GETPWNAM OR NOT HAVE_PWD_H)
-	set(HAVE_SETUID FALSE)
+    set(HAVE_SETUID FALSE)
 endif ()
 
 # stat(2) function
@@ -226,7 +226,7 @@
 
 # If the sys/stat.h is not found, we disable stat(2)
 if (NOT HAVE_SYS_STAT_H OR NOT HAVE_SYS_TYPES_H)
-	set(HAVE_STAT FALSE)
+    set(HAVE_STAT FALSE)
 endif ()
 
 # syslog functions
@@ -240,7 +240,7 @@
 check_function_exists(closelog HAVE_CLOSELOG)
 
 if (NOT HAVE_SYSLOG_H OR NOT HAVE_OPENLOG OR NOT HAVE_CLOSELOG)
-	set(HAVE_SYSLOG FALSE)
+    set(HAVE_SYSLOG FALSE)
 endif ()
 
 # Check for struct stat fields.
@@ -260,6 +260,6 @@
 
 # Configuration file.
 configure_file(
-	${CMAKE_CURRENT_LIST_DIR}/internal/sysconfig.hpp.in
-	${IRCCD_FAKEROOTDIR}/include/irccd/sysconfig.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/internal/sysconfig.hpp.in
+    ${IRCCD_FAKEROOTDIR}/include/irccd/sysconfig.hpp
 )
--- a/cmake/IrccdVersion.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/IrccdVersion.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -27,9 +27,9 @@
 # Irccd release date.
 # -------------------------------------------------------------------
 #
-# IRCCD_RELEASE_DATE_YEAR	4 digits
-# IRCCD_RELEASE_DATE_MONTH	2 digits (01 = January)
-# IRCCD_RELEASE_DATE_DAY	2 digits (01 = first day of month)
+# IRCCD_RELEASE_DATE_YEAR       4 digits
+# IRCCD_RELEASE_DATE_MONTH      2 digits (01 = January)
+# IRCCD_RELEASE_DATE_DAY        2 digits (01 = first day of month)
 #
 set(IRCCD_RELEASE_DATE_YEAR 2016)
 set(IRCCD_RELEASE_DATE_MONTH 04)
@@ -38,13 +38,13 @@
 
 # All plugins.
 set(
-	IRCCD_PLUGINS
-	ask
-	auth
-	hangman
-	history
-	logger
-	plugin
-	roulette
-	CACHE INTERNAL ""
+    IRCCD_PLUGINS
+    ask
+    auth
+    hangman
+    history
+    logger
+    plugin
+    roulette
+    CACHE INTERNAL ""
 )
--- a/cmake/check/PutTime.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/check/PutTime.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -22,15 +22,15 @@
 # std::put_time does not exists on Debian 8, probably too old libstdc++.
 #
 check_cxx_source_compiles(
-	"#include <iomanip>
-	 #include <iostream>
+    "#include <iomanip>
+     #include <iostream>
 
-	 int main()
-	 {
-		std::cout << std::put_time(nullptr, \"\");
+     int main()
+     {
+        std::cout << std::put_time(nullptr, \"\");
 
-		return 0;
-	 }
-	"
-	HAVE_STD_PUT_TIME
+        return 0;
+     }
+    "
+    HAVE_STD_PUT_TIME
 )
--- a/cmake/function/IrccdDefineExecutable.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefineExecutable.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -21,53 +21,53 @@
 # -------------------------------------------------------------------
 #
 # irccd_define_executable(
-#	TARGET target name
-#	SOURCES src1, src2, srcn
-#	FLAGS (Optional) C/C++ flags (without -D)
-#	LIBRARIES (Optional) libraries to link
-#	INCLUDES (Optional) includes for the target
-#	INSTALL (Optional) if set, install the executable (default: false)
-#	PRIVATE (Optional) if set, do not build it into the fake root (default: false)
+#    TARGET target name
+#    SOURCES src1, src2, srcn
+#    FLAGS (Optional) C/C++ flags (without -D)
+#    LIBRARIES (Optional) libraries to link
+#    INCLUDES (Optional) includes for the target
+#    INSTALL (Optional) if set, install the executable (default: false)
+#    PRIVATE (Optional) if set, do not build it into the fake root (default: false)
 # )
 #
 # Create an executable that can be installed or not.
 #
 
 function(irccd_define_executable)
-	set(options INSTALL PRIVATE)
-	set(oneValueArgs TARGET)
-	set(multiValueArgs SOURCES FLAGS LIBRARIES INCLUDES)
+    set(options INSTALL PRIVATE)
+    set(oneValueArgs TARGET)
+    set(multiValueArgs SOURCES FLAGS LIBRARIES INCLUDES)
 
-	cmake_parse_arguments(EXE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+    cmake_parse_arguments(EXE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 
-	if (NOT EXE_TARGET)
-		message(FATAL_ERROR "Please set TARGET")
-	endif ()
-	if (NOT EXE_SOURCES)
-		message(FATAL_ERROR "Please set SOURCES")
-	endif ()
+    if (NOT EXE_TARGET)
+        message(FATAL_ERROR "Please set TARGET")
+    endif ()
+    if (NOT EXE_SOURCES)
+        message(FATAL_ERROR "Please set SOURCES")
+    endif ()
 
-	if (EXE_INSTALL AND EXE_PRIVATE)
-		message(FATAL_ERROR "INSTALL and PRIVATE are mutually exclusive")
-	endif ()
+    if (EXE_INSTALL AND EXE_PRIVATE)
+        message(FATAL_ERROR "INSTALL and PRIVATE are mutually exclusive")
+    endif ()
 
-	add_executable(${EXE_TARGET} ${EXE_SOURCES})
-	target_include_directories(${EXE_TARGET} PRIVATE ${EXE_INCLUDES})
-	target_compile_definitions(${EXE_TARGET} PRIVATE ${EXE_FLAGS})
-	target_link_libraries(${EXE_TARGET} ${EXE_LIBRARIES})
+    add_executable(${EXE_TARGET} ${EXE_SOURCES})
+    target_include_directories(${EXE_TARGET} PRIVATE ${EXE_INCLUDES})
+    target_compile_definitions(${EXE_TARGET} PRIVATE ${EXE_FLAGS})
+    target_link_libraries(${EXE_TARGET} ${EXE_LIBRARIES})
 
-	# use fakeroot for public executables.
-	if (NOT EXE_PRIVATE)
-		set_target_properties(
-			${EXE_TARGET}
-			PROPERTIES
-			RUNTIME_OUTPUT_DIRECTORY ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-			RUNTIME_OUTPUT_DIRECTORY_DEBUG ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-			RUNTIME_OUTPUT_DIRECTORY_RELEASE ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-			RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-			RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		)
+    # use fakeroot for public executables.
+    if (NOT EXE_PRIVATE)
+        set_target_properties(
+            ${EXE_TARGET}
+            PROPERTIES
+            RUNTIME_OUTPUT_DIRECTORY ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+            RUNTIME_OUTPUT_DIRECTORY_DEBUG ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+            RUNTIME_OUTPUT_DIRECTORY_RELEASE ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+            RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+            RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        )
 
-		install(TARGETS ${EXE_TARGET} RUNTIME DESTINATION ${WITH_BINDIR})
-	endif ()
+        install(TARGETS ${EXE_TARGET} RUNTIME DESTINATION ${WITH_BINDIR})
+    endif ()
 endfunction()
--- a/cmake/function/IrccdDefineHtml.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefineHtml.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -21,20 +21,20 @@
 # -------------------------------------------------------------------
 #
 # 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
+#    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
+#    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.
@@ -43,104 +43,104 @@
 #
 
 function(irccd_define_html)
-	set(options)
-	set(oneValueArgs DIRECTORY OUTPUT TARGET)
-	set(multiValueArgs ARGS SOURCES)
+    set(options)
+    set(oneValueArgs DIRECTORY OUTPUT TARGET)
+    set(multiValueArgs ARGS SOURCES)
 
-	cmake_parse_arguments(HTML "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+    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 ()
+    # 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})
+    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 ()
+    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})
+        get_filename_component(directory ${base}/${HTML_OUTPUT} DIRECTORY)
+        file(RELATIVE_PATH baseurl ${directory} ${base})
 
-		if (baseurl STREQUAL "")
-			set(baseurl "./")
-		endif ()
+        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 ()
+        # 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
-		)
+        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 ()
+        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)
+        #
+        # 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 ()
+            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}
-		)
+        add_custom_target(
+            ${HTML_TARGET}
+            DEPENDS ${outputs}
+            SOURCES ${HTML_SOURCES}
+        )
 
-		install(
-			DIRECTORY ${base}/${HTML_DIRECTORY}
-			DESTINATION ${WITH_DOCDIR}
-		)
-	endif ()
+        install(
+            DIRECTORY ${base}/${HTML_DIRECTORY}
+            DESTINATION ${WITH_DOCDIR}
+        )
+    endif ()
 
-	add_dependencies(all-docs ${HTML_TARGET})
+    add_dependencies(all-docs ${HTML_TARGET})
 endfunction()
--- a/cmake/function/IrccdDefineLibrary.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefineLibrary.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -21,38 +21,38 @@
 # -------------------------------------------------------------------
 #
 # irccd_define_library(
-#	TARGET target name
-#	SOURCES src1, src2, srcn
-#	LOCAL (Optional) set to true to build a static library
-#	FLAGS (Optional) C/C++ flags (without -D)
-#	LIBRARIES (Optional) libraries to link
-#	LOCAL_INCLUDES (Optional) local includes for the target only
-#	PUBLIC_INCLUDES (Optional) includes to share with target dependencies
+#    TARGET target name
+#    SOURCES src1, src2, srcn
+#    LOCAL (Optional) set to true to build a static library
+#    FLAGS (Optional) C/C++ flags (without -D)
+#    LIBRARIES (Optional) libraries to link
+#    LOCAL_INCLUDES (Optional) local includes for the target only
+#    PUBLIC_INCLUDES (Optional) includes to share with target dependencies
 # )
 #
 # Create a static library for internal use.
 #
 
 function(irccd_define_library)
-	set(options LOCAL)
-	set(oneValueArgs TARGET)
-	set(multiValueArgs SOURCES FLAGS LIBRARIES LOCAL_INCLUDES PUBLIC_INCLUDES)
-	set(mandatory TARGET SOURCES)
+    set(options LOCAL)
+    set(oneValueArgs TARGET)
+    set(multiValueArgs SOURCES FLAGS LIBRARIES LOCAL_INCLUDES PUBLIC_INCLUDES)
+    set(mandatory TARGET SOURCES)
 
-	cmake_parse_arguments(LIB "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+    cmake_parse_arguments(LIB "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 
-	if (NOT LIB_TARGET)
-		message(FATAL_ERROR "Please set TARGET")
-	endif ()
-	if (NOT LIB_SOURCES)
-		message(FATAL_ERROR "Please set SOURCES")
-	endif ()
-	if (LIB_LOCAL)
-		set(type STATIC)
-	endif ()
+    if (NOT LIB_TARGET)
+        message(FATAL_ERROR "Please set TARGET")
+    endif ()
+    if (NOT LIB_SOURCES)
+        message(FATAL_ERROR "Please set SOURCES")
+    endif ()
+    if (LIB_LOCAL)
+        set(type STATIC)
+    endif ()
 
-	add_library(${LIB_TARGET} ${type} ${LIB_SOURCES})
-	target_include_directories(${LIB_TARGET} PRIVATE ${LIB_LOCAL_INCLUDES} PUBLIC ${LIB_PUBLIC_INCLUDES})
-	target_compile_definitions(${LIB_TARGET} PUBLIC ${LIB_FLAGS})
-	target_link_libraries(${LIB_TARGET} ${LIB_LIBRARIES})
+    add_library(${LIB_TARGET} ${type} ${LIB_SOURCES})
+    target_include_directories(${LIB_TARGET} PRIVATE ${LIB_LOCAL_INCLUDES} PUBLIC ${LIB_PUBLIC_INCLUDES})
+    target_compile_definitions(${LIB_TARGET} PUBLIC ${LIB_FLAGS})
+    target_link_libraries(${LIB_TARGET} ${LIB_LIBRARIES})
 endfunction()
--- a/cmake/function/IrccdDefineMan.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefineMan.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -20,17 +20,17 @@
 # -------------------------------------------------------------------
 #
 # Parameters:
-#	file		- The file name to build
-#	man		- The man section
+#    file       The file name to build
+#    man        The man section
 #
 # This function configure the manual and install it if WITH_MAN is set.
 #
 
 function(irccd_define_man file man)
-	if (WITH_MAN)
-		set(input ${doc_SOURCE_DIR}/man/${file}.in)
-		set(output ${IRCCD_FAKEROOTDIR}/${WITH_MANDIR}/${man}/${file})
-		configure_file(${input} ${output} @ONLY)
-		install(FILES ${output} DESTINATION ${WITH_MANDIR}/${man})
-	endif ()
+    if (WITH_MAN)
+        set(input ${doc_SOURCE_DIR}/man/${file}.in)
+        set(output ${IRCCD_FAKEROOTDIR}/${WITH_MANDIR}/${man}/${file})
+        configure_file(${input} ${output} @ONLY)
+        install(FILES ${output} DESTINATION ${WITH_MANDIR}/${man})
+    endif ()
 endfunction()
--- a/cmake/function/IrccdDefinePlugin.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefinePlugin.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -23,15 +23,15 @@
 # Define a JavaScript plugin, the file will be configured using configure_file and then installed.
 #
 # Parameters:
-#	file		- The plugin full file path
+#    file        The plugin full file path
 #
 macro(irccd_define_plugin file)
-	get_filename_component(name ${file} NAME)
-	set(base ${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR})
+    get_filename_component(name ${file} NAME)
+    set(base ${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR})
 
-	# Substitude variables in the JavaScript file.
-	configure_file(${file} ${base}/${name})
+    # Substitude variables in the JavaScript file.
+    configure_file(${file} ${base}/${name})
 
-	# Install the plugin file.
-	install(FILES ${base}/${name} DESTINATION ${WITH_PLUGINDIR})
+    # Install the plugin file.
+    install(FILES ${base}/${name} DESTINATION ${WITH_PLUGINDIR})
 endmacro()
--- a/cmake/function/IrccdDefineTest.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/function/IrccdDefineTest.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -21,11 +21,11 @@
 # -------------------------------------------------------------------
 #
 # irccd_define_test(
-#	NAME the test name
-#	SOURCES the sources files
-#	LIBRARIES (Optional) libraries to link
-#	RESOURCES (Optional) some resources file to copy
-#	FLAGS (Optional) compilation flags
+#    NAME the test name
+#    SOURCES the sources files
+#    LIBRARIES (Optional) libraries to link
+#    RESOURCES (Optional) some resources file to copy
+#    FLAGS (Optional) compilation flags
 # )
 #
 # Create a unit test named test-${NAME}
@@ -34,74 +34,74 @@
 #
 
 function(irccd_define_test)
-	set(oneValueArgs NAME)
-	set(multiValueArgs SOURCES LIBRARIES RESOURCES FLAGS)
+    set(oneValueArgs NAME)
+    set(multiValueArgs SOURCES LIBRARIES RESOURCES FLAGS)
 
-	cmake_parse_arguments(TEST "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+    cmake_parse_arguments(TEST "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 
-	if (NOT TEST_NAME)
-		message(FATAL_ERROR "Please set NAME")
-	endif ()
-	if (NOT TEST_SOURCES)
-		message(FATAL_ERROR "Please set SOURCES")
-	endif ()
+    if (NOT TEST_NAME)
+        message(FATAL_ERROR "Please set NAME")
+    endif ()
+    if (NOT TEST_SOURCES)
+        message(FATAL_ERROR "Please set SOURCES")
+    endif ()
 
-	foreach (r ${TEST_RESOURCES})
-		file(RELATIVE_PATH output ${CMAKE_CURRENT_SOURCE_DIR} ${r})
-	
-		add_custom_command(
-			OUTPUT ${CMAKE_BINARY_DIR}/tests/${output}
-			COMMAND ${CMAKE_COMMAND} -E copy ${r} ${CMAKE_BINARY_DIR}/tests/${output}
-			DEPENDS ${r}
-		)
+    foreach (r ${TEST_RESOURCES})
+        file(RELATIVE_PATH output ${CMAKE_CURRENT_SOURCE_DIR} ${r})
+    
+        add_custom_command(
+            OUTPUT ${CMAKE_BINARY_DIR}/tests/${output}
+            COMMAND ${CMAKE_COMMAND} -E copy ${r} ${CMAKE_BINARY_DIR}/tests/${output}
+            DEPENDS ${r}
+        )
 
-		list(APPEND RESOURCES ${CMAKE_BINARY_DIR}/tests/${output})
-	endforeach ()
+        list(APPEND RESOURCES ${CMAKE_BINARY_DIR}/tests/${output})
+    endforeach ()
 
-	# Always link to googletest
-	list(APPEND TEST_LIBRARIES extern-gtest)
+    # Always link to googletest
+    list(APPEND TEST_LIBRARIES extern-gtest)
 
-	# Executable
-	add_executable(test-${TEST_NAME} ${TEST_SOURCES} ${TEST_RESOURCES} ${RESOURCES})
-	target_link_libraries(test-${TEST_NAME} ${TEST_LIBRARIES})
-	source_group(Auto-generated FILES ${RESOURCES})
+    # Executable
+    add_executable(test-${TEST_NAME} ${TEST_SOURCES} ${TEST_RESOURCES} ${RESOURCES})
+    target_link_libraries(test-${TEST_NAME} ${TEST_LIBRARIES})
+    source_group(Auto-generated FILES ${RESOURCES})
 
-	target_include_directories(
-		test-${TEST_NAME}
-		PRIVATE
-			${irccd_SOURCE_DIR}
-	)
+    target_include_directories(
+        test-${TEST_NAME}
+        PRIVATE
+            ${irccd_SOURCE_DIR}
+    )
 
-	target_compile_definitions(
-		test-${TEST_NAME}
-		PRIVATE
-			${TEST_FLAGS}
-			SOURCEDIR="${CMAKE_CURRENT_SOURCE_DIR}"
-			BINARYDIR="${CMAKE_CURRENT_BINARY_DIR}"
-			IRCCD_TESTS_DIRECTORY="${CMAKE_BINARY_DIR}/tests"
-	)
+    target_compile_definitions(
+        test-${TEST_NAME}
+        PRIVATE
+            ${TEST_FLAGS}
+            SOURCEDIR="${CMAKE_CURRENT_SOURCE_DIR}"
+            BINARYDIR="${CMAKE_CURRENT_BINARY_DIR}"
+            IRCCD_TESTS_DIRECTORY="${CMAKE_BINARY_DIR}/tests"
+    )
 
-	# Tests are all in the same directory
-	set_target_properties(
-		test-${TEST_NAME}
-		PROPERTIES
-			PROJECT_LABEL ${TEST_NAME}
-			FOLDER test
-			RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests
-			RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/tests
-			RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/tests
-			RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/tests
-			RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/tests
-	)
+    # Tests are all in the same directory
+    set_target_properties(
+        test-${TEST_NAME}
+        PROPERTIES
+            PROJECT_LABEL ${TEST_NAME}
+            FOLDER test
+            RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests
+            RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/tests
+            RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/tests
+            RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/tests
+            RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/tests
+    )
 
-	if (UNIX)
-		set_target_properties(test-${TEST_NAME} PROPERTIES LINK_FLAGS -pthread)
-	endif ()
+    if (UNIX)
+        set_target_properties(test-${TEST_NAME} PROPERTIES LINK_FLAGS -pthread)
+    endif ()
 
-	# And test
-	add_test(
-		NAME test-${TEST_NAME}
-		COMMAND test-${TEST_NAME}
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests
-	)
+    # And test
+    add_test(
+        NAME test-${TEST_NAME}
+        COMMAND test-${TEST_NAME}
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests
+    )
 endfunction()
--- a/cmake/installer/config/config.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/config/config.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
 <Installer>
-	<Name>IRC Client Daemon</Name>
-	<Version>@IRCCD_VERSION@</Version>
-	<Title>IRC Client Daemon Setup</Title>
-	<Publisher>Malikania Projects</Publisher>
-	<ProductUrl>http://projects.malikania.fr/irccd</ProductUrl>
-	<StartMenuDir>Irccd @IRCCD_VERSION@</StartMenuDir>
-	<AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>
-	<TargetDir>@PKGTARGETDIR@</TargetDir>
+    <Name>IRC Client Daemon</Name>
+    <Version>@IRCCD_VERSION@</Version>
+    <Title>IRC Client Daemon Setup</Title>
+    <Publisher>Malikania Projects</Publisher>
+    <ProductUrl>http://projects.malikania.fr/irccd</ProductUrl>
+    <StartMenuDir>Irccd @IRCCD_VERSION@</StartMenuDir>
+    <AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>
+    <TargetDir>@PKGTARGETDIR@</TargetDir>
 </Installer>
--- a/cmake/installer/packages/docs.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/docs.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>Documentation</DisplayName>
-	<Description>Install documentation</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
-	<SortingPriority>95</SortingPriority>
+    <DisplayName>Documentation</DisplayName>
+    <Description>Install documentation</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
+    <SortingPriority>95</SortingPriority>
 </Package>
\ No newline at end of file
--- a/cmake/installer/packages/irccd.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/irccd.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>Irccd executable</DisplayName>
-	<Description>Install irccd daemon</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
-	<SortingPriority>100</SortingPriority>
+    <DisplayName>Irccd executable</DisplayName>
+    <Description>Install irccd daemon</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
+    <SortingPriority>100</SortingPriority>
 </Package>
\ No newline at end of file
--- a/cmake/installer/packages/irccdctl.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/irccdctl.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>Irccdctl executable</DisplayName>
-	<Description>Install irccd controller</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
-	<SortingPriority>50</SortingPriority>
+    <DisplayName>Irccdctl executable</DisplayName>
+    <Description>Install irccd controller</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
+    <SortingPriority>50</SortingPriority>
 </Package>
\ No newline at end of file
--- a/cmake/installer/packages/meta-plugins.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/meta-plugins.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>Plugins</DisplayName>
-	<Description>Install plugins</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
-	<SortingPriority>90</SortingPriority>
+    <DisplayName>Plugins</DisplayName>
+    <Description>Install plugins</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
+    <SortingPriority>90</SortingPriority>
 </Package>
\ No newline at end of file
--- a/cmake/installer/packages/meta-programs.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/meta-programs.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>Core</DisplayName>
-	<Description>Install irccd and irccdctl</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
-	<SortingPriority>100</SortingPriority>
-	<Licenses>
-		<License name="License Agreement" file="LICENSE" />
-	</Licenses>
+    <DisplayName>Core</DisplayName>
+    <Description>Install irccd and irccdctl</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
+    <SortingPriority>100</SortingPriority>
+    <Licenses>
+        <License name="License Agreement" file="LICENSE" />
+    </Licenses>
 </Package>
--- a/cmake/installer/packages/plugin.xml.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/installer/packages/plugin.xml.in	Tue Jun 21 20:52:17 2016 +0200
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <Package>
-	<DisplayName>@IRCCD_PLUGIN_NAME@.js</DisplayName>
-	<Description>Install @IRCCD_PLUGIN_NAME@.js</Description>
-	<Version>@IRCCD_VERSION@</Version>
-	<ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
-	<Default>true</Default>
+    <DisplayName>@IRCCD_PLUGIN_NAME@.js</DisplayName>
+    <Description>Install @IRCCD_PLUGIN_NAME@.js</Description>
+    <Version>@IRCCD_VERSION@</Version>
+    <ReleaseDate>@IRCCD_RELEASE_DATE@</ReleaseDate>
+    <Default>true</Default>
 </Package>
\ No newline at end of file
--- a/cmake/internal/sysconfig.hpp.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/internal/sysconfig.hpp.in	Tue Jun 21 20:52:17 2016 +0200
@@ -32,12 +32,12 @@
  * ------------------------------------------------------------------
  */
 
-#define PREFIX			"@CMAKE_INSTALL_PREFIX@"
+#define PREFIX                  "@CMAKE_INSTALL_PREFIX@"
 
-#define IRCCD_VERSION_MAJOR	@IRCCD_VERSION_MAJOR@
-#define IRCCD_VERSION_MINOR	@IRCCD_VERSION_MINOR@
-#define IRCCD_VERSION_PATCH	@IRCCD_VERSION_PATCH@
-#define IRCCD_VERSION		"@IRCCD_VERSION@"
+#define IRCCD_VERSION_MAJOR     @IRCCD_VERSION_MAJOR@
+#define IRCCD_VERSION_MINOR     @IRCCD_VERSION_MINOR@
+#define IRCCD_VERSION_PATCH     @IRCCD_VERSION_PATCH@
+#define IRCCD_VERSION           "@IRCCD_VERSION@"
 
 /*
  * System identification.
@@ -57,11 +57,11 @@
  * ------------------------------------------------------------------
  */
 
-#define WITH_BINDIR		"@WITH_BINDIR@"
-#define WITH_DATADIR		"@WITH_DATADIR@"
-#define WITH_CONFDIR		"@WITH_CONFDIR@"
-#define WITH_PLUGINDIR		"@WITH_PLUGINDIR@"
-#define WITH_CACHEDIR		"@WITH_CACHEDIR@"
+#define WITH_BINDIR             "@WITH_BINDIR@"
+#define WITH_DATADIR            "@WITH_DATADIR@"
+#define WITH_CONFDIR            "@WITH_CONFDIR@"
+#define WITH_PLUGINDIR          "@WITH_PLUGINDIR@"
+#define WITH_CACHEDIR           "@WITH_CACHEDIR@"
 
 #cmakedefine WITH_JS
 #cmakedefine WITH_SSL
--- a/cmake/packages/FindPandoc.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/cmake/packages/FindPandoc.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -10,25 +10,25 @@
 # This module also defines the following macros:
 #
 # pandoc(
-#	SOURCES file1 [file2 ...]
-#	OUTPUT output
-#	[FROM format]
-#	[TO format]
-#	[TARGET target]
-#	[DEPENDS dependency ...]
-#	[ALL]
-#	[TOC]
-#	[STANDALONE]
-#	[MAKE_DIRECTORY]
-#	[TEMPLATE file]
-#	[FILTER filter]
-#	[HEADER header ...]
-#	[FOOTER footer ...]
-#	[BODY body ...]
-#	[VARIABLE var ...]
-#	[METADATA meta ...]
-#	[ARGS argument ...]
-#	[WORKING_DIRECTORY directory]
+#    SOURCES file1 [file2 ...]
+#    OUTPUT output
+#    [FROM format]
+#    [TO format]
+#    [TARGET target]
+#    [DEPENDS dependency ...]
+#    [ALL]
+#    [TOC]
+#    [STANDALONE]
+#    [MAKE_DIRECTORY]
+#    [TEMPLATE file]
+#    [FILTER filter]
+#    [HEADER header ...]
+#    [FOOTER footer ...]
+#    [BODY body ...]
+#    [VARIABLE var ...]
+#    [METADATA meta ...]
+#    [ARGS argument ...]
+#    [WORKING_DIRECTORY directory]
 # )
 #
 # The sources files are listed in the parameter SOURCES, all files are passed
@@ -75,9 +75,9 @@
 #
 
 find_program(
-	Pandoc_EXECUTABLE
-	NAMES pandoc
-	DOC "Pandoc executable"
+    Pandoc_EXECUTABLE
+    NAMES pandoc
+    DOC "Pandoc executable"
 )
 
 include(FindPackageHandleStandardArgs)
@@ -85,145 +85,145 @@
 
 # Extract the version
 if (Pandoc_EXECUTABLE)
-	execute_process(
-		COMMAND pandoc --version
-		OUTPUT_VARIABLE _pandoc_version_tmp
-	)
+    execute_process(
+        COMMAND pandoc --version
+        OUTPUT_VARIABLE _pandoc_version_tmp
+    )
 
-	string(REGEX REPLACE "^pandoc ([0-9]*\\.[0-9]*\\.[0-9]*).*$" "\\1" Pandoc_VERSION ${_pandoc_version_tmp})
+    string(REGEX REPLACE "^pandoc ([0-9]*\\.[0-9]*\\.[0-9]*).*$" "\\1" Pandoc_VERSION ${_pandoc_version_tmp})
 endif ()
 
 find_package_handle_standard_args(
-	Pandoc
-	FOUND_VAR Pandoc_FOUND
-	VERSION_VAR Pandoc_VERSION
-	REQUIRED_VARS Pandoc_EXECUTABLE
+    Pandoc
+    FOUND_VAR Pandoc_FOUND
+    VERSION_VAR Pandoc_VERSION
+    REQUIRED_VARS Pandoc_EXECUTABLE
 )
 
 if (Pandoc_FOUND)
-	function(pandoc)
-		set(options MAKE_DIRECTORY STANDALONE TOC)
-		set(oneValueArgs FILTER FROM TARGET TEMPLATE TO OUTPUT WORKING_DIRECTORY)
-		set(multiValueArgs ARGS FOOTER HEADER METADATA SOURCES VARIABLE DEPENDS)
+    function(pandoc)
+        set(options MAKE_DIRECTORY STANDALONE TOC)
+        set(oneValueArgs FILTER FROM TARGET TEMPLATE TO OUTPUT WORKING_DIRECTORY)
+        set(multiValueArgs ARGS FOOTER HEADER METADATA SOURCES VARIABLE DEPENDS)
 
-		#
-		# The following variables will be set in that scope:
-		#   _pandoc_arguments		- List of all arguments that will passed to pandoc invocation.
-		#   _pandoc_depends		- List of all dependencies attached to the add_custom_command.
-		#   _pandoc_mkdir		- The mkdir command if MAKE_DIRECTORY is set
-		#   _pandoc_output_base		- The base output directory
-		#
-		cmake_parse_arguments(PANDOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+        #
+        # The following variables will be set in that scope:
+        #   _pandoc_arguments       List of all arguments that will passed to pandoc invocation.
+        #   _pandoc_depends         List of all dependencies attached to the add_custom_command.
+        #   _pandoc_mkdir           The mkdir command if MAKE_DIRECTORY is set
+        #   _pandoc_output_base     The base output directory
+        #
+        cmake_parse_arguments(PANDOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 
-		#
-		# Output and sources are mandatory
-		#
-		if (NOT PANDOC_OUTPUT)
-			message(FATAL_ERROR "Please define OUTPUT")
-		elseif (NOT PANDOC_SOURCES)
-			message(FATAL_ERROR "Please defines SOURCES")
-		endif ()
+        #
+        # Output and sources are mandatory
+        #
+        if (NOT PANDOC_OUTPUT)
+            message(FATAL_ERROR "Please define OUTPUT")
+        elseif (NOT PANDOC_SOURCES)
+            message(FATAL_ERROR "Please defines SOURCES")
+        endif ()
 
-		#
-		# Handle the filter with care.
-		#
-		# 1. If it is a target, depend on it and use a generator
-		#    expression to get its full path on the disk.
-		# 2. If it is not a target, just use the user provided path.
-		#
-		if (PANDOC_FILTER)
-			# If it is a target, add a dependency so that it is built
-			if (TARGET ${PANDOC_FILTER})
-				list(APPEND _pandoc_arguments --filter "$<TARGET_FILE:${PANDOC_FILTER}>")
-				list(APPEND _pandoc_depends ${PANDOC_FILTER})
-			else ()
-				list(APPEND _pandoc_arguments --filter ${PANDOC_FILTER})
-			endif ()
-		endif ()
+        #
+        # Handle the filter with care.
+        #
+        # 1. If it is a target, depend on it and use a generator
+        #    expression to get its full path on the disk.
+        # 2. If it is not a target, just use the user provided path.
+        #
+        if (PANDOC_FILTER)
+            # If it is a target, add a dependency so that it is built
+            if (TARGET ${PANDOC_FILTER})
+                list(APPEND _pandoc_arguments --filter "$<TARGET_FILE:${PANDOC_FILTER}>")
+                list(APPEND _pandoc_depends ${PANDOC_FILTER})
+            else ()
+                list(APPEND _pandoc_arguments --filter ${PANDOC_FILTER})
+            endif ()
+        endif ()
 
-		if (PANDOC_TOC)
-			list(APPEND _pandoc_arguments --toc)
-		endif ()
-		if (PANDOC_STANDALONE)
-			list(APPEND _pandoc_arguments -s)
-		endif ()
-		if (PANDOC_FROM)
-			list(APPEND _pandoc_arguments -f ${PANDOC_FROM})
-		endif ()
-		if (PANDOC_TO)
-			list(APPEND _pandoc_arguments -t ${PANDOC_TO})
-		endif ()
-		if (PANDOC_TEMPLATE)
-			list(APPEND _pandoc_arguments --template ${PANDOC_TEMPLATE})
-			list(APPEND _pandoc_depends ${PANDOC_TEMPLATE})
-		endif ()
+        if (PANDOC_TOC)
+            list(APPEND _pandoc_arguments --toc)
+        endif ()
+        if (PANDOC_STANDALONE)
+            list(APPEND _pandoc_arguments -s)
+        endif ()
+        if (PANDOC_FROM)
+            list(APPEND _pandoc_arguments -f ${PANDOC_FROM})
+        endif ()
+        if (PANDOC_TO)
+            list(APPEND _pandoc_arguments -t ${PANDOC_TO})
+        endif ()
+        if (PANDOC_TEMPLATE)
+            list(APPEND _pandoc_arguments --template ${PANDOC_TEMPLATE})
+            list(APPEND _pandoc_depends ${PANDOC_TEMPLATE})
+        endif ()
 
-		# Header, footers and body
-		foreach (h ${PANDOC_HEADER})
-			list(APPEND _pandoc_arguments -H ${h})
-			list(APPEND _pandoc_depends ${h})
-		endforeach ()
-		foreach (b ${PANDOC_BODY})
-			list(APPEND _pandoc_arguments -B ${b})
-			list(APPEND _pandoc_depends ${b})
-		endforeach ()
-		foreach (f ${PANDOC_FOOTER})
-			list(APPEND _pandoc_arguments -A ${f})
-			list(APPEND _pandoc_depends ${f})
-		endforeach ()
+        # Header, footers and body
+        foreach (h ${PANDOC_HEADER})
+            list(APPEND _pandoc_arguments -H ${h})
+            list(APPEND _pandoc_depends ${h})
+        endforeach ()
+        foreach (b ${PANDOC_BODY})
+            list(APPEND _pandoc_arguments -B ${b})
+            list(APPEND _pandoc_depends ${b})
+        endforeach ()
+        foreach (f ${PANDOC_FOOTER})
+            list(APPEND _pandoc_arguments -A ${f})
+            list(APPEND _pandoc_depends ${f})
+        endforeach ()
 
-		# Variables and metadata
-		foreach (var ${PANDOC_VARIABLE})
-			list(APPEND _pandoc_arguments -V ${var})
-		endforeach ()
-		foreach (meta ${PANDOC_METADATA})
-			list(APPEND _pandoc_arguments -M ${meta})
-		endforeach ()
+        # Variables and metadata
+        foreach (var ${PANDOC_VARIABLE})
+            list(APPEND _pandoc_arguments -V ${var})
+        endforeach ()
+        foreach (meta ${PANDOC_METADATA})
+            list(APPEND _pandoc_arguments -M ${meta})
+        endforeach ()
 
-		# Optional list of arguments
-		foreach (arg ${PANDOC_ARGS})
-			list(APPEND _pandoc_arguments ${arg})
-		endforeach ()
+        # Optional list of arguments
+        foreach (arg ${PANDOC_ARGS})
+            list(APPEND _pandoc_arguments ${arg})
+        endforeach ()
 
-		# Output and sources
-		list(APPEND _pandoc_arguments -o ${PANDOC_OUTPUT})
+        # Output and sources
+        list(APPEND _pandoc_arguments -o ${PANDOC_OUTPUT})
 
-		#
-		# The following variables are set within the loop:
-		#
-		#   _pandoc_input		- The absolute path to the input file.
-		#   _pandoc_output_base		- The base output directory.
-		#
-		foreach (s ${PANDOC_SOURCES})
-			get_filename_component(_pandoc_input ${s} ABSOLUTE)
-			get_filename_component(_pandoc_output_base ${PANDOC_OUTPUT} DIRECTORY)
-			list(APPEND _pandoc_depends ${_pandoc_input})
-			list(APPEND _pandoc_arguments ${_pandoc_input})
-		endforeach ()
+        #
+        # The following variables are set within the loop:
+        #
+        #   _pandoc_input       The absolute path to the input file.
+        #   _pandoc_output_base The base output directory.
+        #
+        foreach (s ${PANDOC_SOURCES})
+            get_filename_component(_pandoc_input ${s} ABSOLUTE)
+            get_filename_component(_pandoc_output_base ${PANDOC_OUTPUT} DIRECTORY)
+            list(APPEND _pandoc_depends ${_pandoc_input})
+            list(APPEND _pandoc_arguments ${_pandoc_input})
+        endforeach ()
 
-		# Create the output directory if requested
-		if (PANDOC_MAKE_DIRECTORY)
-			set(_pandoc_mkdir ${CMAKE_COMMAND} -E make_directory ${_pandoc_output_base})
-		endif ()
+        # Create the output directory if requested
+        if (PANDOC_MAKE_DIRECTORY)
+            set(_pandoc_mkdir ${CMAKE_COMMAND} -E make_directory ${_pandoc_output_base})
+        endif ()
 
-		add_custom_command(
-			OUTPUT ${PANDOC_OUTPUT}
-			COMMAND	${_pandoc_mkdir}
-			COMMAND	${Pandoc_EXECUTABLE} ${_pandoc_arguments}
-			DEPENDS ${_pandoc_depends} ${PANDOC_DEPENDS}
-			WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
-			VERBATIM
-		)
+        add_custom_command(
+            OUTPUT ${PANDOC_OUTPUT}
+            COMMAND    ${_pandoc_mkdir}
+            COMMAND    ${Pandoc_EXECUTABLE} ${_pandoc_arguments}
+            DEPENDS ${_pandoc_depends} ${PANDOC_DEPENDS}
+            WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
+            VERBATIM
+        )
 
-		if (PANDOC_TARGET)
-			add_custom_target(
-				${PANDOC_TARGET} ${PANDOC_ALL}
-				SOURCES ${_pandoc_depends}
-				DEPENDS ${PANDOC_OUTPUT}
-				WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
-			)
-		endif ()
-	endfunction()
+        if (PANDOC_TARGET)
+            add_custom_target(
+                ${PANDOC_TARGET} ${PANDOC_ALL}
+                SOURCES ${_pandoc_depends}
+                DEPENDS ${PANDOC_OUTPUT}
+                WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
+            )
+        endif ()
+    endfunction()
 endif ()
 
 mark_as_advanced(Pandoc_EXECUTABLE)
--- a/contrib/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/contrib/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,12 +19,12 @@
 project(contrib)
 
 if (WITH_SYSTEMD)
-	set(PATH "${CMAKE_INSTALL_PREFIX}/${WITH_BINDIR}/irccd")
+    set(PATH "${CMAKE_INSTALL_PREFIX}/${WITH_BINDIR}/irccd")
 
-	configure_file(
-		${CMAKE_CURRENT_SOURCE_DIR}/irccd.service
-		${CMAKE_CURRENT_BINARY_DIR}/irccd.service
-	)
+    configure_file(
+        ${CMAKE_CURRENT_SOURCE_DIR}/irccd.service
+        ${CMAKE_CURRENT_BINARY_DIR}/irccd.service
+    )
 
-	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/irccd.service DESTINATION ${WITH_SYSTEMDDIR})
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/irccd.service DESTINATION ${WITH_SYSTEMDDIR})
 endif()
--- a/doc/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -20,23 +20,23 @@
 
 # Meta targets `docs`
 add_custom_target(
-	all-docs ALL
-	COMMENT "Building irccd documentation"
+    all-docs ALL
+    COMMENT "Building irccd documentation"
 )
 
 set_target_properties(
-	all-docs
-	PROPERTIES
-		FOLDER meta
+    all-docs
+    PROPERTIES
+        FOLDER meta
 )
 
 if (WITH_DOXYGEN)
-	add_subdirectory(doxygen)
+    add_subdirectory(doxygen)
 endif ()
 
 add_subdirectory(examples)
 add_subdirectory(man)
 
 if (WITH_HTML)
-	add_subdirectory(html)
+    add_subdirectory(html)
 endif ()
--- a/doc/doxygen/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/doxygen/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -20,27 +20,27 @@
 set(DOXYGEN_OUTPUT ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/doxygen)
 
 if (NOT DOXYGEN_DOT_FOUND)
-	set(DOXYGEN_HAVE_DOT "NO")
-	set(DOXYGEN_DOT_PATH "")
+    set(DOXYGEN_HAVE_DOT "NO")
+    set(DOXYGEN_DOT_PATH "")
 else ()
-	set(DOXYGEN_HAVE_DOT "YES")
-	set(DOXYGEN_DOT_PATH "\"${DOXYGEN_DOT_EXECUTABLE}\"")
+    set(DOXYGEN_HAVE_DOT "YES")
+    set(DOXYGEN_DOT_PATH "\"${DOXYGEN_DOT_EXECUTABLE}\"")
 endif ()
 
 configure_file(
-	${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
-	${CMAKE_BINARY_DIR}/Doxyfile
+    ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
+    ${CMAKE_BINARY_DIR}/Doxyfile
 )
 
 add_custom_target(
-	docs-doxygen
-	COMMENT "Generating doxygen documentation"
-	COMMAND
-		${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/doxygen
-	COMMAND
-		${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
-	WORKING_DIRECTORY
-		${CMAKE_SOURCE_DIR}
+    docs-doxygen
+    COMMENT "Generating doxygen documentation"
+    COMMAND
+        ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/doxygen
+    COMMAND
+        ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+    WORKING_DIRECTORY
+        ${CMAKE_SOURCE_DIR}
 )
 
 add_dependencies(all-docs docs-doxygen)
--- a/doc/doxygen/Doxyfile.in	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/doxygen/Doxyfile.in	Tue Jun 21 20:52:17 2016 +0200
@@ -5,11 +5,11 @@
 #
 # The following variables are set by CMake:
 #
-# VERSION		- The project version
-# DOXYGEN_INPUT		- The source directory
-# DOXYGEN_OUTPUT	- The output directory
-# DOXYGEN_HAVE_DOT	- True if have dot
-# DOXYGEN_DOT_PATH	- The path to dot
+# VERSION               The project version
+# DOXYGEN_INPUT         The source directory
+# DOXYGEN_OUTPUT        The output directory
+# DOXYGEN_HAVE_DOT      True if have dot
+# DOXYGEN_DOT_PATH      The path to dot
 #
 
 #---------------------------------------------------------------------------
--- a/doc/examples/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/examples/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,45 +19,46 @@
 project(examples)
 
 add_custom_command(
-	OUTPUT
-		${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
-		${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
-	COMMAND
-		${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
-	COMMAND
-		${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
-	DEPENDS
-		${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
-		${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
+    OUTPUT
+        ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
+        ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
+    COMMAND
+        ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
+    COMMAND
+        ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
+    DEPENDS
+        ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
+        ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
 )
 
 add_custom_target(
-	docs-examples
-	DEPENDS
-		${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
-		${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
-	SOURCES
-		${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
-		${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
+    docs-examples
+    DEPENDS
+        ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample
+        ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample
+    SOURCES
+        ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
+        ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
+        ${CMAKE_CURRENT_SOURCE_DIR}/template-plugin.cpp
 )
 
 set_target_properties(
-	docs-examples
-	PROPERTIES
-		PROJECT_LABEL examples
-		FOLDER docs
+    docs-examples
+    PROPERTIES
+        PROJECT_LABEL examples
+        FOLDER docs
 )
 
 add_dependencies(all-docs docs-examples)
 
 install(
-	FILES irccdctl.conf
-	DESTINATION "${WITH_CONFDIR}"
-	RENAME "irccdctl.conf.sample"
+    FILES irccdctl.conf
+    DESTINATION "${WITH_CONFDIR}"
+    RENAME "irccdctl.conf.sample"
 )
 
 install(
-	FILES irccd.conf
-	DESTINATION "${WITH_CONFDIR}"
-	RENAME "irccd.conf.sample"
+    FILES irccd.conf
+    DESTINATION "${WITH_CONFDIR}"
+    RENAME "irccd.conf.sample"
 )
--- a/doc/examples/irccd.conf	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/examples/irccd.conf	Tue Jun 21 20:52:17 2016 +0200
@@ -3,39 +3,39 @@
 #
 
 # Section general:
-#	This section describe global options used by irccd.
+#    This section describe global options used by irccd.
 #
 # [general]
-# uid = "nobody"		# (string or number) the user id to use (Optional, default: none),
-# gid = "nobody"		# (string or number) the group id to use (Optional, default: none),
-# foreground = false		# (bool) set to true to not daemonize (Optional, default: false),
-# pidfile = "/tmp/irccd.pid"	# (string) path to a file where to store the irccd pid (Optional, default: none).
+# uid = "nobody"                # (string or number) the user id to use (Optional, default: none),
+# gid = "nobody"                # (string or number) the group id to use (Optional, default: none),
+# foreground = false            # (bool) set to true to not daemonize (Optional, default: false),
+# pidfile = "/tmp/irccd.pid"    # (string) path to a file where to store the irccd pid (Optional, default: none).
 
 [general]
 foreground = true
 
 # Section plugins:
-#	Load plugins by name or by paths.
+#    Load plugins by name or by paths.
 #
 # [plugins]
-# abc =				# This will search for abc
-# ask = /tmp/ask.js		# This use /tmp/ask.js to load the plugin
+# abc =                         # This will search for abc
+# ask = /tmp/ask.js             # This use /tmp/ask.js to load the plugin
 
 [plugins]
 history = ""
 ask = ""
 
 # Section identities:
-#	This describe identities, you can add any number you want they are used with servers so you can reuse an
-#	identity for one or more servers if you want.
+#    This describe identities, you can add any number you want they are used with servers so you can reuse an
+#    identity for one or more servers if you want.
 #
 # [identity]
-# name = "id"			# (id) the identity unique id,
-# nickname = "foo"		# (string) the nickname (Optional, default: irccd),
-# username = "bar"		# (string) the realname (Optional, default: IRC Client daemon),
-# realname = "Jean"		# (string) the username name (Optional, default: irccd),
-# ctcp-version = "irccd"	# (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
-# ctcp-autoreply = true		# (bool) enable auto CTCP VERSION reply, (Optional, default: true).
+# name = "id"                   # (id) the identity unique id,
+# nickname = "foo"              # (string) the nickname (Optional, default: irccd),
+# username = "bar"              # (string) the realname (Optional, default: IRC Client daemon),
+# realname = "Jean"             # (string) the username name (Optional, default: irccd),
+# ctcp-version = "irccd"        # (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
+# ctcp-autoreply = true         # (bool) enable auto CTCP VERSION reply, (Optional, default: true).
 
 [identity]
 name = "default"
@@ -44,22 +44,22 @@
 realname = "Superbot Killer"
 
 # Section transport:
-#	You can use transport to wait for any input you want. Unix and internet sockets are supported. Unix are used
-#	for file based socket while internet bind to standard address plus a specific port.
+#    You can use transport to wait for any input you want. Unix and internet sockets are supported. Unix are used
+#    for file based socket while internet bind to standard address plus a specific port.
 #
 # For internet sockets:
 #
 # [transport]
 # type = "ip"
-# port = "1234"			# (int) port number,
-# address = "*"			# (string) address to bind or "*" for any (Optional, default: *),
-# family = ( "ipv4", "ipv6" )	# (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4).
+# port = "1234"                 # (int) port number,
+# address = "*"                 # (string) address to bind or "*" for any (Optional, default: *),
+# family = ( "ipv4", "ipv6" )   # (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4).
 #
 # For unix sockets:
 #
 # [transport]
 # type = "unix"
-# path = "/tmp/irccd.sock"	# (string) the file path to the socket.
+# path = "/tmp/irccd.sock"      # (string) the file path to the socket.
 
 [transport]
 type = "ip"
@@ -68,25 +68,25 @@
 family = "ipv4 ipv6"
 
 # Section server:
-#	List of server you want to connect to. A server may use an identity to
-#	set the username, nickname and so on. A server is registered with a
-#	unique id that is needed for irccdctl(1).
+#    List of server you want to connect to. A server may use an identity to
+#    set the username, nickname and so on. A server is registered with a
+#    unique id that is needed for irccdctl(1).
 #
 # [server]
-# name = "id"			# (id) the unique id,
-# host = "chat.foo.com"		# (string) the server address,
-# port = "4321"			# (int) the server port (Optional, default: 6667),
-# identity = "default"		# (string) an identity to use (Optional, default: irccd's default),
-# password = "secret"		# (string) an optional password (Optional, default: none),
-# auto-rejoin = false		# (bool) auto rejoin a channel after being kicked (Optional, default: false),
-# join-invite = false		# (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 = false			# (bool) enable or disable SSL (Optional, default: false),
-# ssl-verify = false		# (bool) verify the SSL certificates (Optional, default: true),
-# reconnect = true		# (bool) enable reconnection after failure (Optional, default: true),
-# reconnect-tries = 0		# (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0),
-# reconnect-timeout = 5		# (int) number of seconds to wait before retrying (Optional, default: 30).
+# name = "id"                   # (id) the unique id,
+# host = "chat.foo.com"         # (string) the server address,
+# port = "4321"                 # (int) the server port (Optional, default: 6667),
+# identity = "default"          # (string) an identity to use (Optional, default: irccd's default),
+# password = "secret"           # (string) an optional password (Optional, default: none),
+# auto-rejoin = false           # (bool) auto rejoin a channel after being kicked (Optional, default: false),
+# join-invite = false           # (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 = false                   # (bool) enable or disable SSL (Optional, default: false),
+# ssl-verify = false            # (bool) verify the SSL certificates (Optional, default: true),
+# reconnect = true              # (bool) enable reconnection after failure (Optional, default: true),
+# reconnect-tries = 0           # (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0),
+# reconnect-timeout = 5         # (int) number of seconds to wait before retrying (Optional, default: 30).
 
 [server]
 identity = "default"
@@ -97,13 +97,13 @@
 reconnect-tries = 20
 
 # Section rule:
-#	Add one or more rules to filter IRC events.
+#    Add one or more rules to filter IRC events.
 #
-# 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**.
+# 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**.
 #
 # Block plugin hangman everywhere.
 #
--- a/doc/examples/irccdctl.conf	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/examples/irccdctl.conf	Tue Jun 21 20:52:17 2016 +0200
@@ -3,30 +3,30 @@
 #
 
 # Section general:
-#	This section describe global options used by irccd.
+#    This section describe global options used by irccd.
 #
 # [general]
-# verbose = false		# (bool) enable verbose message (Optional, default: false).
+# verbose = false               # (bool) enable verbose message (Optional, default: false).
 
 
 [general]
 
 # Section connect:
-#	This section is used to connect to a irccd transport.
+#    This section is used to connect to a irccd transport.
 #
 # For internet sockets:
 #
 # [connect]
 # type = "ip"
-# host = "localhost"		# (string) host to connect,
-# port = "1234"			# (int) port number,
-# family = "ipv4 ipv6"		# (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
+# host = "localhost"            # (string) host to connect,
+# port = "1234"                 # (int) port number,
+# family = "ipv4 ipv6"          # (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
 #
 # For unix sockets:
 #
 # [connect]
 # type = "unix"
-# path = "/tmp/irccd.sock"	# (string) the file path to the socket.
+# path = "/tmp/irccd.sock"      # (string) the file path to the socket.
 
 [connect]
 type = "ip"
--- a/doc/examples/template-plugin.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/examples/template-plugin.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -6,9 +6,9 @@
 
 #include <iostream>
 
-#include <irccd/plugin-dynlib.hpp>	// (in irccd_onReload, irccd_onLoad and irccd_onUnload)
+#include <irccd/plugin-dynlib.hpp>      // (in irccd_onReload, irccd_onLoad and irccd_onUnload)
 #include <irccd/server.hpp>
-#include <irccd/util.hpp>		// for util::join (in irccd_onNames)
+#include <irccd/util.hpp>               // for util::join (in irccd_onNames)
 
 using namespace irccd;
 
@@ -17,213 +17,213 @@
 /* --- onCommand ---------------------------------------------------- */
 
 void irccd_onCommand(Irccd &,
-		     const std::shared_ptr<Server> &server,
-		     const std::string &origin,
-		     const std::string &channel,
-		     const std::string &message)
+                     const std::shared_ptr<Server> &server,
+                     const std::string &origin,
+                     const std::string &channel,
+                     const std::string &message)
 {
-	std::cout << "onCommand: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", message=" << message << std::endl;
+    std::cout << "onCommand: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", message=" << message << std::endl;
 }
 
 /* --- onConnect ---------------------------------------------------- */
 
 void irccd_onConnect(Irccd &, const std::shared_ptr<Server> &server)
 {
-	std::cout << "onConnect: server=" << server->name() << std::endl;
+    std::cout << "onConnect: server=" << server->name() << std::endl;
 }
 
 /* --- onChannelMode ------------------------------------------------ */
 
 void irccd_onChannelMode(Irccd &,
-			 const std::shared_ptr<Server> &server,
-			 const std::string &origin,
-			 const std::string &channel,
-			 const std::string &mode,
-			 const std::string &arg)
+                         const std::shared_ptr<Server> &server,
+                         const std::string &origin,
+                         const std::string &channel,
+                         const std::string &mode,
+                         const std::string &arg)
 {
-	std::cout << "onChannelMode: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", mode=" << mode
-		  << ", arg=" << arg << std::endl;
+    std::cout << "onChannelMode: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", mode=" << mode
+          << ", arg=" << arg << std::endl;
 }
 
 /* --- onChannelNotice ---------------------------------------------- */
 
 void irccd_onChannelNotice(Irccd &irccd,
-			   const std::shared_ptr<Server> &server,
-			   const std::string &origin,
-			   const std::string &channel,
-			   const std::string &notice)
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &notice)
 {
-	std::cout << "onChannelNotice: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", notice=" << notice << std::endl;
+    std::cout << "onChannelNotice: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", notice=" << notice << std::endl;
 }
 
 /* --- onInvite ----------------------------------------------------- */
 
 void irccd_onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	std::cout << "onInvite: server=" << server->name() << ", origin=" << origin << ", channel=" << channel << std::endl;
+    std::cout << "onInvite: server=" << server->name() << ", origin=" << origin << ", channel=" << channel << std::endl;
 }
 
 /* --- onJoin ------------------------------------------------------- */
 
 void irccd_onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	std::cout << "onJoin: server=" << server->name() << ", origin=" << origin << ", channel=" << channel << std::endl;
+    std::cout << "onJoin: server=" << server->name() << ", origin=" << origin << ", channel=" << channel << std::endl;
 }
 
 /* --- onKick ------------------------------------------------------- */
 
 void irccd_onKick(Irccd &irccd,
-		  const std::shared_ptr<Server> &server,
-		  const std::string &origin,
-		  const std::string &channel,
-		  const std::string &target,
-		  const std::string &reason)
+                  const std::shared_ptr<Server> &server,
+                  const std::string &origin,
+                  const std::string &channel,
+                  const std::string &target,
+                  const std::string &reason)
 {
-	std::cout << "onKick: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", target=" << channel
-		  << ", reason=" << reason << std::endl;
+    std::cout << "onKick: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", target=" << channel
+          << ", reason=" << reason << std::endl;
 }
 
 /* --- onLoad ------------------------------------------------------- */
 
 void irccd_onLoad(Irccd &, DynlibPlugin &plugin)
 {
-	std::cout << "onLoad: plugin=" << plugin.name() << std::endl;
+    std::cout << "onLoad: plugin=" << plugin.name() << std::endl;
 }
 
 /* --- onMessage ---------------------------------------------------- */
 
 void irccd_onMessage(Irccd &irccd,
-		     const std::shared_ptr<Server> &server,
-		     const std::string &origin,
-		     const std::string &channel,
-		     const std::string &message)
+                     const std::shared_ptr<Server> &server,
+                     const std::string &origin,
+                     const std::string &channel,
+                     const std::string &message)
 {
-	std::cout << "onMessage: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", message=" << message << std::endl;
+    std::cout << "onMessage: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", message=" << message << std::endl;
 }
 
 /* --- onMe --------------------------------------------------------- */
 
 void irccd_onMe(Irccd &irccd,
-		const std::shared_ptr<Server> &server,
-		const std::string &origin,
-		const std::string &channel,
-		const std::string &message)
+                const std::shared_ptr<Server> &server,
+                const std::string &origin,
+                const std::string &channel,
+                const std::string &message)
 {
-	std::cout << "onMe: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", message=" << message << std::endl;
+    std::cout << "onMe: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", message=" << message << std::endl;
 }
 
 /* --- onMode ------------------------------------------------------- */
 
 void irccd_onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode)
 {
-	std::cout << "onMode: server=" << server->name() << ", origin=" << origin << ", mode=" << mode << std::endl;
+    std::cout << "onMode: server=" << server->name() << ", origin=" << origin << ", mode=" << mode << std::endl;
 }
 
 /* --- onNames ------------------------------------------------------ */
 
 void irccd_onNames(Irccd &irccd,
-		   const std::shared_ptr<Server> &server,
-		   const std::string &channel,
-		   const std::vector<std::string> &list)
+                   const std::shared_ptr<Server> &server,
+                   const std::string &channel,
+                   const std::vector<std::string> &list)
 {
-	std::cout << "onNames: server=" << server->name()
-		  << ", channel=" << channel
-		  << ", list=" << util::join(list.begin(), list.end(), ", ") << std::endl;
+    std::cout << "onNames: server=" << server->name()
+          << ", channel=" << channel
+          << ", list=" << util::join(list.begin(), list.end(), ", ") << std::endl;
 }
 
 /* --- onNick ------------------------------------------------------- */
 
 void irccd_onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick)
 {
-	std::cout << "onNick: server=" << server->name() << ", origin=" << origin << ", nick=" << nick << std::endl;
+    std::cout << "onNick: server=" << server->name() << ", origin=" << origin << ", nick=" << nick << std::endl;
 }
 
 /* --- onNotice ----------------------------------------------------- */
 
 void irccd_onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice)
 {
-	std::cout << "onNotice: server=" << server->name() << ", origin=" << origin << ", notice=" << notice << std::endl;
+    std::cout << "onNotice: server=" << server->name() << ", origin=" << origin << ", notice=" << notice << std::endl;
 }
 
 /* --- onPart ------------------------------------------------------- */
 
 void irccd_onPart(Irccd &irccd,
-		  const std::shared_ptr<Server> &server,
-		  const std::string &origin,
-		  const std::string &channel,
-		  const std::string &reason)
+                  const std::shared_ptr<Server> &server,
+                  const std::string &origin,
+                  const std::string &channel,
+                  const std::string &reason)
 {
-	std::cout << "onPart: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", reason=" << reason << std::endl;
+    std::cout << "onPart: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", reason=" << reason << std::endl;
 }
 
 /* --- onQuery ------------------------------------------------------ */
 
 void irccd_onQuery(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message)
 {
-	std::cout << "onQuery: server=" << server->name() << ", origin=" << origin << ", message=" << message << std::endl;
+    std::cout << "onQuery: server=" << server->name() << ", origin=" << origin << ", message=" << message << std::endl;
 }
 
 /* --- onQueryCommand ----------------------------------------------- */
 
 void irccd_onQueryCommand(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message)
 {
-	std::cout << "onQueryCommand: server=" << server->name() << ", origin=" << origin << ", message=" << message << std::endl;
+    std::cout << "onQueryCommand: server=" << server->name() << ", origin=" << origin << ", message=" << message << std::endl;
 }
 
 /* --- onReload ----------------------------------------------------- */
 
 void irccd_onReload(Irccd &irccd, DynlibPlugin &plugin)
 {
-	std::cout << "onReload: plugin=" << plugin.name() << std::endl;
+    std::cout << "onReload: plugin=" << plugin.name() << std::endl;
 }
 
 /* --- onTopic ------------------------------------------------------ */
 
 void irccd_onTopic(Irccd &irccd,
-		   const std::shared_ptr<Server> &server,
-		   const std::string &origin,
-		   const std::string &channel,
-		   const std::string &topic)
+                   const std::shared_ptr<Server> &server,
+                   const std::string &origin,
+                   const std::string &channel,
+                   const std::string &topic)
 {
-	std::cout << "onTopic: server=" << server->name()
-		  << ", origin=" << origin
-		  << ", channel=" << channel
-		  << ", topic=" << topic << std::endl;
+    std::cout << "onTopic: server=" << server->name()
+          << ", origin=" << origin
+          << ", channel=" << channel
+          << ", topic=" << topic << std::endl;
 }
 
 /* --- onUnload ----------------------------------------------------- */
 
 void irccd_onUnload(Irccd &irccd, DynlibPlugin &plugin)
 {
-	std::cout << "onUnload: plugin=" << plugin.name() << std::endl;
+    std::cout << "onUnload: plugin=" << plugin.name() << std::endl;
 }
 
 /* --- onWhois ------------------------------------------------------ */
 
 void irccd_onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info)
 {
-	std::cout << "onWhois: server=" << server->name() << ", info-for=" << info.nick << std::endl;
+    std::cout << "onWhois: server=" << server->name() << ", info-for=" << info.nick << std::endl;
 }
 
 } // !C
--- a/doc/html/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -23,7 +23,7 @@
 
 # JavaScript API and user guide
 if (WITH_JS)
-	add_subdirectory(api)
+    add_subdirectory(api)
 endif ()
 
 add_subdirectory(guide)
--- a/doc/html/api/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -32,35 +32,35 @@
 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}
+    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
+    SOURCES ${SOURCES}
+    DIRECTORY api
+    TARGET docs-api
+    ARGS -Vjs
 )
 
 set_target_properties(
-	docs-api
-	PROPERTIES
-		PROJECT_LABEL api
-		FOLDER docs
+    docs-api
+    PROPERTIES
+        PROJECT_LABEL api
+        FOLDER docs
 )
\ No newline at end of file
--- a/doc/html/api/event/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/event/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,26 +17,26 @@
 #
 
 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
+    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/module/Irccd.Directory/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Directory/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,12 +17,12 @@
 #
 
 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
+    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.ElapsedTimer/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.ElapsedTimer/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,11 +17,11 @@
 #
 
 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
+    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.File/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.File/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,23 +17,23 @@
 #
 
 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
+    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.Logger/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,9 +17,9 @@
 #
 
 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
+    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/index.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Logger/index.md	Tue Jun 21 20:52:17 2016 +0200
@@ -22,6 +22,6 @@
 ````javascript
 function onLoad()
 {
-	Irccd.Logger.info("This is an example");
+    Irccd.Logger.info("This is an example");
 }
 ````
--- a/doc/html/api/module/Irccd.Plugin/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Plugin/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,11 +17,11 @@
 #
 
 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
+    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.Server/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,27 +17,27 @@
 #
 
 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
+    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/list.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/function/list.md	Tue Jun 21 20:52:17 2016 +0200
@@ -11,8 +11,8 @@
 var table = Irccd.Server.list();
 
 for (var name in table) {
-	var server = table[name];
+    var server = table[name];
 
-	/* Use server */
+    /* Use server */
 }
 ````
--- a/doc/html/api/module/Irccd.Server/method/constructor.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Server/method/constructor.md	Tue Jun 21 20:52:17 2016 +0200
@@ -25,10 +25,10 @@
 
 ````javascript
 var s = new Irccd.Server({
-	name: "localhost",
-	host: "localhost",
-	nickname: "kevin",
-	ssl: true,
-	sslVerify: false
+    name: "localhost",
+    host: "localhost",
+    nickname: "kevin",
+    ssl: true,
+    sslVerify: false
 });
 ````
--- a/doc/html/api/module/Irccd.System/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.System/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,16 +17,16 @@
 #
 
 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
+    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.Timer/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,9 +17,9 @@
 #
 
 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
+    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/method/constructor.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Timer/method/constructor.md	Tue Jun 21 20:52:17 2016 +0200
@@ -13,7 +13,7 @@
 ````javascript
 /* Execute an action every 1 second */
 var t = new Irccd.Timer(Irccd.Timer.Repeat, 1000, function () {
-	/* Do your action */
+    /* Do your action */
 });
 
 t.start();
--- a/doc/html/api/module/Irccd.Unicode/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Unicode/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,12 +17,12 @@
 #
 
 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
+    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.Util/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,9 +17,9 @@
 #
 
 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
+    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 Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd.Util/function/format.md	Tue Jun 21 20:52:17 2016 +0200
@@ -34,7 +34,7 @@
 ````javascript
 function onMessage(server, channel, origin, message)
 {
-	server.message(channel, Irccd.Util.format("@{red}" + message + "@{}");
+    server.message(channel, Irccd.Util.format("@{red}" + message + "@{}");
 }
 ````
 
@@ -51,7 +51,7 @@
 ````javascript
 function onMessage(server, channel, origin, message)
 {
-	server.message(channel, Irccd.Util.format("@{red}#{message}@{}", { message: message });
+    server.message(channel, Irccd.Util.format("@{red}#{message}@{}", { message: message });
 }
 ````
  </div>
--- a/doc/html/api/module/Irccd/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,6 +17,6 @@
 #
 
 set(
-	IRCCD_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/index.md
+    IRCCD_SOURCES
+    ${CMAKE_CURRENT_LIST_DIR}/index.md
 )
--- a/doc/html/api/module/Irccd/index.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/api/module/Irccd/index.md	Tue Jun 21 20:52:17 2016 +0200
@@ -26,8 +26,8 @@
 
 function onLoad()
 {
-	Logger.info("Major: " + Irccd.version.major);
-	Logger.info("Minor: " + Irccd.version.minor);
-	Logger.info("Patch: " + Irccd.version.patch);
+    Logger.info("Major: " + Irccd.version.major);
+    Logger.info("Minor: " + Irccd.version.minor);
+    Logger.info("Patch: " + Irccd.version.patch);
 }
 ````
--- a/doc/html/guide/01-intro/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/01-intro/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 set(
-	INTRO_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/01-what-is-irc.md
-	${CMAKE_CURRENT_LIST_DIR}/02-what-is-irccd.md
+    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/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/02-install/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 set(
-	INSTALL_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/01-building-from-sources.md
-	${CMAKE_CURRENT_LIST_DIR}/02-customize.md
+    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/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/03-config-format/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 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
+    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 Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/04-irccd/01-config.md	Tue Jun 21 20:52:17 2016 +0200
@@ -313,6 +313,6 @@
 
 # Load some plugins.
 [plugins]
-ask = ""				# This search for plugin ask
-myplugin = /path/to/myplugin.js		# This use absolute path
+ask = ""                # This search for plugin ask
+myplugin = /path/to/myplugin.js        # This use absolute path
 ````
--- a/doc/html/guide/04-irccd/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/04-irccd/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,6 +17,6 @@
 #
 
 set(
-	IRCCD_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/01-config.md
+    IRCCD_SOURCES
+    ${CMAKE_CURRENT_LIST_DIR}/01-config.md
 )
\ No newline at end of file
--- a/doc/html/guide/05-irccdctl/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/05-irccdctl/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 set(
-	IRCCDCTL_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/01-config.md
-	${CMAKE_CURRENT_LIST_DIR}/02-usage.md
-	${CMAKE_CURRENT_LIST_DIR}/03-commands.md
+    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/04-metadata.md	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/06-plugin/04-metadata.md	Tue Jun 21 20:52:17 2016 +0200
@@ -12,9 +12,9 @@
 ````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"
+    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/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/06-plugin/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,11 +17,11 @@
 #
 
 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
+    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/Files.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/07-socket/Files.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 set(
-	SOCKET_SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/01-syntax.md
-	${CMAKE_CURRENT_LIST_DIR}/02-commands.md
-	${CMAKE_CURRENT_LIST_DIR}/03-messages.md
+    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 Jun 21 12:36:46 2016 +0200
+++ b/doc/html/guide/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -27,26 +27,26 @@
 include(07-socket/Files.cmake)
 
 set(
-	SOURCES
-	${INTRO_SOURCES}
-	${INSTALL_SOURCES}
-	${CONFIG_FORMAT_SOURCES}
-	${IRCCD_SOURCES}
-	${IRCCDCTL_SOURCES}
-	${PLUGIN_SOURCES}
-	${SOCKET_SOURCES}
+    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
+    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
+    docs-guide
+    PROPERTIES
+        PROJECT_LABEL guide
+        FOLDER docs
 )
\ No newline at end of file
--- a/doc/html/resources/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/resources/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -24,49 +24,49 @@
 #
 
 set(
-	CSS_FILES
-	css/bootstrap.min.css
-	css/doc.css
-	css/doc-guide.css
-	css/tomorrow.css
+    CSS_FILES
+    css/bootstrap.min.css
+    css/doc.css
+    css/doc-guide.css
+    css/tomorrow.css
 )
 
 set(
-	JS_FILES
-	js/bootstrap.min.js
-	js/highlight.js
-	js/jquery.min.js
+    JS_FILES
+    js/bootstrap.min.js
+    js/highlight.js
+    js/jquery.min.js
 )
 
 foreach (f ${CSS_FILES} ${JS_FILES})
-	get_filename_component(base ${f} DIRECTORY)
-	get_filename_component(name ${f} NAME)
-	list(APPEND OUTPUTS ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${base}/${name})
-	list(APPEND SOURCES ${resources_SOURCE_DIR}/${f})
-	list(APPEND COMMANDS COMMAND ${CMAKE_COMMAND} -E copy ${resources_SOURCE_DIR}/${f} ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${base})
-	install(FILES ${resources_SOURCE_DIR}/${f} DESTINATION ${WITH_DOCDIR}/${base})
+    get_filename_component(base ${f} DIRECTORY)
+    get_filename_component(name ${f} NAME)
+    list(APPEND OUTPUTS ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${base}/${name})
+    list(APPEND SOURCES ${resources_SOURCE_DIR}/${f})
+    list(APPEND COMMANDS COMMAND ${CMAKE_COMMAND} -E copy ${resources_SOURCE_DIR}/${f} ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/${base})
+    install(FILES ${resources_SOURCE_DIR}/${f} DESTINATION ${WITH_DOCDIR}/${base})
 endforeach ()
 
 add_custom_command(
-	OUTPUT ${OUTPUTS}
-	DEPENDS ${SOURCES}
-	COMMENT "Copying HTML resources"
-	COMMAND ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/css
-	COMMAND ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/js
-	${COMMANDS}
+    OUTPUT ${OUTPUTS}
+    DEPENDS ${SOURCES}
+    COMMENT "Copying HTML resources"
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/css
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}/js
+    ${COMMANDS}
 )
 
 add_custom_target(
-	docs-resources
-	SOURCES ${SOURCES}
-	DEPENDS ${OUTPUTS}
+    docs-resources
+    SOURCES ${SOURCES}
+    DEPENDS ${OUTPUTS}
 )
 
 set_target_properties(
-	docs-resources
-	PROPERTIES
-		PROJECT_LABEL resources
-		FOLDER docs
+    docs-resources
+    PROPERTIES
+        PROJECT_LABEL resources
+        FOLDER docs
 )
 
 add_dependencies(all-docs docs-resources)
--- a/doc/html/resources/css/doc-guide.css	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/resources/css/doc-guide.css	Tue Jun 21 20:52:17 2016 +0200
@@ -1,17 +1,17 @@
 h1, h2, h3 {
-	margin-top: 40px;
+    margin-top: 40px;
 }
 
 #introduction {
-	margin-top: 0px;
+    margin-top: 0px;
 }
 
 pre {
-	margin-top: 20px;
-	margin-bottom: 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
 }
 
 .alert {
-	margin-top: 20px;
-	margin-bottom: 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
 }
--- a/doc/html/resources/css/doc.css	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/resources/css/doc.css	Tue Jun 21 20:52:17 2016 +0200
@@ -1,88 +1,88 @@
 .sub-header {
-	padding-bottom: 10px;
-	border-bottom: 1px solid #eee;
+    padding-bottom: 10px;
+    border-bottom: 1px solid #eee;
 }
 
 .navbar-fixed-top {
-	border: 0;
+    border: 0;
 }
 
 /* Hide for mobile, show later */
 .sidebar {
-	display: none;
+    display: none;
 }
 
 @media (min-width: 768px) {
-	.sidebar {
-		position: fixed;
-		top: 0px;
-		bottom: 0;
-		left: 0;
-		z-index: 1000;
-		display: block;
-		padding: 20px;
-		overflow-x: hidden;
-		overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
-		background-color: #f5f5f5;
-		border-right: 1px solid #eee;
-	}
+    .sidebar {
+        position: fixed;
+        top: 0px;
+        bottom: 0;
+        left: 0;
+        z-index: 1000;
+        display: block;
+        padding: 20px;
+        overflow-x: hidden;
+        overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
+        background-color: #f5f5f5;
+        border-right: 1px solid #eee;
+    }
 }
 
 .nav-sidebar {
-	margin-right: -21px;
-	margin-bottom: 20px;
-	margin-left: -20px;
+    margin-right: -21px;
+    margin-bottom: 20px;
+    margin-left: -20px;
 }
 
 .nav-sidebar > li > a {
-	padding-right: 20px;
-	padding-left: 20px;
+    padding-right: 20px;
+    padding-left: 20px;
 }
 
 .nav-sidebar > .active > a,
 .nav-sidebar > .active > a:hover,
 .nav-sidebar > .active > a:focus {
-	color: #fff;
-	background-color: #428bca;
+    color: #fff;
+    background-color: #428bca;
 }
 
 .main {
-	padding: 20px;
+    padding: 20px;
 }
 
 @media (min-width: 768px) {
-	.main {
-		padding-right: 40px;
-		padding-left: 40px;
-	}
+    .main {
+        padding-right: 40px;
+        padding-left: 40px;
+    }
 }
 
 .main .page-header {
-	margin-top: 0;
+    margin-top: 0;
 }
 
 .placeholders {
-	margin-bottom: 30px;
-	text-align: center;
+    margin-bottom: 30px;
+    text-align: center;
 }
 
 .placeholders h4 {
-	margin-bottom: 0;
+    margin-bottom: 0;
 }
 
 .placeholder {
-	margin-bottom: 20px;
+    margin-bottom: 20px;
 }
 
 .placeholder img {
-	display: inline-block;
-	border-radius: 50%;
+    display: inline-block;
+    border-radius: 50%;
 }
 
 .sidebar-list li a {
-	padding: 0 0 0 15px;
+    padding: 0 0 0 15px;
 }
 
 pre {
-	background-color: #ffffff;
+    background-color: #ffffff;
 }
Binary file doc/html/resources/fonts/glyphicons-halflings-regular.eot has changed
Binary file doc/html/resources/fonts/glyphicons-halflings-regular.ttf has changed
Binary file doc/html/resources/fonts/glyphicons-halflings-regular.woff has changed
Binary file doc/html/resources/fonts/glyphicons-halflings-regular.woff2 has changed
--- a/doc/html/resources/js/highlight.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/html/resources/js/highlight.js	Tue Jun 21 20:52:17 2016 +0200
@@ -1,2 +1,2 @@
 /*! highlight.js v9.1.0 | BSD3 License | git.io/hljslicense */
-!function(e){"undefined"!=typeof exports?e(exports):(self.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return self.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(o)}else"start"==g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":x.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(M);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!R[L.sL])return n(M);var t=e?l(L.sL,M,!0,y[L.sL]):f(M,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(y[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,M=""):e.eB?(k+=n(t)+r,M=""):(k+=r,M=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(M+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(M+=t),k+=b();do L.cN&&(k+="</span>"),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),M="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"<unnamed>")+'"');return M+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,L=i||N,y={},k="";for(w=L;w!=N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var M="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),w=L;w.parent;w=w.parent)w.cN&&(k+="</span>");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function f(e,t){t=t||x.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return x.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,x.tabReplace)})),x.useBR&&(e=e.replace(/\n/g,"<br>")),e}function h(e,n,t){var r=n?w[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;x.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?l(n,r,!0):f(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){x=o(x,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){w[e]=n})}function N(){return Object.keys(R)}function E(e){return e=(e||"").toLowerCase(),R[e]||R[w[e]]}var x={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},w={};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},i={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:t.CNR}],r:0},s={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},r,t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:[e,t.CLCM,t.CBCM,i,r,s,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{bK:"new throw return else",r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,i]},t.CLCM,t.CBCM,s]}]}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|	)",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"symbol",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link",e:"$"}}]}]}});hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",r=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl"],k:t,c:o}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:i,k:t},s={b:"{",e:"}",c:[{cN:"attr",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:r}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return i.splice(i.length,0,s,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"(AV|CA|CF|CG|CI|MK|MP|NS|UI|XC)\\w+"},i={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:i,l:n,i:"</",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"meta",b:"#",e:"$",c:[{cN:"meta-string",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+o.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:o,l:n,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("dts",function(e){var a={cN:"string",v:[e.inherit(e.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},c={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:e.CNR}],r:0},b={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[e.inherit(a,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},a,e.CLCM,e.CBCM]},i={cN:"variable",b:"\\&[a-z\\d_]*\\b"},r={cN:"meta-keyword",b:"/[a-z][a-z\\d-]*/"},d={cN:"symbol",b:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},n={cN:"params",b:"<",e:">",c:[c,i]},s={cN:"class",b:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,e:/[{;=]/,rB:!0,eE:!0},t={cN:"class",b:"/\\s*{",e:"};",r:10,c:[i,r,d,s,n,e.CLCM,e.CBCM,c,a]};return{k:"",c:[t,i,r,d,s,n,e.CLCM,e.CBCM,c,a,b,{b:e.IR+"::",k:""}]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"</?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("xml",function(s){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},r={eW:!0,i:/</,r:0,c:[e,{cN:"attr",b:t,r:0},{b:"=",r:0,c:[{cN:"string",c:[e],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[r],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[r],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},e,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[r]}),e.C("^\\=begin","^\\=end",{c:[r],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:c},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:c},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var o="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+o+"|"+l+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:c,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+"(\\s*,\\s*"+e.UIR+")*>)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:r,r:0};return{aliases:["jsp"],k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},a={cN:"meta",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},a]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,i,t]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,t]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});
\ No newline at end of file
+!function(e){"undefined"!=typeof exports?e(exports):(self.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return self.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(o)}else"start"==g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":x.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(M);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!R[L.sL])return n(M);var t=e?l(L.sL,M,!0,y[L.sL]):f(M,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(y[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,M=""):e.eB?(k+=n(t)+r,M=""):(k+=r,M=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(M+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(M+=t),k+=b();do L.cN&&(k+="</span>"),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),M="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"<unnamed>")+'"');return M+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,L=i||N,y={},k="";for(w=L;w!=N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var M="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),w=L;w.parent;w=w.parent)w.cN&&(k+="</span>");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function f(e,t){t=t||x.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return x.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,x.tabReplace)})),x.useBR&&(e=e.replace(/\n/g,"<br>")),e}function h(e,n,t){var r=n?w[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;x.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?l(n,r,!0):f(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){x=o(x,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){w[e]=n})}function N(){return Object.keys(R)}function E(e){return e=(e||"").toLowerCase(),R[e]||R[w[e]]}var x={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},w={};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},i={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:t.CNR}],r:0},s={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},r,t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:[e,t.CLCM,t.CBCM,i,r,s,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{bK:"new throw return else",r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,i]},t.CLCM,t.CBCM,s]}]}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|    )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"symbol",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link",e:"$"}}]}]}});hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",r=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl"],k:t,c:o}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:i,k:t},s={b:"{",e:"}",c:[{cN:"attr",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:r}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return i.splice(i.length,0,s,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"(AV|CA|CF|CG|CI|MK|MP|NS|UI|XC)\\w+"},i={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:i,l:n,i:"</",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"meta",b:"#",e:"$",c:[{cN:"meta-string",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+o.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:o,l:n,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("dts",function(e){var a={cN:"string",v:[e.inherit(e.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},c={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:e.CNR}],r:0},b={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[e.inherit(a,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},a,e.CLCM,e.CBCM]},i={cN:"variable",b:"\\&[a-z\\d_]*\\b"},r={cN:"meta-keyword",b:"/[a-z][a-z\\d-]*/"},d={cN:"symbol",b:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},n={cN:"params",b:"<",e:">",c:[c,i]},s={cN:"class",b:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,e:/[{;=]/,rB:!0,eE:!0},t={cN:"class",b:"/\\s*{",e:"};",r:10,c:[i,r,d,s,n,e.CLCM,e.CBCM,c,a]};return{k:"",c:[t,i,r,d,s,n,e.CLCM,e.CBCM,c,a,b,{b:e.IR+"::",k:""}]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"</?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("xml",function(s){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},r={eW:!0,i:/</,r:0,c:[e,{cN:"attr",b:t,r:0},{b:"=",r:0,c:[{cN:"string",c:[e],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[r],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[r],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},e,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[r]}),e.C("^\\=begin","^\\=end",{c:[r],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:c},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:c},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var o="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+o+"|"+l+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:c,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+"(\\s*,\\s*"+e.UIR+")*>)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:r,r:0};return{aliases:["jsp"],k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},a={cN:"meta",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},a]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,i,t]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,t]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});
\ No newline at end of file
--- a/doc/man/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/doc/man/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -21,19 +21,19 @@
 # -------------------------------------------------------------------
 
 set(
-	MONTHS
-	January
-	February
-	March
-	April
-	May
-	June
-	July
-	August
-	September
-	October
-	November
-	December
+    MONTHS
+    January
+    February
+    March
+    April
+    May
+    June
+    July
+    August
+    September
+    October
+    November
+    December
 )
 
 # Get month as name.
--- a/extern/cppformat/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/extern/cppformat/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -21,8 +21,8 @@
 add_library(extern-cppformat STATIC format.cc format.h)
 target_include_directories(extern-cppformat PUBLIC ${cppformat_SOURCE_DIR})
 set_target_properties(
-	extern-cppformat
-	PROPERTIES
-		PROJECT_LABEL cppformat
-		FOLDER extern
+    extern-cppformat
+    PROPERTIES
+        PROJECT_LABEL cppformat
+        FOLDER extern
 )
\ No newline at end of file
--- a/extern/duktape/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/extern/duktape/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,19 +19,19 @@
 project(duktape)
 
 irccd_define_library(
-	LOCAL
-	TARGET extern-duktape
-	FLAGS DUK_OPT_CPP_EXCEPTIONS
-	SOURCES
-		duk_config.h
-		duktape.cpp
-		duktape.h
-	PUBLIC_INCLUDES ${duktape_SOURCE_DIR}
+    LOCAL
+    TARGET extern-duktape
+    FLAGS DUK_OPT_CPP_EXCEPTIONS
+    SOURCES
+        duk_config.h
+        duktape.cpp
+        duktape.h
+    PUBLIC_INCLUDES ${duktape_SOURCE_DIR}
 )
 
 set_target_properties(
-	extern-duktape
-	PROPERTIES
-		PROJECT_LABEL duktape
-		FOLDER extern
+    extern-duktape
+    PROPERTIES
+        PROJECT_LABEL duktape
+        FOLDER extern
 )
--- a/extern/gtest/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/extern/gtest/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,20 +19,20 @@
 project(gtest)
 
 irccd_define_library(
-	LOCAL
-	TARGET extern-gtest
-	SOURCES src/gtest-all.cc
-	PUBLIC_INCLUDES ${gtest_SOURCE_DIR}/include
-	LOCAL_INCLUDES ${gtest_SOURCE_DIR}
+    LOCAL
+    TARGET extern-gtest
+    SOURCES src/gtest-all.cc
+    PUBLIC_INCLUDES ${gtest_SOURCE_DIR}/include
+    LOCAL_INCLUDES ${gtest_SOURCE_DIR}
 )
 
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-	target_compile_options(extern-gtest PRIVATE -Wno-missing-field-initializers)
+    target_compile_options(extern-gtest PRIVATE -Wno-missing-field-initializers)
 endif ()
 
 set_target_properties(
-	extern-gtest
-	PROPERTIES
-		PROJECT_LABEL gtest
-		FOLDER extern
+    extern-gtest
+    PROPERTIES
+        PROJECT_LABEL gtest
+        FOLDER extern
 )
\ No newline at end of file
--- a/extern/jansson/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/extern/jansson/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -23,17 +23,17 @@
 include(CheckTypeSize)
 
 if (MSVC)
-	# Turn off Microsofts "security" warnings.
-	add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
-	
-	if (STATIC_CRT)
-		set(CMAKE_C_FLAGS_RELEASE "/MT")
-		set(CMAKE_C_FLAGS_DEBUG "/MTd")
-	endif()
+    # Turn off Microsofts "security" warnings.
+    add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
+    
+    if (STATIC_CRT)
+        set(CMAKE_C_FLAGS_RELEASE "/MT")
+        set(CMAKE_C_FLAGS_DEBUG "/MTd")
+    endif()
 endif()
 
 if (NOT WIN32 AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX))
-	add_definitions("-fPIC")
+    add_definitions("-fPIC")
 endif()
 
 check_include_files(endian.h HAVE_ENDIAN_H)
@@ -67,15 +67,15 @@
 check_type_size("int" INT)
 
 if (HAVE_INT32_T)
-	set(JSON_INT32 int32_t)
+    set(JSON_INT32 int32_t)
 elseif (HAVE___INT32)
-	set(JSON_INT32 __int32)
+    set(JSON_INT32 __int32)
 elseif (HAVE_LONG_INT AND (${LONG_INT} EQUAL 4))
-	set(JSON_INT32 long)
+    set(JSON_INT32 long)
 elseif (HAVE_INT AND (${INT} EQUAL 4))
-	set(JSON_INT32 int)
+    set(JSON_INT32 int)
 else ()
-	message (FATAL_ERROR "Could not detect a valid 32-bit integer type")
+    message (FATAL_ERROR "Could not detect a valid 32-bit integer type")
 endif ()
 
 check_type_size("unsigned long" UNSIGNED_LONG_INT)
@@ -85,41 +85,41 @@
 check_type_size(__uint32 __UINT32)
 
 if (HAVE_UINT32_T)
-	set(JSON_UINT32 uint32_t)
+    set(JSON_UINT32 uint32_t)
 elseif (HAVE___UINT32)
-	set(JSON_UINT32 __uint32)
+    set(JSON_UINT32 __uint32)
 elseif (HAVE_UNSIGNED_LONG_INT AND (${UNSIGNED_LONG_INT} EQUAL 4))
-	set(JSON_UINT32 "unsigned long")
+    set(JSON_UINT32 "unsigned long")
 elseif (HAVE_UNSIGNED_INT AND (${UNSIGNED_INT} EQUAL 4))
-	set(JSON_UINT32 "unsigned int")
+    set(JSON_UINT32 "unsigned int")
 else ()
-	message(FATAL_ERROR "Could not detect a valid unsigned 32-bit integer type")
+    message(FATAL_ERROR "Could not detect a valid unsigned 32-bit integer type")
 endif ()
 
 check_type_size(uint16_t UINT16_T)
 check_type_size(__uint16 __UINT16)
 
 if (HAVE_UINT16_T)
-	set(JSON_UINT16 uint16_t)
+    set(JSON_UINT16 uint16_t)
 elseif (HAVE___UINT16)
-	set(JSON_UINT16 __uint16)
+    set(JSON_UINT16 __uint16)
 elseif (HAVE_UNSIGNED_INT AND (${UNSIGNED_INT} EQUAL 2))
-	set(JSON_UINT16 "unsigned int")
+    set(JSON_UINT16 "unsigned int")
 elseif (HAVE_UNSIGNED_SHORT AND (${UNSIGNED_SHORT} EQUAL 2))
-	set(JSON_UINT16 "unsigned short")
+    set(JSON_UINT16 "unsigned short")
 else ()
-	message(FATAL_ERROR "Could not detect a valid unsigned 16-bit integer type")
+    message(FATAL_ERROR "Could not detect a valid unsigned 16-bit integer type")
 endif ()
 
 check_type_size(uint8_t UINT8_T)
 check_type_size(__uint8 __UINT8)
 
 if (HAVE_UINT8_T)
-	set(JSON_UINT8 uint8_t)
+    set(JSON_UINT8 uint8_t)
 elseif (HAVE___UINT8)
-	set(JSON_UINT8 __uint8)
+    set(JSON_UINT8 __uint8)
 else ()
-	set(JSON_UINT8 "unsigned char")
+    set(JSON_UINT8 "unsigned char")
 endif ()
 
 # Check for ssize_t and SSIZE_T existance.
@@ -127,11 +127,11 @@
 check_type_size(SSIZE_T UPPERCASE_SSIZE_T)
 
 if(NOT HAVE_SSIZE_T)
-	if(HAVE_UPPERCASE_SSIZE_T)
-		set(JSON_SSIZE SSIZE_T)
-	else()
-		set(JSON_SSIZE int)
-	endif()
+    if(HAVE_UPPERCASE_SSIZE_T)
+        set(JSON_SSIZE SSIZE_T)
+    else()
+        set(JSON_SSIZE int)
+    endif()
 endif()
 
 set(CMAKE_EXTRA_INCLUDE_FILES "")
@@ -143,43 +143,43 @@
 
 # Figure out what variant we should use
 if (HAVE_STRTOLL)
-	set(JSON_STRTOINT strtoll)
+    set(JSON_STRTOINT strtoll)
 elseif (HAVE_STRTOQ)
-	set(JSON_STRTOINT strtoq)
+    set(JSON_STRTOINT strtoq)
 elseif (HAVE__STRTOI64)
-	set(JSON_STRTOINT _strtoi64)
+    set(JSON_STRTOINT _strtoi64)
 else ()
-	# fallback to strtol (32 bit)
-	# this will set all the required variables
-	set (JSON_STRTOINT strtol)
-	set (JSON_INT_T long)
-	set (JSON_INTEGER_FORMAT "\"ld\"")
+    # fallback to strtol (32 bit)
+    # this will set all the required variables
+    set (JSON_STRTOINT strtol)
+    set (JSON_INT_T long)
+    set (JSON_INTEGER_FORMAT "\"ld\"")
 endif ()
 
 # if we haven't defined JSON_INT_T, then we have a 64 bit conversion function.
 # detect what to use for the 64 bit type.
 # Note: I will prefer long long if I can get it, as that is what the automake system aimed for.
 if (NOT DEFINED JSON_INT_T)
-	if (HAVE_LONG_LONG_INT AND (${LONG_LONG_INT} EQUAL 8))
-		set(JSON_INT_T "long long")
-	elseif (HAVE_INT64_T)
-		set(JSON_INT_T int64_t)
-	elseif (HAVE___INT64)
-		set(JSON_INT_T __int64)
-	else ()
-		message(FATAL_ERROR "Could not detect 64 bit type, although I detected the strtoll equivalent")
-	endif ()
+    if (HAVE_LONG_LONG_INT AND (${LONG_LONG_INT} EQUAL 8))
+        set(JSON_INT_T "long long")
+    elseif (HAVE_INT64_T)
+        set(JSON_INT_T int64_t)
+    elseif (HAVE___INT64)
+        set(JSON_INT_T __int64)
+    else ()
+        message(FATAL_ERROR "Could not detect 64 bit type, although I detected the strtoll equivalent")
+    endif ()
 
-	# Apparently, Borland BCC and MSVC wants I64d,
-	# Borland BCC could also accept LD
-	# and gcc wants ldd,
-	# I am not sure what cygwin will want, so I will assume I64d
+    # Apparently, Borland BCC and MSVC wants I64d,
+    # Borland BCC could also accept LD
+    # and gcc wants ldd,
+    # I am not sure what cygwin will want, so I will assume I64d
 
-	if (WIN32) # matches both msvc and cygwin
-		set(JSON_INTEGER_FORMAT "\"I64d\"")
-	else ()
-		set(JSON_INTEGER_FORMAT "\"lld\"")
-	endif ()
+    if (WIN32) # matches both msvc and cygwin
+        set(JSON_INTEGER_FORMAT "\"I64d\"")
+    else ()
+        set(JSON_INTEGER_FORMAT "\"lld\"")
+    endif ()
 endif ()
 
 
@@ -188,9 +188,9 @@
 check_function_exists (localeconv HAVE_LOCALECONV)
 
 if (HAVE_LOCALECONV AND HAVE_LOCALE_H)
-	set(JSON_HAVE_LOCALECONV 1)
+    set(JSON_HAVE_LOCALECONV 1)
 else ()
-	set(JSON_HAVE_LOCALECONV 0)
+    set(JSON_HAVE_LOCALECONV 0)
 endif()
 
 # check if we have setlocale
@@ -203,14 +203,14 @@
 check_function_keywords("__inline__")
 
 if (HAVE_INLINE)
-	set(JSON_INLINE inline)
+    set(JSON_INLINE inline)
 elseif (HAVE___INLINE)
-	set(JSON_INLINE __inline)
+    set(JSON_INLINE __inline)
 elseif (HAVE___INLINE__)
-	set(JSON_INLINE __inline__)
+    set(JSON_INLINE __inline__)
 else()
-	# no inline on this platform
-	set (JSON_INLINE)
+    # no inline on this platform
+    set (JSON_INLINE)
 endif()
 
 # Find our snprintf
@@ -218,9 +218,9 @@
 check_function_exists (_snprintf HAVE__SNPRINTF)
 
 if (HAVE_SNPRINTF)
-	set(JSON_SNPRINTF snprintf)
+    set(JSON_SNPRINTF snprintf)
 elseif (HAVE__SNPRINTF)
-	set(JSON_SNPRINTF _snprintf)
+    set(JSON_SNPRINTF _snprintf)
 endif () 
 
 check_c_source_compiles ("int main() { unsigned long val; __sync_bool_compare_and_swap(&val, 0, 1); return 0; } " HAVE_SYNC_BUILTINS)
@@ -250,35 +250,35 @@
 file(GLOB JANSSON_SRC src/*.c)
 
 set(
-	JANSSON_HDR_PRIVATE
-	${CMAKE_CURRENT_SOURCE_DIR}/src/hashtable.h
-	${CMAKE_CURRENT_SOURCE_DIR}/src/jansson_private.h
-	${CMAKE_CURRENT_SOURCE_DIR}/src/strbuffer.h
-	${CMAKE_CURRENT_SOURCE_DIR}/src/utf.h
-	${CMAKE_CURRENT_BINARY_DIR}/private_include/jansson_private_config.h
+    JANSSON_HDR_PRIVATE
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/hashtable.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/jansson_private.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/strbuffer.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/utf.h
+    ${CMAKE_CURRENT_BINARY_DIR}/private_include/jansson_private_config.h
 )
 
 set(
-	JANSSON_HDR_PUBLIC 
-	${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h
-	${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
+    JANSSON_HDR_PUBLIC 
+    ${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
 )
 
 irccd_define_library(
-	LOCAL
-	TARGET extern-jansson
-	SOURCES
-		${JANSSON_SRC}
-		${JANSSON_HDR_PRIVATE} 
-		${JANSSON_HDR_PUBLIC}
-	PUBLIC_INCLUDES
-		"${jansson_SOURCE_DIR}/include"
-		"${jansson_BINARY_DIR}/include"
+    LOCAL
+    TARGET extern-jansson
+    SOURCES
+        ${JANSSON_SRC}
+        ${JANSSON_HDR_PRIVATE} 
+        ${JANSSON_HDR_PUBLIC}
+    PUBLIC_INCLUDES
+        "${jansson_SOURCE_DIR}/include"
+        "${jansson_BINARY_DIR}/include"
 )
 
 set_target_properties(
-	extern-jansson
-	PROPERTIES
-		PROJECT_LABEL jansson
-		FOLDER extern
+    extern-jansson
+    PROPERTIES
+        PROJECT_LABEL jansson
+        FOLDER extern
 )
\ No newline at end of file
--- a/extern/libircclient/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/extern/libircclient/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -28,41 +28,41 @@
 check_function_exists(localtime_r HAVE_LOCALTIME_R)
 
 if (HAVE_GETHOSTBYNAME_R)
-	list(APPEND FLAGS "HAVE_GETHOSTBYNAME_R")
+    list(APPEND FLAGS "HAVE_GETHOSTBYNAME_R")
 endif ()
 if (HAVE_LOCALTIME_R)
-	list(APPEND FLAGS "HAVE_LOCALTIME_R")
+    list(APPEND FLAGS "HAVE_LOCALTIME_R")
 endif ()
 
 # SSL is optional
 if (WITH_SSL)
-	list(APPEND INCLUDES ${OPENSSL_INCLUDE_DIR})
-	list(APPEND LIBRARIES ${OPENSSL_LIBRARIES})
-	list(APPEND FLAGS "ENABLE_SSL")
+    list(APPEND INCLUDES ${OPENSSL_INCLUDE_DIR})
+    list(APPEND LIBRARIES ${OPENSSL_LIBRARIES})
+    list(APPEND FLAGS "ENABLE_SSL")
 endif ()
 
 # Enable or disable IPv6
 if (WITH_IPV6)
-	list(APPEND FLAGS "ENABLE_IPV6")
+    list(APPEND FLAGS "ENABLE_IPV6")
 endif ()
 
 if (WIN32)
-	list(APPEND LIBRARIES ws2_32)
+    list(APPEND LIBRARIES ws2_32)
 endif ()
 
 irccd_define_library(
-	LOCAL
-	TARGET extern-ircclient
-	SOURCES src/libircclient.c
-	FLAGS ${FLAGS}
-	LIBRARIES ${LIBRARIES}
-	PUBLIC_INCLUDES "${extern-libircclient_SOURCE_DIR}/include"
-	LOCAL_INCLUDES ${INCLUDES}
+    LOCAL
+    TARGET extern-ircclient
+    SOURCES src/libircclient.c
+    FLAGS ${FLAGS}
+    LIBRARIES ${LIBRARIES}
+    PUBLIC_INCLUDES "${extern-libircclient_SOURCE_DIR}/include"
+    LOCAL_INCLUDES ${INCLUDES}
 )
 
 set_target_properties(
-	extern-ircclient
-	PROPERTIES
-		PROJECT_LABEL libircclient
-		FOLDER extern
+    extern-ircclient
+    PROPERTIES
+        PROJECT_LABEL libircclient
+        FOLDER extern
 )
\ No newline at end of file
--- a/irccd/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/irccd/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,17 +19,17 @@
 project(irccd)
 
 irccd_define_executable(
-	TARGET irccd
-	INSTALL
-	SOURCES CMakeLists.txt main.cpp
-	INCLUDES ${irccd_SOURCE_DIR}
-	LIBRARIES libirccd
+    TARGET irccd
+    INSTALL
+    SOURCES CMakeLists.txt main.cpp
+    INCLUDES ${irccd_SOURCE_DIR}
+    LIBRARIES libirccd
 )
 
 if (IRCCD_SYSTEM_MAC)
-	target_compile_options(irccd PRIVATE -Wno-deprecated-declarations)
+    target_compile_options(irccd PRIVATE -Wno-deprecated-declarations)
 endif ()
 
 if (UNIX)
-	set_target_properties(irccd PROPERTIES LINK_FLAGS -pthread)
+    set_target_properties(irccd PROPERTIES LINK_FLAGS -pthread)
 endif ()
--- a/irccd/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/irccd/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -56,216 +56,216 @@
 
 void usage()
 {
-	log::warning() << "usage: " << sys::programName() << " [options...]\n\n";
-	log::warning() << "Available options:\n";
-	log::warning() << "  -c, --config file       specify the configuration file\n";
-	log::warning() << "  -f, --foreground        do not run as a daemon\n";
-	log::warning() << "      --help              show this help\n";
-	log::warning() << "  -p, --plugin name       load a specific plugin\n";
-	log::warning() << "  -v, --verbose           be verbose\n";
-	log::warning() << "      --version           show the version\n";
-	std::exit(1);
+    log::warning() << "usage: " << sys::programName() << " [options...]\n\n";
+    log::warning() << "Available options:\n";
+    log::warning() << "  -c, --config file       specify the configuration file\n";
+    log::warning() << "  -f, --foreground        do not run as a daemon\n";
+    log::warning() << "      --help              show this help\n";
+    log::warning() << "  -p, --plugin name       load a specific plugin\n";
+    log::warning() << "  -v, --verbose           be verbose\n";
+    log::warning() << "      --version           show the version\n";
+    std::exit(1);
 }
 
 void stop(int)
 {
-	instance->stop();
+    instance->stop();
 }
 
 void init(int &argc, char **&argv)
 {
-	// Needed for some components.
-	sys::setProgramName("irccd");
-	path::setApplicationPath(argv[0]);
+    // Needed for some components.
+    sys::setProgramName("irccd");
+    path::setApplicationPath(argv[0]);
 
-	// Default logging to console.
-	log::setVerbose(false);
-	log::setInterface(std::make_unique<log::Console>());
+    // Default logging to console.
+    log::setVerbose(false);
+    log::setInterface(std::make_unique<log::Console>());
 
-	// Register some signals.
-	signal(SIGINT, stop);
-	signal(SIGTERM, stop);
+    // Register some signals.
+    signal(SIGINT, stop);
+    signal(SIGTERM, stop);
 
-	-- argc;
-	++ argv;
+    -- argc;
+    ++ argv;
 }
 
 parser::Result parse(int &argc, char **&argv)
 {
-	// Parse command line options.
-	parser::Result result;
+    // Parse command line options.
+    parser::Result result;
 
-	try {
-		parser::Options options{
-			{ "-c",			true	},
-			{ "--config",		true	},
-			{ "-f",			false	},
-			{ "--foreground",	false	},
-			{ "--help",		false	},
-			{ "-p",			true	},
-			{ "--plugin",		true	},
-			{ "-v",			false	},
-			{ "--verbose",		false	},
-			{ "--version",		false	}
-		};
+    try {
+        parser::Options options{
+            { "-c",             true    },
+            { "--config",       true    },
+            { "-f",             false   },
+            { "--foreground",   false   },
+            { "--help",         false   },
+            { "-p",             true    },
+            { "--plugin",       true    },
+            { "-v",             false   },
+            { "--verbose",      false   },
+            { "--version",      false   }
+        };
 
-		result = parser::read(argc, argv, options);
+        result = parser::read(argc, argv, options);
 
-		for (const auto &pair : result) {
-			if (pair.first == "--help")
-				usage();
-				// NOTREACHED
-			if (pair.first == "--version") {
-				std::cout << IRCCD_VERSION << std::endl;
-				std::exit(1);
-			}
-			if (pair.first == "-v" || pair.first == "--verbose")
-				log::setVerbose(true);
-		}
-	} catch (const std::exception &ex) {
-		log::warning() << sys::programName() << ": " << ex.what() << std::endl;
-		usage();
-	}
+        for (const auto &pair : result) {
+            if (pair.first == "--help")
+                usage();
+                // NOTREACHED
+            if (pair.first == "--version") {
+                std::cout << IRCCD_VERSION << std::endl;
+                std::exit(1);
+            }
+            if (pair.first == "-v" || pair.first == "--verbose")
+                log::setVerbose(true);
+        }
+    } catch (const std::exception &ex) {
+        log::warning() << sys::programName() << ": " << ex.what() << std::endl;
+        usage();
+    }
 
-	return result;
+    return result;
 }
 
 Config open(const parser::Result &result)
 {
-	auto it = result.find("-c");
+    auto it = result.find("-c");
 
-	if (it != result.end() || (it = result.find("--config")) != result.end()) {
-		try {
-			return Config(it->second);
-		} catch (const std::exception &ex) {
-			throw std::runtime_error("{}: {}"_format(it->second, ex.what()));
-		}
-	}
+    if (it != result.end() || (it = result.find("--config")) != result.end()) {
+        try {
+            return Config(it->second);
+        } catch (const std::exception &ex) {
+            throw std::runtime_error("{}: {}"_format(it->second, ex.what()));
+        }
+    }
 
-	return Config::find();
+    return Config::find();
 }
 
 void loadPid(const std::string &path)
 {
-	if (path.empty())
-		return;
+    if (path.empty())
+        return;
 
-	try {
+    try {
 #if defined(HAVE_GETPID)
-		std::ofstream out(path, std::ofstream::trunc);
+        std::ofstream out(path, std::ofstream::trunc);
 
-		if (!out)
-			throw std::runtime_error("could not open pidfile {}: {}"_format(path, std::strerror(errno)));
+        if (!out)
+            throw std::runtime_error("could not open pidfile {}: {}"_format(path, std::strerror(errno)));
 
-		log::debug() << "irccd: pid written in " << path << std::endl;
-		out << getpid() << std::endl;
+        log::debug() << "irccd: pid written in " << path << std::endl;
+        out << getpid() << std::endl;
 #else
-		throw std::runtime_error("pidfile option not supported on this platform");
+        throw std::runtime_error("pidfile option not supported on this platform");
 #endif
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: " << ex.what() << std::endl;
-	}
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: " << ex.what() << std::endl;
+    }
 }
 
 void loadGid(const std::string gid)
 {
-	try {
-		if (!gid.empty())
+    try {
+        if (!gid.empty())
 #if defined(HAVE_SETGID)
-			sys::setGid(gid);
+            sys::setGid(gid);
 #else
-			throw std::runtime_error(" gid option not supported on this platform");
+            throw std::runtime_error(" gid option not supported on this platform");
 #endif
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: " << ex.what() << std::endl;
-	}
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: " << ex.what() << std::endl;
+    }
 }
 
 void loadUid(const std::string &uid)
 {
-	try {
-		if (!uid.empty())
+    try {
+        if (!uid.empty())
 #if defined(HAVE_SETUID)
-			sys::setUid(uid);
+            sys::setUid(uid);
 #else
-			throw std::runtime_error("uid option not supported on this platform");
+            throw std::runtime_error("uid option not supported on this platform");
 #endif
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: " << ex.what() << std::endl;
-	}
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: " << ex.what() << std::endl;
+    }
 }
 
 void loadForeground(bool foreground, const parser::Result &options)
 {
-	try {
+    try {
 #if defined(HAVE_DAEMON)
-		if (options.count("-f") == 0 && options.count("--foreground") == 0 && !foreground)
-			daemon(1, 0);
+        if (options.count("-f") == 0 && options.count("--foreground") == 0 && !foreground)
+            daemon(1, 0);
 #else
-		if (options.count("-f") > 0 || options.count("--foreground") > 0 || foreground)
-			throw std::runtime_error("foreground option not supported on this platform");
+        if (options.count("-f") > 0 || options.count("--foreground") > 0 || foreground)
+            throw std::runtime_error("foreground option not supported on this platform");
 #endif
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: " << ex.what() << std::endl;
-	}
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: " << ex.what() << std::endl;
+    }
 }
 
 void load(const Config &config, const parser::Result &options)
 {
-	/*
-	 * Order matters, please be careful when changing this.
-	 *
-	 * 1. Open logs as early as possible to use the defined outputs on any loading errors.
-	 */
+    /*
+     * Order matters, please be careful when changing this.
+     *
+     * 1. Open logs as early as possible to use the defined outputs on any loading errors.
+     */
 
-	// [logs] and [format] sections.
-	config.loadLogs();
-	config.loadFormats();
+    // [logs] and [format] sections.
+    config.loadLogs();
+    config.loadFormats();
 
-	// Show message here to use the formats.
-	log::info() << "irccd: using " << config.path() << std::endl;
+    // Show message here to use the formats.
+    log::info() << "irccd: using " << config.path() << std::endl;
 
-	// [general] section.
-	loadPid(config.pidfile());
-	loadGid(config.gid());
-	loadUid(config.uid());
-	loadForeground(config.isForeground(), options);
+    // [general] section.
+    loadPid(config.pidfile());
+    loadGid(config.gid());
+    loadUid(config.uid());
+    loadForeground(config.isForeground(), options);
 
-	// [transport]
-	for (const auto &transport : config.loadTransports())
-		instance->transportService().add(transport);
+    // [transport]
+    for (const auto &transport : config.loadTransports())
+        instance->transportService().add(transport);
 
-	// [server] section.
-	for (const auto &server : config.loadServers())
-		instance->serverService().add(server);
+    // [server] section.
+    for (const auto &server : config.loadServers())
+        instance->serverService().add(server);
 
-	// [rule] section.
-	for (const auto &rule : config.loadRules())
-		instance->ruleService().add(rule);
+    // [rule] section.
+    for (const auto &rule : config.loadRules())
+        instance->ruleService().add(rule);
 
-	// [plugin] section.
-	config.loadPlugins(*instance);
+    // [plugin] section.
+    config.loadPlugins(*instance);
 }
 
 } // !namespace
 
 int main(int argc, char **argv)
 {
-	init(argc, argv);
+    init(argc, argv);
 
-	parser::Result options = parse(argc, argv);
+    parser::Result options = parse(argc, argv);
 
-	// Find configuration file.
-	instance = std::make_unique<Irccd>();
+    // Find configuration file.
+    instance = std::make_unique<Irccd>();
 
-	try {
-		load(open(options), options);
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: " << ex.what() << std::endl;
-		return 1;
-	}
+    try {
+        load(open(options), options);
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: " << ex.what() << std::endl;
+        return 1;
+    }
 
-	instance->run();
+    instance->run();
 
-	return 0;
+    return 0;
 }
--- a/irccdctl/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/irccdctl/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,12 +19,12 @@
 project(irccdctl)
 
 irccd_define_executable(
-	TARGET irccdctl
-	INSTALL
-	SOURCES CMakeLists.txt main.cpp
-	LIBRARIES libirccd
+    TARGET irccdctl
+    INSTALL
+    SOURCES CMakeLists.txt main.cpp
+    LIBRARIES libirccd
 )
 
 if (UNIX)
-	set_target_properties(irccdctl PROPERTIES LINK_FLAGS -pthread)
+    set_target_properties(irccdctl PROPERTIES LINK_FLAGS -pthread)
 endif ()
--- a/irccdctl/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/irccdctl/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -24,21 +24,21 @@
 
 int main(int argc, char **argv)
 {
-	// TODO: move to Application
-	sys::setProgramName("irccdctl");
-	path::setApplicationPath(argv[0]);
-	log::setInterface(std::make_unique<log::Console>());
-	log::setVerbose(false);
-	net::init();
+    // TODO: move to Application
+    sys::setProgramName("irccdctl");
+    path::setApplicationPath(argv[0]);
+    log::setInterface(std::make_unique<log::Console>());
+    log::setVerbose(false);
+    net::init();
 
-	try {
-		Irccdctl ctl;
+    try {
+        Irccdctl ctl;
 
-		ctl.run(--argc, ++argv);
-	} catch (const std::exception &ex) {
-		log::warning() << sys::programName() << ": " << ex.what() << std::endl;
-		std::exit(1);
-	}
+        ctl.run(--argc, ++argv);
+    } catch (const std::exception &ex) {
+        log::warning() << sys::programName() << ": " << ex.what() << std::endl;
+        std::exit(1);
+    }
 
-	return 0;
+    return 0;
 }
--- a/lib/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -23,109 +23,109 @@
 add_library(libirccd ${HEADERS} ${SOURCES})
 
 target_include_directories(
-	libirccd
-	PUBLIC
-		$<BUILD_INTERFACE:${duktape_SOURCE_DIR}>
-		$<BUILD_INTERFACE:${extern-libircclient_SOURCE_DIR}/include>
-		$<BUILD_INTERFACE:${IRCCD_FAKEROOTDIR}/include/irccd>
-		$<BUILD_INTERFACE:${IRCCD_FAKEROOTDIR}/include>
-		$<BUILD_INTERFACE:${lib_SOURCE_DIR}>
-		$<INSTALL_INTERFACE:include>
-		${OPENSSL_INCLUDE_DIR}
+    libirccd
+    PUBLIC
+        $<BUILD_INTERFACE:${duktape_SOURCE_DIR}>
+        $<BUILD_INTERFACE:${extern-libircclient_SOURCE_DIR}/include>
+        $<BUILD_INTERFACE:${IRCCD_FAKEROOTDIR}/include/irccd>
+        $<BUILD_INTERFACE:${IRCCD_FAKEROOTDIR}/include>
+        $<BUILD_INTERFACE:${lib_SOURCE_DIR}>
+        $<INSTALL_INTERFACE:include>
+        ${OPENSSL_INCLUDE_DIR}
 )
 
 source_group(irccd FILES ${HEADERS} ${SOURCES})
 
 if (IRCCD_SYSTEM_WINDOWS)
-	list(APPEND LIBRARIES ws2_32 shlwapi)
+    list(APPEND LIBRARIES ws2_32 shlwapi)
 
-	if (BUILD_SHARED_LIBS)
-		list(APPEND FLAGS IRCCD_BUILDING_DLL)
-	endif ()
+    if (BUILD_SHARED_LIBS)
+        list(APPEND FLAGS IRCCD_BUILDING_DLL)
+    endif ()
 elseif (IRCCD_SYSTEM_MAC)
-	list(APPEND LIBRARIES resolv)
+    list(APPEND LIBRARIES resolv)
 elseif (IRCCD_SYSTEM_LINUX)
-	list(APPEND LIBRARIES dl)
+    list(APPEND LIBRARIES dl)
 endif ()
 
 target_link_libraries(libirccd extern-duktape extern-ircclient extern-jansson extern-cppformat ${LIBRARIES})
 target_compile_definitions(libirccd PRIVATE ${FLAGS})
 
 set_target_properties(
-	libirccd
-	PROPERTIES
-		PREFIX ""
-		OUTPUT_NAME_DEBUG libirccd2d
-		RUNTIME_OUTPUT_DIRECTORY ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		RUNTIME_OUTPUT_DIRECTORY_DEBUG ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		RUNTIME_OUTPUT_DIRECTORY_RELEASE ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
-		VERSION ${IRCCD_VERSION}
-		SOVERSION ${IRCCD_VERSION_SHLIB}
+    libirccd
+    PROPERTIES
+        PREFIX ""
+        OUTPUT_NAME_DEBUG libirccd2d
+        RUNTIME_OUTPUT_DIRECTORY ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        RUNTIME_OUTPUT_DIRECTORY_DEBUG ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        RUNTIME_OUTPUT_DIRECTORY_RELEASE ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${IRCCD_FAKEROOTDIR}/${WITH_BINDIR}
+        VERSION ${IRCCD_VERSION}
+        SOVERSION ${IRCCD_VERSION_SHLIB}
 )
 
 install(
-	TARGETS libirccd
-#	EXPORT Irccd2Targets
-	RUNTIME DESTINATION bin
-	LIBRARY DESTINATION lib
-	ARCHIVE DESTINATION lib
+    TARGETS libirccd
+#    EXPORT Irccd2Targets
+    RUNTIME DESTINATION bin
+    LIBRARY DESTINATION lib
+    ARCHIVE DESTINATION lib
 )
 
 # # CMake target exports.
 # export(
-# 	EXPORT Irccd2Targets
-# 	FILE "${CMAKE_BINARY_DIR}/Irccd2Targets.cmake"
-# 	NAMESPACE Irccd2::
+#     EXPORT Irccd2Targets
+#     FILE "${CMAKE_BINARY_DIR}/Irccd2Targets.cmake"
+#     NAMESPACE Irccd2::
 # )
 
 # CMake version file.
 # include(CMakePackageConfigHelpers)
 
 # write_basic_package_version_file(
-# 	"${CMAKE_CURRENT_BINARY_DIR}/Irccd2ConfigVersion.cmake"
-# 	VERSION ${IRCCD_VERSION}
-# 	COMPATIBILITY AnyNewerVersion
+#     "${CMAKE_CURRENT_BINARY_DIR}/Irccd2ConfigVersion.cmake"
+#     VERSION ${IRCCD_VERSION}
+#     COMPATIBILITY AnyNewerVersion
 # )
 
 # Irccd main module file.
 # configure_file(
-# 	"${CMAKE_SOURCE_DIR}/cmake/internal/Irccd2Config.cmake.in"
-# 	"${CMAKE_BINARY_DIR}/Irccd2Config.cmake"
-# 	COPYONLY
+#     "${CMAKE_SOURCE_DIR}/cmake/internal/Irccd2Config.cmake.in"
+#     "${CMAKE_BINARY_DIR}/Irccd2Config.cmake"
+#     COPYONLY
 # )
 
 # Install all CMake stuff.
 # install(
-# 	EXPORT Irccd2Targets
-# 	FILE Irccd2Targets.cmake
-# 	NAMESPACE Irccd2::
-# 	DESTINATION ${WITH_CMAKEDIR}/Irccd2
+#     EXPORT Irccd2Targets
+#     FILE Irccd2Targets.cmake
+#     NAMESPACE Irccd2::
+#     DESTINATION ${WITH_CMAKEDIR}/Irccd2
 # )
 # 
 # install(
-# 	FILES
-# 		"${CMAKE_BINARY_DIR}/Irccd2Config.cmake"
-# 		"${CMAKE_BINARY_DIR}/Irccd2ConfigVersion.cmake"
-# 	DESTINATION ${WITH_CMAKEDIR}/Irccd2
+#     FILES
+#         "${CMAKE_BINARY_DIR}/Irccd2Config.cmake"
+#         "${CMAKE_BINARY_DIR}/Irccd2ConfigVersion.cmake"
+#     DESTINATION ${WITH_CMAKEDIR}/Irccd2
 # )
 
 # pkg-config
 if (WITH_PKGCONFIG)
-	# Configure the pkg-config file.
-	configure_file(
-		${CMAKE_SOURCE_DIR}/cmake/internal/irccd2.pc.in
-		${CMAKE_BINARY_DIR}/irccd2.pc
-		@ONLY
-	)
+    # Configure the pkg-config file.
+    configure_file(
+        ${CMAKE_SOURCE_DIR}/cmake/internal/irccd2.pc.in
+        ${CMAKE_BINARY_DIR}/irccd2.pc
+        @ONLY
+    )
 
-	# Adjust the library output name if debug.
-	file(
-		GENERATE
-		OUTPUT ${CMAKE_BINARY_DIR}/irccd2.pc
-		INPUT ${CMAKE_BINARY_DIR}/irccd2.pc
-	)
+    # Adjust the library output name if debug.
+    file(
+        GENERATE
+        OUTPUT ${CMAKE_BINARY_DIR}/irccd2.pc
+        INPUT ${CMAKE_BINARY_DIR}/irccd2.pc
+    )
 
-	install(FILES ${CMAKE_BINARY_DIR}/irccd2.pc DESTINATION ${WITH_PKGCONFIGDIR})
+    install(FILES ${CMAKE_BINARY_DIR}/irccd2.pc DESTINATION ${WITH_PKGCONFIGDIR})
 endif ()
--- a/lib/irccd/CMakeSources.cmake	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/CMakeSources.cmake	Tue Jun 21 20:52:17 2016 +0200
@@ -1,157 +1,157 @@
 set(
-	HEADERS
-	${CMAKE_CURRENT_LIST_DIR}/alias.hpp
-	${CMAKE_CURRENT_LIST_DIR}/connection.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-help.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-config.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-info.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-list.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-load.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-reload.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-unload.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-cmode.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-cnotice.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-connect.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-disconnect.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-info.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-invite.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-join.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-kick.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-list.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-me.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-message.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-mode.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-nick.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-notice.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-part.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-reconnect.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-topic.hpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-watch.hpp
-	${CMAKE_CURRENT_LIST_DIR}/command.hpp
-	${CMAKE_CURRENT_LIST_DIR}/config.hpp
-	${CMAKE_CURRENT_LIST_DIR}/elapsed-timer.hpp
-	${CMAKE_CURRENT_LIST_DIR}/fs.hpp
-	${CMAKE_CURRENT_LIST_DIR}/ini.hpp
-	${CMAKE_CURRENT_LIST_DIR}/irccd.hpp
-	${CMAKE_CURRENT_LIST_DIR}/irccdctl.hpp
-	${CMAKE_CURRENT_LIST_DIR}/json.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-directory.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-elapsed-timer.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-file.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-irccd.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-logger.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-plugin.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-server.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-system.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-timer.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-unicode.hpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-util.hpp
-	${CMAKE_CURRENT_LIST_DIR}/net.hpp
-	${CMAKE_CURRENT_LIST_DIR}/logger.hpp
-	${CMAKE_CURRENT_LIST_DIR}/module.hpp
-	${CMAKE_CURRENT_LIST_DIR}/options.hpp
-	${CMAKE_CURRENT_LIST_DIR}/path.hpp
-	${CMAKE_CURRENT_LIST_DIR}/plugin.hpp
-	${CMAKE_CURRENT_LIST_DIR}/plugin-dynlib.hpp
-	${CMAKE_CURRENT_LIST_DIR}/plugin-js.hpp
-	${CMAKE_CURRENT_LIST_DIR}/rule.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-event.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-private.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-connected.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-connecting.hpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-disconnected.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-command.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-interrupt.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-module.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-plugin.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-rule.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-server.hpp
-	${CMAKE_CURRENT_LIST_DIR}/service-transport.hpp
-	${CMAKE_CURRENT_LIST_DIR}/system.hpp
-	${CMAKE_CURRENT_LIST_DIR}/timer.hpp
-	${CMAKE_CURRENT_LIST_DIR}/transport-client.hpp
-	${CMAKE_CURRENT_LIST_DIR}/transport-server.hpp
-	${CMAKE_CURRENT_LIST_DIR}/unicode.hpp
-	${CMAKE_CURRENT_LIST_DIR}/util.hpp
+    HEADERS
+    ${CMAKE_CURRENT_LIST_DIR}/alias.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/connection.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-help.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-config.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-info.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-list.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-load.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-reload.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-unload.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-cmode.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-cnotice.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-connect.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-disconnect.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-info.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-invite.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-join.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-kick.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-list.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-me.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-message.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-mode.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-nick.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-notice.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-part.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-reconnect.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-topic.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-watch.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/command.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/config.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/elapsed-timer.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/fs.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/ini.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/irccd.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/irccdctl.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/json.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-directory.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-elapsed-timer.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-file.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-irccd.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-logger.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-plugin.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-server.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-system.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-timer.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-unicode.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-util.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/net.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/logger.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/module.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/options.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/path.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/plugin.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/plugin-dynlib.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/plugin-js.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/rule.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-event.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-private.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-connected.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-connecting.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-disconnected.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-command.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-interrupt.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-module.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-plugin.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-rule.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-server.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-transport.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/system.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/timer.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/transport-client.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/transport-server.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/unicode.hpp
+    ${CMAKE_CURRENT_LIST_DIR}/util.hpp
 )
 
 set(
-	SOURCES
-	${CMAKE_CURRENT_LIST_DIR}/alias.cpp
-	${CMAKE_CURRENT_LIST_DIR}/connection.cpp
-	${CMAKE_CURRENT_LIST_DIR}/config.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-help.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-config.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-info.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-list.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-load.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-reload.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-unload.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-cmode.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-cnotice.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-connect.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-disconnect.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-info.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-invite.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-join.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-kick.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-list.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-me.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-message.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-mode.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-nick.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-notice.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-part.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-reconnect.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-server-topic.cpp
-	${CMAKE_CURRENT_LIST_DIR}/cmd-watch.cpp
-	${CMAKE_CURRENT_LIST_DIR}/command.cpp
-	${CMAKE_CURRENT_LIST_DIR}/elapsed-timer.cpp
-	${CMAKE_CURRENT_LIST_DIR}/fs.cpp
-	${CMAKE_CURRENT_LIST_DIR}/ini.cpp
-	${CMAKE_CURRENT_LIST_DIR}/irccd.cpp
-	${CMAKE_CURRENT_LIST_DIR}/irccdctl.cpp
-	${CMAKE_CURRENT_LIST_DIR}/json.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-directory.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-elapsed-timer.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-file.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-irccd.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-logger.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-plugin.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-server.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-system.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-timer.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-unicode.cpp
-	${CMAKE_CURRENT_LIST_DIR}/mod-util.cpp
-	${CMAKE_CURRENT_LIST_DIR}/logger.cpp
-	${CMAKE_CURRENT_LIST_DIR}/options.cpp
-	${CMAKE_CURRENT_LIST_DIR}/path.cpp
-	${CMAKE_CURRENT_LIST_DIR}/plugin-dynlib.cpp
-	${CMAKE_CURRENT_LIST_DIR}/plugin-js.cpp
-	${CMAKE_CURRENT_LIST_DIR}/rule.cpp
-	${CMAKE_CURRENT_LIST_DIR}/server.cpp
-	${CMAKE_CURRENT_LIST_DIR}/server-event.cpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-connected.cpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-connecting.cpp
-	${CMAKE_CURRENT_LIST_DIR}/server-state-disconnected.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-command.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-interrupt.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-module.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-plugin.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-rule.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-server.cpp
-	${CMAKE_CURRENT_LIST_DIR}/service-transport.cpp
-	${CMAKE_CURRENT_LIST_DIR}/system.cpp
-	${CMAKE_CURRENT_LIST_DIR}/timer.cpp
-	${CMAKE_CURRENT_LIST_DIR}/transport-client.cpp
-	${CMAKE_CURRENT_LIST_DIR}/transport-server.cpp
-	${CMAKE_CURRENT_LIST_DIR}/unicode.cpp
-	${CMAKE_CURRENT_LIST_DIR}/util.cpp
+    SOURCES
+    ${CMAKE_CURRENT_LIST_DIR}/alias.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/connection.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/config.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-help.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-config.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-info.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-list.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-load.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-reload.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-plugin-unload.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-cmode.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-cnotice.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-connect.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-disconnect.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-info.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-invite.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-join.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-kick.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-list.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-me.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-message.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-mode.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-nick.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-notice.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-part.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-reconnect.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-server-topic.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/cmd-watch.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/command.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/elapsed-timer.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/fs.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/ini.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/irccd.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/irccdctl.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/json.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-directory.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-elapsed-timer.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-file.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-irccd.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-logger.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-plugin.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-server.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-system.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-timer.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-unicode.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/mod-util.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/logger.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/options.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/path.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/plugin-dynlib.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/plugin-js.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/rule.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/server.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-event.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-connected.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-connecting.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/server-state-disconnected.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-command.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-interrupt.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-module.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-plugin.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-rule.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-server.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/service-transport.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/system.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/timer.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/transport-client.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/transport-server.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/unicode.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/util.cpp
 )
 
 if (NOT IRCCD_SYSTEM_WINDOWS)
-	list(APPEND HEADERS ${CMAKE_CURRENT_LIST_DIR}/xdg.hpp)
+    list(APPEND HEADERS ${CMAKE_CURRENT_LIST_DIR}/xdg.hpp)
 endif ()
--- a/lib/irccd/alias.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/alias.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -25,36 +25,36 @@
 
 AliasArg::AliasArg(std::string value)
 {
-	assert(!value.empty());
+    assert(!value.empty());
 
-	if ((m_isPlaceholder = std::regex_match(value, std::regex("^%\\d+$")))) 
-		m_value = value.substr(1);
-	else
-		m_value = std::move(value);
+    if ((m_isPlaceholder = std::regex_match(value, std::regex("^%\\d+$")))) 
+        m_value = value.substr(1);
+    else
+        m_value = std::move(value);
 }
 
 unsigned AliasArg::index() const noexcept
 {
-	assert(isPlaceholder());
+    assert(isPlaceholder());
 
-	return std::stoi(m_value);
+    return std::stoi(m_value);
 }
 
 const std::string &AliasArg::value() const noexcept
 {
-	assert(!isPlaceholder());
+    assert(!isPlaceholder());
 
-	return m_value;
+    return m_value;
 }
 
 std::ostream &operator<<(std::ostream &out, const AliasArg &arg)
 {
-	if (arg.m_isPlaceholder)
-		out << "%" << arg.m_value;
-	else
-		out << arg.m_value;
+    if (arg.m_isPlaceholder)
+        out << "%" << arg.m_value;
+    else
+        out << arg.m_value;
 
-	return out;
+    return out;
 }
 
 } // !irccd
--- a/lib/irccd/alias.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/alias.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -43,51 +43,51 @@
  */
 class AliasArg {
 private:
-	std::string m_value;
-	bool m_isPlaceholder;
+    std::string m_value;
+    bool m_isPlaceholder;
 
 public:
-	/**
-	 * Construct an argument.
-	 *
-	 * \pre value must not be empty
-	 * \param value the value
-	 */
-	IRCCD_EXPORT AliasArg(std::string value);
+    /**
+     * Construct an argument.
+     *
+     * \pre value must not be empty
+     * \param value the value
+     */
+    IRCCD_EXPORT AliasArg(std::string value);
 
-	/**
-	 * Check if the argument is a placeholder.
-	 *
-	 * \return true if the argument is a placeholder
-	 */
-	inline bool isPlaceholder() const noexcept
-	{
-		return m_isPlaceholder;
-	}
+    /**
+     * Check if the argument is a placeholder.
+     *
+     * \return true if the argument is a placeholder
+     */
+    inline bool isPlaceholder() const noexcept
+    {
+        return m_isPlaceholder;
+    }
 
-	/**
-	 * Get the placeholder index (e.g %0 returns 0)
-	 *
-	 * \pre isPlaceholder() must return true
-	 * \return the position
-	 */
-	IRCCD_EXPORT unsigned index() const noexcept;
+    /**
+     * Get the placeholder index (e.g %0 returns 0)
+     *
+     * \pre isPlaceholder() must return true
+     * \return the position
+     */
+    IRCCD_EXPORT unsigned index() const noexcept;
 
-	/**
-	 * Get the real value.
-	 *
-	 * \pre isPlaceholder() must return false
-	 * \return the value
-	 */
-	IRCCD_EXPORT const std::string &value() const noexcept;
+    /**
+     * Get the real value.
+     *
+     * \pre isPlaceholder() must return false
+     * \return the value
+     */
+    IRCCD_EXPORT const std::string &value() const noexcept;
 
-	/**
-	 * Output the alias to the stream.
-	 *
-	 * \param out the output stream
-	 * \return out
-	 */
-	IRCCD_EXPORT friend std::ostream &operator<<(std::ostream &out, const AliasArg &);
+    /**
+     * Output the alias to the stream.
+     *
+     * \param out the output stream
+     * \return out
+     */
+    IRCCD_EXPORT friend std::ostream &operator<<(std::ostream &out, const AliasArg &);
 };
 
 /**
@@ -98,41 +98,41 @@
  */
 class AliasCommand {
 private:
-	std::string m_command;
-	std::vector<AliasArg> m_args;
+    std::string m_command;
+    std::vector<AliasArg> m_args;
 
 public:
-	/**
-	 * Create an alias command.
-	 *
-	 * \param command the command
-	 * \param args the arguments
-	 */
-	inline AliasCommand(std::string command, std::vector<AliasArg> args = {}) noexcept
-		: m_command(std::move(command))
-		, m_args(std::move(args))
-	{
-	}
+    /**
+     * Create an alias command.
+     *
+     * \param command the command
+     * \param args the arguments
+     */
+    inline AliasCommand(std::string command, std::vector<AliasArg> args = {}) noexcept
+        : m_command(std::move(command))
+        , m_args(std::move(args))
+    {
+    }
 
-	/**
-	 * Get the command to execute.
-	 *
-	 * \return the command name
-	 */
-	inline const std::string &command() const noexcept
-	{
-		return m_command;
-	}
+    /**
+     * Get the command to execute.
+     *
+     * \return the command name
+     */
+    inline const std::string &command() const noexcept
+    {
+        return m_command;
+    }
 
-	/**
-	 * Get the arguments.
-	 *
-	 * \return the arguments
-	 */
-	inline const std::vector<AliasArg> &args() const noexcept
-	{
-		return m_args;
-	}
+    /**
+     * Get the arguments.
+     *
+     * \return the arguments
+     */
+    inline const std::vector<AliasArg> &args() const noexcept
+    {
+        return m_args;
+    }
 };
 
 /**
@@ -144,28 +144,28 @@
  */
 class Alias : public std::vector<AliasCommand> {
 private:
-	std::string m_name;
+    std::string m_name;
 
 public:
-	/**
-	 * Create an alias.
-	 *
-	 * \param name the alias name
-	 */
-	inline Alias(std::string name) noexcept
-		: m_name(std::move(name))
-	{
-	}
+    /**
+     * Create an alias.
+     *
+     * \param name the alias name
+     */
+    inline Alias(std::string name) noexcept
+        : m_name(std::move(name))
+    {
+    }
 
-	/**
-	 * Get the alias name.
-	 *
-	 * \return the name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the alias name.
+     *
+     * \return the name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 };
 
 } // !irccd
--- a/lib/irccd/cmd-help.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-help.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -25,30 +25,30 @@
 namespace command {
 
 Help::Help()
-	: Command("help", "General")
+    : Command("help", "General")
 {
 }
 
 std::vector<Command::Arg> Help::args() const
 {
-	return {{ "command", true }};
+    return {{ "command", true }};
 }
 
 std::string Help::help() const
 {
-	return "Get help about a command.";
+    return "Get help about a command.";
 }
 
 json::Value Help::request(Irccdctl &irccdctl, const CommandRequest &args) const
 {
-	auto it = irccdctl.commandService().find(args.arg(0U));
+    auto it = irccdctl.commandService().find(args.arg(0U));
 
-	if (!it)
-		log::warning() << "there is no command named: " << args.arg(0U) << std::endl;
-	else
-		log::warning() << it->usage() << std::flush;
+    if (!it)
+        log::warning() << "there is no command named: " << args.arg(0U) << std::endl;
+    else
+        log::warning() << it->usage() << std::flush;
 
-	return nullptr;
+    return nullptr;
 }
 
 } // !command
--- a/lib/irccd/cmd-help.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-help.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,25 +36,25 @@
  */
 class Help : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT Help();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT Help();
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-config.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-config.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -31,95 +31,95 @@
 
 json::Value execSet(Irccd &irccd, const json::Value &request)
 {
-	auto plugin = irccd.pluginService().require(request.at("plugin").toString());
-	auto config = plugin->config();
+    auto plugin = irccd.pluginService().require(request.at("plugin").toString());
+    auto config = plugin->config();
 
-	config[request.at("variable").toString()] = request.at("value").toString(true);
-	plugin->setConfig(config);
+    config[request.at("variable").toString()] = request.at("value").toString(true);
+    plugin->setConfig(config);
 
-	return nullptr;
+    return nullptr;
 }
 
 json::Value execGet(Irccd &irccd, const json::Value &request)
 {
-	auto config = irccd.pluginService().require(request.at("plugin").toString())->config();
-	auto var = request.find("variable");
+    auto config = irccd.pluginService().require(request.at("plugin").toString())->config();
+    auto var = request.find("variable");
 
-	// 'vars' property.
-	std::map<std::string, json::Value> vars;
+    // 'vars' property.
+    std::map<std::string, json::Value> vars;
 
-	if (var != request.end())
-		vars.emplace(var->toString(), config[var->toString()]);
-	else
-		for (const auto &pair : config)
-			vars.emplace(pair.first, pair.second);
+    if (var != request.end())
+        vars.emplace(var->toString(), config[var->toString()]);
+    else
+        for (const auto &pair : config)
+            vars.emplace(pair.first, pair.second);
 
-	return json::object({{ "vars", json::Value(vars) }});
+    return json::object({{ "vars", json::Value(vars) }});
 }
 
 } // !namespace
 
 PluginConfig::PluginConfig()
-	: Command("plugin-config", "Plugins")
+    : Command("plugin-config", "Plugins")
 {
 }
 
 std::string PluginConfig::help() const
 {
-	return "Get or set a plugin configuration option.";
+    return "Get or set a plugin configuration option.";
 }
 
 std::vector<Command::Arg> PluginConfig::args() const
 {
-	return {
-		{ "plugin",	true	},
-		{ "variable",	false	},
-		{ "value",	false	}
-	};
+    return {
+        { "plugin",     true    },
+        { "variable",   false   },
+        { "value",      false   }
+    };
 }
 
 std::vector<Command::Property> PluginConfig::properties() const
 {
-	return {{ "plugin", { json::Type::String }}};
+    return {{ "plugin", { json::Type::String }}};
 }
 
 json::Value PluginConfig::request(Irccdctl &, const CommandRequest &args) const
 {
-	auto object = json::object({
-		{ "plugin", args.arg(0) }
-	});
+    auto object = json::object({
+        { "plugin", args.arg(0) }
+    });
 
-	if (args.length() >= 2U) {
-		object.insert("variable", args.arg(1));
+    if (args.length() >= 2U) {
+        object.insert("variable", args.arg(1));
 
-		if (args.length() == 3U)
-			object.insert("value", args.arg(2));
-	}
+        if (args.length() == 3U)
+            object.insert("value", args.arg(2));
+    }
 
-	return object;
+    return object;
 }
 
 json::Value PluginConfig::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	return request.contains("value") ? execSet(irccd, request) : execGet(irccd, request);
+    return request.contains("value") ? execSet(irccd, request) : execGet(irccd, request);
 }
 
 void PluginConfig::result(Irccdctl &irccdctl, const json::Value &response) const
 {
-	Command::result(irccdctl, response);
+    Command::result(irccdctl, response);
 
-	auto it = response.find("vars");
+    auto it = response.find("vars");
 
-	if (it == response.end() || !it->isObject())
-		return;
+    if (it == response.end() || !it->isObject())
+        return;
 
-	if (it->size() > 1U)
-		for (auto v = it->begin(); v != it->end(); ++v)
-			std::cout << std::setw(16) << std::left << v.key() << " : " << v->toString(true) << std::endl;
-	else
-		std::cout << it->begin()->toString(true) << std::endl;
+    if (it->size() > 1U)
+        for (auto v = it->begin(); v != it->end(); ++v)
+            std::cout << std::setw(16) << std::left << v.key() << " : " << v->toString(true) << std::endl;
+    else
+        std::cout << it->begin()->toString(true) << std::endl;
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-config.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-config.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -35,40 +35,40 @@
  */
 class PluginConfig : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginConfig();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginConfig();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 
-	/**
-	 * \copydoc Command::result
-	 */
-	IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
+    /**
+     * \copydoc Command::result
+     */
+    IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-info.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-info.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -29,56 +29,55 @@
 namespace command {
 
 PluginInfo::PluginInfo()
-	: Command("plugin-info", "Plugins")
+    : Command("plugin-info", "Plugins")
 {
 }
 
 std::string PluginInfo::help() const
 {
-	return "Get plugin information.";
+    return "Get plugin information.";
 }
 
 std::vector<Command::Arg> PluginInfo::args() const
 {
-	return {{ "plugin", true }};
+    return {{ "plugin", true }};
 }
 
 std::vector<Command::Property> PluginInfo::properties() const
 {
-	return {{ "plugin", { json::Type::String }}};
+    return {{ "plugin", { json::Type::String }}};
 }
 
 json::Value PluginInfo::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({{ "plugin", args.arg(0) }});
+    return json::object({{ "plugin", args.arg(0) }});
 }
 
 json::Value PluginInfo::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
+
+    auto plugin = irccd.pluginService().require(request.at("plugin").toString());
 
-	auto plugin = irccd.pluginService().require(request.at("plugin").toString());
-	
-	return json::object({
-		{ "author",	plugin->author()	},
-		{ "license",	plugin->license()	},
-		{ "summary",	plugin->summary()	},
-		{ "version",	plugin->version()	}
-	});
+    return json::object({
+        { "author",     plugin->author()    },
+        { "license",    plugin->license()   },
+        { "summary",    plugin->summary()   },
+        { "version",    plugin->version()   }
+    });
 }
 
 void PluginInfo::result(Irccdctl &irccdctl, const json::Value &result) const
 {
-	Command::result(irccdctl, result);
+    Command::result(irccdctl, result);
 
-	// Plugin information.
-	if (result.valueOr("status", false).toBool()) {
-		std::cout << std::boolalpha;
-		std::cout << "Author         : " << result.valueOr("author", "").toString(true) << std::endl;
-		std::cout << "License        : " << result.valueOr("license", "").toString(true) << std::endl;
-		std::cout << "Summary        : " << result.valueOr("summary", "").toString(true) << std::endl;
-		std::cout << "Version        : " << result.valueOr("version", "").toString(true) << std::endl;
-	}
+    if (result.valueOr("status", false).toBool()) {
+        std::cout << std::boolalpha;
+        std::cout << "Author         : " << result.valueOr("author", "").toString(true) << std::endl;
+        std::cout << "License        : " << result.valueOr("license", "").toString(true) << std::endl;
+        std::cout << "Summary        : " << result.valueOr("summary", "").toString(true) << std::endl;
+        std::cout << "Version        : " << result.valueOr("version", "").toString(true) << std::endl;
+    }
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-info.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-info.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,40 +36,40 @@
  */
 class PluginInfo : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginInfo();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginInfo();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 
-	/**
-	 * \copydoc Command::result
-	 */
-	IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
+    /**
+     * \copydoc Command::result
+     */
+    IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-list.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-list.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -29,34 +29,34 @@
 namespace command {
 
 PluginList::PluginList()
-	: Command("plugin-list", "Plugins")
+    : Command("plugin-list", "Plugins")
 {
 }
 
 std::string PluginList::help() const
 {
-	return "Get the list of loaded plugins.";
+    return "Get the list of loaded plugins.";
 }
 
 json::Value PluginList::exec(Irccd &irccd, const json::Value &request) const
 {
-	json::Value response = Command::exec(irccd, request);
-	json::Value list = json::array({});
+    json::Value response = Command::exec(irccd, request);
+    json::Value list = json::array({});
 
-	for (const auto &plugin : irccd.pluginService().plugins())
-		list.append(plugin->name());
+    for (const auto &plugin : irccd.pluginService().plugins())
+        list.append(plugin->name());
 
-	response.insert("list", std::move(list));
+    response.insert("list", std::move(list));
 
-	return response;
+    return response;
 }
 
 void PluginList::result(Irccdctl &irccdctl, const json::Value &object) const
 {
-	Command::result(irccdctl, object);
+    Command::result(irccdctl, object);
 
-	for (const auto &n : object.valueOr("list", json::Type::Array, json::array({})))
-		std::cout << n.toString() << std::endl;
+    for (const auto &n : object.valueOr("list", json::Type::Array, json::array({})))
+        std::cout << n.toString() << std::endl;
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-list.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-list.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,25 +36,25 @@
  */
 class PluginList : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginList();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginList();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 
-	/**
-	 * \copydoc Command::result
-	 */
-	IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
+    /**
+     * \copydoc Command::result
+     */
+    IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-load.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-load.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,32 +26,32 @@
 namespace command {
 
 PluginLoad::PluginLoad()
-	: Command("plugin-load", "Plugins")
+    : Command("plugin-load", "Plugins")
 {
 }
 
 std::string PluginLoad::help() const
 {
-	return "Load a plugin.";
+    return "Load a plugin.";
 }
 
 std::vector<Command::Arg> PluginLoad::args() const
 {
-	return {{ "plugin", true }};
+    return {{ "plugin", true }};
 }
 
 std::vector<Command::Property> PluginLoad::properties() const
 {
-	return {{ "plugin", { json::Type::String }}};
+    return {{ "plugin", { json::Type::String }}};
 }
 
 json::Value PluginLoad::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.pluginService().load(request.at("plugin").toString());
+    irccd.pluginService().load(request.at("plugin").toString());
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-load.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-load.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,30 +36,30 @@
  */
 class PluginLoad : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginLoad();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginLoad();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-reload.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-reload.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -27,32 +27,32 @@
 namespace command {
 
 PluginReload::PluginReload()
-	: Command("plugin-reload", "Plugins")
+    : Command("plugin-reload", "Plugins")
 {
 }
 
 std::string PluginReload::help() const
 {
-	return "Reload a plugin.";
+    return "Reload a plugin.";
 }
 
 std::vector<Command::Arg> PluginReload::args() const
 {
-	return {{ "plugin", true }};
+    return {{ "plugin", true }};
 }
 
 std::vector<Command::Property> PluginReload::properties() const
 {
-	return {{ "plugin", { json::Type::String }}};
+    return {{ "plugin", { json::Type::String }}};
 }
 
 json::Value PluginReload::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.pluginService().require(request.at("plugin").toString())->onReload(irccd);
+    irccd.pluginService().require(request.at("plugin").toString())->onReload(irccd);
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-reload.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-reload.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,30 +36,30 @@
  */
 class PluginReload : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginReload();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginReload();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-plugin-unload.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-unload.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,32 +26,32 @@
 namespace command {
 
 PluginUnload::PluginUnload()
-	: Command("plugin-unload", "Plugins")
+    : Command("plugin-unload", "Plugins")
 {
 }
 
 std::string PluginUnload::help() const
 {
-	return "Unload a plugin.";
+    return "Unload a plugin.";
 }
 
 std::vector<Command::Arg> PluginUnload::args() const
 {
-	return {{ "plugin", true }};
+    return {{ "plugin", true }};
 }
 
 std::vector<Command::Property> PluginUnload::properties() const
 {
-	return {{ "plugin", { json::Type::String }}};
+    return {{ "plugin", { json::Type::String }}};
 }
 
 json::Value PluginUnload::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.pluginService().unload(request.at("plugin").toString());
+    irccd.pluginService().unload(request.at("plugin").toString());
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-plugin-unload.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-plugin-unload.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,30 +36,30 @@
  */
 class PluginUnload : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT PluginUnload();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT PluginUnload();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-cmode.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-cmode.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,43 +26,43 @@
 namespace command {
 
 ServerChannelMode::ServerChannelMode()
-	: Command("server-cmode", "Server")
+    : Command("server-cmode", "Server")
 {
 }
 
 std::string ServerChannelMode::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerChannelMode::args() const
 {
-	return {
-		{ "server",	true },
-		{ "channel",	true },
-		{ "mode",	true }
-	};
+    return {
+        { "server",     true },
+        { "channel",    true },
+        { "mode",       true }
+    };
 }
 
 std::vector<Command::Property> ServerChannelMode::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }},
-		{ "mode",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "channel",    { json::Type::String }},
+        { "mode",       { json::Type::String }}
+    };
 }
 
 json::Value ServerChannelMode::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->cmode(
-		request.at("channel").toString(),
-		request.at("mode").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->cmode(
+        request.at("channel").toString(),
+        request.at("mode").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-cmode.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-cmode.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,30 +36,30 @@
  */
 class ServerChannelMode : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerChannelMode();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerChannelMode();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
-	 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
+     
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-cnotice.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-cnotice.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,43 +26,43 @@
 namespace command {
 
 ServerChannelNotice::ServerChannelNotice()
-	: Command("server-cnotice", "Server")
+    : Command("server-cnotice", "Server")
 {
 }
 
 std::string ServerChannelNotice::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerChannelNotice::args() const
 {
-	return {
-		{ "server",	true },
-		{ "channel",	true },
-		{ "message",	true }
-	};
+    return {
+        { "server",     true },
+        { "channel",    true },
+        { "message",    true }
+    };
 }
 
 std::vector<Command::Property> ServerChannelNotice::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }},
-		{ "message",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "channel",    { json::Type::String }},
+        { "message",    { json::Type::String }}
+    };
 }
 
 json::Value ServerChannelNotice::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->cnotice(
-		request.at("channel").toString(),
-		request.at("message").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->cnotice(
+        request.at("channel").toString(),
+        request.at("message").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-cnotice.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-cnotice.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -45,30 +45,30 @@
  */
 class ServerChannelNotice : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerChannelNotice();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerChannelNotice();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-connect.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-connect.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,132 +36,132 @@
 
 std::string readInfoName(const json::Value &object)
 {
-	auto it = object.find("name");
+    auto it = object.find("name");
 
-	if (it == object.end())
-		throw std::invalid_argument("missing 'name' property");
-	if (!it->isString() || !util::isIdentifierValid(it->toString()))
-		throw std::invalid_argument("invalid server name");
+    if (it == object.end())
+        throw std::invalid_argument("missing 'name' property");
+    if (!it->isString() || !util::isIdentifierValid(it->toString()))
+        throw std::invalid_argument("invalid server name");
 
-	return it->toString();
+    return it->toString();
 }
 
 std::string readInfoHost(const json::Value &object)
 {
-	auto it = object.find("host");
+    auto it = object.find("host");
 
-	if (it == object.end())
-		throw std::invalid_argument("missing 'host' property");
-	if (!it->isString())
-		throw std::invalid_argument("invalid host");
+    if (it == object.end())
+        throw std::invalid_argument("missing 'host' property");
+    if (!it->isString())
+        throw std::invalid_argument("invalid host");
 
-	return it->toString();
+    return it->toString();
 }
 
 std::uint16_t readInfoPort(const json::Value &object)
 {
-	auto it = object.find("port");
-	uint16_t port = 6667;
+    auto it = object.find("port");
+    uint16_t port = 6667;
 
-	if (it != object.end())
-		if (it->isInt() && it->toInt() >= 0 && it->toInt() <= std::numeric_limits<std::uint16_t>::max())
-			port = static_cast<std::uint16_t>(it->toInt());
+    if (it != object.end())
+        if (it->isInt() && it->toInt() >= 0 && it->toInt() <= std::numeric_limits<std::uint16_t>::max())
+            port = static_cast<std::uint16_t>(it->toInt());
 
-	return port;
+    return port;
 }
 
 ServerInfo readInfo(const json::Value &object)
 {
-	ServerInfo info;
+    ServerInfo info;
 
-	info.host = readInfoHost(object);
-	info.port = readInfoPort(object);
+    info.host = readInfoHost(object);
+    info.port = readInfoPort(object);
 
-	if (object.valueOr("ssl", json::Type::Boolean, false).toBool())
+    if (object.valueOr("ssl", json::Type::Boolean, false).toBool())
 #if defined(WITH_SSL)
-		info.flags |= ServerInfo::Ssl;
+        info.flags |= ServerInfo::Ssl;
 #else
-		throw std::invalid_argument("ssl is disabled");
+        throw std::invalid_argument("ssl is disabled");
 #endif
 
-	if (object.valueOr("sslVerify", json::Type::Boolean, false).toBool())
-		info.flags |= ServerInfo::SslVerify;
+    if (object.valueOr("sslVerify", json::Type::Boolean, false).toBool())
+        info.flags |= ServerInfo::SslVerify;
 
-	return info;
+    return info;
 }
 
 ServerIdentity readIdentity(const json::Value &object)
 {
-	ServerIdentity identity;
+    ServerIdentity identity;
 
-	identity.nickname = object.valueOr("nickname", json::Type::String, identity.nickname).toString();
-	identity.realname = object.valueOr("realname", json::Type::String, identity.realname).toString();
-	identity.username = object.valueOr("username", json::Type::String, identity.username).toString();
-	identity.ctcpversion = object.valueOr("ctcpVersion", json::Type::String, identity.ctcpversion).toString();
+    identity.nickname = object.valueOr("nickname", json::Type::String, identity.nickname).toString();
+    identity.realname = object.valueOr("realname", json::Type::String, identity.realname).toString();
+    identity.username = object.valueOr("username", json::Type::String, identity.username).toString();
+    identity.ctcpversion = object.valueOr("ctcpVersion", json::Type::String, identity.ctcpversion).toString();
 
-	return identity;
+    return identity;
 }
 
 ServerSettings readSettings(const json::Value &object)
 {
-	ServerSettings settings;
+    ServerSettings settings;
 
-	settings.command = object.valueOr("commandChar", json::Type::String, settings.command).toString();
-	settings.reconnectTries = object.valueOr("reconnectTries", json::Type::Int, settings.reconnectTries).toInt();
-	settings.reconnectDelay = object.valueOr("reconnectTimeout", json::Type::Int, settings.reconnectDelay).toInt();
+    settings.command = object.valueOr("commandChar", json::Type::String, settings.command).toString();
+    settings.reconnectTries = object.valueOr("reconnectTries", json::Type::Int, settings.reconnectTries).toInt();
+    settings.reconnectDelay = object.valueOr("reconnectTimeout", json::Type::Int, settings.reconnectDelay).toInt();
 
-	return settings;
+    return settings;
 }
 
 } // !namespace
 
 ServerConnect::ServerConnect()
-	: Command("server-connect", "Server")
+    : Command("server-connect", "Server")
 {
 }
 
 std::string ServerConnect::help() const
 {
-	return "Connect to a server.";
+    return "Connect to a server.";
 }
 
 std::vector<Command::Option> ServerConnect::options() const
 {
-	return {
-		{ "command",	"c", "command",		"char",		"command character to use"	},
-		{ "nickname",	"n", "nickname",	"nickname",	"nickname to use"		},
-		{ "realname",	"r", "realname",	"realname",	"realname to use"		},
-		{ "sslverify",	"S", "ssl-verify",	"",		"verify SSL"			},
-		{ "ssl",	"s", "ssl",		"",		"connect with SSL"		},
-		{ "username",	"u", "username",	"",		"username to use"		}
-	};
+    return {
+        { "command",    "c", "command",     "char",     "command character to use"  },
+        { "nickname",   "n", "nickname",    "nickname", "nickname to use"           },
+        { "realname",   "r", "realname",    "realname", "realname to use"           },
+        { "sslverify",  "S", "ssl-verify",  "",         "verify SSL"                },
+        { "ssl",        "s", "ssl",         "",         "connect with SSL"          },
+        { "username",   "u", "username",    "",         "username to use"           }
+    };
 }
 
 std::vector<Command::Arg> ServerConnect::args() const
 {
-	return {
-		{ "id",		true	},
-		{ "host",	true	},
-		{ "port",	false	}
-	};
+    return {
+        { "id",     true    },
+        { "host",   true    },
+        { "port",   false   }
+    };
 }
 
 std::vector<Command::Property> ServerConnect::properties() const
 {
-	// TODO
-	return {};
+    // TODO
+    return {};
 }
 
 json::Value ServerConnect::exec(Irccd &irccd, const json::Value &request) const
 {
-	auto server = std::make_shared<Server>(readInfoName(request), readInfo(request), readIdentity(request), readSettings(request));
+    auto server = std::make_shared<Server>(readInfoName(request), readInfo(request), readIdentity(request), readSettings(request));
 
-	if (irccd.serverService().has(server->name()))
-		throw std::invalid_argument("server '{}' already exists"_format(server->name()));
+    if (irccd.serverService().has(server->name()))
+        throw std::invalid_argument("server '{}' already exists"_format(server->name()));
 
-	irccd.serverService().add(std::move(server));
+    irccd.serverService().add(std::move(server));
 
-	return Command::exec(irccd, request);
+    return Command::exec(irccd, request);
 }
 
 } // !command
--- a/lib/irccd/cmd-server-connect.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-connect.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerConnect : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerConnect();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerConnect();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::options
-	 */
-	IRCCD_EXPORT std::vector<Option> options() const override;
+    /**
+     * \copydoc Command::options
+     */
+    IRCCD_EXPORT std::vector<Option> options() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-disconnect.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-disconnect.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,30 +26,30 @@
 namespace command {
 
 ServerDisconnect::ServerDisconnect()
-	: Command("server-disconnect", "Server")
+    : Command("server-disconnect", "Server")
 {
 }
 
 std::string ServerDisconnect::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerDisconnect::args() const
 {
-	return {{ "server", false }};
+    return {{ "server", false }};
 }
 
 json::Value ServerDisconnect::exec(Irccd &irccd, const json::Value &request) const
 {
-	auto it = request.find("server");
+    auto it = request.find("server");
 
-	if (it == request.end())
-		irccd.serverService().clear();
-	else
-		irccd.serverService().remove(it->toString());
+    if (it == request.end())
+        irccd.serverService().clear();
+    else
+        irccd.serverService().remove(it->toString());
 
-	return Command::exec(irccd, request);
+    return Command::exec(irccd, request);
 }
 
 } // !command
--- a/lib/irccd/cmd-server-disconnect.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-disconnect.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,27 +36,27 @@
  */
 class ServerDisconnect : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerDisconnect();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerDisconnect();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * Get list of arguments required.
-	 *
-	 * \return the arguments required
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * Get list of arguments required.
+     *
+     * \return the arguments required
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-info.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-info.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -28,91 +28,91 @@
 namespace command {
 
 ServerInfo::ServerInfo()
-	: Command("server-info", "Server")
+    : Command("server-info", "Server")
 {
 }
 
 std::string ServerInfo::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerInfo::args() const
 {
-	return {{ "server", true }};
+    return {{ "server", true }};
 }
 
 std::vector<Command::Property> ServerInfo::properties() const
 {
-	return {{ "server", { json::Type::String }}};
+    return {{ "server", { json::Type::String }}};
 }
 
 json::Value ServerInfo::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.args()[0] },
-		{ "target",	args.args()[1] },
-		{ "channel",	args.args()[2] }
-	});
+    return json::object({
+        { "server",     args.args()[0] },
+        { "target",     args.args()[1] },
+        { "channel",    args.args()[2] }
+    });
 }
 
 json::Value ServerInfo::exec(Irccd &irccd, const json::Value &request) const
 {
-	auto response = Command::exec(irccd, request);
-	auto server = irccd.serverService().require(request.at("server").toString());
+    auto response = Command::exec(irccd, request);
+    auto server = irccd.serverService().require(request.at("server").toString());
 
-	// General stuff.
-	response.insert("name", server->name());
-	response.insert("host", server->info().host);
-	response.insert("port", server->info().port);
-	response.insert("nickname", server->identity().nickname);
-	response.insert("username", server->identity().username);
-	response.insert("realname", server->identity().realname);
+    // General stuff.
+    response.insert("name", server->name());
+    response.insert("host", server->info().host);
+    response.insert("port", server->info().port);
+    response.insert("nickname", server->identity().nickname);
+    response.insert("username", server->identity().username);
+    response.insert("realname", server->identity().realname);
 
-	// Optional stuff.
-	if (server->info().flags & irccd::ServerInfo::Ipv6)
-		response.insert("ipv6", true);
-	if (server->info().flags & irccd::ServerInfo::Ssl)
-		response.insert("ssl", true);
-	if (server->info().flags & irccd::ServerInfo::SslVerify)
-		response.insert("sslVerify", true);
+    // Optional stuff.
+    if (server->info().flags & irccd::ServerInfo::Ipv6)
+        response.insert("ipv6", true);
+    if (server->info().flags & irccd::ServerInfo::Ssl)
+        response.insert("ssl", true);
+    if (server->info().flags & irccd::ServerInfo::SslVerify)
+        response.insert("sslVerify", true);
 
-	// Channel list.
-	auto channels = json::array({});
+    // Channel list.
+    auto channels = json::array({});
 
-	for (const auto &c : server->settings().channels)
-		channels.append(c.name);
+    for (const auto &c : server->settings().channels)
+        channels.append(c.name);
 
-	response.insert("channels", std::move(channels));
+    response.insert("channels", std::move(channels));
 
-	return response;
+    return response;
 }
 
 void ServerInfo::result(Irccdctl &irccdctl, const json::Value &response) const
 {
-	Command::result(irccdctl, response);
+    Command::result(irccdctl, response);
 
-	// Server information.
-	std::cout << std::boolalpha;
-	std::cout << "Name           : " << response.valueOr("name", "").toString(true) << std::endl;
-	std::cout << "Host           : " << response.valueOr("host", "").toString(true) << std::endl;
-	std::cout << "Port           : " << response.valueOr("port", "").toString(true) << std::endl;
-	std::cout << "Ipv6           : " << response.valueOr("ipv6", "").toString(true) << std::endl;
-	std::cout << "SSL            : " << response.valueOr("ssl", "").toString(true) << std::endl;
-	std::cout << "SSL verified   : " << response.valueOr("sslVerify", "").toString(true) << std::endl;
+    // Server information.
+    std::cout << std::boolalpha;
+    std::cout << "Name           : " << response.valueOr("name", "").toString(true) << std::endl;
+    std::cout << "Host           : " << response.valueOr("host", "").toString(true) << std::endl;
+    std::cout << "Port           : " << response.valueOr("port", "").toString(true) << std::endl;
+    std::cout << "Ipv6           : " << response.valueOr("ipv6", "").toString(true) << std::endl;
+    std::cout << "SSL            : " << response.valueOr("ssl", "").toString(true) << std::endl;
+    std::cout << "SSL verified   : " << response.valueOr("sslVerify", "").toString(true) << std::endl;
 
-	// Channels.
-	std::cout << "Channels       : ";
+    // Channels.
+    std::cout << "Channels       : ";
 
-	for (const json::Value &v : response.valueOr("channels", json::Type::Array, json::array({})))
-		std::cout << v.toString() << " ";
+    for (const json::Value &v : response.valueOr("channels", json::Type::Array, json::array({})))
+        std::cout << v.toString() << " ";
 
-	std::cout << std::endl;
+    std::cout << std::endl;
 
-	// Identity.
-	std::cout << "Nickname       : " << response.valueOr("nickname", "").toString(true) << std::endl;
-	std::cout << "User name      : " << response.valueOr("username", "").toString(true) << std::endl;
-	std::cout << "Real name      : " << response.valueOr("realname", "").toString(true) << std::endl;
+    // Identity.
+    std::cout << "Nickname       : " << response.valueOr("nickname", "").toString(true) << std::endl;
+    std::cout << "User name      : " << response.valueOr("username", "").toString(true) << std::endl;
+    std::cout << "Real name      : " << response.valueOr("realname", "").toString(true) << std::endl;
 }
 
 } // !command
--- a/lib/irccd/cmd-server-info.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-info.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,40 +36,40 @@
  */
 class ServerInfo : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerInfo();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerInfo();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 
-	/**
-	 * \copydoc Command::result
-	 */
-	IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
+    /**
+     * \copydoc Command::result
+     */
+    IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-invite.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-invite.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,53 +26,53 @@
 namespace command {
 
 ServerInvite::ServerInvite()
-	: Command("server-invite", "Server")
+    : Command("server-invite", "Server")
 {
 }
 
 std::string ServerInvite::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerInvite::args() const
 {
-	return {
-		{ "server",	true },
-		{ "nickname",	true },
-		{ "channel",	true }
-	};
+    return {
+        { "server",     true },
+        { "nickname",   true },
+        { "channel",    true }
+    };
 }
 
 std::vector<Command::Property> ServerInvite::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "target",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "target",     { json::Type::String }},
+        { "channel",    { json::Type::String }}
+    };
 }
 
 json::Value ServerInvite::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.args()[0] },
-		{ "target",	args.args()[1] },
-		{ "channel",	args.args()[2] }
-	});
+    return json::object({
+        { "server",     args.args()[0] },
+        { "target",     args.args()[1] },
+        { "channel",    args.args()[2] }
+    });
 }
 
 json::Value ServerInvite::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(
-		request.at("server").toString())->invite(
-		request.at("target").toString(),
-		request.at("channel").toString()
-	);
+    irccd.serverService().require(
+        request.at("server").toString())->invite(
+        request.at("target").toString(),
+        request.at("channel").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-invite.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-invite.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerInvite : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerInvite();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerInvite();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-join.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-join.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,57 +26,57 @@
 namespace command {
 
 ServerJoin::ServerJoin()
-	: Command("server-join", "Server")
+    : Command("server-join", "Server")
 {
 }
 
 std::string ServerJoin::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerJoin::args() const
 {
-	return {
-		{ "server",	true	},
-		{ "channel",	true	},
-		{ "password",	false	}
-	};
+    return {
+        { "server",     true    },
+        { "channel",    true    },
+        { "password",   false   }
+    };
 }
 
 std::vector<Command::Property> ServerJoin::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }},
-		{ "password",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "channel",    { json::Type::String }},
+        { "password",   { json::Type::String }}
+    };
 }
 
 json::Value ServerJoin::request(Irccdctl &, const CommandRequest &args) const
 {
-	auto req = json::object({
-		{ "server",	args.args()[0] },
-		{ "channel",	args.args()[1] }
-	});
+    auto req = json::object({
+        { "server",     args.args()[0] },
+        { "channel",    args.args()[1] }
+    });
 
-	if (args.length() == 3)
-		req.insert("password", args.args()[2]);
+    if (args.length() == 3)
+        req.insert("password", args.args()[2]);
 
-	return req;
+    return req;
 }
 
 json::Value ServerJoin::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(
-		request.at("server").toString())->join(
-		request.at("channel").toString(),
-		request.valueOr("password", json::Type::String, "").toString()
-	);
+    irccd.serverService().require(
+        request.at("server").toString())->join(
+        request.at("channel").toString(),
+        request.valueOr("password", json::Type::String, "").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-join.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-join.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerJoin : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerJoin();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerJoin();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-kick.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-kick.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,59 +26,59 @@
 namespace command {
 
 ServerKick::ServerKick()
-	: Command("server-kick", "Server")
+    : Command("server-kick", "Server")
 {
 }
 
 std::string ServerKick::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerKick::args() const
 {
-	return {
-		{ "server",	true	},
-		{ "target",	true	},
-		{ "channel",	true	},
-		{ "reason",	false	}
-	};
+    return {
+        { "server",     true    },
+        { "target",     true    },
+        { "channel",    true    },
+        { "reason",     false   }
+    };
 }
 
 std::vector<Command::Property> ServerKick::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "target",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "target",     { json::Type::String }},
+        { "channel",    { json::Type::String }}
+    };
 }
 
 json::Value ServerKick::request(Irccdctl &, const CommandRequest &args) const
 {
-	auto req = json::object({
-		{ "server",	args.arg(0) },
-		{ "target",	args.arg(1) },
-		{ "channel",	args.arg(2) }
-	});
+    auto req = json::object({
+        { "server",     args.arg(0) },
+        { "target",     args.arg(1) },
+        { "channel",    args.arg(2) }
+    });
 
-	if (args.length() == 4)
-		req.insert("reason", args.arg(3));
+    if (args.length() == 4)
+        req.insert("reason", args.arg(3));
 
-	return req;
+    return req;
 }
 
 json::Value ServerKick::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->kick(
-		request.at("target").toString(),
-		request.at("channel").toString(),
-		request.valueOr("reason", json::Type::String, "").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->kick(
+        request.at("target").toString(),
+        request.at("channel").toString(),
+        request.valueOr("reason", json::Type::String, "").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-kick.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-kick.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerKick : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerKick();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerKick();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-list.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-list.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -28,32 +28,32 @@
 namespace command {
 
 ServerList::ServerList()
-	: Command("server-list", "Server")
+    : Command("server-list", "Server")
 {
 }
 
 std::string ServerList::help() const
 {
-	return "";
+    return "";
 }
 
 json::Value ServerList::exec(Irccd &irccd, const json::Value &) const
 {
-	auto json = json::object({});
-	auto list = json::array({});
+    auto json = json::object({});
+    auto list = json::array({});
 
-	for (const auto &server : irccd.serverService().servers())
-		list.append(server->name());
+    for (const auto &server : irccd.serverService().servers())
+        list.append(server->name());
 
-	json.insert("list", std::move(list));
+    json.insert("list", std::move(list));
 
-	return json;
+    return json;
 }
 
 void ServerList::result(Irccdctl &, const json::Value &response) const
 {
-	for (const auto &n : response.valueOr("list", json::Type::Array, json::array({})))
-		std::cout << n.toString() << std::endl;
+    for (const auto &n : response.valueOr("list", json::Type::Array, json::array({})))
+        std::cout << n.toString() << std::endl;
 }
 
 } // !command
--- a/lib/irccd/cmd-server-list.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-list.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,25 +36,25 @@
  */
 class ServerList : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerList();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerList();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 
-	/**
-	 * \copydoc Command::result
-	 */
-	IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
+    /**
+     * \copydoc Command::result
+     */
+    IRCCD_EXPORT void result(Irccdctl &irccdctl, const json::Value &response) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-me.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-me.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,52 +26,52 @@
 namespace command {
 
 ServerMe::ServerMe()
-	: Command("server-me", "Server")
+    : Command("server-me", "Server")
 {
 }
 
 std::string ServerMe::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerMe::args() const
 {
-	return {
-		{ "server",	true },
-		{ "target",	true },
-		{ "message",	true }
-	};
+    return {
+        { "server",     true },
+        { "target",     true },
+        { "message",    true }
+    };
 }
 
 std::vector<Command::Property> ServerMe::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "target",	{ json::Type::String }},
-		{ "message",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "target",     { json::Type::String }},
+        { "message",    { json::Type::String }}
+    };
 }
 
 json::Value ServerMe::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "target",	args.arg(1) },
-		{ "message",	args.arg(2) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "target",     args.arg(1) },
+        { "message",    args.arg(2) }
+    });
 }
 
 json::Value ServerMe::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->me(
-		request.at("target").toString(),
-		request.at("message").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->me(
+        request.at("target").toString(),
+        request.at("message").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-me.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-me.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerMe : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerMe();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerMe();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-message.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-message.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,52 +26,52 @@
 namespace command {
 
 ServerMessage::ServerMessage()
-	: Command("server-message", "Server")
+    : Command("server-message", "Server")
 {
 }
 
 std::string ServerMessage::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerMessage::args() const
 {
-	return {
-		{ "server",	true },
-		{ "target",	true },
-		{ "message",	true }
-	};
+    return {
+        { "server",     true },
+        { "target",     true },
+        { "message",    true }
+    };
 }
 
 std::vector<Command::Property> ServerMessage::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "target",	{ json::Type::String }},
-		{ "message",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "target",     { json::Type::String }},
+        { "message",    { json::Type::String }}
+    };
 }
 
 json::Value ServerMessage::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "target",	args.arg(1) },
-		{ "message",	args.arg(2) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "target",     args.arg(1) },
+        { "message",    args.arg(2) }
+    });
 }
 
 json::Value ServerMessage::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->me(
-		request.at("target").toString(),
-		request.at("message").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->me(
+        request.at("target").toString(),
+        request.at("message").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-message.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-message.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerMessage : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerMessage();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerMessage();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-mode.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-mode.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,46 +26,46 @@
 namespace command {
 
 ServerMode::ServerMode()
-	: Command("server-mode", "Server")
+    : Command("server-mode", "Server")
 {
 }
 
 std::string ServerMode::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerMode::args() const
 {
-	return {
-		{ "server",	true },
-		{ "mode",	true }
-	};
+    return {
+        { "server",     true },
+        { "mode",       true }
+    };
 }
 
 std::vector<Command::Property> ServerMode::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "mode",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "mode",       { json::Type::String }}
+    };
 }
 
 json::Value ServerMode::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "mode",	args.arg(1) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "mode",       args.arg(1) }
+    });
 }
 
 json::Value ServerMode::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->mode(request.at("mode").toString());
+    irccd.serverService().require(request.at("server").toString())->mode(request.at("mode").toString());
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-mode.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-mode.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerMode : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerMode();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerMode();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-nick.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-nick.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,46 +26,46 @@
 namespace command {
 
 ServerNick::ServerNick()
-	: Command("server-nick", "Server")
+    : Command("server-nick", "Server")
 {
 }
 
 std::string ServerNick::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerNick::args() const
 {
-	return {
-		{ "server",	true },
-		{ "nickname",	true }
-	};
+    return {
+        { "server",     true },
+        { "nickname",   true }
+    };
 }
 
 std::vector<Command::Property> ServerNick::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "nickname",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "nickname",   { json::Type::String }}
+    };
 }
 
 json::Value ServerNick::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "nickname",	args.arg(1) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "nickname",   args.arg(1) }
+    });
 }
 
 json::Value ServerNick::exec(Irccd &irccd, const json::Value &object) const
 {
-	Command::exec(irccd, object);
+    Command::exec(irccd, object);
 
-	irccd.serverService().require(object.at("server").toString())->nick(object.at("nickname").toString());
+    irccd.serverService().require(object.at("server").toString())->nick(object.at("nickname").toString());
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-nick.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-nick.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerNick : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerNick();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerNick();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-notice.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-notice.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,52 +26,52 @@
 namespace command {
 
 ServerNotice::ServerNotice()
-	: Command("server-notice", "Server")
+    : Command("server-notice", "Server")
 {
 }
 
 std::string ServerNotice::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerNotice::args() const
 {
-	return {
-		{ "server",	true },
-		{ "target",	true },
-		{ "message",	true }
-	};
+    return {
+        { "server",     true },
+        { "target",     true },
+        { "message",    true }
+    };
 }
 
 std::vector<Command::Property> ServerNotice::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "target",	{ json::Type::String }},
-		{ "message",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "target",     { json::Type::String }},
+        { "message",    { json::Type::String }}
+    };
 }
 
 json::Value ServerNotice::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "target",	args.arg(1) },
-		{ "message",	args.arg(2) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "target",     args.arg(1) },
+        { "message",    args.arg(2) }
+    });
 }
 
 json::Value ServerNotice::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->notice(
-		request.at("target").toString(),
-		request.at("message").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->notice(
+        request.at("target").toString(),
+        request.at("message").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-notice.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-notice.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerNotice : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerNotice();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerNotice();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-part.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-part.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,55 +26,55 @@
 namespace command {
 
 ServerPart::ServerPart()
-	: Command("server-part", "Server")
+    : Command("server-part", "Server")
 {
 }
 
 std::string ServerPart::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerPart::args() const
 {
-	return {
-		{ "server",	true	},
-		{ "channel",	true	},
-		{ "reason",	false	}
-	};
+    return {
+        { "server",     true    },
+        { "channel",    true    },
+        { "reason",     false    }
+    };
 }
 
 std::vector<Command::Property> ServerPart::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "channel",    { json::Type::String }}
+    };
 }
 
 json::Value ServerPart::request(Irccdctl &, const CommandRequest &args) const
 {
-	auto req = json::object({
-		{ "server",	args.arg(0) },
-		{ "channel",	args.arg(1) }
-	});
+    auto req = json::object({
+        { "server",     args.arg(0) },
+        { "channel",    args.arg(1) }
+    });
 
-	if (args.length() == 3)
-		req.insert("reason", args.arg(2));
+    if (args.length() == 3)
+        req.insert("reason", args.arg(2));
 
-	return req;
+    return req;
 }
 
 json::Value ServerPart::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->part(
-		request.at("channel").toString(),
-		request.valueOr("reason", "").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->part(
+        request.at("channel").toString(),
+        request.valueOr("reason", "").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-part.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-part.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerPart : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerPart();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerPart();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-reconnect.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-reconnect.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,36 +26,36 @@
 namespace command {
 
 ServerReconnect::ServerReconnect()
-	: Command("server-reconnect", "Server")
+    : Command("server-reconnect", "Server")
 {
 }
 
 std::string ServerReconnect::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerReconnect::args() const
 {
-	return {{ "server", false }};
+    return {{ "server", false }};
 }
 
 json::Value ServerReconnect::request(Irccdctl &, const CommandRequest &args) const
 {
-	return args.length() == 0 ? nullptr : json::object({ { "server", args.arg(0) } });
+    return args.length() == 0 ? nullptr : json::object({ { "server", args.arg(0) } });
 }
 
 json::Value ServerReconnect::exec(Irccd &irccd, const json::Value &request) const
 {
-	auto server = request.find("server");
+    auto server = request.find("server");
 
-	if (server != request.end() && server->isString())
-		irccd.serverService().require(server->toString())->reconnect();
-	else
-		for (auto &server : irccd.serverService().servers())
-			server->reconnect();
+    if (server != request.end() && server->isString())
+        irccd.serverService().require(server->toString())->reconnect();
+    else
+        for (auto &server : irccd.serverService().servers())
+            server->reconnect();
 
-	return nullptr;
+    return nullptr;
 }
 
 } // !command
--- a/lib/irccd/cmd-server-reconnect.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-reconnect.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,30 +36,30 @@
  */
 class ServerReconnect : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerReconnect();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerReconnect();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-server-topic.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-topic.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,52 +26,52 @@
 namespace command {
 
 ServerTopic::ServerTopic()
-	: Command("server-topic", "Server")
+    : Command("server-topic", "Server")
 {
 }
 
 std::string ServerTopic::help() const
 {
-	return "";
+    return "";
 }
 
 std::vector<Command::Arg> ServerTopic::args() const
 {
-	return {
-		{ "server",	true },
-		{ "channel",	true },
-		{ "topic",	true }
-	};
+    return {
+        { "server",     true },
+        { "channel",    true },
+        { "topic",      true }
+    };
 }
 
 std::vector<Command::Property> ServerTopic::properties() const
 {
-	return {
-		{ "server",	{ json::Type::String }},
-		{ "channel",	{ json::Type::String }},
-		{ "topic",	{ json::Type::String }}
-	};
+    return {
+        { "server",     { json::Type::String }},
+        { "channel",    { json::Type::String }},
+        { "topic",      { json::Type::String }}
+    };
 }
 
 json::Value ServerTopic::request(Irccdctl &, const CommandRequest &args) const
 {
-	return json::object({
-		{ "server",	args.arg(0) },
-		{ "channel",	args.arg(1) },
-		{ "topic",	args.arg(2) }
-	});
+    return json::object({
+        { "server",     args.arg(0) },
+        { "channel",    args.arg(1) },
+        { "topic",      args.arg(2) }
+    });
 }
 
 json::Value ServerTopic::exec(Irccd &irccd, const json::Value &request) const
 {
-	Command::exec(irccd, request);
+    Command::exec(irccd, request);
 
-	irccd.serverService().require(request.at("server").toString())->topic(
-		request.at("channel").toString(),
-		request.at("topic").toString()
-	);
+    irccd.serverService().require(request.at("server").toString())->topic(
+        request.at("channel").toString(),
+        request.at("topic").toString()
+    );
 
-	return json::object();
+    return json::object();
 }
 
 } // !command
--- a/lib/irccd/cmd-server-topic.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-server-topic.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,35 +36,35 @@
  */
 class ServerTopic : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT ServerTopic();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT ServerTopic();
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::args
-	 */
-	IRCCD_EXPORT std::vector<Arg> args() const override;
+    /**
+     * \copydoc Command::args
+     */
+    IRCCD_EXPORT std::vector<Arg> args() const override;
 
-	/**
-	 * \copydoc Command::properties
-	 */
-	IRCCD_EXPORT std::vector<Property> properties() const override;
+    /**
+     * \copydoc Command::properties
+     */
+    IRCCD_EXPORT std::vector<Property> properties() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 
-	/**
-	 * \copydoc Command::exec
-	 */
-	IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
+    /**
+     * \copydoc Command::exec
+     */
+    IRCCD_EXPORT json::Value exec(Irccd &irccd, const json::Value &request) const override;
 };
 
 } // !command
--- a/lib/irccd/cmd-watch.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-watch.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -32,211 +32,211 @@
 
 void onChannelMode(const json::Value &v)
 {
-	std::cout << "event:       onChannelMode\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "mode:        " << v.valueOr("mode", "").toString() << "\n";
-	std::cout << "argument:    " << v.valueOr("argument", "").toString() << "\n";
+    std::cout << "event:       onChannelMode\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "mode:        " << v.valueOr("mode", "").toString() << "\n";
+    std::cout << "argument:    " << v.valueOr("argument", "").toString() << "\n";
 }
 
 void onChannelNotice(const json::Value &v)
 {
-	std::cout << "event:       onChannelNotice\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
+    std::cout << "event:       onChannelNotice\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onConnect(const json::Value &v)
 {
-	std::cout << "event:       onConnect\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "event:       onConnect\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
 }
 
 void onInvite(const json::Value &v)
 {
-	std::cout << "event:       onInvite\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "event:       onInvite\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
 }
 
 void onJoin(const json::Value &v)
 {
-	std::cout << "event:       onJoin\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "event:       onJoin\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
 }
 
 void onKick(const json::Value &v)
 {
-	std::cout << "event:       onKick\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "target:      " << v.valueOr("target", "").toString() << "\n";
-	std::cout << "reason:      " << v.valueOr("reason", "").toString() << "\n";
+    std::cout << "event:       onKick\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "target:      " << v.valueOr("target", "").toString() << "\n";
+    std::cout << "reason:      " << v.valueOr("reason", "").toString() << "\n";
 }
 
 void onMessage(const json::Value &v)
 {
-	std::cout << "event:       onMessage\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
+    std::cout << "event:       onMessage\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onMe(const json::Value &v)
 {
-	std::cout << "event:       onMe\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "target:      " << v.valueOr("target", "").toString() << "\n";
-	std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
+    std::cout << "event:       onMe\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "target:      " << v.valueOr("target", "").toString() << "\n";
+    std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onMode(const json::Value &v)
 {
-	std::cout << "event:       onMode\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "mode:        " << v.valueOr("mode", "").toString() << "\n";
+    std::cout << "event:       onMode\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "mode:        " << v.valueOr("mode", "").toString() << "\n";
 }
 
 void onNames(const json::Value &v)
 {
-	std::cout << "event:       onNames\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "names:       " << v.valueOr("names", "").toJson(0) << "\n";
+    std::cout << "event:       onNames\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "names:       " << v.valueOr("names", "").toJson(0) << "\n";
 }
 
 void onNick(const json::Value &v)
 {
-	std::cout << "event:       onNick\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "nickname:    " << v.valueOr("nickname", "").toString() << "\n";
+    std::cout << "event:       onNick\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "nickname:    " << v.valueOr("nickname", "").toString() << "\n";
 }
 
 void onNotice(const json::Value &v)
 {
-	std::cout << "event:       onNotice\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "message:      " << v.valueOr("message", "").toString() << "\n";
+    std::cout << "event:       onNotice\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "message:      " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onPart(const json::Value &v)
 {
-	std::cout << "event:       onPart\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "reason:      " << v.valueOr("reason", "").toString() << "\n";
+    std::cout << "event:       onPart\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "reason:      " << v.valueOr("reason", "").toString() << "\n";
 }
 
 void onQuery(const json::Value &v)
 {
-	std::cout << "event:       onQuery\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
+    std::cout << "event:       onQuery\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onTopic(const json::Value &v)
 {
-	std::cout << "event:       onTopic\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
-	std::cout << "topic:       " << v.valueOr("topic", "").toString() << "\n";
+    std::cout << "event:       onTopic\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
+    std::cout << "channel:     " << v.valueOr("channel", "").toString() << "\n";
+    std::cout << "topic:       " << v.valueOr("topic", "").toString() << "\n";
 }
 
 void onWhois(const json::Value &v)
 {
-	std::cout << "event:       onWhois\n";
-	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
-	std::cout << "nickname:    " << v.valueOr("nickname", "").toString() << "\n";
-	std::cout << "username:    " << v.valueOr("username", "").toString() << "\n";
-	std::cout << "host:        " << v.valueOr("host", "").toString() << "\n";
-	std::cout << "realname:    " << v.valueOr("realname", "").toString() << "\n";
+    std::cout << "event:       onWhois\n";
+    std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
+    std::cout << "nickname:    " << v.valueOr("nickname", "").toString() << "\n";
+    std::cout << "username:    " << v.valueOr("username", "").toString() << "\n";
+    std::cout << "host:        " << v.valueOr("host", "").toString() << "\n";
+    std::cout << "realname:    " << v.valueOr("realname", "").toString() << "\n";
 }
 
 const std::unordered_map<std::string, std::function<void (const json::Value &)>> events{
-	{ "onChannelMode",	onChannelMode		},
-	{ "onChannelNotice",	onChannelNotice		},
-	{ "onConnect",		onConnect		},
-	{ "onInvite",		onInvite		},
-	{ "onJoin",		onJoin			},
-	{ "onKick",		onKick			},
-	{ "onMessage",		onMessage		},
-	{ "onMe",		onMe			},
-	{ "onMode",		onMode			},
-	{ "onNames",		onNames			},
-	{ "onNick",		onNick			},
-	{ "onNotice",		onNotice		},
-	{ "onPart",		onPart			},
-	{ "onQuery",		onQuery			},
-	{ "onTopic",		onTopic			},
-	{ "onWhois",		onWhois			}
+    { "onChannelMode",      onChannelMode   },
+    { "onChannelNotice",    onChannelNotice },
+    { "onConnect",          onConnect       },
+    { "onInvite",           onInvite        },
+    { "onJoin",             onJoin          },
+    { "onKick",             onKick          },
+    { "onMessage",          onMessage       },
+    { "onMe",               onMe            },
+    { "onMode",             onMode          },
+    { "onNames",            onNames         },
+    { "onNick",             onNick          },
+    { "onNotice",           onNotice        },
+    { "onPart",             onPart          },
+    { "onQuery",            onQuery         },
+    { "onTopic",            onTopic         },
+    { "onWhois",            onWhois         }
 };
 
 } // !namespace
 
 Watch::Watch()
-	: Command("watch", "General")
+    : Command("watch", "General")
 {
 }
 
 std::vector<Command::Option> Watch::options() const
 {
-	return {{ "format", "f", "format", "format", "output format" }};
+    return {{ "format", "f", "format", "format", "output format" }};
 }
 
 std::string Watch::help() const
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	oss << "Start watching irccd events.\n\n";
-	oss << "You can use different output formats, native which is a human readable\n";
-	oss << "format or json, pretty formatted json.";
+    oss << "Start watching irccd events.\n\n";
+    oss << "You can use different output formats, native which is a human readable\n";
+    oss << "format or json, pretty formatted json.";
 
-	return oss.str();
+    return oss.str();
 }
 
 json::Value Watch::request(Irccdctl &ctl, const CommandRequest &request) const
 {
-	std::string format = request.optionOr("format", "native");
+    std::string format = request.optionOr("format", "native");
 
-	if (format != "native" && format != "json")
-		throw std::invalid_argument("invalid format given: " + format);
+    if (format != "native" && format != "json")
+        throw std::invalid_argument("invalid format given: " + format);
 
-	for (;;) {
-		try {
-			auto object = ctl.connection().next(-1);
-			auto it = events.find(object.valueOr("event", "").toString());
+    for (;;) {
+        try {
+            auto object = ctl.connection().next(-1);
+            auto it = events.find(object.valueOr("event", "").toString());
 
-			// Silently ignore to avoid breaking user output.
-			if (it == events.end())
-				continue;
+            // Silently ignore to avoid breaking user output.
+            if (it == events.end())
+                continue;
 
-			if (format == "json")
-				std::cout << object.toJson() << std::endl;
-			else {
-				it->second(object);
-				std::cout << std::endl;
-			}
-		} catch (...) {
-		}
-	}
+            if (format == "json")
+                std::cout << object.toJson() << std::endl;
+            else {
+                it->second(object);
+                std::cout << std::endl;
+            }
+        } catch (...) {
+        }
+    }
 
-	throw std::runtime_error("connection lost");
+    throw std::runtime_error("connection lost");
 
-	return nullptr;
+    return nullptr;
 }
 
 } // !command
--- a/lib/irccd/cmd-watch.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/cmd-watch.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,25 +36,25 @@
  */
 class Watch : public Command {
 public:
-	/**
-	 * Constructor.
-	 */
-	IRCCD_EXPORT Watch();
+    /**
+     * Constructor.
+     */
+    IRCCD_EXPORT Watch();
 
-	/**
-	 * \copydoc Command::options
-	 */
-	IRCCD_EXPORT std::vector<Option> options() const override;
+    /**
+     * \copydoc Command::options
+     */
+    IRCCD_EXPORT std::vector<Option> options() const override;
 
-	/**
-	 * \copydoc Command::help
-	 */
-	IRCCD_EXPORT std::string help() const override;
+    /**
+     * \copydoc Command::help
+     */
+    IRCCD_EXPORT std::string help() const override;
 
-	/**
-	 * \copydoc Command::request
-	 */
-	IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
+    /**
+     * \copydoc Command::request
+     */
+    IRCCD_EXPORT json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const override;
 };
 
 } // !command
--- a/lib/irccd/command.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/command.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -42,13 +42,13 @@
  */
 std::string typeName(json::Type type)
 {
-	static const std::vector<std::string> typenames{
-		"array", "boolean", "int", "null", "object", "real", "string"
-	};
+    static const std::vector<std::string> typenames{
+        "array", "boolean", "int", "null", "object", "real", "string"
+    };
 
-	assert(type >= json::Type::Array && type <= json::Type::String);
+    assert(type >= json::Type::Array && type <= json::Type::String);
 
-	return typenames[static_cast<int>(type)];
+    return typenames[static_cast<int>(type)];
 }
 
 /*
@@ -60,113 +60,113 @@
 
 std::string typeNameList(const std::vector<json::Type> &types)
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	if (types.size() == 1)
-		return typeName(types[0]);
+    if (types.size() == 1)
+        return typeName(types[0]);
 
-	for (std::size_t i = 0; i < types.size(); ++i) {
-		oss << typeName(types[i]);
+    for (std::size_t i = 0; i < types.size(); ++i) {
+        oss << typeName(types[i]);
 
-		if (i == types.size() - 2)
-			oss << " or ";
-		else if (i < types.size() - 1)
-			oss << ", ";
-	}
+        if (i == types.size() - 2)
+            oss << " or ";
+        else if (i < types.size() - 1)
+            oss << ", ";
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 } // !namespace
 
 std::string Command::usage() const
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	oss << "usage: " << sys::programName() << " " << m_name;
+    oss << "usage: " << sys::programName() << " " << m_name;
 
-	// Options summary.
-	if (options().size() > 0)
-		oss << " [options...]";
+    // Options summary.
+    if (options().size() > 0)
+        oss << " [options...]";
 
-	// Arguments summary.
-	if (args().size() > 0) {
-		oss << " ";
+    // Arguments summary.
+    if (args().size() > 0) {
+        oss << " ";
 
-		for (const auto &arg : args())
-			oss << (arg.required() ? "" : "[") << arg.name() << (arg.required() ? "" : "]") << " ";
-	}
+        for (const auto &arg : args())
+            oss << (arg.required() ? "" : "[") << arg.name() << (arg.required() ? "" : "]") << " ";
+    }
 
-	// Description.
-	oss << "\n\n" << help() << "\n\n";
+    // Description.
+    oss << "\n\n" << help() << "\n\n";
 
-	// Options.
-	if (options().size() > 0) {
-		oss << "Options:\n";
+    // Options.
+    if (options().size() > 0) {
+        oss << "Options:\n";
 
-		for (const auto &opt : options()) {
-			std::ostringstream optoss;
+        for (const auto &opt : options()) {
+            std::ostringstream optoss;
 
-			// Construct the line for the option in a single string to pad it correctly.
-			optoss << "  ";
-			optoss << (!opt.simpleKey().empty() ? ("-"s + opt.simpleKey() + " ") : "   ");
-			optoss << (!opt.longKey().empty() ? ("--"s + opt.longKey() + " "s) : "");
-			optoss << opt.arg();
+            // Construct the line for the option in a single string to pad it correctly.
+            optoss << "  ";
+            optoss << (!opt.simpleKey().empty() ? ("-"s + opt.simpleKey() + " ") : "   ");
+            optoss << (!opt.longKey().empty() ? ("--"s + opt.longKey() + " "s) : "");
+            optoss << opt.arg();
 
-			// Add it padded with spaces.
-			oss << std::left << std::setw(28) << optoss.str();
-			oss << opt.description() << "\n";
-		}
-	}
+            // Add it padded with spaces.
+            oss << std::left << std::setw(28) << optoss.str();
+            oss << opt.description() << "\n";
+        }
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 unsigned Command::min() const noexcept
 {
-	auto list = args();
+    auto list = args();
 
-	return std::accumulate(list.begin(), list.end(), 0U, [] (unsigned i, const auto &arg) noexcept -> unsigned {
-		return i + (arg.required() ? 1 : 0);
-	});
+    return std::accumulate(list.begin(), list.end(), 0U, [] (unsigned i, const auto &arg) noexcept -> unsigned {
+        return i + (arg.required() ? 1 : 0);
+    });
 }
 
 unsigned Command::max() const noexcept
 {
-	return (unsigned)args().size();
+    return (unsigned)args().size();
 }
 
 json::Value Command::request(Irccdctl &, const CommandRequest &) const
 {
-	return json::object({});
+    return json::object({});
 }
 
 json::Value Command::exec(Irccd &, const json::Value &request) const
 {
-	// Verify that requested properties are present in the request.
-	for (const auto &prop : properties()) {
-		auto it = request.find(prop.name());
+    // Verify that requested properties are present in the request.
+    for (const auto &prop : properties()) {
+        auto it = request.find(prop.name());
 
-		if (it == request.end())
-			throw std::invalid_argument("missing '{}' property"_format(prop.name()));
+        if (it == request.end())
+            throw std::invalid_argument("missing '{}' property"_format(prop.name()));
 
-		if (std::find(prop.types().begin(), prop.types().end(), it->typeOf()) == prop.types().end()) {
-			auto expected = typeNameList(prop.types());
-			auto got = typeName(it->typeOf());
+        if (std::find(prop.types().begin(), prop.types().end(), it->typeOf()) == prop.types().end()) {
+            auto expected = typeNameList(prop.types());
+            auto got = typeName(it->typeOf());
 
-			throw std::invalid_argument("invalid '{}' property ({} expected, got {})"_format(prop.name(), expected, got));
-		}
-	}
+            throw std::invalid_argument("invalid '{}' property ({} expected, got {})"_format(prop.name(), expected, got));
+        }
+    }
 
-	return json::object({});
+    return json::object({});
 }
 
 void Command::result(Irccdctl &, const json::Value &response) const
 {
-	auto it = response.find("error");
+    auto it = response.find("error");
 
-	if (it != response.end() && it->isString())
-		log::warning() << "irccdctl: " << it->toString() << std::endl;
+    if (it != response.end() && it->isString())
+        log::warning() << "irccdctl: " << it->toString() << std::endl;
 }
 
 } // !irccd
--- a/lib/irccd/command.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/command.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -49,130 +49,130 @@
  */
 class CommandRequest {
 public:
-	/**
-	 * The options given by command line.
-	 */
-	using Options = std::multimap<std::string, std::string>;
+    /**
+     * The options given by command line.
+     */
+    using Options = std::multimap<std::string, std::string>;
 
-	/**
-	 * Command line arguments in the same order.
-	 */
-	using Args = std::vector<std::string>;
+    /**
+     * Command line arguments in the same order.
+     */
+    using Args = std::vector<std::string>;
 
 private:
-	Options m_options;
-	Args m_args;
+    Options m_options;
+    Args m_args;
 
 public:
-	/**
-	 * Construct the request.
-	 *
-	 * \param options the options
-	 * \param args the arguments
-	 */
-	inline CommandRequest(Options options, Args args) noexcept
-		: m_options(std::move(options))
-		, m_args(std::move(args))
-	{
-	}
+    /**
+     * Construct the request.
+     *
+     * \param options the options
+     * \param args the arguments
+     */
+    inline CommandRequest(Options options, Args args) noexcept
+        : m_options(std::move(options))
+        , m_args(std::move(args))
+    {
+    }
 
-	/**
-	 * Get the arguments.
-	 *
-	 * \return the arguments
-	 */
-	inline const Args &args() const noexcept
-	{
-		return m_args;
-	}
+    /**
+     * Get the arguments.
+     *
+     * \return the arguments
+     */
+    inline const Args &args() const noexcept
+    {
+        return m_args;
+    }
 
-	/**
-	 * Get the options.
-	 *
-	 * \return the options
-	 */
-	inline const Options &options() const noexcept
-	{
-		return m_options;
-	}
+    /**
+     * Get the options.
+     *
+     * \return the options
+     */
+    inline const Options &options() const noexcept
+    {
+        return m_options;
+    }
 
-	/**
-	 * Get the number of arguments.
-	 *
-	 * \return the number of arguments
-	 */
-	inline unsigned length() const noexcept
-	{
-		return (unsigned)m_args.size();
-	}
+    /**
+     * Get the number of arguments.
+     *
+     * \return the number of arguments
+     */
+    inline unsigned length() const noexcept
+    {
+        return (unsigned)m_args.size();
+    }
 
-	/**
-	 * Check if the request has the given option id.
-	 *
-	 * \param option the option id
-	 * \return true if the option is available
-	 */
-	inline bool has(const std::string &option) const noexcept
-	{
-		return m_options.count(option) != 0;
-	}
+    /**
+     * Check if the request has the given option id.
+     *
+     * \param option the option id
+     * \return true if the option is available
+     */
+    inline bool has(const std::string &option) const noexcept
+    {
+        return m_options.count(option) != 0;
+    }
 
-	/**
-	 * Get the argument at the specified index.
-	 *
-	 * \pre index < length()
-	 * \param index the argument index
-	 * \return the argument
-	 */
-	inline const std::string &arg(unsigned index) const noexcept
-	{
-		assert(index < m_args.size());
+    /**
+     * Get the argument at the specified index.
+     *
+     * \pre index < length()
+     * \param index the argument index
+     * \return the argument
+     */
+    inline const std::string &arg(unsigned index) const noexcept
+    {
+        assert(index < m_args.size());
 
-		return m_args[index];
-	}
+        return m_args[index];
+    }
 
-	/**
-	 * Get the argument or default value if not available.
-	 *
-	 * \param index the index
-	 * \param defaultValue the value if index is out of range
-	 * \return the argument
-	 */
-	inline std::string argOr(unsigned index, std::string defaultValue) const noexcept
-	{
-		return index < m_args.size() ? m_args[index] : defaultValue;
-	}
+    /**
+     * Get the argument or default value if not available.
+     *
+     * \param index the index
+     * \param defaultValue the value if index is out of range
+     * \return the argument
+     */
+    inline std::string argOr(unsigned index, std::string defaultValue) const noexcept
+    {
+        return index < m_args.size() ? m_args[index] : defaultValue;
+    }
 
-	/**
-	 * Get the given option by its id.
-	 *
-	 * \pre has(key)
-	 * \param key the option id
-	 * \return the option
-	 */
-	inline const std::string &option(const std::string &key) const noexcept
-	{
-		assert(m_options.count(key) != 0);
+    /**
+     * Get the given option by its id.
+     *
+     * \pre has(key)
+     * \param key the option id
+     * \return the option
+     */
+    inline const std::string &option(const std::string &key) const noexcept
+    {
+        assert(m_options.count(key) != 0);
 
-		return m_options.find(key)->second;
-	}
+        return m_options.find(key)->second;
+    }
 
-	/**
-	 * Get the given option by its id or defaultValue if not found.
-	 *
-	 * \param key the option id
-	 * \param defaultValue the value replacement
-	 * \return the option
-	 */
-	inline std::string optionOr(const std::string &key, std::string defaultValue) const noexcept
-	{
-		auto it = m_options.find(key);
+    /**
+     * Get the given option by its id or defaultValue if not found.
+     *
+     * \param key the option id
+     * \param defaultValue the value replacement
+     * \return the option
+     */
+    inline std::string optionOr(const std::string &key, std::string defaultValue) const noexcept
+    {
+        auto it = m_options.find(key);
 
-		if (it == m_options.end())
-			return defaultValue;
+        if (it == m_options.end())
+            return defaultValue;
 
-		return it->second;
-	}
+        return it->second;
+    }
 };
 
 /**
@@ -198,182 +198,182 @@
  */
 class Command {
 public:
-	/**
-	 * \brief Defines available options for this command.
-	 */
-	class Option;
+    /**
+     * \brief Defines available options for this command.
+     */
+    class Option;
 
-	/**
-	 * \brief Defines available arguments for this command.
-	 */
-	class Arg;
+    /**
+     * \brief Defines available arguments for this command.
+     */
+    class Arg;
 
-	/**
-	 * \brief Defines properties that must be available in the JSON request.
-	 */
-	class Property;
+    /**
+     * \brief Defines properties that must be available in the JSON request.
+     */
+    class Property;
 
 private:
-	std::string m_name;
-	std::string m_category;
-	bool m_visible;
+    std::string m_name;
+    std::string m_category;
+    bool m_visible;
 
 public:
-	/**
-	 * Create the remote command.
-	 *
-	 * \pre name must not be empty
-	 * \pre category must not be empty
-	 * \param name the command name (e.g. server-list)
-	 * \param category the category (e.g. Server)
-	 * \param visible true if the command should be visible without verbosity
-	 */
-	inline Command(std::string name, std::string category, bool visible = true) noexcept
-		: m_name(std::move(name))
-		, m_category(std::move(category))
-		, m_visible(visible)
-	{
-		assert(!m_name.empty());
-		assert(!m_category.empty());
-	}
+    /**
+     * Create the remote command.
+     *
+     * \pre name must not be empty
+     * \pre category must not be empty
+     * \param name the command name (e.g. server-list)
+     * \param category the category (e.g. Server)
+     * \param visible true if the command should be visible without verbosity
+     */
+    inline Command(std::string name, std::string category, bool visible = true) noexcept
+        : m_name(std::move(name))
+        , m_category(std::move(category))
+        , m_visible(visible)
+    {
+        assert(!m_name.empty());
+        assert(!m_category.empty());
+    }
 
-	/**
-	 * Default destructor virtual.
-	 */
-	virtual ~Command() = default;
+    /**
+     * Default destructor virtual.
+     */
+    virtual ~Command() = default;
 
-	/**
-	 * Return the command name, must not have spaces.
-	 *
-	 * \return the command name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Return the command name, must not have spaces.
+     *
+     * \return the command name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Get the command category.
-	 *
-	 * Irccdctl will sort commands by categories.
-	 *
-	 * \return the category
-	 */
-	inline const std::string &category() const noexcept
-	{
-		return m_category;
-	}
+    /**
+     * Get the command category.
+     *
+     * Irccdctl will sort commands by categories.
+     *
+     * \return the category
+     */
+    inline const std::string &category() const noexcept
+    {
+        return m_category;
+    }
 
-	/**
-	 * Hide the command in non-verbose mode.
-	 *
-	 * \return true if the command should be visible in non-verbose mode
-	 */
-	inline bool visible() const noexcept
-	{
-		return m_visible;
-	}
+    /**
+     * Hide the command in non-verbose mode.
+     *
+     * \return true if the command should be visible in non-verbose mode
+     */
+    inline bool visible() const noexcept
+    {
+        return m_visible;
+    }
 
-	/**
-	 * Return the command documentation usage.
-	 *
-	 * \return the usage
-	 */
-	IRCCD_EXPORT std::string usage() const;
+    /**
+     * Return the command documentation usage.
+     *
+     * \return the usage
+     */
+    IRCCD_EXPORT std::string usage() const;
 
-	/**
-	 * Return the help message.
-	 *
-	 * \return the help message
-	 */
-	virtual std::string help() const = 0;
+    /**
+     * Return the help message.
+     *
+     * \return the help message
+     */
+    virtual std::string help() const = 0;
 
-	/**
-	 * Get the supported irccdctl options.
-	 *
-	 * \return the options
-	 */
-	virtual std::vector<Option> options() const
-	{
-		return {};
-	}
+    /**
+     * Get the supported irccdctl options.
+     *
+     * \return the options
+     */
+    virtual std::vector<Option> options() const
+    {
+        return {};
+    }
 
-	/**
-	 * Get the supported arguments.
-	 *
-	 * \return the arguments
-	 */
-	virtual std::vector<Arg> args() const
-	{
-		return {};
-	}
+    /**
+     * Get the supported arguments.
+     *
+     * \return the arguments
+     */
+    virtual std::vector<Arg> args() const
+    {
+        return {};
+    }
 
-	/**
-	 * Get the properties required in the JSON request.
-	 *
-	 * Default implementation returns empty list.
-	 *
-	 * \return the required properties
-	 * \note Put only **required** properties
-	 */
-	virtual std::vector<Property> properties() const
-	{
-		return {};
-	}
+    /**
+     * Get the properties required in the JSON request.
+     *
+     * Default implementation returns empty list.
+     *
+     * \return the required properties
+     * \note Put only **required** properties
+     */
+    virtual std::vector<Property> properties() const
+    {
+        return {};
+    }
 
-	/**
-	 * Get the minimum number of arguments required.
-	 *
-	 * \return the minimum
-	 */
-	IRCCD_EXPORT unsigned min() const noexcept;
+    /**
+     * Get the minimum number of arguments required.
+     *
+     * \return the minimum
+     */
+    IRCCD_EXPORT unsigned min() const noexcept;
 
-	/**
-	 * Get the maximum number of arguments required.
-	 *
-	 * \return the maximum
-	 */
-	IRCCD_EXPORT unsigned max() const noexcept;
+    /**
+     * Get the maximum number of arguments required.
+     *
+     * \return the maximum
+     */
+    IRCCD_EXPORT unsigned max() const noexcept;
 
-	/**
-	 * Prepare a JSON request to the daemon.
-	 *
-	 * If the command is local and does not need to send anything to irccd's instance, return a null JSON value.
-	 *
-	 * The default implementation just send the command name with no arguments.
-	 *
-	 * \param irccdctl the irccdctl instance
-	 * \param args the command line arguments and options
-	 * \return the JSON object to send to the daemon
-	 * \post the returned JSON value must be an object
-	 */
-	IRCCD_EXPORT virtual json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const;
+    /**
+     * Prepare a JSON request to the daemon.
+     *
+     * If the command is local and does not need to send anything to irccd's instance, return a null JSON value.
+     *
+     * The default implementation just send the command name with no arguments.
+     *
+     * \param irccdctl the irccdctl instance
+     * \param args the command line arguments and options
+     * \return the JSON object to send to the daemon
+     * \post the returned JSON value must be an object
+     */
+    IRCCD_EXPORT virtual json::Value request(Irccdctl &irccdctl, const CommandRequest &args) const;
 
-	/**
-	 * Execute the command in the daemon.
-	 *
-	 * The user can return an object with any properties to forward to the client. Irccd will automatically
-	 * add the command name and the appropriate status code.
-	 *
-	 * The default return an empty object which indicates success.
-	 *
-	 * If any exception is thrown from this function, it is forwarded to the client as error status.
-	 *
-	 * \param irccd the instance
-	 * \param request the JSON request
-	 * \return the response
-	 */
-	IRCCD_EXPORT virtual json::Value exec(Irccd &irccd, const json::Value &request) const;
+    /**
+     * Execute the command in the daemon.
+     *
+     * The user can return an object with any properties to forward to the client. Irccd will automatically
+     * add the command name and the appropriate status code.
+     *
+     * The default return an empty object which indicates success.
+     *
+     * If any exception is thrown from this function, it is forwarded to the client as error status.
+     *
+     * \param irccd the instance
+     * \param request the JSON request
+     * \return the response
+     */
+    IRCCD_EXPORT virtual json::Value exec(Irccd &irccd, const json::Value &request) const;
 
-	/**
-	 * What to do when receiving the response from irccd.
-	 *
-	 * This default implementation just check for an error string and shows it if any.
-	 * 
-	 * \param irccdctl the irccdctl instance
-	 * \param response the JSON response
-	 */
-	IRCCD_EXPORT virtual void result(Irccdctl &irccdctl, const json::Value &response) const;
+    /**
+     * What to do when receiving the response from irccd.
+     *
+     * This default implementation just check for an error string and shows it if any.
+     * 
+     * \param irccdctl the irccdctl instance
+     * \param response the JSON response
+     */
+    IRCCD_EXPORT virtual void result(Irccdctl &irccdctl, const json::Value &response) const;
 };
 
 /**
@@ -381,94 +381,94 @@
  */
 class Command::Option {
 private:
-	std::string m_id;
-	std::string m_simple;
-	std::string m_long;
-	std::string m_arg;
-	std::string m_description;
+    std::string m_id;
+    std::string m_simple;
+    std::string m_long;
+    std::string m_arg;
+    std::string m_description;
 
 public:
-	/**
-	 * Constructor an option description.
-	 *
-	 * Simple and long keys must not start with '-' or '--', they will be added automatically.
-	 *
-	 * If arg is not empty, the option takes an argument.
-	 *
-	 * \pre id must not be empty
-	 * \pre at least simpleKey or longKey must not be empty
-	 * \pre description must not be empty
-	 * \param id the option id
-	 * \param simpleKey the key the option key
-	 * \param longKey the long option name
-	 * \param arg the argument name if needed
-	 * \param description the description
-	 */
-	inline Option(std::string id,
-		      std::string simpleKey,
-		      std::string longKey,
-		      std::string arg,
-		      std::string description) noexcept
-		: m_id(std::move(id))
-		, m_simple(std::move(simpleKey))
-		, m_long(std::move(longKey))
-		, m_arg(std::move(arg))
-		, m_description(std::move(description))
-	{
-		assert(!m_id.empty());
-		assert(!m_simple.empty() || !m_long.empty());
-		assert(!m_description.empty());
-	}
+    /**
+     * Constructor an option description.
+     *
+     * Simple and long keys must not start with '-' or '--', they will be added automatically.
+     *
+     * If arg is not empty, the option takes an argument.
+     *
+     * \pre id must not be empty
+     * \pre at least simpleKey or longKey must not be empty
+     * \pre description must not be empty
+     * \param id the option id
+     * \param simpleKey the key the option key
+     * \param longKey the long option name
+     * \param arg the argument name if needed
+     * \param description the description
+     */
+    inline Option(std::string id,
+              std::string simpleKey,
+              std::string longKey,
+              std::string arg,
+              std::string description) noexcept
+        : m_id(std::move(id))
+        , m_simple(std::move(simpleKey))
+        , m_long(std::move(longKey))
+        , m_arg(std::move(arg))
+        , m_description(std::move(description))
+    {
+        assert(!m_id.empty());
+        assert(!m_simple.empty() || !m_long.empty());
+        assert(!m_description.empty());
+    }
 
-	/**
-	 * Get the id.
-	 *
-	 * \return the id
-	 */
-	inline const std::string &id() const noexcept
-	{
-		return m_id;
-	}
+    /**
+     * Get the id.
+     *
+     * \return the id
+     */
+    inline const std::string &id() const noexcept
+    {
+        return m_id;
+    }
 
-	/**
-	 * Get the option key.
-	 *
-	 * \return the key
-	 */
-	inline const std::string &simpleKey() const noexcept
-	{
-		return m_simple;
-	}
+    /**
+     * Get the option key.
+     *
+     * \return the key
+     */
+    inline const std::string &simpleKey() const noexcept
+    {
+        return m_simple;
+    }
 
-	/**
-	 * Get the long option.
-	 *
-	 * \return the long option
-	 */
-	inline const std::string &longKey() const noexcept
-	{
-		return m_long;
-	}
+    /**
+     * Get the long option.
+     *
+     * \return the long option
+     */
+    inline const std::string &longKey() const noexcept
+    {
+        return m_long;
+    }
 
-	/**
-	 * Get the option description.
-	 *
-	 * \return the description
-	 */
-	inline const std::string &description() const noexcept
-	{
-		return m_description;
-	}
+    /**
+     * Get the option description.
+     *
+     * \return the description
+     */
+    inline const std::string &description() const noexcept
+    {
+        return m_description;
+    }
 
-	/**
-	 * Get the option argument name.
-	 *
-	 * \return the argument name if any
-	 */
-	inline const std::string &arg() const noexcept
-	{
-		return m_arg;
-	}
+    /**
+     * Get the option argument name.
+     *
+     * \return the argument name if any
+     */
+    inline const std::string &arg() const noexcept
+    {
+        return m_arg;
+    }
 };
 
 /**
@@ -476,41 +476,41 @@
  */
 class Command::Arg {
 private:
-	std::string m_name;
-	bool m_required;
+    std::string m_name;
+    bool m_required;
 
 public:
-	/**
-	 * Construct an argument.
-	 *
-	 * \param name the name
-	 * \param required true if the argument is required
-	 */
-	inline Arg(std::string name, bool required) noexcept
-		: m_name(std::move(name))
-		, m_required(required)
-	{
-	}
+    /**
+     * Construct an argument.
+     *
+     * \param name the name
+     * \param required true if the argument is required
+     */
+    inline Arg(std::string name, bool required) noexcept
+        : m_name(std::move(name))
+        , m_required(required)
+    {
+    }
 
-	/**
-	 * Get the argument name.
-	 *
-	 * \return the name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the argument name.
+     *
+     * \return the name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Tells if the argument is required.
-	 *
-	 * \return true if required
-	 */
-	inline bool required() const noexcept
-	{
-		return m_required;
-	}
+    /**
+     * Tells if the argument is required.
+     *
+     * \return true if required
+     */
+    inline bool required() const noexcept
+    {
+        return m_required;
+    }
 };
 
 /**
@@ -518,45 +518,45 @@
  */
 class Command::Property {
 private:
-	std::string m_name;
-	std::vector<json::Type> m_types;
+    std::string m_name;
+    std::vector<json::Type> m_types;
 
 public:
-	/**
-	 * Construct the property description.
-	 *
-	 * \pre !name.empty()
-	 * \pre types.size() >= 1
-	 * \param name the name
-	 * \param types the json types allowed
-	 */
-	inline Property(std::string name, std::vector<json::Type> types = { json::Type::String }) noexcept
-		: m_name(std::move(name))
-		, m_types(std::move(types))
-	{
-		assert(!m_name.empty());
-		assert(m_types.size() >= 1);
-	}
+    /**
+     * Construct the property description.
+     *
+     * \pre !name.empty()
+     * \pre types.size() >= 1
+     * \param name the name
+     * \param types the json types allowed
+     */
+    inline Property(std::string name, std::vector<json::Type> types = { json::Type::String }) noexcept
+        : m_name(std::move(name))
+        , m_types(std::move(types))
+    {
+        assert(!m_name.empty());
+        assert(m_types.size() >= 1);
+    }
 
-	/**
-	 * Get the property name.
-	 *
-	 * \return the name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the property name.
+     *
+     * \return the name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Get the property types.
-	 *
-	 * \return the types
-	 */
-	inline const std::vector<json::Type> &types() const noexcept
-	{
-		return m_types;
-	}
+    /**
+     * Get the property types.
+     *
+     * \return the types
+     */
+    inline const std::vector<json::Type> &types() const noexcept
+    {
+        return m_types;
+    }
 };
 
 } // !irccd
--- a/lib/irccd/config.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/config.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -41,552 +41,552 @@
 
 class IrccdLogFilter : public log::Filter {
 private:
-	std::string convert(const std::string &tmpl, std::string input) const
-	{
-		if (tmpl.empty())
-			return input;
+    std::string convert(const std::string &tmpl, std::string input) const
+    {
+        if (tmpl.empty())
+            return input;
 
-		util::Substitution params;
+        util::Substitution params;
 
-		params.flags &= ~(util::Substitution::IrcAttrs);
-		params.keywords.emplace("message", std::move(input));
+        params.flags &= ~(util::Substitution::IrcAttrs);
+        params.keywords.emplace("message", std::move(input));
 
-		return util::format(tmpl, params);
-	}
+        return util::format(tmpl, params);
+    }
 
 public:
-	std::string m_debug;
-	std::string m_info;
-	std::string m_warning;
+    std::string m_debug;
+    std::string m_info;
+    std::string m_warning;
 
-	std::string preDebug(std::string input) const override
-	{
-		return convert(m_debug, std::move(input));
-	}
+    std::string preDebug(std::string input) const override
+    {
+        return convert(m_debug, std::move(input));
+    }
 
-	std::string preInfo(std::string input) const override
-	{
-		return convert(m_info, std::move(input));
-	}
+    std::string preInfo(std::string input) const override
+    {
+        return convert(m_info, std::move(input));
+    }
 
-	std::string preWarning(std::string input) const override
-	{
-		return convert(m_warning, std::move(input));
-	}
+    std::string preWarning(std::string input) const override
+    {
+        return convert(m_warning, std::move(input));
+    }
 };
 
 std::string get(const ini::Document &doc, const std::string &section, const std::string &key)
 {
-	auto its = doc.find(section);
+    auto its = doc.find(section);
 
-	if (its == doc.end())
-		return "";
+    if (its == doc.end())
+        return "";
 
-	auto ito = its->find(key);
+    auto ito = its->find(key);
 
-	if (ito == its->end())
-		return "";
+    if (ito == its->end())
+        return "";
 
-	return ito->value();
+    return ito->value();
 }
 
 ServerIdentity loadIdentity(const ini::Section &sc)
 {
-	assert(sc.key() == "identity");
-	assert(sc.contains("name") && util::isIdentifierValid(sc["name"].value()));
+    assert(sc.key() == "identity");
+    assert(sc.contains("name") && util::isIdentifierValid(sc["name"].value()));
 
-	ServerIdentity identity;
+    ServerIdentity identity;
 
-	// Mandatory stuff.
-	identity.name = sc["name"].value();
+    // Mandatory stuff.
+    identity.name = sc["name"].value();
 
-	// Optional stuff.
-	ini::Section::const_iterator it;
+    // Optional stuff.
+    ini::Section::const_iterator it;
 
-	if ((it = sc.find("username")) != sc.end())
-		identity.username = it->value();
-	if ((it = sc.find("realname")) != sc.end())
-		identity.realname = it->value();
-	if ((it = sc.find("nickname")) != sc.end())
-		identity.nickname = it->value();
-	if ((it = sc.find("ctcp-version")) != sc.end())
-		identity.ctcpversion = it->value();
+    if ((it = sc.find("username")) != sc.end())
+        identity.username = it->value();
+    if ((it = sc.find("realname")) != sc.end())
+        identity.realname = it->value();
+    if ((it = sc.find("nickname")) != sc.end())
+        identity.nickname = it->value();
+    if ((it = sc.find("ctcp-version")) != sc.end())
+        identity.ctcpversion = it->value();
 
-	return identity;
+    return identity;
 }
 
 PluginConfig loadPluginConfig(const ini::Section &sc)
 {
-	PluginConfig config;
+    PluginConfig config;
 
-	for (const auto &option : sc)
-		config.emplace(option.key(), option.value());
+    for (const auto &option : sc)
+        config.emplace(option.key(), option.value());
 
-	return config;
+    return config;
 }
 
 std::unique_ptr<log::Interface> loadLogFile(const ini::Section &sc)
 {
-	/*
-	 * TODO: improve that with CMake options.
-	 */
+    /*
+     * TODO: improve that with CMake options.
+     */
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	std::string normal = "log.txt";
-	std::string errors = "errors.txt";
+    std::string normal = "log.txt";
+    std::string errors = "errors.txt";
 #else
-	std::string normal = "/var/log/irccd/log.txt";
-	std::string errors = "/var/log/irccd/errors.txt";
+    std::string normal = "/var/log/irccd/log.txt";
+    std::string errors = "/var/log/irccd/errors.txt";
 #endif
 
-	ini::Section::const_iterator it;
+    ini::Section::const_iterator it;
 
-	if ((it = sc.find("path-logs")) != sc.end())
-		normal = it->value();
-	if ((it = sc.find("path-errors")) != sc.end())
-		errors = it->value();
+    if ((it = sc.find("path-logs")) != sc.end())
+        normal = it->value();
+    if ((it = sc.find("path-errors")) != sc.end())
+        errors = it->value();
 
-	return std::make_unique<log::File>(std::move(normal), std::move(errors));
+    return std::make_unique<log::File>(std::move(normal), std::move(errors));
 }
 
 std::unique_ptr<log::Interface> loadLogSyslog()
 {
 #if defined(HAVE_SYSLOG)
-	return std::make_unique<log::Syslog>();
+    return std::make_unique<log::Syslog>();
 #else
-	throw std::runtime_error("logs: syslog is not available on this platform");
+    throw std::runtime_error("logs: syslog is not available on this platform");
 #endif // !HAVE_SYSLOG
 }
 
 std::shared_ptr<TransportServer> loadTransportIp(const ini::Section &sc)
 {
-	assert(sc.key() == "transport");
+    assert(sc.key() == "transport");
 
-	std::shared_ptr<TransportServer> transport;
-	ini::Section::const_iterator it;
+    std::shared_ptr<TransportServer> transport;
+    ini::Section::const_iterator it;
 
-	// Port.
-	int port;
+    // Port.
+    int port;
 
-	if ((it = sc.find("port")) == sc.cend())
-		throw std::invalid_argument("transport: missing 'port' parameter");
+    if ((it = sc.find("port")) == sc.cend())
+        throw std::invalid_argument("transport: missing 'port' parameter");
 
-	try {
-		port = util::toNumber<std::uint16_t>(it->value());
-	} catch (const std::exception &) {
-		throw std::invalid_argument("transport: invalid port number: {}"_format(it->value()));
-	}
+    try {
+        port = util::toNumber<std::uint16_t>(it->value());
+    } catch (const std::exception &) {
+        throw std::invalid_argument("transport: invalid port number: {}"_format(it->value()));
+    }
 
-	// Address.
-	std::string address = "*";
+    // Address.
+    std::string address = "*";
 
-	if ((it = sc.find("address")) != sc.end())
-		address = it->value();
+    if ((it = sc.find("address")) != sc.end())
+        address = it->value();
 
-	// Domain
-	bool ipv6 = true;
-	bool ipv4 = true;
+    // Domain
+    bool ipv6 = true;
+    bool ipv4 = true;
 
-	if ((it = sc.find("domain")) != sc.end()) {
-		ipv6 = false;
-		ipv4 = false;
+    if ((it = sc.find("domain")) != sc.end()) {
+        ipv6 = false;
+        ipv4 = false;
 
-		for (const auto &v : *it) {
-			if (v == "ipv4")
-				ipv4 = true;
-			if (v == "ipv6")
-				ipv6 = true;
-		}
-	}
+        for (const auto &v : *it) {
+            if (v == "ipv4")
+                ipv4 = true;
+            if (v == "ipv6")
+                ipv6 = true;
+        }
+    }
 
-	if (ipv6)
-		transport = std::make_shared<TransportServerIp>(AF_INET6, move(address), port, !ipv4);
-	else if (ipv4)
-		transport = std::make_shared<TransportServerIp>(AF_INET, move(address), port);
-	else
-		throw std::invalid_argument("transport: domain must at least have ipv4 or ipv6");
+    if (ipv6)
+        transport = std::make_shared<TransportServerIp>(AF_INET6, move(address), port, !ipv4);
+    else if (ipv4)
+        transport = std::make_shared<TransportServerIp>(AF_INET, move(address), port);
+    else
+        throw std::invalid_argument("transport: domain must at least have ipv4 or ipv6");
 
-	return transport;
+    return transport;
 }
 
 std::shared_ptr<TransportServer> loadTransportUnix(const ini::Section &sc)
 {
-	assert(sc.key() == "transport");
+    assert(sc.key() == "transport");
 
 #if !defined(IRCCD_SYSTEM_WINDOWS)
-	ini::Section::const_iterator it = sc.find("path");
+    ini::Section::const_iterator it = sc.find("path");
 
-	if (it == sc.end())
-		throw std::invalid_argument("transport: missing 'path' parameter");
+    if (it == sc.end())
+        throw std::invalid_argument("transport: missing 'path' parameter");
 
-	return std::make_shared<TransportServerUnix>(it->value());
+    return std::make_shared<TransportServerUnix>(it->value());
 #else
-	(void)sc;
+    (void)sc;
 
-	throw std::invalid_argument("transport: unix transport not supported on on this platform");
+    throw std::invalid_argument("transport: unix transport not supported on on this platform");
 #endif
 }
 
 std::shared_ptr<TransportServer> loadTransport(const ini::Section &sc)
 {
-	assert(sc.key() == "transport");
+    assert(sc.key() == "transport");
 
-	std::shared_ptr<TransportServer> transport;
-	ini::Section::const_iterator it = sc.find("type");
+    std::shared_ptr<TransportServer> transport;
+    ini::Section::const_iterator it = sc.find("type");
 
-	if (it == sc.end())
-		throw std::invalid_argument("transport: missing 'type' parameter");
+    if (it == sc.end())
+        throw std::invalid_argument("transport: missing 'type' parameter");
 
-	if (it->value() == "ip")
-		transport = loadTransportIp(sc);
-	else if (it->value() == "unix")
-		transport = loadTransportUnix(sc);
-	else
-		throw std::invalid_argument("transport: invalid type given: {}"_format(it->value()));
+    if (it->value() == "ip")
+        transport = loadTransportIp(sc);
+    else if (it->value() == "unix")
+        transport = loadTransportUnix(sc);
+    else
+        throw std::invalid_argument("transport: invalid type given: {}"_format(it->value()));
 
-	return transport;
+    return transport;
 }
 
 Rule loadRule(const ini::Section &sc)
 {
-	assert(sc.key() == "rule");
+    assert(sc.key() == "rule");
 
-	// Simple converter from std::vector to std::unordered_set.
-	auto toSet = [] (const std::vector<std::string> &v) -> std::unordered_set<std::string> {
-		return std::unordered_set<std::string>(v.begin(), v.end());
-	};
+    // Simple converter from std::vector to std::unordered_set.
+    auto toSet = [] (const std::vector<std::string> &v) -> std::unordered_set<std::string> {
+        return std::unordered_set<std::string>(v.begin(), v.end());
+    };
 
-	RuleSet servers, channels, origins, plugins, events;
-	RuleAction action = RuleAction::Accept;
+    RuleSet servers, channels, origins, plugins, events;
+    RuleAction action = RuleAction::Accept;
 
-	// Get the sets.
-	ini::Section::const_iterator it;
+    // Get the sets.
+    ini::Section::const_iterator it;
 
-	if ((it = sc.find("servers")) != sc.end())
-		servers = toSet(*it);
-	if ((it = sc.find("channels")) != sc.end())
-		channels = toSet(*it);
-	if ((it = sc.find("origins")) != sc.end())
-		origins = toSet(*it);
-	if ((it = sc.find("plugins")) != sc.end())
-		plugins = toSet(*it);
-	if ((it = sc.find("channels")) != sc.end())
-		channels = toSet(*it);
+    if ((it = sc.find("servers")) != sc.end())
+        servers = toSet(*it);
+    if ((it = sc.find("channels")) != sc.end())
+        channels = toSet(*it);
+    if ((it = sc.find("origins")) != sc.end())
+        origins = toSet(*it);
+    if ((it = sc.find("plugins")) != sc.end())
+        plugins = toSet(*it);
+    if ((it = sc.find("channels")) != sc.end())
+        channels = toSet(*it);
 
-	// Get the action.
-	if ((it = sc.find("action")) == sc.end())
-		throw std::invalid_argument("rule: missing 'action'' parameter");
+    // Get the action.
+    if ((it = sc.find("action")) == sc.end())
+        throw std::invalid_argument("rule: missing 'action'' parameter");
 
-	if (it->value() == "drop")
-		action = RuleAction::Drop;
-	else if (it->value() == "accept")
-		action = RuleAction::Accept;
-	else
-		throw std::invalid_argument("rule: invalid action given: {}"_format(it->value()));
+    if (it->value() == "drop")
+        action = RuleAction::Drop;
+    else if (it->value() == "accept")
+        action = RuleAction::Accept;
+    else
+        throw std::invalid_argument("rule: invalid action given: {}"_format(it->value()));
 
-	return Rule(std::move(servers),
-		    std::move(channels),
-		    std::move(origins),
-		    std::move(plugins),
-		    std::move(events),
-		    action);
+    return Rule(std::move(servers),
+            std::move(channels),
+            std::move(origins),
+            std::move(plugins),
+            std::move(events),
+            action);
 }
 
 std::shared_ptr<Server> loadServer(const ini::Section &sc, const Config &config)
 {
-	assert(sc.key() == "server");
+    assert(sc.key() == "server");
 
-	std::string name;
-	ServerInfo info;
-	ServerIdentity identity;
-	ServerSettings settings;
+    std::string name;
+    ServerInfo info;
+    ServerIdentity identity;
+    ServerSettings settings;
 
-	// Name.
-	ini::Section::const_iterator it;
+    // Name.
+    ini::Section::const_iterator it;
 
-	if ((it = sc.find("name")) == sc.end())
-		throw std::invalid_argument("server: missing 'name' parameter");
-	else if (!util::isIdentifierValid(it->value()))
-		throw std::invalid_argument("server: invalid identifier: {}"_format(it->value()));
+    if ((it = sc.find("name")) == sc.end())
+        throw std::invalid_argument("server: missing 'name' parameter");
+    else if (!util::isIdentifierValid(it->value()))
+        throw std::invalid_argument("server: invalid identifier: {}"_format(it->value()));
 
-	name = it->value();
+    name = it->value();
 
-	// Host
-	if ((it = sc.find("host")) == sc.end())
-		throw std::invalid_argument("server {}: missing host"_format(name));
+    // Host
+    if ((it = sc.find("host")) == sc.end())
+        throw std::invalid_argument("server {}: missing host"_format(name));
 
-	info.host = it->value();
+    info.host = it->value();
 
-	// Optional identity
-	if ((it = sc.find("identity")) != sc.end())
-		identity = config.findIdentity(it->value());
+    // Optional identity
+    if ((it = sc.find("identity")) != sc.end())
+        identity = config.findIdentity(it->value());
 
-	// Optional port
-	if ((it = sc.find("port")) != sc.end()) {
-		try {
-			info.port = util::toNumber<std::uint16_t>(it->value());
-		} catch (const std::exception &) {
-			throw std::invalid_argument("server {}: invalid number for {}: {}"_format(name, it->key(), it->value()));
-		}
-	}
+    // Optional port
+    if ((it = sc.find("port")) != sc.end()) {
+        try {
+            info.port = util::toNumber<std::uint16_t>(it->value());
+        } catch (const std::exception &) {
+            throw std::invalid_argument("server {}: invalid number for {}: {}"_format(name, it->key(), it->value()));
+        }
+    }
 
-	// Optional password
-	if ((it = sc.find("password")) != sc.end())
-		info.password = it->value();
+    // Optional password
+    if ((it = sc.find("password")) != sc.end())
+        info.password = it->value();
 
-	// Optional flags
-	if ((it = sc.find("ipv6")) != sc.end() && util::isBoolean(it->value()))
-		info.flags |= ServerInfo::Ipv6;
-	if ((it = sc.find("ssl")) != sc.end()) {
-		if (util::isBoolean(it->value()))
-			info.flags |= ServerInfo::Ssl;
-	}
-	if ((it = sc.find("ssl-verify")) != sc.end()) {
-		if (util::isBoolean(it->value()))
-			info.flags |= ServerInfo::SslVerify;
-	}
+    // Optional flags
+    if ((it = sc.find("ipv6")) != sc.end() && util::isBoolean(it->value()))
+        info.flags |= ServerInfo::Ipv6;
+    if ((it = sc.find("ssl")) != sc.end()) {
+        if (util::isBoolean(it->value()))
+            info.flags |= ServerInfo::Ssl;
+    }
+    if ((it = sc.find("ssl-verify")) != sc.end()) {
+        if (util::isBoolean(it->value()))
+            info.flags |= ServerInfo::SslVerify;
+    }
 
-	// Options
-	if ((it = sc.find("auto-rejoin")) != sc.end() && util::isBoolean(it->value()))
-		settings.flags |= ServerSettings::AutoRejoin;
-	if ((it = sc.find("join-invite")) != sc.end() && util::isBoolean(it->value()))
-		settings.flags |= ServerSettings::JoinInvite;
+    // Options
+    if ((it = sc.find("auto-rejoin")) != sc.end() && util::isBoolean(it->value()))
+        settings.flags |= ServerSettings::AutoRejoin;
+    if ((it = sc.find("join-invite")) != sc.end() && util::isBoolean(it->value()))
+        settings.flags |= ServerSettings::JoinInvite;
 
-	// Channels
-	if ((it = sc.find("channels")) != sc.end()) {
-		for (const std::string &s : *it) {
-			ServerChannel channel;
+    // Channels
+    if ((it = sc.find("channels")) != sc.end()) {
+        for (const std::string &s : *it) {
+            ServerChannel channel;
 
-			if (auto pos = s.find(":") != std::string::npos) {
-				channel.name = s.substr(0, pos);
-				channel.password = s.substr(pos + 1);
-			} else
-				channel.name = s;
+            if (auto pos = s.find(":") != std::string::npos) {
+                channel.name = s.substr(0, pos);
+                channel.password = s.substr(pos + 1);
+            } else
+                channel.name = s;
 
-			settings.channels.push_back(std::move(channel));
-		}
-	}
-	if ((it = sc.find("command-char")) != sc.end())
-		settings.command = it->value();
+            settings.channels.push_back(std::move(channel));
+        }
+    }
+    if ((it = sc.find("command-char")) != sc.end())
+        settings.command = it->value();
 
-	// Reconnect and ping timeout
-	try {
-		if ((it = sc.find("reconnect-tries")) != sc.end())
-			settings.reconnectTries = util::toNumber<std::int8_t>(it->value());
-		if ((it = sc.find("reconnect-timeout")) != sc.end())
-			settings.reconnectDelay = util::toNumber<std::uint16_t>(it->value());
-		if ((it = sc.find("ping-timeout")) != sc.end())
-			settings.pingTimeout = util::toNumber<std::uint16_t>(it->value());
-	} catch (const std::exception &) {
-		log::warning("server {}: invalid number for {}: {}"_format(name, it->key(), it->value()));
-	}
+    // Reconnect and ping timeout
+    try {
+        if ((it = sc.find("reconnect-tries")) != sc.end())
+            settings.reconnectTries = util::toNumber<std::int8_t>(it->value());
+        if ((it = sc.find("reconnect-timeout")) != sc.end())
+            settings.reconnectDelay = util::toNumber<std::uint16_t>(it->value());
+        if ((it = sc.find("ping-timeout")) != sc.end())
+            settings.pingTimeout = util::toNumber<std::uint16_t>(it->value());
+    } catch (const std::exception &) {
+        log::warning("server {}: invalid number for {}: {}"_format(name, it->key(), it->value()));
+    }
 
-	return std::make_shared<Server>(std::move(name), std::move(info), std::move(identity), std::move(settings));
+    return std::make_shared<Server>(std::move(name), std::move(info), std::move(identity), std::move(settings));
 }
 
 } // !namespace
 
 Config Config::find()
 {
-	for (const auto &path : path::list(path::PathConfig)) {
-		std::string fullpath = path + "irccd.conf";
+    for (const auto &path : path::list(path::PathConfig)) {
+        std::string fullpath = path + "irccd.conf";
 
-		if (!fs::isReadable(fullpath))
-			continue;
+        if (!fs::isReadable(fullpath))
+            continue;
 
-		try {
-			return Config(fullpath);
-		} catch (const std::exception &ex) {
-			throw std::runtime_error("{}: {}"_format(fullpath, ex.what()));
-		}
-	}
+        try {
+            return Config(fullpath);
+        } catch (const std::exception &ex) {
+            throw std::runtime_error("{}: {}"_format(fullpath, ex.what()));
+        }
+    }
 
-	throw std::runtime_error("no configuration file found");
+    throw std::runtime_error("no configuration file found");
 }
 
 ServerIdentity Config::findIdentity(const std::string &name) const
 {
-	assert(util::isIdentifierValid(name));
+    assert(util::isIdentifierValid(name));
 
-	for (const auto &section : m_document) {
-		if (section.key() != "identity")
-			continue;
+    for (const auto &section : m_document) {
+        if (section.key() != "identity")
+            continue;
 
-		auto it = section.find("name");
+        auto it = section.find("name");
 
-		if (it == section.end()) {
-			log::warning("identity: missing 'name' property");
-			continue;
-		}
-		if (!util::isIdentifierValid(it->value())) {
-			log::warning("identity: invalid identifier: {}"_format(it->value()));
-			continue;
-		}
-		if (it->value() != name)
-			continue;
+        if (it == section.end()) {
+            log::warning("identity: missing 'name' property");
+            continue;
+        }
+        if (!util::isIdentifierValid(it->value())) {
+            log::warning("identity: invalid identifier: {}"_format(it->value()));
+            continue;
+        }
+        if (it->value() != name)
+            continue;
 
-		return loadIdentity(section);
-	}
+        return loadIdentity(section);
+    }
 
-	return ServerIdentity();
+    return ServerIdentity();
 }
 
 PluginConfig Config::findPluginConfig(const std::string &name) const
 {
-	assert(util::isIdentifierValid(name));
+    assert(util::isIdentifierValid(name));
 
-	std::string fullname = std::string("plugin.") + name;
+    std::string fullname = std::string("plugin.") + name;
 
-	for (const auto &section : m_document) {
-		if (section.key() != fullname)
-			continue;
+    for (const auto &section : m_document) {
+        if (section.key() != fullname)
+            continue;
 
-		return loadPluginConfig(section);
-	}
+        return loadPluginConfig(section);
+    }
 
-	return PluginConfig();
+    return PluginConfig();
 }
 
 PluginFormats Config::findPluginFormats(const std::string &name) const
 {
-	assert(util::isIdentifierValid(name));
+    assert(util::isIdentifierValid(name));
 
-	auto section = m_document.find(std::string("format.") + name);
+    auto section = m_document.find(std::string("format.") + name);
 
-	if (section == m_document.end())
-		return PluginFormats();
+    if (section == m_document.end())
+        return PluginFormats();
 
-	PluginFormats formats;
+    PluginFormats formats;
 
-	for (const auto &opt : *section)
-		formats.emplace(opt.key(), opt.value());
+    for (const auto &opt : *section)
+        formats.emplace(opt.key(), opt.value());
 
-	return formats;
+    return formats;
 }
 
 bool Config::isVerbose() const noexcept
 {
-	return util::isBoolean(get(m_document, "logs", "verbose"));
+    return util::isBoolean(get(m_document, "logs", "verbose"));
 }
 
 bool Config::isForeground() const noexcept
 {
-	return util::isBoolean(get(m_document, "general", "foreground"));
+    return util::isBoolean(get(m_document, "general", "foreground"));
 }
 
 std::string Config::pidfile() const
 {
-	return get(m_document, "general", "pidfile");
+    return get(m_document, "general", "pidfile");
 }
 
 std::string Config::uid() const
 {
-	return get(m_document, "general", "uid");
+    return get(m_document, "general", "uid");
 }
 
 std::string Config::gid() const
 {
-	return get(m_document, "general", "gid");
+    return get(m_document, "general", "gid");
 }
 
 void Config::loadLogs() const
 {
-	ini::Document::const_iterator sc = m_document.find("logs");
+    ini::Document::const_iterator sc = m_document.find("logs");
 
-	if (sc == m_document.end())
-		return;
+    if (sc == m_document.end())
+        return;
 
-	ini::Section::const_iterator it;
+    ini::Section::const_iterator it;
 
-	if ((it = sc->find("type")) != sc->end()) {
-		std::unique_ptr<log::Interface> iface;
+    if ((it = sc->find("type")) != sc->end()) {
+        std::unique_ptr<log::Interface> iface;
 
-		// Console is the default, no test case.
-		if (it->value() == "file")
-			iface = loadLogFile(*sc);
-		else if (it->value() == "syslog")
-			iface = loadLogSyslog();
-		else
-			throw std::runtime_error("logs: unknown log type: {}"_format(it->value()));
+        // Console is the default, no test case.
+        if (it->value() == "file")
+            iface = loadLogFile(*sc);
+        else if (it->value() == "syslog")
+            iface = loadLogSyslog();
+        else
+            throw std::runtime_error("logs: unknown log type: {}"_format(it->value()));
 
-		if (iface)
-			log::setInterface(std::move(iface));
-	}
+        if (iface)
+            log::setInterface(std::move(iface));
+    }
 }
 
 void Config::loadFormats() const
 {
-	ini::Document::const_iterator sc = m_document.find("format");
+    ini::Document::const_iterator sc = m_document.find("format");
 
-	if (sc == m_document.end())
-		return;
+    if (sc == m_document.end())
+        return;
 
-	std::unique_ptr<IrccdLogFilter> filter = std::make_unique<IrccdLogFilter>();
-	ini::Section::const_iterator it;
+    std::unique_ptr<IrccdLogFilter> filter = std::make_unique<IrccdLogFilter>();
+    ini::Section::const_iterator it;
 
-	if ((it = sc->find("debug")) != sc->cend())
-		filter->m_debug = it->value();
-	if ((it = sc->find("info")) != sc->cend())
-		filter->m_info = it->value();
-	if ((it = sc->find("warning")) != sc->cend())
-		filter->m_warning = it->value();
+    if ((it = sc->find("debug")) != sc->cend())
+        filter->m_debug = it->value();
+    if ((it = sc->find("info")) != sc->cend())
+        filter->m_info = it->value();
+    if ((it = sc->find("warning")) != sc->cend())
+        filter->m_warning = it->value();
 
-	log::setFilter(std::move(filter));
+    log::setFilter(std::move(filter));
 }
 
 std::vector<std::shared_ptr<TransportServer>> Config::loadTransports() const
 {
-	std::vector<std::shared_ptr<TransportServer>> transports;
+    std::vector<std::shared_ptr<TransportServer>> transports;
 
-	for (const auto &section : m_document)
-		if (section.key() == "transport")
-			transports.push_back(loadTransport(section));
+    for (const auto &section : m_document)
+        if (section.key() == "transport")
+            transports.push_back(loadTransport(section));
 
-	return transports;
+    return transports;
 }
 
 std::vector<Rule> Config::loadRules() const
 {
-	std::vector<Rule> rules;
+    std::vector<Rule> rules;
 
-	for (const auto &section : m_document)
-		if (section.key() == "rule")
-			rules.push_back(loadRule(section));
+    for (const auto &section : m_document)
+        if (section.key() == "rule")
+            rules.push_back(loadRule(section));
 
-	return rules;
+    return rules;
 }
 
 std::vector<std::shared_ptr<Server>> Config::loadServers() const
 {
-	std::vector<std::shared_ptr<Server>> servers;
+    std::vector<std::shared_ptr<Server>> servers;
 
-	for (const auto &section : m_document) {
-		if (section.key() != "server")
-			continue;
+    for (const auto &section : m_document) {
+        if (section.key() != "server")
+            continue;
 
-		try {
-			servers.push_back(loadServer(section, *this));
-		} catch (const std::exception &ex) {
-			log::warning(ex.what());
-		}
-	}
+        try {
+            servers.push_back(loadServer(section, *this));
+        } catch (const std::exception &ex) {
+            log::warning(ex.what());
+        }
+    }
 
-	return servers;
+    return servers;
 }
 
 void Config::loadPlugins(Irccd &irccd) const
 {
-	auto it = m_document.find("plugins");
+    auto it = m_document.find("plugins");
 
-	if (it != m_document.end()) {
-		for (const auto &option : *it) {
-			if (!util::isIdentifierValid(option.key()))
-				continue;
+    if (it != m_document.end()) {
+        for (const auto &option : *it) {
+            if (!util::isIdentifierValid(option.key()))
+                continue;
 
-			irccd.pluginService().setConfig(option.key(), findPluginConfig(option.key()));
-			irccd.pluginService().setFormats(option.key(), findPluginFormats(option.key()));
-			irccd.pluginService().load(option.key(), option.value());
-		}
-	}
+            irccd.pluginService().setConfig(option.key(), findPluginConfig(option.key()));
+            irccd.pluginService().setFormats(option.key(), findPluginFormats(option.key()));
+            irccd.pluginService().load(option.key(), option.value());
+        }
+    }
 }
 
 } // !irccd
--- a/lib/irccd/config.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/config.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -46,136 +46,136 @@
  */
 class Config {
 private:
-	std::string m_path;
-	ini::Document m_document;
+    std::string m_path;
+    ini::Document m_document;
 
 public:
-	/**
-	 * Search the configuration file into the standard defined paths.
-	 *
-	 * \return the config
-	 * \throw std::exception on errors or if no config could be found
-	 */
-	IRCCD_EXPORT static Config find();
+    /**
+     * Search the configuration file into the standard defined paths.
+     *
+     * \return the config
+     * \throw std::exception on errors or if no config could be found
+     */
+    IRCCD_EXPORT static Config find();
 
-	/**
-	 * Load the configuration from the specified path.
-	 *
-	 * \param path the path
-	 */
-	inline Config(std::string path)
-		: m_path(std::move(path))
-		, m_document(ini::readFile(m_path))
-	{
-	}
+    /**
+     * Load the configuration from the specified path.
+     *
+     * \param path the path
+     */
+    inline Config(std::string path)
+        : m_path(std::move(path))
+        , m_document(ini::readFile(m_path))
+    {
+    }
 
-	/**
-	 * Get the path to the configuration file.
-	 *
-	 * \return the path
-	 */
-	inline const std::string &path() const noexcept
-	{
-		return m_path;
-	}
+    /**
+     * Get the path to the configuration file.
+     *
+     * \return the path
+     */
+    inline const std::string &path() const noexcept
+    {
+        return m_path;
+    }
 
-	/**
-	 * Find an entity if defined in the configuration file.
-	 *
-	 * \pre util::isValidIdentifier(name)
-	 * \return default identity if cannot be found
-	 */
-	IRCCD_EXPORT ServerIdentity findIdentity(const std::string &name) const;
+    /**
+     * Find an entity if defined in the configuration file.
+     *
+     * \pre util::isValidIdentifier(name)
+     * \return default identity if cannot be found
+     */
+    IRCCD_EXPORT ServerIdentity findIdentity(const std::string &name) const;
 
-	/**
-	 * Find a plugin configuration if defined in the configuration file.
-	 *
-	 * \pre util::isValidIdentifier(name)
-	 * \return the configuration or empty if not found
-	 */
-	IRCCD_EXPORT PluginConfig findPluginConfig(const std::string &name) const;
+    /**
+     * Find a plugin configuration if defined in the configuration file.
+     *
+     * \pre util::isValidIdentifier(name)
+     * \return the configuration or empty if not found
+     */
+    IRCCD_EXPORT PluginConfig findPluginConfig(const std::string &name) const;
 
-	/**
-	 * Find plugin formats if defined.
-	 *
-	 * \pre util::isValidIdentifier(name)
-	 * \return the formats or empty one if not found
-	 */
-	IRCCD_EXPORT PluginFormats findPluginFormats(const std::string &name) const;
+    /**
+     * Find plugin formats if defined.
+     *
+     * \pre util::isValidIdentifier(name)
+     * \return the formats or empty one if not found
+     */
+    IRCCD_EXPORT PluginFormats findPluginFormats(const std::string &name) const;
 
-	/**
-	 * Get the path to the pidfile.
-	 *
-	 * \return the path or empty if not defined
-	 */
-	IRCCD_EXPORT std::string pidfile() const;
+    /**
+     * Get the path to the pidfile.
+     *
+     * \return the path or empty if not defined
+     */
+    IRCCD_EXPORT std::string pidfile() const;
 
-	/**
-	 * Get the uid.
-	 *
-	 * \return the uid or empty one if no one is set
-	 */
-	IRCCD_EXPORT std::string uid() const;
+    /**
+     * Get the uid.
+     *
+     * \return the uid or empty one if no one is set
+     */
+    IRCCD_EXPORT std::string uid() const;
 
-	/**
-	 * Get the gid.
-	 *
-	 * \return the gid or empty one if no one is set
-	 */
-	IRCCD_EXPORT std::string gid() const;
+    /**
+     * Get the gid.
+     *
+     * \return the gid or empty one if no one is set
+     */
+    IRCCD_EXPORT std::string gid() const;
 
-	/**
-	 * Check if verbosity is enabled.
-	 *
-	 * \return true if verbosity was requested
-	 */
-	IRCCD_EXPORT bool isVerbose() const noexcept;
+    /**
+     * Check if verbosity is enabled.
+     *
+     * \return true if verbosity was requested
+     */
+    IRCCD_EXPORT bool isVerbose() const noexcept;
 
-	/**
-	 * Check if foreground is specified (= no daemonize).
-	 *
-	 * \return true if foreground was requested
-	 */
-	IRCCD_EXPORT bool isForeground() const noexcept;
+    /**
+     * Check if foreground is specified (= no daemonize).
+     *
+     * \return true if foreground was requested
+     */
+    IRCCD_EXPORT bool isForeground() const noexcept;
 
-	/**
-	 * Load logging interface.
-	 */
-	IRCCD_EXPORT void loadLogs() const;
+    /**
+     * Load logging interface.
+     */
+    IRCCD_EXPORT void loadLogs() const;
 
-	/**
-	 * Load formats for logging.
-	 */
-	IRCCD_EXPORT void loadFormats() const;
+    /**
+     * Load formats for logging.
+     */
+    IRCCD_EXPORT void loadFormats() const;
 
-	/**
-	 * Load transports.
-	 *
-	 * \return the set of transports
-	 */
-	IRCCD_EXPORT std::vector<std::shared_ptr<TransportServer>> loadTransports() const;
+    /**
+     * Load transports.
+     *
+     * \return the set of transports
+     */
+    IRCCD_EXPORT std::vector<std::shared_ptr<TransportServer>> loadTransports() const;
 
-	/**
-	 * Load rules.
-	 *
-	 * \return the rules
-	 */
-	IRCCD_EXPORT std::vector<Rule> loadRules() const;
+    /**
+     * Load rules.
+     *
+     * \return the rules
+     */
+    IRCCD_EXPORT std::vector<Rule> loadRules() const;
 
-	/**
-	 * Get the list of servers defined.
-	 *
-	 * \return the list of servers
-	 */
-	IRCCD_EXPORT std::vector<std::shared_ptr<Server>> loadServers() const;
+    /**
+     * Get the list of servers defined.
+     *
+     * \return the list of servers
+     */
+    IRCCD_EXPORT std::vector<std::shared_ptr<Server>> loadServers() const;
 
-	/**
-	 * Get the list of defined plugins.
-	 *
-	 * \param irccd the irccd instance
-	 * \return the list of plugins
-	 */
-	IRCCD_EXPORT void loadPlugins(Irccd &irccd) const;
+    /**
+     * Get the list of defined plugins.
+     *
+     * \param irccd the irccd instance
+     * \return the list of plugins
+     */
+    IRCCD_EXPORT void loadPlugins(Irccd &irccd) const;
 };
 
 } // !irccd
--- a/lib/irccd/connection.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/connection.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -23,25 +23,25 @@
 
 json::Value Connection::next(const std::string &name, int timeout)
 {
-	m_timer.reset();
+    m_timer.reset();
 
-	for (;;) {
-		json::Value object = next(clamp(timeout));
+    for (;;) {
+        json::Value object = next(clamp(timeout));
 
-		if (object.isObject() && object["response"].toString() == name)
-			return object;
-	}
+        if (object.isObject() && object["response"].toString() == name)
+            return object;
+    }
 
-	throw std::runtime_error("connection lost");
+    throw std::runtime_error("connection lost");
 }
 
 void Connection::verify(const std::string &name, int timeout)
 {
-	auto object = next(name, timeout);
-	auto value = object.at("status").toString();
+    auto object = next(name, timeout);
+    auto value = object.at("status").toString();
 
-	if (!value.empty() && value != "ok")
-		throw std::runtime_error(object.at("error").toString());
+    if (!value.empty() && value != "ok")
+        throw std::runtime_error(object.at("error").toString());
 }
 
 } // !irccd
--- a/lib/irccd/connection.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/connection.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -42,76 +42,76 @@
  */
 class Connection {
 protected:
-	/**
-	 * Timer to track elapsed time.
-	 */
-	ElapsedTimer m_timer;
+    /**
+     * Timer to track elapsed time.
+     */
+    ElapsedTimer m_timer;
 
-	/**
-	 * Clamp the time to wait to be sure that it will be never less than 0.
-	 */
-	inline int clamp(int timeout) noexcept
-	{
-		return timeout < 0 ? -1 : (timeout - (int)m_timer.elapsed() < 0) ? 0 : (timeout - m_timer.elapsed());
-	}
+    /**
+     * Clamp the time to wait to be sure that it will be never less than 0.
+     */
+    inline int clamp(int timeout) noexcept
+    {
+        return timeout < 0 ? -1 : (timeout - (int)m_timer.elapsed() < 0) ? 0 : (timeout - m_timer.elapsed());
+    }
 
 public:
-	/**
-	 * Default constructor.
-	 */
-	Connection() = default;
+    /**
+     * Default constructor.
+     */
+    Connection() = default;
 
-	/**
-	 * Default destructor.
-	 */
-	virtual ~Connection() = default;
+    /**
+     * Default destructor.
+     */
+    virtual ~Connection() = default;
 
-	/**
-	 * Wait for the next requested response.
-	 *
-	 * \param name the response name
-	 * \param timeout the optional timeout
-	 * \return the object
-	 * \throw net::Error on errors or on timeout
-	 */
-	IRCCD_EXPORT json::Value next(const std::string &name, int timeout = 30000);
+    /**
+     * Wait for the next requested response.
+     *
+     * \param name the response name
+     * \param timeout the optional timeout
+     * \return the object
+     * \throw net::Error on errors or on timeout
+     */
+    IRCCD_EXPORT json::Value next(const std::string &name, int timeout = 30000);
 
-	/**
-	 * Just wait if the operation succeeded.
-	 *
-	 * \param name the response name
-	 * \param timeout the timeout
-	 */
-	IRCCD_EXPORT void verify(const std::string &name, int timeout = 30000);
+    /**
+     * Just wait if the operation succeeded.
+     *
+     * \param name the response name
+     * \param timeout the timeout
+     */
+    IRCCD_EXPORT void verify(const std::string &name, int timeout = 30000);
 
-	/**
-	 * Try to connect to the host.
-	 *
-	 * \param timeout the maximum time in milliseconds
-	 * \throw net::Error on errors or timeout
-	 */
-	virtual void connect(int timeout = 30000) = 0;
+    /**
+     * Try to connect to the host.
+     *
+     * \param timeout the maximum time in milliseconds
+     * \throw net::Error on errors or timeout
+     */
+    virtual void connect(int timeout = 30000) = 0;
 
-	/**
-	 * Try to send the message in 30 seconds. The message must not end with \\r\\n\\r\\n, it is added automatically.
-	 *
-	 * \pre msg must not be empty
-	 * \param msg the message to send
-	 * \param timeout the maximum time in milliseconds
-	 * \throw net::Error on errors
-	 */
-	virtual void send(std::string msg, int timeout = 30000) = 0;
+    /**
+     * Try to send the message in 30 seconds. The message must not end with \\r\\n\\r\\n, it is added automatically.
+     *
+     * \pre msg must not be empty
+     * \param msg the message to send
+     * \param timeout the maximum time in milliseconds
+     * \throw net::Error on errors
+     */
+    virtual void send(std::string msg, int timeout = 30000) = 0;
 
-	/**
-	 * Get the next event from irccd.
-	 *
-	 * This functions throws if the connection is lost.
-	 *
-	 * \param timeout the maximum time in milliseconds
-	 * \return the next event
-	 * \throw net::Error on errors or disconnection
-	 */
-	virtual json::Value next(int timeout = 30000) = 0;
+    /**
+     * Get the next event from irccd.
+     *
+     * This functions throws if the connection is lost.
+     *
+     * \param timeout the maximum time in milliseconds
+     * \return the next event
+     * \throw net::Error on errors or disconnection
+     */
+    virtual json::Value next(int timeout = 30000) = 0;
 };
 
 /**
@@ -121,114 +121,114 @@
 template <typename Address>
 class ConnectionBase : public Connection {
 private:
-	net::SocketTcp<Address> m_socket;
-	net::Listener<> m_listener;
-	Address m_address;
+    net::SocketTcp<Address> m_socket;
+    net::Listener<> m_listener;
+    Address m_address;
 
-	// Input buffer.
-	std::string m_input;
+    // Input buffer.
+    std::string m_input;
 
 public:
-	/**
-	 * Construct the socket but do not connect immediately.
-	 *
-	 * \param address the address
-	 */
-	inline ConnectionBase(Address address)
-		: m_address(std::move(address))
-	{
-		m_socket.set(net::option::SockBlockMode{false});
-		m_listener.set(m_socket.handle(), net::Condition::Readable);
-	}
+    /**
+     * Construct the socket but do not connect immediately.
+     *
+     * \param address the address
+     */
+    inline ConnectionBase(Address address)
+        : m_address(std::move(address))
+    {
+        m_socket.set(net::option::SockBlockMode{false});
+        m_listener.set(m_socket.handle(), net::Condition::Readable);
+    }
 
-	/**
-	 * \copydoc Connection::connect
-	 */
-	void connect(int timeout) override;
+    /**
+     * \copydoc Connection::connect
+     */
+    void connect(int timeout) override;
 
-	/**
-	 * \copydoc Connection::send
-	 */
-	void send(std::string msg, int timeout) override;
+    /**
+     * \copydoc Connection::send
+     */
+    void send(std::string msg, int timeout) override;
 
-	/**
-	 * \copydoc Connection::next(int)
-	 */
-	json::Value next(int timeout) override;
+    /**
+     * \copydoc Connection::next(int)
+     */
+    json::Value next(int timeout) override;
 };
 
 template <typename Address>
 void ConnectionBase<Address>::connect(int timeout)
 {
-	net::Condition cond;
+    net::Condition cond;
 
-	m_socket.connect(m_address, cond);
-	m_timer.reset();
+    m_socket.connect(m_address, cond);
+    m_timer.reset();
 
-	while (cond != net::Condition::None) {
-		if (timeout >= 0 && m_timer.elapsed() >= static_cast<unsigned>(timeout))
-			throw std::runtime_error("timeout while connecting");
+    while (cond != net::Condition::None) {
+        if (timeout >= 0 && m_timer.elapsed() >= static_cast<unsigned>(timeout))
+            throw std::runtime_error("timeout while connecting");
 
-		m_listener.remove(m_socket.handle());
-		m_listener.set(m_socket.handle(), cond);
-		m_listener.wait(timeout - m_timer.elapsed());
-		m_socket.resumeConnect(cond);
-	}
+        m_listener.remove(m_socket.handle());
+        m_listener.set(m_socket.handle(), cond);
+        m_listener.wait(timeout - m_timer.elapsed());
+        m_socket.resumeConnect(cond);
+    }
 
-	m_listener.set(m_socket.handle(), net::Condition::Readable);
+    m_listener.set(m_socket.handle(), net::Condition::Readable);
 }
 
 template <typename Address>
 void ConnectionBase<Address>::send(std::string msg, int timeout)
 {
-	assert(!msg.empty());
+    assert(!msg.empty());
 
-	// Add termination.
-	msg += "\r\n\r\n";
+    // Add termination.
+    msg += "\r\n\r\n";
 
-	m_listener.remove(m_socket.handle());
-	m_listener.set(m_socket.handle(), net::Condition::Writable);
-	m_timer.reset();
+    m_listener.remove(m_socket.handle());
+    m_listener.set(m_socket.handle(), net::Condition::Writable);
+    m_timer.reset();
 
-	while (!msg.empty()) {
-		// Do not wait the time that is already passed.
-		m_listener.wait(clamp(timeout));
+    while (!msg.empty()) {
+        // Do not wait the time that is already passed.
+        m_listener.wait(clamp(timeout));
 
-		// Try to send at most as possible.
-		msg.erase(0, m_socket.send(msg));
-	}
+        // Try to send at most as possible.
+        msg.erase(0, m_socket.send(msg));
+    }
 
-	// Timeout?
-	if (!msg.empty())
-		throw std::runtime_error("operation timed out while sending to irccd");
+    // Timeout?
+    if (!msg.empty())
+        throw std::runtime_error("operation timed out while sending to irccd");
 }
 
 template <typename Address>
 json::Value ConnectionBase<Address>::next(int timeout)
 {
-	// Maybe there is already something.
-	std::string buffer = util::nextNetwork(m_input);
+    // Maybe there is already something.
+    std::string buffer = util::nextNetwork(m_input);
 
-	m_listener.remove(m_socket.handle());
-	m_listener.set(m_socket.handle(), net::Condition::Readable);
-	m_timer.reset();
+    m_listener.remove(m_socket.handle());
+    m_listener.set(m_socket.handle(), net::Condition::Readable);
+    m_timer.reset();
 
-	// Read if there is nothing.
-	while (buffer.empty()) {
-		// Wait and read.
-		m_listener.wait(clamp(timeout));
-		m_input += m_socket.recv(512);
+    // Read if there is nothing.
+    while (buffer.empty()) {
+        // Wait and read.
+        m_listener.wait(clamp(timeout));
+        m_input += m_socket.recv(512);
 
-		// Finally try.
-		buffer = util::nextNetwork(m_input);
-	}
+        // Finally try.
+        buffer = util::nextNetwork(m_input);
+    }
 
-	json::Value value = json::fromString(buffer);
+    json::Value value = json::fromString(buffer);
 
-	if (!value.isObject())
-		throw std::invalid_argument("invalid message received");
+    if (!value.isObject())
+        throw std::invalid_argument("invalid message received");
 
-	return value;
+    return value;
 }
 
 } // !irccd
--- a/lib/irccd/duktape.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/duktape.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -51,52 +51,52 @@
 class StackAssert {
 #if !defined(NDEBUG)
 private:
-	duk_context *m_context;
-	unsigned m_expected;
-	unsigned m_begin;
+    duk_context *m_context;
+    unsigned m_expected;
+    unsigned m_begin;
 #endif
 
 public:
-	/**
-	 * Create the stack checker.
-	 *
-	 * No-op if NDEBUG is set.
-	 *
-	 * \param ctx the context
-	 * \param expected the size expected relative to the already existing values
-	 */
-	inline StackAssert(duk_context *ctx, unsigned expected = 0) noexcept
+    /**
+     * Create the stack checker.
+     *
+     * No-op if NDEBUG is set.
+     *
+     * \param ctx the context
+     * \param expected the size expected relative to the already existing values
+     */
+    inline StackAssert(duk_context *ctx, unsigned expected = 0) noexcept
 #if !defined(NDEBUG)
-		: m_context(ctx)
-		, m_expected(expected)
-		, m_begin(static_cast<unsigned>(duk_get_top(ctx)))
+        : m_context(ctx)
+        , m_expected(expected)
+        , m_begin(static_cast<unsigned>(duk_get_top(ctx)))
 #endif
-	{
+    {
 #if defined(NDEBUG)
-		(void)ctx;
-		(void)expected;
+        (void)ctx;
+        (void)expected;
 #endif
-	}
+    }
 
-	/**
-	 * Verify the expected size.
-	 *
-	 * No-op if NDEBUG is set.
-	 */
-	inline ~StackAssert() noexcept
-	{
+    /**
+     * Verify the expected size.
+     *
+     * No-op if NDEBUG is set.
+     */
+    inline ~StackAssert() noexcept
+    {
 #if !defined(NDEBUG)
-		if (static_cast<unsigned>(duk_get_top(m_context)) - m_begin != m_expected) {
-			std::fprintf(stderr, "Corrupt stack detection in StackAssert:\n");
-			std::fprintf(stderr, "  Size at start:            %u\n", m_begin);
-			std::fprintf(stderr, "  Size at end:              %d\n", duk_get_top(m_context));
-			std::fprintf(stderr, "  Expected (user):          %u\n", m_expected);
-			std::fprintf(stderr, "  Expected (adjusted):      %u\n", m_expected + m_begin);
-			std::fprintf(stderr, "  Number of stale values:   %u\n", duk_get_top(m_context) - m_begin - m_expected);
-			std::abort();
-		}
+        if (static_cast<unsigned>(duk_get_top(m_context)) - m_begin != m_expected) {
+            std::fprintf(stderr, "Corrupt stack detection in StackAssert:\n");
+            std::fprintf(stderr, "  Size at start:            %u\n", m_begin);
+            std::fprintf(stderr, "  Size at end:              %d\n", duk_get_top(m_context));
+            std::fprintf(stderr, "  Expected (user):          %u\n", m_expected);
+            std::fprintf(stderr, "  Expected (adjusted):      %u\n", m_expected + m_begin);
+            std::fprintf(stderr, "  Number of stale values:   %u\n", duk_get_top(m_context) - m_begin - m_expected);
+            std::abort();
+        }
 #endif
-	}
+    }
 };
 
 /**
@@ -107,21 +107,21 @@
  */
 class Exception : public std::exception {
 public:
-	std::string name;		//!< name of error
-	std::string message;		//!< error message
-	std::string stack;		//!< stack if available
-	std::string fileName;		//!< filename if applicable
-	int lineNumber{0};		//!< line number if applicable
+    std::string name;        //!< name of error
+    std::string message;        //!< error message
+    std::string stack;        //!< stack if available
+    std::string fileName;        //!< filename if applicable
+    int lineNumber{0};        //!< line number if applicable
 
-	/**
-	 * Get the error message. This effectively returns message field.
-	 *
-	 * \return the message
-	 */
-	const char *what() const noexcept override
-	{
-		return message.c_str();
-	}
+    /**
+     * Get the error message. This effectively returns message field.
+     *
+     * \return the message
+     */
+    const char *what() const noexcept override
+    {
+        return message.c_str();
+    }
 };
 
 /**
@@ -131,54 +131,54 @@
  */
 class UniqueContext {
 private:
-	using Deleter = void (*)(duk_context *);
-	using Handle = std::unique_ptr<duk_context, Deleter>;
+    using Deleter = void (*)(duk_context *);
+    using Handle = std::unique_ptr<duk_context, Deleter>;
 
-	Handle m_handle;
+    Handle m_handle;
 
-	UniqueContext(const UniqueContext &) = delete;
-	UniqueContext &operator=(const UniqueContext &) = delete;
+    UniqueContext(const UniqueContext &) = delete;
+    UniqueContext &operator=(const UniqueContext &) = delete;
 
 public:
-	/**
-	 * Create default context.
-	 */
-	inline UniqueContext()
-		: m_handle(duk_create_heap_default(), duk_destroy_heap)
-	{
-	}
+    /**
+     * Create default context.
+     */
+    inline UniqueContext()
+        : m_handle(duk_create_heap_default(), duk_destroy_heap)
+    {
+    }
 
-	/**
-	 * Default move constructor.
-	 */
-	UniqueContext(UniqueContext &&) noexcept = default;
+    /**
+     * Default move constructor.
+     */
+    UniqueContext(UniqueContext &&) noexcept = default;
 
-	/**
-	 * Convert the context to the native Duktape/C type.
-	 *
-	 * \return the duk_context
-	 */
-	inline operator duk_context *() noexcept
-	{
-		return m_handle.get();
-	}
+    /**
+     * Convert the context to the native Duktape/C type.
+     *
+     * \return the duk_context
+     */
+    inline operator duk_context *() noexcept
+    {
+        return m_handle.get();
+    }
 
-	/**
-	 * Convert the context to the native Duktape/C type.
-	 *
-	 * \return the duk_context
-	 */
-	inline operator duk_context *() const noexcept
-	{
-		return m_handle.get();
-	}
+    /**
+     * Convert the context to the native Duktape/C type.
+     *
+     * \return the duk_context
+     */
+    inline operator duk_context *() const noexcept
+    {
+        return m_handle.get();
+    }
 
-	/**
-	 * Default move assignment operator.
-	 *
-	 * \return this
-	 */
-	UniqueContext &operator=(UniqueContext &&) noexcept = delete;
+    /**
+     * Default move assignment operator.
+     *
+     * \return this
+     */
+    UniqueContext &operator=(UniqueContext &&) noexcept = delete;
 };
 
 /**
@@ -188,43 +188,43 @@
  */
 class Error {
 private:
-	int m_type{DUK_ERR_ERROR};
-	std::string m_message;
+    int m_type{DUK_ERR_ERROR};
+    std::string m_message;
 
 protected:
-	/**
-	 * Constructor with a type of error specified, specially designed for derived errors.
-	 *
-	 * \param type of error (e.g. DUK_ERR_ERROR)
-	 * \param message the message
-	 */
-	inline Error(int type, std::string message) noexcept
-		: m_type(type)
-		, m_message(std::move(message))
-	{
-	}
+    /**
+     * Constructor with a type of error specified, specially designed for derived errors.
+     *
+     * \param type of error (e.g. DUK_ERR_ERROR)
+     * \param message the message
+     */
+    inline Error(int type, std::string message) noexcept
+        : m_type(type)
+        , m_message(std::move(message))
+    {
+    }
 
 public:
-	/**
-	 * Constructor with a message.
-	 *
-	 * \param message the message
-	 */
-	inline Error(std::string message) noexcept
-		: m_message(std::move(message))
-	{
-	}
+    /**
+     * Constructor with a message.
+     *
+     * \param message the message
+     */
+    inline Error(std::string message) noexcept
+        : m_message(std::move(message))
+    {
+    }
 
-	/**
-	 * Create the exception on the stack.
-	 *
-	 * \note the default implementation search for the global variables
-	 * \param ctx the context
-	 */
-	virtual void raise(duk_context *ctx) const
-	{
-		duk_error(ctx, m_type, "%s", m_message.c_str());
-	}
+    /**
+     * Create the exception on the stack.
+     *
+     * \note the default implementation search for the global variables
+     * \param ctx the context
+     */
+    virtual void raise(duk_context *ctx) const
+    {
+        duk_error(ctx, m_type, "%s", m_message.c_str());
+    }
 };
 
 /**
@@ -233,15 +233,15 @@
  */
 class EvalError : public Error {
 public:
-	/**
-	 * Construct an EvalError.
-	 *
-	 * \param message the message
-	 */
-	inline EvalError(std::string message) noexcept
-		: Error(DUK_ERR_EVAL_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an EvalError.
+     *
+     * \param message the message
+     */
+    inline EvalError(std::string message) noexcept
+        : Error(DUK_ERR_EVAL_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -250,15 +250,15 @@
  */
 class RangeError : public Error {
 public:
-	/**
-	 * Construct an RangeError.
-	 *
-	 * \param message the message
-	 */
-	inline RangeError(std::string message) noexcept
-		: Error(DUK_ERR_RANGE_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an RangeError.
+     *
+     * \param message the message
+     */
+    inline RangeError(std::string message) noexcept
+        : Error(DUK_ERR_RANGE_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -267,15 +267,15 @@
  */
 class ReferenceError : public Error {
 public:
-	/**
-	 * Construct an ReferenceError.
-	 *
-	 * \param message the message
-	 */
-	inline ReferenceError(std::string message) noexcept
-		: Error(DUK_ERR_REFERENCE_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an ReferenceError.
+     *
+     * \param message the message
+     */
+    inline ReferenceError(std::string message) noexcept
+        : Error(DUK_ERR_REFERENCE_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -284,15 +284,15 @@
  */
 class SyntaxError : public Error {
 public:
-	/**
-	 * Construct an SyntaxError.
-	 *
-	 * \param message the message
-	 */
-	inline SyntaxError(std::string message) noexcept
-		: Error(DUK_ERR_SYNTAX_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an SyntaxError.
+     *
+     * \param message the message
+     */
+    inline SyntaxError(std::string message) noexcept
+        : Error(DUK_ERR_SYNTAX_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -301,15 +301,15 @@
  */
 class TypeError : public Error {
 public:
-	/**
-	 * Construct an TypeError.
-	 *
-	 * \param message the message
-	 */
-	inline TypeError(std::string message) noexcept
-		: Error(DUK_ERR_TYPE_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an TypeError.
+     *
+     * \param message the message
+     */
+    inline TypeError(std::string message) noexcept
+        : Error(DUK_ERR_TYPE_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -318,15 +318,15 @@
  */
 class URIError : public Error {
 public:
-	/**
-	 * Construct an URIError.
-	 *
-	 * \param message the message
-	 */
-	inline URIError(std::string message) noexcept
-		: Error(DUK_ERR_URI_ERROR, std::move(message))
-	{
-	}
+    /**
+     * Construct an URIError.
+     *
+     * \param message the message
+     */
+    inline URIError(std::string message) noexcept
+        : Error(DUK_ERR_URI_ERROR, std::move(message))
+    {
+    }
 };
 
 /**
@@ -339,26 +339,26 @@
  */
 inline Exception dukx_exception(duk_context *ctx, int index, bool pop = true)
 {
-	Exception ex;
+    Exception ex;
 
-	index = duk_normalize_index(ctx, index);
+    index = duk_normalize_index(ctx, index);
 
-	duk_get_prop_string(ctx, index, "name");
-	ex.name = duk_to_string(ctx, -1);
-	duk_get_prop_string(ctx, index, "message");
-	ex.message = duk_to_string(ctx, -1);
-	duk_get_prop_string(ctx, index, "fileName");
-	ex.fileName = duk_to_string(ctx, -1);
-	duk_get_prop_string(ctx, index, "lineNumber");
-	ex.lineNumber = duk_to_int(ctx, -1);
-	duk_get_prop_string(ctx, index, "stack");
-	ex.stack = duk_to_string(ctx, -1);
-	duk_pop_n(ctx, 5);
+    duk_get_prop_string(ctx, index, "name");
+    ex.name = duk_to_string(ctx, -1);
+    duk_get_prop_string(ctx, index, "message");
+    ex.message = duk_to_string(ctx, -1);
+    duk_get_prop_string(ctx, index, "fileName");
+    ex.fileName = duk_to_string(ctx, -1);
+    duk_get_prop_string(ctx, index, "lineNumber");
+    ex.lineNumber = duk_to_int(ctx, -1);
+    duk_get_prop_string(ctx, index, "stack");
+    ex.stack = duk_to_string(ctx, -1);
+    duk_pop_n(ctx, 5);
 
-	if (pop)
-		duk_remove(ctx, index);
+    if (pop)
+        duk_remove(ctx, index);
 
-	return ex;
+    return ex;
 }
 
 /**
@@ -373,14 +373,14 @@
 template <typename Func>
 void dukx_enumerate(duk_context *ctx, int index, duk_uint_t flags, duk_bool_t getvalue, Func &&func)
 {
-	duk_enum(ctx, index, flags);
+    duk_enum(ctx, index, flags);
 
-	while (duk_next(ctx, -1, getvalue)) {
-		func(ctx);
-		duk_pop_n(ctx, 1 + (getvalue ? 1 : 0));
-	}
+    while (duk_next(ctx, -1, getvalue)) {
+        func(ctx);
+        duk_pop_n(ctx, 1 + (getvalue ? 1 : 0));
+    }
 
-	duk_pop(ctx);
+    duk_pop(ctx);
 }
 
 /**
@@ -392,7 +392,7 @@
 template <typename Exception>
 void dukx_throw(duk_context *ctx, const Exception &ex)
 {
-	ex.raise(ctx);
+    ex.raise(ctx);
 }
 
 /**
@@ -404,10 +404,10 @@
  */
 inline std::string dukx_get_std_string(duk_context *ctx, int index)
 {
-	duk_size_t size;
-	const char *text = duk_get_lstring(ctx, index, &size);
+    duk_size_t size;
+    const char *text = duk_get_lstring(ctx, index, &size);
 
-	return std::string(text, size);
+    return std::string(text, size);
 }
 
 /**
@@ -419,10 +419,10 @@
  */
 inline std::string dukx_require_std_string(duk_context *ctx, int index)
 {
-	duk_size_t size;
-	const char *text = duk_require_lstring(ctx, index, &size);
+    duk_size_t size;
+    const char *text = duk_require_lstring(ctx, index, &size);
 
-	return std::string(text, size);
+    return std::string(text, size);
 }
 
 /**
@@ -433,7 +433,7 @@
  */
 inline void dukx_push_std_string(duk_context *ctx, const std::string &str)
 {
-	duk_push_lstring(ctx, str.data(), str.length());
+    duk_push_lstring(ctx, str.data(), str.length());
 }
 
 /**
@@ -446,18 +446,18 @@
 template <typename Getter>
 auto dukx_get_array(duk_context *ctx, duk_idx_t index, Getter &&get)
 {
-	using T = decltype(get(ctx, 0));
+    using T = decltype(get(ctx, 0));
 
-	std::vector<T> result;
-	std::size_t length = duk_get_length(ctx, index);
+    std::vector<T> result;
+    std::size_t length = duk_get_length(ctx, index);
 
-	for (std::size_t i = 0; i < length; ++i) {
-		duk_get_prop_index(ctx, -1, i);
-		result.push_back(get(ctx, -1));
-		duk_pop(ctx);
-	}
+    for (std::size_t i = 0; i < length; ++i) {
+        duk_get_prop_index(ctx, -1, i);
+        result.push_back(get(ctx, -1));
+        duk_pop(ctx);
+    }
 
-	return result;
+    return result;
 }
 
 /**
@@ -470,13 +470,13 @@
 template <typename T, typename Pusher>
 void dukx_push_array(duk_context *ctx, const std::vector<T> &values, Pusher &&push)
 {
-	duk_push_array(ctx);
+    duk_push_array(ctx);
 
-	int i = 0;
-	for (auto x : values) {
-		push(ctx, x);
-		duk_put_prop_index(ctx, -2, i++);
-	}
+    int i = 0;
+    for (auto x : values) {
+        push(ctx, x);
+        duk_put_prop_index(ctx, -2, i++);
+    }
 }
 
 } // !irccd
--- a/lib/irccd/dynlib.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/dynlib.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -115,16 +115,16 @@
  *
  * int main()
  * {
- *	try {
- *		Dynlib dso("./plugin" DYNLIB_SUFFIX);
+ *    try {
+ *        Dynlib dso("./plugin" DYNLIB_SUFFIX);
  *
- *		dso.sym<PluginLoad>("plugin_load")();
- *		dso.sym<PluginUnload>("plugin_unload")();
- *	} catch (const std::exception &ex) {
- *		std::cerr << ex.what() << std::endl;
- *	}
+ *        dso.sym<PluginLoad>("plugin_load")();
+ *        dso.sym<PluginUnload>("plugin_unload")();
+ *    } catch (const std::exception &ex) {
+ *        std::cerr << ex.what() << std::endl;
+ *    }
  *
- *	return 0;
+ *    return 0;
  * }
  * ````
  *
@@ -156,7 +156,7 @@
  * \endcode
  */
 #if defined(_WIN32)
-#  define DYNLIB_EXPORT	__declspec(dllexport)
+#  define DYNLIB_EXPORT    __declspec(dllexport)
 #else
 #  define DYNLIB_EXPORT
 #endif
@@ -191,80 +191,80 @@
 class Dynlib {
 private:
 #if defined(_WIN32)
-	using Handle	= HMODULE;
-	using Sym	= FARPROC;
+    using Handle    = HMODULE;
+    using Sym    = FARPROC;
 #else
-	using Handle	= void *;
-	using Sym	= void *;
+    using Handle    = void *;
+    using Sym    = void *;
 #endif
 
 public:
-	/**
-	 * \brief Policy for symbol resolution.
-	 */
-	enum Policy {
-		Immediately,		//!< load symbols immediately
-		Lazy			//!< load symbols when needed
-	};
+    /**
+     * \brief Policy for symbol resolution.
+     */
+    enum Policy {
+        Immediately,        //!< load symbols immediately
+        Lazy            //!< load symbols when needed
+    };
 
 private:
-	Handle	m_handle;
+    Handle    m_handle;
 
-	Dynlib(const Dynlib &) = delete;
-	Dynlib &operator=(const Dynlib &) = delete;
+    Dynlib(const Dynlib &) = delete;
+    Dynlib &operator=(const Dynlib &) = delete;
 
-	Dynlib(Dynlib &&) = delete;
-	Dynlib &operator=(Dynlib &&) = delete;
+    Dynlib(Dynlib &&) = delete;
+    Dynlib &operator=(Dynlib &&) = delete;
 
 #if defined(_WIN32)
-	std::string error()
-	{
-		LPSTR error = nullptr;
-		std::string errmsg;
+    std::string error()
+    {
+        LPSTR error = nullptr;
+        std::string errmsg;
 
-		FormatMessageA(
-			FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-			NULL,
-			GetLastError(),
-			MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-			(LPSTR)&error, 0, NULL);
+        FormatMessageA(
+            FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+            NULL,
+            GetLastError(),
+            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+            (LPSTR)&error, 0, NULL);
 
-		if (error) {
-			errmsg = std::string(error);
-			LocalFree(error);
-		}
+        if (error) {
+            errmsg = std::string(error);
+            LocalFree(error);
+        }
 
-		return errmsg;
-	}
+        return errmsg;
+    }
 #endif
 
 public:
-	/**
-	 * Constructor to load a shared module.
-	 *
-	 * \param path the absolute path
-	 * \param policy the policy to load
-	 * \throw std::runtime_error on error
-	 */
-	inline Dynlib(const std::string &path, Policy policy = Immediately);
+    /**
+     * Constructor to load a shared module.
+     *
+     * \param path the absolute path
+     * \param policy the policy to load
+     * \throw std::runtime_error on error
+     */
+    inline Dynlib(const std::string &path, Policy policy = Immediately);
 
-	/**
-	 * Close the library automatically.
-	 */
-	inline ~Dynlib();
+    /**
+     * Close the library automatically.
+     */
+    inline ~Dynlib();
 
-	/**
-	 * Get a symbol from the library.
-	 *
-	 * On some platforms the symbol must be manually exported.
-	 *
-	 * \param name the symbol
-	 * \return the symbol
-	 * \throw std::runtime_error on error
-	 * \see DYNLIB_EXPORT
-	 */
-	template <typename T>
-	inline T sym(const std::string &name);
+    /**
+     * Get a symbol from the library.
+     *
+     * On some platforms the symbol must be manually exported.
+     *
+     * \param name the symbol
+     * \return the symbol
+     * \throw std::runtime_error on error
+     * \see DYNLIB_EXPORT
+     */
+    template <typename T>
+    inline T sym(const std::string &name);
 };
 
 #if defined(_WIN32)
@@ -276,27 +276,27 @@
 
 Dynlib::Dynlib(const std::string &path, Policy)
 {
-	m_handle = LoadLibraryA(path.c_str());
+    m_handle = LoadLibraryA(path.c_str());
 
-	if (m_handle == nullptr)
-		throw std::runtime_error(error());
+    if (m_handle == nullptr)
+        throw std::runtime_error(error());
 }
 
 Dynlib::~Dynlib()
 {
-	FreeLibrary(m_handle);
-	m_handle = nullptr;
+    FreeLibrary(m_handle);
+    m_handle = nullptr;
 }
 
 template <typename T>
 T Dynlib::sym(const std::string &name)
 {
-	Sym sym = GetProcAddress(m_handle, name.c_str());
+    Sym sym = GetProcAddress(m_handle, name.c_str());
 
-	if (sym == nullptr)
-		throw std::runtime_error(error());
+    if (sym == nullptr)
+        throw std::runtime_error(error());
 
-	return reinterpret_cast<T>(sym);
+    return reinterpret_cast<T>(sym);
 }
 
 #else
@@ -308,27 +308,27 @@
 
 Dynlib::Dynlib(const std::string &path, Policy policy)
 {
-	m_handle = dlopen(path.c_str(), policy == Immediately ? RTLD_NOW : RTLD_LAZY);
+    m_handle = dlopen(path.c_str(), policy == Immediately ? RTLD_NOW : RTLD_LAZY);
 
-	if (m_handle == nullptr)
-		throw std::runtime_error(dlerror());
+    if (m_handle == nullptr)
+        throw std::runtime_error(dlerror());
 }
 
 Dynlib::~Dynlib()
 {
-	dlclose(m_handle);
-	m_handle = nullptr;
+    dlclose(m_handle);
+    m_handle = nullptr;
 }
 
 template <typename T>
 T Dynlib::sym(const std::string &name)
 {
-	Sym sym = dlsym(m_handle, name.c_str());
+    Sym sym = dlsym(m_handle, name.c_str());
 
-	if (sym == nullptr)
-		throw std::runtime_error(dlerror());
+    if (sym == nullptr)
+        throw std::runtime_error(dlerror());
 
-	return reinterpret_cast<T>(sym);
+    return reinterpret_cast<T>(sym);
 }
 
 #endif
--- a/lib/irccd/elapsed-timer.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/elapsed-timer.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,39 +26,39 @@
 
 ElapsedTimer::ElapsedTimer() noexcept
 {
-	m_last = high_resolution_clock::now();
+    m_last = high_resolution_clock::now();
 }
 
 void ElapsedTimer::pause() noexcept
 {
-	/*
-	 * When we put the timer on pause, do not forget to set the already
-	 * elapsed time.
-	 */
-	(void)elapsed();
-	m_paused = true;
+    /*
+     * When we put the timer on pause, do not forget to set the already
+     * elapsed time.
+     */
+    (void)elapsed();
+    m_paused = true;
 }
 
 void ElapsedTimer::restart() noexcept
 {
-	m_paused = false;
-	m_last = high_resolution_clock::now();
+    m_paused = false;
+    m_last = high_resolution_clock::now();
 }
 
 void ElapsedTimer::reset() noexcept
 {
-	m_elapsed = 0;
-	m_last = high_resolution_clock::now();
+    m_elapsed = 0;
+    m_last = high_resolution_clock::now();
 }
 
 unsigned ElapsedTimer::elapsed() noexcept
 {
-	if (!m_paused) {
-		m_elapsed += duration_cast<milliseconds>(high_resolution_clock::now() - m_last).count();
-		m_last = high_resolution_clock::now();
-	}
+    if (!m_paused) {
+        m_elapsed += duration_cast<milliseconds>(high_resolution_clock::now() - m_last).count();
+        m_last = high_resolution_clock::now();
+    }
 
-	return m_elapsed;
+    return m_elapsed;
 }
 
 } // !irccd
--- a/lib/irccd/elapsed-timer.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/elapsed-timer.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -42,44 +42,44 @@
  */
 class ElapsedTimer {
 private:
-	using TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock>;
+    using TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock>;
 
-	TimePoint m_last;
-	bool m_paused{false};
-	unsigned m_elapsed{0};
+    TimePoint m_last;
+    bool m_paused{false};
+    unsigned m_elapsed{0};
 
 public:
-	/**
-	 * Construct the elapsed timer, start counting.
-	 */
-	IRCCD_EXPORT ElapsedTimer() noexcept;
+    /**
+     * Construct the elapsed timer, start counting.
+     */
+    IRCCD_EXPORT ElapsedTimer() noexcept;
 
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~ElapsedTimer() = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~ElapsedTimer() = default;
 
-	/**
-	 * Put the timer on pause, the already elapsed time is stored.
-	 */
-	IRCCD_EXPORT void pause() noexcept;
+    /**
+     * Put the timer on pause, the already elapsed time is stored.
+     */
+    IRCCD_EXPORT void pause() noexcept;
 
-	/**
-	 * Restart the timer, does not reset it.
-	 */
-	IRCCD_EXPORT void restart() noexcept;
+    /**
+     * Restart the timer, does not reset it.
+     */
+    IRCCD_EXPORT void restart() noexcept;
 
-	/**
-	 * Reset the timer to 0.
-	 */
-	IRCCD_EXPORT void reset() noexcept;
+    /**
+     * Reset the timer to 0.
+     */
+    IRCCD_EXPORT void reset() noexcept;
 
-	/**
-	 * Get the number of elapsed milliseconds.
-	 *
-	 * \return the milliseconds
-	 */
-	IRCCD_EXPORT unsigned elapsed() noexcept;
+    /**
+     * Get the number of elapsed milliseconds.
+     *
+     * \return the milliseconds
+     */
+    IRCCD_EXPORT unsigned elapsed() noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/fs.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/fs.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -16,8 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#if defined(_WIN32)
-#  define _CRT_SECURE_NO_WARNINGS
+#if defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS)
+#   define _CRT_SECURE_NO_WARNINGS
 #endif
 
 #include <algorithm>
@@ -29,13 +29,13 @@
 #include <stdexcept>
 
 #if defined(_WIN32)
-#  include <direct.h>
-#  include <Windows.h>
-#  include <Shlwapi.h>
+#   include <direct.h>
+#   include <Windows.h>
+#   include <Shlwapi.h>
 #else
-#  include <sys/types.h>
-#  include <dirent.h>
-#  include <unistd.h>
+#   include <sys/types.h>
+#   include <dirent.h>
+#   include <unistd.h>
 #endif
 
 #include "fs.hpp"
@@ -56,22 +56,22 @@
 
 std::string error()
 {
-	LPSTR error = nullptr;
-	std::string errmsg = "Unknown error";
+    LPSTR error = nullptr;
+    std::string errmsg = "Unknown error";
 
-	FormatMessageA(
-		FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-		nullptr,
-		GetLastError(),
-		MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-		(LPSTR)&error, 0, nullptr);
+    FormatMessageA(
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+        nullptr,
+        GetLastError(),
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+        (LPSTR)&error, 0, nullptr);
 
-	if (error) {
-		errmsg = std::string(error);
-		LocalFree(error);
-	}
+    if (error) {
+        errmsg = std::string(error);
+        LocalFree(error);
+    }
 
-	return errmsg;
+    return errmsg;
 }
 
 #endif
@@ -84,17 +84,17 @@
  */
 bool hasAccess(const std::string &path, const std::string &mode)
 {
-	assert(mode.length() == 1);
-	assert(mode[0] == 'r' || mode[0] == 'w');
+    assert(mode.length() == 1);
+    assert(mode[0] == 'r' || mode[0] == 'w');
 
-	auto fp = std::fopen(path.c_str(), mode.c_str());
+    auto fp = std::fopen(path.c_str(), mode.c_str());
 
-	if (fp == nullptr)
-		return false;
+    if (fp == nullptr)
+        return false;
 
-	std::fclose(fp);
+    std::fclose(fp);
 
-	return true;
+    return true;
 }
 
 /*
@@ -112,12 +112,12 @@
 template <typename Predicate>
 bool typeOf(const std::string &path, Predicate &&predicate)
 {
-	DWORD result = GetFileAttributesA(path.c_str());
+    DWORD result = GetFileAttributesA(path.c_str());
 
-	if (result == INVALID_FILE_ATTRIBUTES)
-		return false;
+    if (result == INVALID_FILE_ATTRIBUTES)
+        return false;
 
-	return predicate(result);
+    return predicate(result);
 }
 
 #elif defined(FS_HAVE_STAT)
@@ -125,12 +125,12 @@
 template <typename Predicate>
 bool typeOf(const std::string &path, Predicate &&predicate) noexcept
 {
-	struct stat st;
+    struct stat st;
 
-	if (::stat(path.c_str(), &st) < 0)
-		return false;
+    if (::stat(path.c_str(), &st) < 0)
+        return false;
 
-	return predicate(st);
+    return predicate(st);
 }
 
 #else
@@ -138,7 +138,7 @@
 template <typename Predicate>
 bool typeOf(const std::string &path, Predicate &&predicate) noexcept
 {
-	throw std::runtime_error(std::strerror(ENOSYS));
+    throw std::runtime_error(std::strerror(ENOSYS));
 }
 
 #endif
@@ -151,28 +151,28 @@
  */
 std::string clean(std::string input)
 {
-	if (input.empty())
-		return input;
+    if (input.empty())
+        return input;
 
-	/* First, remove any duplicates */
-	input.erase(std::unique(input.begin(), input.end(), [&] (char c1, char c2) {
-		return c1 == c2 && (c1 == '/' || c1 == '\\');
-	}), input.end());
+    // First, remove any duplicates.
+    input.erase(std::unique(input.begin(), input.end(), [&] (char c1, char c2) {
+        return c1 == c2 && (c1 == '/' || c1 == '\\');
+    }), input.end());
 
-	/* Add a trailing / or \\ */
-	char c = input[input.length() - 1];
+    // Add a trailing / or \\.
+    char c = input[input.length() - 1];
 
-	if (c != '/' && c != '\\')
-		input += separator();
+    if (c != '/' && c != '\\')
+        input += separator();
 
-	/* Now converts all / to \\ for Windows and the opposite for Unix */
+    // Now converts all / to \\ for Windows and the opposite for Unix.
 #if defined(_WIN32)
-	std::replace(input.begin(), input.end(), '/', '\\');
+    std::replace(input.begin(), input.end(), '/', '\\');
 #else
-	std::replace(input.begin(), input.end(), '\\', '/');
+    std::replace(input.begin(), input.end(), '\\', '/');
 #endif
 
-	return input;
+    return input;
 }
 
 /*
@@ -181,12 +181,12 @@
  */
 std::string baseName(std::string path)
 {
-	auto pos = path.find_last_of("\\/");
+    auto pos = path.find_last_of("\\/");
 
-	if (pos != std::string::npos)
-		path = path.substr(pos + 1);
+    if (pos != std::string::npos)
+        path = path.substr(pos + 1);
 
-	return path;
+    return path;
 }
 
 /*
@@ -195,14 +195,14 @@
  */
 std::string dirName(std::string path)
 {
-	auto pos = path.find_last_of("\\/");
+    auto pos = path.find_last_of("\\/");
 
-	if (pos == std::string::npos)
-		path = ".";
-	else
-		path = path.substr(0, pos);
+    if (pos == std::string::npos)
+        path = ".";
+    else
+        path = path.substr(0, pos);
 
-	return path;
+    return path;
 }
 
 /*
@@ -212,9 +212,9 @@
 bool isAbsolute(const std::string &path) noexcept
 {
 #if defined(_WIN32)
-	return !isRelative(path);
+    return !isRelative(path);
 #else
-	return path.size() > 0 && path[0] == '/';
+    return path.size() > 0 && path[0] == '/';
 #endif
 }
 
@@ -225,9 +225,9 @@
 bool isRelative(const std::string &path) noexcept
 {
 #if defined(_WIN32)
-	return PathIsRelativeA(path.c_str()) == 1;
+    return PathIsRelativeA(path.c_str()) == 1;
 #else
-	return !isAbsolute(path);
+    return !isAbsolute(path);
 #endif
 }
 
@@ -237,7 +237,7 @@
  */
 bool isReadable(const std::string &path) noexcept
 {
-	return hasAccess(path, "r");
+    return hasAccess(path, "r");
 }
 
 /*
@@ -246,7 +246,7 @@
  */
 bool isWritable(const std::string &path) noexcept
 {
-	return hasAccess(path, "w");
+    return hasAccess(path, "w");
 }
 
 /*
@@ -255,13 +255,13 @@
  */
 bool isFile(const std::string &path)
 {
-	return typeOf(path, [] (const auto &object) {
+    return typeOf(path, [] (const auto &object) {
 #if defined(_WIN32)
-		return (object & FILE_ATTRIBUTE_ARCHIVE) == FILE_ATTRIBUTE_ARCHIVE;
+        return (object & FILE_ATTRIBUTE_ARCHIVE) == FILE_ATTRIBUTE_ARCHIVE;
 #elif defined(FS_HAVE_STAT)
-		return S_ISREG(object.st_mode);
+        return S_ISREG(object.st_mode);
 #endif
-	});
+    });
 }
 
 /*
@@ -270,13 +270,13 @@
  */
 bool isDirectory(const std::string &path)
 {
-	return typeOf(path, [] (const auto &object) {
+    return typeOf(path, [] (const auto &object) {
 #if defined(_WIN32)
-		return (object & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
+        return (object & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
 #elif defined(FS_HAVE_STAT)
-		return S_ISDIR(object.st_mode);
+        return S_ISDIR(object.st_mode);
 #endif
-	});
+    });
 }
 
 /*
@@ -285,13 +285,13 @@
  */
 bool isSymlink(const std::string &path)
 {
-	return typeOf(path, [] (const auto &object) {
+    return typeOf(path, [] (const auto &object) {
 #if defined(_WIN32)
-		return (object & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT;
+        return (object & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT;
 #elif defined(FS_HAVE_STAT)
-		return S_ISLNK(object.st_mode);
+        return S_ISLNK(object.st_mode);
 #endif
-	});
+    });
 }
 
 /*
@@ -302,12 +302,12 @@
 
 struct stat stat(const std::string &path)
 {
-	struct stat st;
+    struct stat st;
 
-	if (::stat(path.c_str(), &st) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (::stat(path.c_str(), &st) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	return st;
+    return st;
 }
 
 #endif
@@ -319,11 +319,11 @@
 bool exists(const std::string &path) noexcept
 {
 #if defined(FS_HAVE_STAT)
-	struct stat st;
+    struct stat st;
 
-	return ::stat(path.c_str(), &st) == 0;
+    return ::stat(path.c_str(), &st) == 0;
 #else
-	return  hasAccess(path, "r");
+    return  hasAccess(path, "r");
 #endif
 }
 
@@ -333,84 +333,84 @@
  */
 std::vector<Entry> readdir(const std::string &path, int flags)
 {
-	std::vector<Entry> entries;
+    std::vector<Entry> entries;
 
 #if defined(_WIN32)
-	std::ostringstream oss;
-	HANDLE handle;
-	WIN32_FIND_DATA fdata;
+    std::ostringstream oss;
+    HANDLE handle;
+    WIN32_FIND_DATA fdata;
 
-	oss << path << "\\*";
-	handle = FindFirstFile(oss.str().c_str(), &fdata);
+    oss << path << "\\*";
+    handle = FindFirstFile(oss.str().c_str(), &fdata);
 
-	if (handle == nullptr)
-		throw std::runtime_error(error());
+    if (handle == nullptr)
+        throw std::runtime_error(error());
 
-	do {
-		Entry entry;
+    do {
+        Entry entry;
 
-		entry.name = fdata.cFileName;
+        entry.name = fdata.cFileName;
 
-		if (entry.name == "." && !(flags & Dot))
-			continue;
-		if (entry.name == ".." && !(flags & DotDot))
-			continue;
+        if (entry.name == "." && !(flags & Dot))
+            continue;
+        if (entry.name == ".." && !(flags & DotDot))
+            continue;
 
-		switch (fdata.dwFileAttributes) {
-		case FILE_ATTRIBUTE_DIRECTORY:
-			entry.type = Entry::Dir;
-			break;
-		case FILE_ATTRIBUTE_NORMAL:
-			entry.type = Entry::File;
-			break;
-		case FILE_ATTRIBUTE_REPARSE_POINT:
-			entry.type = Entry::Link;
-			break;
-		default:
-			break;
-		}
+        switch (fdata.dwFileAttributes) {
+        case FILE_ATTRIBUTE_DIRECTORY:
+            entry.type = Entry::Dir;
+            break;
+        case FILE_ATTRIBUTE_NORMAL:
+            entry.type = Entry::File;
+            break;
+        case FILE_ATTRIBUTE_REPARSE_POINT:
+            entry.type = Entry::Link;
+            break;
+        default:
+            break;
+        }
 
-		entries.push_back(std::move(entry));
-	} while (FindNextFile(handle, &fdata) != 0);
+        entries.push_back(std::move(entry));
+    } while (FindNextFile(handle, &fdata) != 0);
 
-	FindClose(handle);
+    FindClose(handle);
 #else
-	DIR *dp;
-	struct dirent *ent;
+    DIR *dp;
+    struct dirent *ent;
 
-	if ((dp = opendir(path.c_str())) == nullptr)
-		throw std::runtime_error(std::strerror(errno));
+    if ((dp = opendir(path.c_str())) == nullptr)
+        throw std::runtime_error(std::strerror(errno));
 
-	while ((ent = readdir(dp)) != nullptr) {
-		Entry entry;
+    while ((ent = readdir(dp)) != nullptr) {
+        Entry entry;
 
-		entry.name = ent->d_name;
-		if (entry.name == "." && !(flags & Dot))
-			continue;
-		if (entry.name == ".." && !(flags & DotDot))
-			continue;
+        entry.name = ent->d_name;
+        if (entry.name == "." && !(flags & Dot))
+            continue;
+        if (entry.name == ".." && !(flags & DotDot))
+            continue;
 
-		switch (ent->d_type) {
-		case DT_DIR:
-			entry.type = Entry::Dir;
-			break;
-		case DT_REG:
-			entry.type = Entry::File;
-			break;
-		case DT_LNK:
-			entry.type = Entry::Link;
-			break;
-		default:
-			break;
-		}
+        switch (ent->d_type) {
+        case DT_DIR:
+            entry.type = Entry::Dir;
+            break;
+        case DT_REG:
+            entry.type = Entry::File;
+            break;
+        case DT_LNK:
+            entry.type = Entry::Link;
+            break;
+        default:
+            break;
+        }
 
-		entries.push_back(std::move(entry));
-	}
+        entries.push_back(std::move(entry));
+    }
 
-	closedir(dp);
+    closedir(dp);
 #endif
 
-	return entries;
+    return entries;
 }
 
 /*
@@ -419,28 +419,28 @@
  */
 void mkdir(const std::string &path, int mode)
 {
-	std::string::size_type next = 0;
-	std::string part;
+    std::string::size_type next = 0;
+    std::string part;
 
-	for (;;) {
-		next = path.find_first_of("\\/", next);
-		part = path.substr(0, next);
+    for (;;) {
+        next = path.find_first_of("\\/", next);
+        part = path.substr(0, next);
 
-		if (!part.empty()) {
+        if (!part.empty()) {
 #if defined(_WIN32)
-			(void)mode;
+            (void)mode;
 
-			if (::_mkdir(part.c_str()) < 0 && errno != EEXIST)
-				throw std::runtime_error(std::strerror(errno));
+            if (::_mkdir(part.c_str()) < 0 && errno != EEXIST)
+                throw std::runtime_error(std::strerror(errno));
 #else
-			if (::mkdir(part.c_str(), mode) < 0 && errno != EEXIST)
-				throw std::runtime_error(std::strerror(errno));
+            if (::mkdir(part.c_str(), mode) < 0 && errno != EEXIST)
+                throw std::runtime_error(std::strerror(errno));
 #endif
-		}
+        }
 
-		if (next++ == std::string::npos)
-			break;
-	}
+        if (next++ == std::string::npos)
+            break;
+    }
 }
 
 /*
@@ -449,22 +449,23 @@
  */
 void rmdir(const std::string &base) noexcept
 {
-	try {
-		for (const auto &entry : readdir(base)) {
-			std::string path = base + separator() + entry.name;
+    try {
+        for (const auto &entry : readdir(base)) {
+            std::string path = base + separator() + entry.name;
 
-			if (entry.type == Entry::Dir)
-				rmdir(path);
-			else
-				remove(path.c_str());
-		}
-	} catch (...) {
-	}
+            if (entry.type == Entry::Dir)
+                rmdir(path);
+            else
+                ::remove(path.c_str());
+        }
+    } catch (...) {
+        // Silently discard to remove as much as possible.
+    }
 
 #if defined(_WIN32)
-	RemoveDirectoryA(base.c_str());
+    ::RemoveDirectoryA(base.c_str());
 #else
-	remove(base.c_str());
+    ::remove(base.c_str());
 #endif
 }
 
@@ -475,22 +476,22 @@
 std::string cwd()
 {
 #if defined(_WIN32)
-	char path[MAX_PATH];
+    char path[MAX_PATH];
 
-	if (!GetCurrentDirectoryA(sizeof (path), path))
-		throw std::runtime_error("failed to get current working directory");
+    if (!::GetCurrentDirectoryA(sizeof (path), path))
+        throw std::runtime_error("failed to get current working directory");
 
-	return path;
+    return path;
 #else
-	char path[PATH_MAX];
+    char path[PATH_MAX];
 
-	if (getcwd(path, sizeof (path)) == nullptr)
-		throw std::runtime_error{std::strerror(errno)};
+    if (::getcwd(path, sizeof (path)) == nullptr)
+        throw std::runtime_error{std::strerror(errno)};
 
-	return path;
+    return path;
 #endif
 }
 
-} // !fs
+} // !irccd
 
-} // !irccd
+} // !fs
--- a/lib/irccd/fs.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/fs.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -16,8 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifndef IRCCD_FS_HPP
-#define IRCCD_FS_HPP
+#ifndef FS_HPP
+#define FS_HPP
 
 /**
  * \file fs.hpp
@@ -25,28 +25,27 @@
  */
 
 /**
- * \page filesystem Filesystem
- * \brief Filesystem support
- *
- * The following options can be set by the user:
- *
- *   - **FS_HAVE_STAT**: (bool) Set to true if sys/stat.h and stat function are available, automatically detected.
+ * \cond FS_HIDDEN_SYMBOLS
  */
 
 #if !defined(FS_HAVE_STAT)
-#  if defined(_WIN32)
-#    define FS_HAVE_STAT
-#  elif defined(__linux__)
-#    define FS_HAVE_STAT
-#  elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-#    define FS_HAVE_STAT
-#  elif defined(__APPLE__)
-#    define FS_HAVE_STAT
-#  endif
+#   if defined(_WIN32)
+#       define FS_HAVE_STAT
+#   elif defined(__linux__)
+#       define FS_HAVE_STAT
+#   elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#       define FS_HAVE_STAT
+#   elif defined(__APPLE__)
+#       define FS_HAVE_STAT
+#   endif
 #endif
 
+/**
+ * \endcond
+ */
+
 #if defined(FS_HAVE_STAT)
-#  include <sys/stat.h>
+#   include <sys/stat.h>
 #endif
 
 #include <regex>
@@ -67,8 +66,8 @@
  * \brief Flags for readdir.
  */
 enum Flags {
-	Dot	= (1 << 0),	//!< if set, also lists "."
-	DotDot	= (1 << 1)	//!< if set, also lists ".."
+    Dot     = (1 << 0),         //!< if set, also lists "."
+    DotDot  = (1 << 1)          //!< if set, also lists ".."
 };
 
 /**
@@ -77,18 +76,18 @@
  */
 class Entry {
 public:
-	/**
-	 * \brief Describe the type of an entry
-	 */
-	enum Type : char {
-		Unknown,	//!< File type is unknown,
-		File,		//!< File is regular type,
-		Dir,		//!< File is directory,
-		Link		//!< File is link
-	};
+    /**
+     * \brief Describe the type of an entry
+     */
+    enum Type : char {
+        Unknown,                //!< File type is unknown,
+        File,                   //!< File is regular type,
+        Dir,                    //!< File is directory,
+        Link                    //!< File is link
+    };
 
-	std::string name;	//!< name of entry (base name)
-	Type type{Unknown};	//!< type of file
+    std::string name;           //!< name of entry (base name)
+    Type type{Unknown};         //!< type of file
 };
 
 /**
@@ -100,7 +99,7 @@
  */
 inline bool operator==(const Entry &e1, const Entry &e2) noexcept
 {
-	return e1.name == e2.name && e1.type == e2.type;
+    return e1.name == e2.name && e1.type == e2.type;
 }
 
 /**
@@ -112,7 +111,7 @@
  */
 inline bool operator!=(const Entry &e1, const Entry &e2) noexcept
 {
-	return !(e1 == e2);
+    return !(e1 == e2);
 }
 
 /**
@@ -123,9 +122,9 @@
 inline char separator() noexcept
 {
 #if defined(_WIN32)
-	return '\\';
+    return '\\';
 #else
-	return '/';
+    return '/';
 #endif
 }
 
@@ -272,7 +271,7 @@
  * Search an item recursively.
  *
  * The predicate must have the following signature:
- *	void f(const std::string &base, const Entry &entry)
+ *  void f(const std::string &base, const Entry &entry)
  *
  * Where:
  *   - base is the current parent directory in the tree
@@ -286,34 +285,34 @@
 template <typename Predicate>
 std::string findIf(const std::string &base, Predicate &&predicate)
 {
-	/*
-	 * Do not go deeply to the tree before testing all files in the current directory for performances reasons, we iterate
-	 * this directory to search for the entry name and iterate again over all sub directories if not found.
-	 */
-	std::string path;
-	std::vector<Entry> entries = readdir(base);
+    /*
+     * Do not go deeply to the tree before testing all files in the current directory for performances reasons, we iterate
+     * this directory to search for the entry name and iterate again over all sub directories if not found.
+     */
+    std::string path;
+    std::vector<Entry> entries = readdir(base);
 
-	for (const auto &entry : entries) {
-		if (predicate(base, entry)) {
-			path = base + separator() + entry.name;
-			break;
-		}
-	}
+    for (const auto &entry : entries) {
+        if (predicate(base, entry)) {
+            path = base + separator() + entry.name;
+            break;
+        }
+    }
 
-	if (!path.empty())
-		return path;
+    if (!path.empty())
+        return path;
 
-	for (const auto &entry : entries) {
-		if (entry.type != Entry::Dir)
-			continue;
+    for (const auto &entry : entries) {
+        if (entry.type != Entry::Dir)
+            continue;
 
-		path = findIf(base + separator() + entry.name, std::forward<Predicate>(predicate));
+        path = findIf(base + separator() + entry.name, std::forward<Predicate>(predicate));
 
-		if (!path.empty())
-			break;
-	}
+        if (!path.empty())
+            break;
+    }
 
-	return path;
+    return path;
 }
 
 /**
@@ -326,7 +325,7 @@
  */
 inline std::string find(const std::string &base, const std::string &name)
 {
-	return findIf(base, [&] (const auto &, const auto &entry) { return entry.name == name; });
+    return findIf(base, [&] (const auto &, const auto &entry) { return entry.name == name; });
 }
 
 /**
@@ -339,7 +338,7 @@
  */
 inline std::string find(const std::string &base, const std::regex &regex)
 {
-	return findIf(base, [&] (const auto &, const auto &entry) { return std::regex_match(entry.name, regex); });
+    return findIf(base, [&] (const auto &, const auto &entry) { return std::regex_match(entry.name, regex); });
 }
 
 /**
@@ -354,4 +353,4 @@
 
 } // !irccd
 
-#endif // !IRCCD_FS_HPP
+#endif // !FS_HPP
--- a/lib/irccd/ini.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/ini.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -24,7 +24,7 @@
 #include <sstream>
 #include <stdexcept>
 
-/* for PathIsRelative */
+// for PathIsRelative.
 #if defined(_WIN32)
 #  include <Shlwapi.h>
 #endif
@@ -43,294 +43,278 @@
 inline bool isAbsolute(const std::string &path) noexcept
 {
 #if defined(_WIN32)
-	return !PathIsRelative(path.c_str());
+    return !PathIsRelative(path.c_str());
 #else
-	return path.size() > 0 && path[0] == '/';
+    return path.size() > 0 && path[0] == '/';
 #endif
 }
 
 inline bool isQuote(char c) noexcept
 {
-	return c == '\'' || c == '"';
+    return c == '\'' || c == '"';
 }
 
 inline bool isSpace(char c) noexcept
 {
-	/* Custom version because std::isspace includes \n as space */
-	return c == ' ' || c == '\t';
+    // Custom version because std::isspace includes \n as space.
+    return c == ' ' || c == '\t';
 }
 
 inline bool isList(char c) noexcept
 {
-	return c == '(' || c == ')' || c == ',';
+    return c == '(' || c == ')' || c == ',';
 }
 
 inline bool isReserved(char c) noexcept
 {
-	return isList(c) || isQuote(c) || c == '[' || c == ']' || c == '@' || c == '#' || c == '=';
+    return isList(c) || isQuote(c) || c == '[' || c == ']' || c == '@' || c == '#' || c == '=';
 }
 
 void analyseLine(int &line, int &column, StreamIterator &it) noexcept
 {
-	assert(*it == '\n');
+    assert(*it == '\n');
 
-	++ line;
-	++ it;
-	column = 0;
+    ++ line;
+    ++ it;
+    column = 0;
 }
 
 void analyseComment(int &column, StreamIterator &it, StreamIterator end) noexcept
 {
-	assert(*it == '#');
+    assert(*it == '#');
 
-	while (it != end && *it != '\n') {
-		++ column;
-		++ it;
-	}
+    while (it != end && *it != '\n') {
+        ++ column;
+        ++ it;
+    }
 }
 
 void analyseSpaces(int &column, StreamIterator &it, StreamIterator end) noexcept
 {
-	assert(isSpace(*it));
+    assert(isSpace(*it));
 
-	while (it != end && isSpace(*it)) {
-		++ column;
-		++ it;
-	}
+    while (it != end && isSpace(*it)) {
+        ++ column;
+        ++ it;
+    }
 }
 
 void analyseList(Tokens &list, int line, int &column, StreamIterator &it) noexcept
 {
-	assert(isList(*it));
+    assert(isList(*it));
 
-	switch (*it++) {
-	case '(':
-		list.emplace_back(Token::ListBegin, line, column++);
-		break;
-	case ')':
-		list.emplace_back(Token::ListEnd, line, column++);
-		break;
-	case ',':
-		list.emplace_back(Token::Comma, line, column++);
-		break;
-	default:
-		break;
-	}
+    switch (*it++) {
+    case '(':
+        list.emplace_back(Token::ListBegin, line, column++);
+        break;
+    case ')':
+        list.emplace_back(Token::ListEnd, line, column++);
+        break;
+    case ',':
+        list.emplace_back(Token::Comma, line, column++);
+        break;
+    default:
+        break;
+    }
 }
 
 void analyseSection(Tokens &list, int &line, int &column, StreamIterator &it, StreamIterator end)
 {
-	assert(*it == '[');
+    assert(*it == '[');
 
-	std::string value;
-	int save = column;
+    std::string value;
+    int save = column;
 
-	/* Read section name */
-	++ it;
-	while (it != end && *it != ']') {
-		if (*it == '\n') {
-			throw Error(line, column, "section not terminated, missing ']'");
-		}
-		if (isReserved(*it)) {
-			throw Error(line, column, "section name expected after '[', got '" + std::string(1, *it) + "'");
-		}
+    // Read section name.
+    ++ it;
+    while (it != end && *it != ']') {
+        if (*it == '\n')
+            throw Error(line, column, "section not terminated, missing ']'");
+        if (isReserved(*it))
+            throw Error(line, column, "section name expected after '[', got '" + std::string(1, *it) + "'");
 
-		++ column;
-		value += *it++;
-	}
+        ++ column;
+        value += *it++;
+    }
 
-	if (it == end) {
-		throw Error(line, column, "section name expected after '[', got <EOF>");
-	}
-	if (value.empty()) {
-		throw Error(line, column, "empty section name");
-	}
+    if (it == end)
+        throw Error(line, column, "section name expected after '[', got <EOF>");
+    if (value.empty())
+        throw Error(line, column, "empty section name");
 
-	/* Remove ']' */
-	++ it;
+    // Remove ']'.
+    ++ it;
 
-	list.emplace_back(Token::Section, line, save, std::move(value));
+    list.emplace_back(Token::Section, line, save, std::move(value));
 }
 
 void analyseAssign(Tokens &list, int &line, int &column, StreamIterator &it)
 {
-	assert(*it == '=');
+    assert(*it == '=');
 
-	list.push_back({ Token::Assign, line, column++ });
-	++ it;
+    list.push_back({ Token::Assign, line, column++ });
+    ++ it;
 }
 
 void analyseQuotedWord(Tokens &list, int &line, int &column, StreamIterator &it, StreamIterator end)
 {
-	std::string value;
-	int save = column;
-	char quote = *it++;
+    std::string value;
+    int save = column;
+    char quote = *it++;
 
-	while (it != end && *it != quote) {
-		// TODO: escape sequence
-		++ column;
-		value += *it++;
-	}
+    while (it != end && *it != quote) {
+        // TODO: escape sequence
+        ++ column;
+        value += *it++;
+    }
 
-	if (it == end) {
-		throw Error(line, column, "undisclosed '" + std::string(1, quote) + "', got <EOF>");
-	}
+    if (it == end)
+        throw Error(line, column, "undisclosed '" + std::string(1, quote) + "', got <EOF>");
 
-	/* Remove quote */
-	++ it;
+    // Remove quote.
+    ++ it;
 
-	list.push_back({ Token::QuotedWord, line, save, std::move(value) });
+    list.push_back({ Token::QuotedWord, line, save, std::move(value) });
 }
 
 void analyseWord(Tokens &list, int &line, int &column, StreamIterator &it, StreamIterator end)
 {
-	assert(!isReserved(*it));
+    assert(!isReserved(*it));
 
-	std::string value;
-	int save = column;
+    std::string value;
+    int save = column;
 
-	while (it != end && !std::isspace(*it) && !isReserved(*it)) {
-		++ column;
-		value += *it++;
-	}
+    while (it != end && !std::isspace(*it) && !isReserved(*it)) {
+        ++ column;
+        value += *it++;
+    }
 
-	list.push_back({ Token::Word, line, save, std::move(value) });
+    list.push_back({ Token::Word, line, save, std::move(value) });
 }
 
 void analyseInclude(Tokens &list, int &line, int &column, StreamIterator &it, StreamIterator end)
 {
-	assert(*it == '@');
+    assert(*it == '@');
 
-	std::string include;
-	int save = column;
+    std::string include;
+    int save = column;
 
-	/* Read include */
-	++ it;
-	while (it != end && !isSpace(*it)) {
-		++ column;
-		include += *it++;
-	}
+    // Read include.
+    ++ it;
+    while (it != end && !isSpace(*it)) {
+        ++ column;
+        include += *it++;
+    }
 
-	if (include != "include") {
-		throw Error(line, column, "expected include after '@' token");
-	}
+    if (include != "include")
+        throw Error(line, column, "expected include after '@' token");
 
-	list.push_back({ Token::Include, line, save });
+    list.push_back({ Token::Include, line, save });
 }
 
 void parseOptionValueSimple(Option &option, TokenIterator &it)
 {
-	assert(it->type() == Token::Word || it->type() == Token::QuotedWord);
+    assert(it->type() == Token::Word || it->type() == Token::QuotedWord);
 
-	option.push_back((it++)->value());
+    option.push_back((it++)->value());
 }
 
 void parseOptionValueList(Option &option, TokenIterator &it, TokenIterator end)
 {
-	assert(it->type() == Token::ListBegin);
+    assert(it->type() == Token::ListBegin);
 
-	TokenIterator save = it++;
+    TokenIterator save = it++;
 
-	while (it != end && it->type() != Token::ListEnd) {
-		switch (it->type()) {
-		case Token::Comma:
-			/* Previous must be a word */
-			if (it[-1].type() != Token::Word && it[-1].type() != Token::QuotedWord)
-				throw Error(it->line(), it->column(), "unexpected comma after '" + it[-1].value() + "'");
+    while (it != end && it->type() != Token::ListEnd) {
+        switch (it->type()) {
+        case Token::Comma:
+            // Previous must be a word.
+            if (it[-1].type() != Token::Word && it[-1].type() != Token::QuotedWord)
+                throw Error(it->line(), it->column(), "unexpected comma after '" + it[-1].value() + "'");
 
-			++ it;
-			break;
-		case Token::Word:
-		case Token::QuotedWord:
-			option.push_back((it++)->value());
-			break;
-		default:
-			throw Error(it->line(), it->column(), "unexpected '" + it[-1].value() + "' in list construct");
-			break;
-		}
-	}
+            ++ it;
+            break;
+        case Token::Word:
+        case Token::QuotedWord:
+            option.push_back((it++)->value());
+            break;
+        default:
+            throw Error(it->line(), it->column(), "unexpected '" + it[-1].value() + "' in list construct");
+            break;
+        }
+    }
 
-	if (it == end) {
-		throw Error(save->line(), save->column(), "unterminated list construct");
-	}
+    if (it == end)
+        throw Error(save->line(), save->column(), "unterminated list construct");
 
-	/* Remove ) */
-	++ it;
+    // Remove ).
+    ++ it;
 }
 
 void parseOption(Section &sc, TokenIterator &it, TokenIterator end)
 {
-	Option option(it->value());
+    Option option(it->value());
+
+    TokenIterator save = it;
 
-	TokenIterator save = it;
+    // No '=' or something else?
+    if (++it == end)
+        throw Error(save->line(), save->column(), "expected '=' assignment, got <EOF>");
+    if (it->type() != Token::Assign)
+        throw Error(it->line(), it->column(), "expected '=' assignment, got " + it->value());
 
-	/* No '=' or something else? */
-	if (++it == end) {
-		throw Error(save->line(), save->column(), "expected '=' assignment, got <EOF>");
-	}
-	if (it->type() != Token::Assign) {
-		throw Error(it->line(), it->column(), "expected '=' assignment, got " + it->value());
-	}
+    // Empty options are allowed so just test for words.
+    if (++it != end) {
+        if (it->type() == Token::Word || it->type() == Token::QuotedWord)
+            parseOptionValueSimple(option, it);
+        else if (it->type() == Token::ListBegin)
+            parseOptionValueList(option, it, end);
+    }
 
-	/* Empty options are allowed so just test for words */
-	if (++it != end) {
-		if (it->type() == Token::Word || it->type() == Token::QuotedWord) {
-			parseOptionValueSimple(option, it);
-		} else if (it->type() == Token::ListBegin) {
-			parseOptionValueList(option, it, end);
-		}
-	}
-
-	sc.push_back(std::move(option));
+    sc.push_back(std::move(option));
 }
 
 void parseInclude(Document &doc, const std::string &path, TokenIterator &it, TokenIterator end)
 {
-	TokenIterator save = it;
-
-	if (++it == end) {
-		throw Error(save->line(), save->column(), "expected file name after '@include' statement, got <EOF>");
-	}
+    TokenIterator save = it;
 
-	if (it->type() != Token::Word && it->type() != Token::QuotedWord) {
-		throw Error(it->line(), it->column(), "expected file name after '@include' statement, got " + it->value());
-	}
+    if (++it == end)
+        throw Error(save->line(), save->column(), "expected file name after '@include' statement, got <EOF>");
+    if (it->type() != Token::Word && it->type() != Token::QuotedWord)
+        throw Error(it->line(), it->column(), "expected file name after '@include' statement, got " + it->value());
 
-	std::string value = (it++)->value();
-	std::string file;
+    std::string value = (it++)->value();
+    std::string file;
 
-	if (!isAbsolute(value)) {
+    if (!isAbsolute(value))
 #if defined(_WIN32)
-		file = path + "\\" + value;
+        file = path + "\\" + value;
 #else
-		file = path + "/" + value;
+        file = path + "/" + value;
 #endif
-	} else {
-		file = value;
-	}
+    else
+        file = value;
 
-	for (const auto &sc : readFile(file)) {
-		doc.push_back(sc);
-	}
+    for (const auto &sc : readFile(file))
+        doc.push_back(sc);
 }
 
 void parseSection(Document &doc, TokenIterator &it, TokenIterator end)
 {
-	Section sc(it->value());
+    Section sc(it->value());
 
-	/* Skip [section] */
-	++ it;
+    // Skip [section].
+    ++ it;
 
-	/* Read until next section */
-	while (it != end && it->type() != Token::Section) {
-		if (it->type() != Token::Word) {
-			throw Error(it->line(), it->column(), "unexpected token '" + it->value() + "' in section definition");
-		}
+    // Read until next section.
+    while (it != end && it->type() != Token::Section) {
+        if (it->type() != Token::Word)
+            throw Error(it->line(), it->column(), "unexpected token '" + it->value() + "' in section definition");
 
-		parseOption(sc, it, end);
-	}
+        parseOption(sc, it, end);
+    }
 
-	doc.push_back(std::move(sc));
+    doc.push_back(std::move(sc));
 }
 
 } // !namespace
@@ -339,96 +323,92 @@
 
 Tokens analyse(std::istreambuf_iterator<char> it, std::istreambuf_iterator<char> end)
 {
-	Tokens list;
-	int line = 1;
-	int column = 0;
+    Tokens list;
+    int line = 1;
+    int column = 0;
 
-	while (it != end) {
-		if (*it == '\n') {
-			analyseLine(line, column, it);
-		} else if (*it == '#') {
-			analyseComment(column, it, end);
-		} else if (*it == '[') {
-			analyseSection(list, line, column, it, end);
-		} else if (*it == '=') {
-			analyseAssign(list, line, column, it);
-		} else if (isSpace(*it)) {
-			analyseSpaces(column, it, end);
-		} else if (*it == '@') {
-			analyseInclude(list, line, column, it, end);
-		} else if (isQuote(*it)) {
-			analyseQuotedWord(list, line, column, it, end);
-		} else if (isList(*it)) {
-			analyseList(list, line, column, it);
-		} else {
-			analyseWord(list, line, column, it, end);
-		}
-	}
+    while (it != end) {
+        if (*it == '\n')
+            analyseLine(line, column, it);
+        else if (*it == '#')
+            analyseComment(column, it, end);
+        else if (*it == '[')
+            analyseSection(list, line, column, it, end);
+        else if (*it == '=')
+            analyseAssign(list, line, column, it);
+        else if (isSpace(*it))
+            analyseSpaces(column, it, end);
+        else if (*it == '@')
+            analyseInclude(list, line, column, it, end);
+        else if (isQuote(*it))
+            analyseQuotedWord(list, line, column, it, end);
+        else if (isList(*it))
+            analyseList(list, line, column, it);
+        else
+            analyseWord(list, line, column, it, end);
+    }
 
-	return list;
+    return list;
 }
 
 Tokens analyse(std::istream &stream)
 {
-	return analyse(std::istreambuf_iterator<char>(stream), {});
+    return analyse(std::istreambuf_iterator<char>(stream), {});
 }
 
 Document parse(const Tokens &tokens, const std::string &path)
 {
-	Document doc;
-	TokenIterator it = tokens.cbegin();
-	TokenIterator end = tokens.cend();
+    Document doc;
+    TokenIterator it = tokens.cbegin();
+    TokenIterator end = tokens.cend();
 
-	while (it != end) {
-		switch (it->type()) {
-		case Token::Include:
-			parseInclude(doc, path, it, end);
-			break;
-		case Token::Section:
-			parseSection(doc, it, end);
-			break;
-		default:
-			throw Error(it->line(), it->column(), "unexpected '" + it->value() + "' on root document");
-		}
-	}
+    while (it != end) {
+        switch (it->type()) {
+        case Token::Include:
+            parseInclude(doc, path, it, end);
+            break;
+        case Token::Section:
+            parseSection(doc, it, end);
+            break;
+        default:
+            throw Error(it->line(), it->column(), "unexpected '" + it->value() + "' on root document");
+        }
+    }
 
-	return doc;
+    return doc;
 }
 
 Document readFile(const std::string &filename)
 {
-	/* Get parent path */
-	auto parent = filename;
-	auto pos = parent.find_last_of("/\\");
+    // Get parent path.
+    auto parent = filename;
+    auto pos = parent.find_last_of("/\\");
 
-	if (pos != std::string::npos) {
-		parent.erase(pos);
-	} else {
-		parent = ".";
-	}
+    if (pos != std::string::npos)
+        parent.erase(pos);
+    else
+        parent = ".";
 
-	std::ifstream input(filename);
+    std::ifstream input(filename);
 
-	if (!input) {
-		throw Error(0, 0, std::strerror(errno));
-	}
+    if (!input)
+        throw Error(0, 0, std::strerror(errno));
 
-	return parse(analyse(input), parent);
+    return parse(analyse(input), parent);
 }
 
 Document readString(const std::string &buffer)
 {
-	std::istringstream iss(buffer);
+    std::istringstream iss(buffer);
 
-	return parse(analyse(iss));
+    return parse(analyse(iss));
 }
 
 void dump(const Tokens &tokens)
 {
-	for (const Token &token: tokens) {
-		// TODO: add better description
-		std::cout << token.line() << ":" << token.column() << ": " << token.value() << std::endl;
-	}
+    for (const Token &token: tokens)
+        // TODO: add better description
+        std::cout << token.line() << ":" << token.column() << ": " << token.value() << std::endl;
 }
 
 } // !ini
--- a/lib/irccd/ini.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/ini.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -16,8 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifndef IRCCD_INI_HPP
-#define IRCCD_INI_HPP
+#ifndef INI_HPP
+#define INI_HPP
 
 /**
  * \file ini.hpp
@@ -127,54 +127,54 @@
  */
 class Error : public std::exception {
 private:
-	int m_line;		//!< line number
-	int m_column;		//!< line column
-	std::string m_message;	//!< error message
+    int m_line;                 //!< line number
+    int m_column;               //!< line column
+    std::string m_message;      //!< error message
 
 public:
-	/**
-	 * Constructor.
-	 *
-	 * \param line the line
-	 * \param column the column
-	 * \param msg the message
-	 */
-	inline Error(int line, int column, std::string msg) noexcept
-		: m_line(line)
-		, m_column(column)
-		, m_message(std::move(msg))
-	{
-	}
+    /**
+     * Constructor.
+     *
+     * \param line the line
+     * \param column the column
+     * \param msg the message
+     */
+    inline Error(int line, int column, std::string msg) noexcept
+        : m_line(line)
+        , m_column(column)
+        , m_message(std::move(msg))
+    {
+    }
 
-	/**
-	 * Get the line number.
-	 *
-	 * \return the line
-	 */
-	inline int line() const noexcept
-	{
-		return m_line;
-	}
+    /**
+     * Get the line number.
+     *
+     * \return the line
+     */
+    inline int line() const noexcept
+    {
+        return m_line;
+    }
 
-	/**
-	 * Get the column number.
-	 *
-	 * \return the column
-	 */
-	inline int column() const noexcept
-	{
-		return m_column;
-	}
+    /**
+     * Get the column number.
+     *
+     * \return the column
+     */
+    inline int column() const noexcept
+    {
+        return m_column;
+    }
 
-	/**
-	 * Return the raw error message (no line and column shown).
-	 *
-	 * \return the error message
-	 */
-	const char *what() const noexcept override
-	{
-		return m_message.c_str();
-	}
+    /**
+     * Return the raw error message (no line and column shown).
+     *
+     * \return the error message
+     */
+    const char *what() const noexcept override
+    {
+        return m_message.c_str();
+    }
 };
 
 /**
@@ -187,106 +187,106 @@
  */
 class Token {
 public:
-	/**
-	 * \brief Token type.
-	 */
-	enum Type {
-		Include,	//!< include statement
-		Section,	//!< [section]
-		Word,		//!< word without quotes
-		QuotedWord,	//!< word with quotes
-		Assign,		//!< = assignment
-		ListBegin,	//!< begin of list (
-		ListEnd,	//!< end of list )
-		Comma		//!< list separation
-	};
+    /**
+     * \brief Token type.
+     */
+    enum Type {
+        Include,                //!< include statement
+        Section,                //!< [section]
+        Word,                   //!< word without quotes
+        QuotedWord,             //!< word with quotes
+        Assign,                 //!< = assignment
+        ListBegin,              //!< begin of list (
+        ListEnd,                //!< end of list )
+        Comma                   //!< list separation
+    };
 
 private:
-	Type m_type;
-	int m_line;
-	int m_column;
-	std::string m_value;
+    Type m_type;
+    int m_line;
+    int m_column;
+    std::string m_value;
 
 public:
-	/**
-	 * Construct a token.
-	 *
-	 * \param type the type
-	 * \param line the line
-	 * \param column the column
-	 * \param value the value
-	 */
-	Token(Type type, int line, int column, std::string value = "") noexcept
-		: m_type(type)
-		, m_line(line)
-		, m_column(column)
-	{
-		switch (type) {
-		case Include:
-			m_value = "@include";
-			break;
-		case Section:
-		case Word:
-		case QuotedWord:
-			m_value = value;
-			break;
-		case Assign:
-			m_value = "=";
-			break;
-		case ListBegin:
-			m_value = "(";
-			break;
-		case ListEnd:
-			m_value = ")";
-			break;
-		case Comma:
-			m_value = ",";
-			break;
-		default:
-			break;
-		}
-	}
+    /**
+     * Construct a token.
+     *
+     * \param type the type
+     * \param line the line
+     * \param column the column
+     * \param value the value
+     */
+    Token(Type type, int line, int column, std::string value = "") noexcept
+        : m_type(type)
+        , m_line(line)
+        , m_column(column)
+    {
+        switch (type) {
+        case Include:
+            m_value = "@include";
+            break;
+        case Section:
+        case Word:
+        case QuotedWord:
+            m_value = value;
+            break;
+        case Assign:
+            m_value = "=";
+            break;
+        case ListBegin:
+            m_value = "(";
+            break;
+        case ListEnd:
+            m_value = ")";
+            break;
+        case Comma:
+            m_value = ",";
+            break;
+        default:
+            break;
+        }
+    }
 
-	/**
-	 * Get the type.
-	 *
-	 * \return the type
-	 */
-	inline Type type() const noexcept
-	{
-		return m_type;
-	}
+    /**
+     * Get the type.
+     *
+     * \return the type
+     */
+    inline Type type() const noexcept
+    {
+        return m_type;
+    }
 
-	/**
-	 * Get the line.
-	 *
-	 * \return the line
-	 */
-	inline int line() const noexcept
-	{
-		return m_line;
-	}
+    /**
+     * Get the line.
+     *
+     * \return the line
+     */
+    inline int line() const noexcept
+    {
+        return m_line;
+    }
 
-	/**
-	 * Get the column.
-	 *
-	 * \return the column
-	 */
-	inline int column() const noexcept
-	{
-		return m_column;
-	}
+    /**
+     * Get the column.
+     *
+     * \return the column
+     */
+    inline int column() const noexcept
+    {
+        return m_column;
+    }
 
-	/**
-	 * Get the value. For words, quoted words and section, the value is the content. Otherwise it's the
-	 * characters parsed.
-	 *
-	 * \return the value
-	 */
-	inline const std::string &value() const noexcept
-	{
-		return m_value;
-	}
+    /**
+     * Get the value. For words, quoted words and section, the value is the content. Otherwise it's the
+     * characters parsed.
+     *
+     * \return the value
+     */
+    inline const std::string &value() const noexcept
+    {
+        return m_value;
+    }
 };
 
 /**
@@ -300,72 +300,72 @@
  */
 class Option : public std::vector<std::string> {
 private:
-	std::string m_key;
+    std::string m_key;
 
 public:
-	/**
-	 * Construct an empty option.
-	 *
-	 * \pre key must not be empty
-	 * \param key the key
-	 */
-	inline Option(std::string key) noexcept
-		: std::vector<std::string>()
-		, m_key(std::move(key))
-	{
-		assert(!m_key.empty());
-	}
+    /**
+     * Construct an empty option.
+     *
+     * \pre key must not be empty
+     * \param key the key
+     */
+    inline Option(std::string key) noexcept
+        : std::vector<std::string>()
+        , m_key(std::move(key))
+    {
+        assert(!m_key.empty());
+    }
 
-	/**
-	 * Construct a single option.
-	 *
-	 * \pre key must not be empty
-	 * \param key the key
-	 * \param value the value
-	 */
-	inline Option(std::string key, std::string value) noexcept
-		: m_key(std::move(key))
-	{
-		assert(!m_key.empty());
+    /**
+     * Construct a single option.
+     *
+     * \pre key must not be empty
+     * \param key the key
+     * \param value the value
+     */
+    inline Option(std::string key, std::string value) noexcept
+        : m_key(std::move(key))
+    {
+        assert(!m_key.empty());
 
-		push_back(std::move(value));
-	}
+        push_back(std::move(value));
+    }
 
-	/**
-	 * Construct a list option.
-	 *
-	 * \pre key must not be empty
-	 * \param key the key
-	 * \param values the values
-	 */
-	inline Option(std::string key, std::vector<std::string> values) noexcept
-		: std::vector<std::string>(std::move(values))
-		, m_key(std::move(key))
-	{
-		assert(!m_key.empty());
-	}
+    /**
+     * Construct a list option.
+     *
+     * \pre key must not be empty
+     * \param key the key
+     * \param values the values
+     */
+    inline Option(std::string key, std::vector<std::string> values) noexcept
+        : std::vector<std::string>(std::move(values))
+        , m_key(std::move(key))
+    {
+        assert(!m_key.empty());
+    }
 
-	/**
-	 * Get the option key.
-	 *
-	 * \return the key
-	 */
-	inline const std::string &key() const noexcept
-	{
-		return m_key;
-	}
+    /**
+     * Get the option key.
+     *
+     * \return the key
+     */
+    inline const std::string &key() const noexcept
+    {
+        return m_key;
+    }
 
-	/**
-	 * Get the option value.
-	 *
-	 * \return the value
-	 */
-	inline const std::string &value() const noexcept
-	{
-		static std::string dummy;
+    /**
+     * Get the option value.
+     *
+     * \return the value
+     */
+    inline const std::string &value() const noexcept
+    {
+        static std::string dummy;
 
-		return empty() ? dummy : (*this)[0];
-	}
+        return empty() ? dummy : (*this)[0];
+    }
 };
 
 /**
@@ -374,100 +374,100 @@
  */
 class Section : public std::vector<Option> {
 private:
-	std::string m_key;
+    std::string m_key;
 
 public:
-	/**
-	 * Construct a section with its name.
-	 *
-	 * \pre key must not be empty
-	 * \param key the key
-	 */
-	inline Section(std::string key) noexcept
-		: m_key(std::move(key))
-	{
-		assert(!m_key.empty());
-	}
+    /**
+     * Construct a section with its name.
+     *
+     * \pre key must not be empty
+     * \param key the key
+     */
+    inline Section(std::string key) noexcept
+        : m_key(std::move(key))
+    {
+        assert(!m_key.empty());
+    }
 
-	/**
-	 * Get the section key.
-	 *
-	 * \return the key
-	 */
-	inline const std::string &key() const noexcept
-	{
-		return m_key;
-	}
+    /**
+     * Get the section key.
+     *
+     * \return the key
+     */
+    inline const std::string &key() const noexcept
+    {
+        return m_key;
+    }
 
-	/**
-	 * Check if the section contains a specific option.
-	 *
-	 * \param key the option key
-	 * \return true if the option exists
-	 */
-	inline bool contains(const std::string &key) const noexcept
-	{
-		return find(key) != end();
-	}
+    /**
+     * Check if the section contains a specific option.
+     *
+     * \param key the option key
+     * \return true if the option exists
+     */
+    inline bool contains(const std::string &key) const noexcept
+    {
+        return find(key) != end();
+    }
 
-	/**
-	 * Find an option by key and return an iterator.
-	 *
-	 * \param key the key
-	 * \return the iterator or end() if not found
-	 */
-	inline iterator find(const std::string &key) noexcept
-	{
-		return std::find_if(begin(), end(), [&] (const auto &o) {
-			return o.key() == key;
-		});
-	}
+    /**
+     * Find an option by key and return an iterator.
+     *
+     * \param key the key
+     * \return the iterator or end() if not found
+     */
+    inline iterator find(const std::string &key) noexcept
+    {
+        return std::find_if(begin(), end(), [&] (const auto &o) {
+            return o.key() == key;
+        });
+    }
 
-	/**
-	 * Find an option by key and return an iterator.
-	 *
-	 * \param key the key
-	 * \return the iterator or end() if not found
-	 */
-	inline const_iterator find(const std::string &key) const noexcept
-	{
-		return std::find_if(cbegin(), cend(), [&] (const auto &o) {
-			return o.key() == key;
-		});
-	}
+    /**
+     * Find an option by key and return an iterator.
+     *
+     * \param key the key
+     * \return the iterator or end() if not found
+     */
+    inline const_iterator find(const std::string &key) const noexcept
+    {
+        return std::find_if(cbegin(), cend(), [&] (const auto &o) {
+            return o.key() == key;
+        });
+    }
 
-	/**
-	 * Access an option at the specified key.
-	 *
-	 * \param key the key
-	 * \return the option
-	 * \pre contains(key) must return true
-	 */
-	inline Option &operator[](const std::string &key)
-	{
-		assert(contains(key));
+    /**
+     * Access an option at the specified key.
+     *
+     * \param key the key
+     * \return the option
+     * \pre contains(key) must return true
+     */
+    inline Option &operator[](const std::string &key)
+    {
+        assert(contains(key));
 
-		return *find(key);
-	}
+        return *find(key);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \param key the key
-	 * \return the option
-	 * \pre contains(key) must return true
-	 */
-	inline const Option &operator[](const std::string &key) const
-	{
-		assert(contains(key));
+    /**
+     * Overloaded function.
+     *
+     * \param key the key
+     * \return the option
+     * \pre contains(key) must return true
+     */
+    inline const Option &operator[](const std::string &key) const
+    {
+        assert(contains(key));
 
-		return *find(key);
-	}
+        return *find(key);
+    }
 
-	/**
-	 * Inherited operators.
-	 */
-	using std::vector<Option>::operator[];
+    /**
+     * Inherited operators.
+     */
+    using std::vector<Option>::operator[];
 };
 
 /**
@@ -478,75 +478,75 @@
  */
 class Document : public std::vector<Section> {
 public:
-	/**
-	 * Check if a document has a specific section.
-	 *
-	 * \param key the key
-	 * \return true if the document contains the section
-	 */
-	inline bool contains(const std::string &key) const noexcept
-	{
-		return std::find_if(begin(), end(), [&] (const auto &sc) { return sc.key() == key; }) != end();
-	}
+    /**
+     * Check if a document has a specific section.
+     *
+     * \param key the key
+     * \return true if the document contains the section
+     */
+    inline bool contains(const std::string &key) const noexcept
+    {
+        return std::find_if(begin(), end(), [&] (const auto &sc) { return sc.key() == key; }) != end();
+    }
 
-	/**
-	 * Find a section by key and return an iterator.
-	 *
-	 * \param key the key
-	 * \return the iterator or end() if not found
-	 */
-	inline iterator find(const std::string &key) noexcept
-	{
-		return std::find_if(begin(), end(), [&] (const auto &o) {
-			return o.key() == key;
-		});
-	}
+    /**
+     * Find a section by key and return an iterator.
+     *
+     * \param key the key
+     * \return the iterator or end() if not found
+     */
+    inline iterator find(const std::string &key) noexcept
+    {
+        return std::find_if(begin(), end(), [&] (const auto &o) {
+            return o.key() == key;
+        });
+    }
 
-	/**
-	 * Find a section by key and return an iterator.
-	 *
-	 * \param key the key
-	 * \return the iterator or end() if not found
-	 */
-	inline const_iterator find(const std::string &key) const noexcept
-	{
-		return std::find_if(cbegin(), cend(), [&] (const auto &o) {
-			return o.key() == key;
-		});
-	}
+    /**
+     * Find a section by key and return an iterator.
+     *
+     * \param key the key
+     * \return the iterator or end() if not found
+     */
+    inline const_iterator find(const std::string &key) const noexcept
+    {
+        return std::find_if(cbegin(), cend(), [&] (const auto &o) {
+            return o.key() == key;
+        });
+    }
 
-	/**
-	 * Access a section at the specified key.
-	 *
-	 * \param key the key
-	 * \return the section
-	 * \pre contains(key) must return true
-	 */
-	inline Section &operator[](const std::string &key)
-	{
-		assert(contains(key));
+    /**
+     * Access a section at the specified key.
+     *
+     * \param key the key
+     * \return the section
+     * \pre contains(key) must return true
+     */
+    inline Section &operator[](const std::string &key)
+    {
+        assert(contains(key));
 
-		return *find(key);
-	}
+        return *find(key);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \param key the key
-	 * \return the section
-	 * \pre contains(key) must return true
-	 */
-	inline const Section &operator[](const std::string &key) const
-	{
-		assert(contains(key));
+    /**
+     * Overloaded function.
+     *
+     * \param key the key
+     * \return the section
+     * \pre contains(key) must return true
+     */
+    inline const Section &operator[](const std::string &key) const
+    {
+        assert(contains(key));
 
-		return *find(key);
-	}
+        return *find(key);
+    }
 
-	/**
-	 * Inherited operators.
-	 */
-	using std::vector<Section>::operator[];
+    /**
+     * Inherited operators.
+     */
+    using std::vector<Section>::operator[];
 };
 
 /**
@@ -613,4 +613,4 @@
 
 } // !irccd
 
-#endif // !IRCCD_INI_HPP
+#endif // !INI_HPP
--- a/lib/irccd/irccd.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/irccd.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,98 +34,98 @@
 namespace irccd {
 
 Irccd::Irccd()
-	: m_commandService(std::make_shared<CommandService>())
-	, m_interruptService(std::make_shared<InterruptService>())
-	, m_serverService(std::make_shared<ServerService>(*this))
-	, m_transportService(std::make_shared<TransportService>(*this))
-	, m_ruleService(std::make_shared<RuleService>())
-	, m_moduleService(std::make_shared<ModuleService>())
-	, m_pluginService(std::make_shared<PluginService>(*this))
+    : m_commandService(std::make_shared<CommandService>())
+    , m_interruptService(std::make_shared<InterruptService>())
+    , m_serverService(std::make_shared<ServerService>(*this))
+    , m_transportService(std::make_shared<TransportService>(*this))
+    , m_ruleService(std::make_shared<RuleService>())
+    , m_moduleService(std::make_shared<ModuleService>())
+    , m_pluginService(std::make_shared<PluginService>(*this))
 {
-	m_services.push_back(m_interruptService);
-	m_services.push_back(m_serverService);
-	m_services.push_back(m_transportService);
+    m_services.push_back(m_interruptService);
+    m_services.push_back(m_serverService);
+    m_services.push_back(m_transportService);
 }
 
 void Irccd::post(std::function<void (Irccd &)> ev) noexcept
 {
-	std::lock_guard<mutex> lock(m_mutex);
+    std::lock_guard<mutex> lock(m_mutex);
 
-	m_events.push_back(move(ev));
-	m_interruptService->interrupt();
+    m_events.push_back(move(ev));
+    m_interruptService->interrupt();
 }
 
 void Irccd::run()
 {
-	while (m_running) {
-		poll();
-		dispatch();
-	}
+    while (m_running) {
+        poll();
+        dispatch();
+    }
 }
 
 void Irccd::poll()
 {
-	fd_set setinput;
-	fd_set setoutput;
-	net::Handle max = 0;
+    fd_set setinput;
+    fd_set setoutput;
+    net::Handle max = 0;
 
-	FD_ZERO(&setinput);
-	FD_ZERO(&setoutput);
+    FD_ZERO(&setinput);
+    FD_ZERO(&setoutput);
 
-	for (const auto &service : m_services)
-		service->prepare(setinput, setoutput, max);
+    for (const auto &service : m_services)
+        service->prepare(setinput, setoutput, max);
 
-	// Do the selection.
-	struct timeval tv;
+    // Do the selection.
+    struct timeval tv;
 
-	tv.tv_sec = 5;
-	tv.tv_usec = 250000;
+    tv.tv_sec = 5;
+    tv.tv_usec = 250000;
 
-	int error = select(max + 1, &setinput, &setoutput, nullptr, &tv);
+    int error = select(max + 1, &setinput, &setoutput, nullptr, &tv);
 
-	// Skip anyway if requested to stop
-	if (!m_running)
-		return;
+    // Skip anyway if requested to stop
+    if (!m_running)
+        return;
 
-	// Skip on error.
-	if (error < 0 && errno != EINTR) {
-		log::warning() << "irccd: " << net::error(error) << endl;
-		return;
-	}
+    // Skip on error.
+    if (error < 0 && errno != EINTR) {
+        log::warning() << "irccd: " << net::error(error) << endl;
+        return;
+    }
 
-	// Process after selection.
-	for (const auto &service : m_services)
-		service->sync(setinput, setoutput);
+    // Process after selection.
+    for (const auto &service : m_services)
+        service->sync(setinput, setoutput);
 }
 
 void Irccd::dispatch()
 {
-	/*
-	 * Make a copy because the events can add other events while we are iterating it. Also lock because the timers
-	 * may alter these events too.
-	 */
-	std::vector<std::function<void (Irccd &)>> copy;
+    /*
+     * Make a copy because the events can add other events while we are iterating it. Also lock because the timers
+     * may alter these events too.
+     */
+    std::vector<std::function<void (Irccd &)>> copy;
 
-	{
-		std::lock_guard<mutex> lock(m_mutex);
+    {
+        std::lock_guard<mutex> lock(m_mutex);
 
-		copy = move(m_events);
-		m_events.clear();
-	}
+        copy = move(m_events);
+        m_events.clear();
+    }
 
-	if (copy.size() > 0)
-		log::debug() << "irccd: dispatching " << copy.size() << " event" << (copy.size() > 1 ? "s" : "") << endl;
+    if (copy.size() > 0)
+        log::debug() << "irccd: dispatching " << copy.size() << " event" << (copy.size() > 1 ? "s" : "") << endl;
 
-	for (auto &ev : copy)
-		ev(*this);
+    for (auto &ev : copy)
+        ev(*this);
 }
 
 void Irccd::stop()
 {
-	log::debug() << "irccd: requesting to stop now" << endl;
+    log::debug() << "irccd: requesting to stop now" << endl;
 
-	m_running = false;
-	m_interruptService->interrupt();
+    m_running = false;
+    m_interruptService->interrupt();
 }
 
 } // !irccd
--- a/lib/irccd/irccd.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/irccd.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -53,132 +53,132 @@
  */
 class Irccd {
 private:
-	// Main loop stuff.
-	std::atomic<bool> m_running{true};
-	std::mutex m_mutex;
-	std::vector<std::function<void (Irccd &)>> m_events;
+    // Main loop stuff.
+    std::atomic<bool> m_running{true};
+    std::mutex m_mutex;
+    std::vector<std::function<void (Irccd &)>> m_events;
 
-	// Services.
-	std::shared_ptr<CommandService> m_commandService;
-	std::shared_ptr<InterruptService> m_interruptService;
-	std::shared_ptr<ServerService> m_serverService;
-	std::shared_ptr<TransportService> m_transportService;
-	std::shared_ptr<RuleService> m_ruleService;
-	std::shared_ptr<ModuleService> m_moduleService;
-	std::shared_ptr<PluginService> m_pluginService;
-	std::vector<std::shared_ptr<Service>> m_services;
+    // Services.
+    std::shared_ptr<CommandService> m_commandService;
+    std::shared_ptr<InterruptService> m_interruptService;
+    std::shared_ptr<ServerService> m_serverService;
+    std::shared_ptr<TransportService> m_transportService;
+    std::shared_ptr<RuleService> m_ruleService;
+    std::shared_ptr<ModuleService> m_moduleService;
+    std::shared_ptr<PluginService> m_pluginService;
+    std::vector<std::shared_ptr<Service>> m_services;
 
-	// Not copyable and not movable because services has references to irccd.
-	Irccd(const Irccd &) = delete;
-	Irccd(Irccd &&) = delete;
+    // Not copyable and not movable because services has references to irccd.
+    Irccd(const Irccd &) = delete;
+    Irccd(Irccd &&) = delete;
 
-	Irccd &operator=(const Irccd &) = delete;
-	Irccd &operator=(Irccd &&) = delete;
+    Irccd &operator=(const Irccd &) = delete;
+    Irccd &operator=(Irccd &&) = delete;
 
 public:
-	/**
-	 * Prepare standard services.
-	 */
-	IRCCD_EXPORT Irccd();
+    /**
+     * Prepare standard services.
+     */
+    IRCCD_EXPORT Irccd();
 
-	/**
-	 * Add a generic service.
-	 *
-	 * \param service the service
-	 */
-	inline void addService(std::shared_ptr<Service> service)
-	{
-		m_services.push_back(std::move(service));
-	}
+    /**
+     * Add a generic service.
+     *
+     * \param service the service
+     */
+    inline void addService(std::shared_ptr<Service> service)
+    {
+        m_services.push_back(std::move(service));
+    }
 
-	/**
-	 * Access the command service.
-	 *
-	 * \return the service
-	 */
-	inline CommandService &commandService() noexcept
-	{
-		return *m_commandService;
-	}
+    /**
+     * Access the command service.
+     *
+     * \return the service
+     */
+    inline CommandService &commandService() noexcept
+    {
+        return *m_commandService;
+    }
 
-	/**
-	 * Access the server service.
-	 *
-	 * \return the service
-	 */
-	inline ServerService &serverService() noexcept
-	{
-		return *m_serverService;
-	}
+    /**
+     * Access the server service.
+     *
+     * \return the service
+     */
+    inline ServerService &serverService() noexcept
+    {
+        return *m_serverService;
+    }
 
-	/**
-	 * Access the transport service.
-	 *
-	 * \return the service
-	 */
-	inline TransportService &transportService() noexcept
-	{
-		return *m_transportService;
-	}
+    /**
+     * Access the transport service.
+     *
+     * \return the service
+     */
+    inline TransportService &transportService() noexcept
+    {
+        return *m_transportService;
+    }
 
-	/**
-	 * Access the rule service.
-	 *
-	 * \return the service
-	 */
-	inline RuleService &ruleService() noexcept
-	{
-		return *m_ruleService;
-	}
+    /**
+     * Access the rule service.
+     *
+     * \return the service
+     */
+    inline RuleService &ruleService() noexcept
+    {
+        return *m_ruleService;
+    }
 
-	/**
-	 * Access the module service.
-	 *
-	 * \return the service
-	 */
-	inline ModuleService &moduleService() noexcept
-	{
-		return *m_moduleService;
-	}
+    /**
+     * Access the module service.
+     *
+     * \return the service
+     */
+    inline ModuleService &moduleService() noexcept
+    {
+        return *m_moduleService;
+    }
 
-	/**
-	 * Access the plugin service.
-	 *
-	 * \return the service
-	 */
-	inline PluginService &pluginService() noexcept
-	{
-		return *m_pluginService;
-	}
+    /**
+     * Access the plugin service.
+     *
+     * \return the service
+     */
+    inline PluginService &pluginService() noexcept
+    {
+        return *m_pluginService;
+    }
 
-	/**
-	 * Add an event to the queue. This will immediately signals the event loop to interrupt itself to dispatch
-	 * the pending events.
-	 *
-	 * \param ev the event
-	 * \note Thread-safe
-	 */
-	IRCCD_EXPORT void post(std::function<void (Irccd &)> ev) noexcept;
+    /**
+     * Add an event to the queue. This will immediately signals the event loop to interrupt itself to dispatch
+     * the pending events.
+     *
+     * \param ev the event
+     * \note Thread-safe
+     */
+    IRCCD_EXPORT void post(std::function<void (Irccd &)> ev) noexcept;
 
-	/**
-	 * Loop forever by calling poll() and dispatch() indefinitely.
-	 */
-	IRCCD_EXPORT void run();
+    /**
+     * Loop forever by calling poll() and dispatch() indefinitely.
+     */
+    IRCCD_EXPORT void run();
 
-	/**
-	 * Poll the next events without blocking (250 ms max).
-	 */
-	IRCCD_EXPORT void poll();
+    /**
+     * Poll the next events without blocking (250 ms max).
+     */
+    IRCCD_EXPORT void poll();
 
-	/**
-	 * Dispatch the pending events, usually after calling poll().
-	 */
-	IRCCD_EXPORT void dispatch();
+    /**
+     * Dispatch the pending events, usually after calling poll().
+     */
+    IRCCD_EXPORT void dispatch();
 
-	/**
-	 * Request to stop, usually from a signal.
-	 */
-	IRCCD_EXPORT void stop();
+    /**
+     * Request to stop, usually from a signal.
+     */
+    IRCCD_EXPORT void stop();
 };
 
 } // !irccd
--- a/lib/irccd/irccdctl.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/irccdctl.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -78,179 +78,179 @@
 
 void Irccdctl::usage() const
 {
-	// TODO: CHANGE
-	log::warning() << "usage: " << sys::programName() << " [options...] <command> [command-options...] [command-args...]\n\n";
-	log::warning() << "General options:\n";
-	log::warning() << "\tc, --config file\tspecify the configuration file\n";
-	log::warning() << "\t--help\t\t\tshow this help\n";
-	log::warning() << "\t-t, --type type\t\tspecify connection type\n";
-	log::warning() << "\t-v, --verbose\t\tbe verbose\n\n";
-	log::warning() << "Available options for type ip and ipv6 (-t, --type):\n";
-	log::warning() << "\t-h, --host address\tconnect to the specified address\n";
-	log::warning() << "\t-p, --port port\t\tuse the specified port number\n\n";
-	log::warning() << "Available options for type unix (-t, --type):\n";
-	log::warning() << "\t-P, --path file\t\tconnect to the specified socket file\n\n";
-	log::warning() << "General commands:\n";
-	log::warning() << "\thelp\t\t\tShow an help topic\n";
-	log::warning() << "\twatch\t\t\tStart listening to irccd\n\n";
-	log::warning() << "Plugin management:\n";
-	log::warning() << "\tplugin-config\t\tGet or set a plugin configuration option\n";
-	log::warning() << "\tplugin-info\t\tGet plugin information\n";
-	log::warning() << "\tplugin-list\t\tList all loaded plugins\n";
-	log::warning() << "\tplugin-load\t\tLoad a plugin\n";
-	log::warning() << "\tplugin-reload\t\tReload a plugin\n";
-	log::warning() << "\tplugin-unload\t\tUnload a plugin\n\n";
-	log::warning() << "Server management:\n";
-	log::warning() << "\tserver-cmode\t\tChange a channel mode\n";
-	log::warning() << "\tserver-cnotice\t\tSend a channel notice\n";
-	log::warning() << "\tserver-connect\t\tConnect to a server\n";
-	log::warning() << "\tserver-disconnect\tDisconnect from a server\n";
-	log::warning() << "\tserver-info\t\tGet server information\n";
-	log::warning() << "\tserver-invite\t\tInvite someone to a channel\n";
-	log::warning() << "\tserver-join\t\tJoin a channel\n";
-	log::warning() << "\tserver-kick\t\tKick someone from a channel\n";
-	log::warning() << "\tserver-list\t\tList all servers\n";
-	log::warning() << "\tserver-me\t\tSend a CTCP Action (same as /me)\n";
-	log::warning() << "\tserver-message\t\tSend a message to someone or a channel\n";
-	log::warning() << "\tserver-mode\t\tChange a user mode\n";
-	log::warning() << "\tserver-notice\t\tSend a private notice\n";
-	log::warning() << "\tserver-nick\t\tChange your nickname\n";
-	log::warning() << "\tserver-part\t\tLeave a channel\n";
-	log::warning() << "\tserver-reconnect\tReconnect one or all servers\n";
-	log::warning() << "\tserver-topic\t\tChange a channel topic\n";
-	log::warning() << "\nFor more information on a command, type " << sys::programName() << " help <command>" << std::endl;
-	std::exit(1);
+    // TODO: CHANGE
+    log::warning() << "usage: " << sys::programName() << " [options...] <command> [command-options...] [command-args...]\n\n";
+    log::warning() << "General options:\n";
+    log::warning() << "\tc, --config file\tspecify the configuration file\n";
+    log::warning() << "\t--help\t\t\tshow this help\n";
+    log::warning() << "\t-t, --type type\t\tspecify connection type\n";
+    log::warning() << "\t-v, --verbose\t\tbe verbose\n\n";
+    log::warning() << "Available options for type ip and ipv6 (-t, --type):\n";
+    log::warning() << "\t-h, --host address\tconnect to the specified address\n";
+    log::warning() << "\t-p, --port port\t\tuse the specified port number\n\n";
+    log::warning() << "Available options for type unix (-t, --type):\n";
+    log::warning() << "\t-P, --path file\t\tconnect to the specified socket file\n\n";
+    log::warning() << "General commands:\n";
+    log::warning() << "\thelp\t\t\tShow an help topic\n";
+    log::warning() << "\twatch\t\t\tStart listening to irccd\n\n";
+    log::warning() << "Plugin management:\n";
+    log::warning() << "\tplugin-config\t\tGet or set a plugin configuration option\n";
+    log::warning() << "\tplugin-info\t\tGet plugin information\n";
+    log::warning() << "\tplugin-list\t\tList all loaded plugins\n";
+    log::warning() << "\tplugin-load\t\tLoad a plugin\n";
+    log::warning() << "\tplugin-reload\t\tReload a plugin\n";
+    log::warning() << "\tplugin-unload\t\tUnload a plugin\n\n";
+    log::warning() << "Server management:\n";
+    log::warning() << "\tserver-cmode\t\tChange a channel mode\n";
+    log::warning() << "\tserver-cnotice\t\tSend a channel notice\n";
+    log::warning() << "\tserver-connect\t\tConnect to a server\n";
+    log::warning() << "\tserver-disconnect\tDisconnect from a server\n";
+    log::warning() << "\tserver-info\t\tGet server information\n";
+    log::warning() << "\tserver-invite\t\tInvite someone to a channel\n";
+    log::warning() << "\tserver-join\t\tJoin a channel\n";
+    log::warning() << "\tserver-kick\t\tKick someone from a channel\n";
+    log::warning() << "\tserver-list\t\tList all servers\n";
+    log::warning() << "\tserver-me\t\tSend a CTCP Action (same as /me)\n";
+    log::warning() << "\tserver-message\t\tSend a message to someone or a channel\n";
+    log::warning() << "\tserver-mode\t\tChange a user mode\n";
+    log::warning() << "\tserver-notice\t\tSend a private notice\n";
+    log::warning() << "\tserver-nick\t\tChange your nickname\n";
+    log::warning() << "\tserver-part\t\tLeave a channel\n";
+    log::warning() << "\tserver-reconnect\tReconnect one or all servers\n";
+    log::warning() << "\tserver-topic\t\tChange a channel topic\n";
+    log::warning() << "\nFor more information on a command, type " << sys::programName() << " help <command>" << std::endl;
+    std::exit(1);
 }
 
 void Irccdctl::readConnectIp(const ini::Section &sc)
 {
-	ini::Section::const_iterator it;
+    ini::Section::const_iterator it;
 
-	// Host.
-	std::string host;
+    // Host.
+    std::string host;
 
-	if ((it = sc.find("host")) == sc.end())
-		throw std::invalid_argument("missing host parameter");
+    if ((it = sc.find("host")) == sc.end())
+        throw std::invalid_argument("missing host parameter");
 
-	host = it->value();
+    host = it->value();
 
-	// Port.
-	std::uint16_t port;
+    // Port.
+    std::uint16_t port;
 
-	if ((it = sc.find("port")) == sc.end())
-		throw std::invalid_argument("missing port parameter");
+    if ((it = sc.find("port")) == sc.end())
+        throw std::invalid_argument("missing port parameter");
 
-	try {
-		port = util::toNumber<std::uint16_t>(it->value());
-	} catch (...) {
-		throw std::invalid_argument("invalid port number: " + it->value());
-	}
+    try {
+        port = util::toNumber<std::uint16_t>(it->value());
+    } catch (...) {
+        throw std::invalid_argument("invalid port number: " + it->value());
+    }
 
-	// Domain.
-	int domain = AF_INET;
+    // Domain.
+    int domain = AF_INET;
 
-	if ((it = sc.find("domain")) != sc.end()) {
-		if (it->value() == "ipv6")
-			domain = AF_INET6;
-		else if (it->value() == "ipv4")
-			domain = AF_INET;
-		else
-			throw std::invalid_argument("invalid domain: " + it->value());
-	}
+    if ((it = sc.find("domain")) != sc.end()) {
+        if (it->value() == "ipv6")
+            domain = AF_INET6;
+        else if (it->value() == "ipv4")
+            domain = AF_INET;
+        else
+            throw std::invalid_argument("invalid domain: " + it->value());
+    }
 
-	m_connection =  std::make_unique<ConnectionBase<Ip>>(Ip::resolve(host, std::to_string(port), domain));
+    m_connection =  std::make_unique<ConnectionBase<Ip>>(Ip::resolve(host, std::to_string(port), domain));
 }
 
 void Irccdctl::readConnectUnix(const ini::Section &sc)
 {
 #if !defined(IRCCD_SYSTEM_WINDOWS)
-	auto it = sc.find("path");
+    auto it = sc.find("path");
 
-	if (it == sc.end())
-		throw std::invalid_argument("missing path parameter");
+    if (it == sc.end())
+        throw std::invalid_argument("missing path parameter");
 
-	m_connection = std::make_unique<ConnectionBase<Local>>(Local{it->value(), false});
+    m_connection = std::make_unique<ConnectionBase<Local>>(Local{it->value(), false});
 #else
-	(void)sc;
+    (void)sc;
 
-	throw std::invalid_argument("unix connection not supported on Windows");
+    throw std::invalid_argument("unix connection not supported on Windows");
 #endif
 }
 
 void Irccdctl::readConnect(const ini::Section &sc)
 {
-	auto it = sc.find("type");
+    auto it = sc.find("type");
 
-	if (it == sc.end())
-		throw std::invalid_argument("missing type parameter");
+    if (it == sc.end())
+        throw std::invalid_argument("missing type parameter");
 
-	if (it->value() == "ip")
-		readConnectIp(sc);
-	else if (it->value() == "unix")
-		readConnectUnix(sc);
-	else
-		throw std::invalid_argument("invalid type given: " + it->value());
+    if (it->value() == "ip")
+        readConnectIp(sc);
+    else if (it->value() == "unix")
+        readConnectUnix(sc);
+    else
+        throw std::invalid_argument("invalid type given: " + it->value());
 }
 
 void Irccdctl::readGeneral(const ini::Section &sc)
 {
-	auto verbose = sc.find("verbose");
+    auto verbose = sc.find("verbose");
 
-	if (verbose != sc.end())
-		log::setVerbose(util::isBoolean(verbose->value()));
+    if (verbose != sc.end())
+        log::setVerbose(util::isBoolean(verbose->value()));
 }
 
 void Irccdctl::readAliases(const ini::Section &sc)
 {
-	for (const ini::Option &option : sc) {
-		// This is the alias name.
-		Alias alias(option.key());
+    for (const ini::Option &option : sc) {
+        // This is the alias name.
+        Alias alias(option.key());
 
-		if (m_commandService.contains(option.key()))
-			throw std::invalid_argument("there is already a command named " + option.key());
+        if (m_commandService.contains(option.key()))
+            throw std::invalid_argument("there is already a command named " + option.key());
 
-		// Iterate over the list of commands to execute for this alias.
-		for (const std::string &repl : option) {
-			// This is the alias split string.
-			std::vector<std::string> list = util::split(repl, " \t");
+        // Iterate over the list of commands to execute for this alias.
+        for (const std::string &repl : option) {
+            // This is the alias split string.
+            std::vector<std::string> list = util::split(repl, " \t");
 
-			if (list.size() < 1)
-				throw std::invalid_argument("alias require at least one argument");
+            if (list.size() < 1)
+                throw std::invalid_argument("alias require at least one argument");
 
-			// First argument is the command/alias to execute.
-			std::string command = list[0];
+            // First argument is the command/alias to execute.
+            std::string command = list[0];
 
-			// This is the alias arguments.
-			std::vector<AliasArg> args;
+            // This is the alias arguments.
+            std::vector<AliasArg> args;
 
-			for (auto it = list.begin() + 1; it != list.end(); ++it)
-				args.push_back(std::move(*it));
+            for (auto it = list.begin() + 1; it != list.end(); ++it)
+                args.push_back(std::move(*it));
 
-			alias.push_back({std::move(command), std::move(args)});
-		}
+            alias.push_back({std::move(command), std::move(args)});
+        }
 
-		// Show for debugging purpose.
-		log::debug("alias {}:"_format(option.key()));
+        // Show for debugging purpose.
+        log::debug("alias {}:"_format(option.key()));
 
-		for (const auto &cmd : alias)
-			log::debug("  {} {}"_format(cmd.command(), util::join(cmd.args().begin(), cmd.args().end(), ' ')));
+        for (const auto &cmd : alias)
+            log::debug("  {} {}"_format(cmd.command(), util::join(cmd.args().begin(), cmd.args().end(), ' ')));
 
-		m_aliases.emplace(option.key(), std::move(alias));
-	}
+        m_aliases.emplace(option.key(), std::move(alias));
+    }
 }
 
 void Irccdctl::read(const std::string &path, const parser::Result &options)
 {
-	ini::Document doc = ini::readFile(path);
-	ini::Document::const_iterator it = doc.find("connect");
+    ini::Document doc = ini::readFile(path);
+    ini::Document::const_iterator it = doc.find("connect");
 
-	// Do not try to read [connect] if specified at command line.
-	if (it != doc.end() && options.count("-t") == 0 && options.count("--type") == 0)
-		readConnect(*it);
-	if ((it = doc.find("general")) != doc.end())
-		readGeneral(*it);
-	if ((it = doc.find("alias")) != doc.end())
-		readAliases(*it);
+    // Do not try to read [connect] if specified at command line.
+    if (it != doc.end() && options.count("-t") == 0 && options.count("--type") == 0)
+        readConnect(*it);
+    if ((it = doc.find("general")) != doc.end())
+        readGeneral(*it);
+    if ((it = doc.find("alias")) != doc.end())
+        readAliases(*it);
 }
 
 /*
@@ -260,291 +260,291 @@
 
 void Irccdctl::parseConnectIp(const parser::Result &options, bool ipv6)
 {
-	parser::Result::const_iterator it;
+    parser::Result::const_iterator it;
 
-	// Host (-h or --host).
-	std::string host;
+    // Host (-h or --host).
+    std::string host;
 
-	if ((it = options.find("-h")) == options.end() && (it = options.find("--host")) == options.end())
-		throw std::invalid_argument("missing host argument (-h or --host)");
+    if ((it = options.find("-h")) == options.end() && (it = options.find("--host")) == options.end())
+        throw std::invalid_argument("missing host argument (-h or --host)");
 
-	host = it->second;
+    host = it->second;
 
-	// Port (-p or --port).
-	std::uint16_t port;
+    // Port (-p or --port).
+    std::uint16_t port;
 
-	if ((it = options.find("-p")) == options.end() && (it = options.find("--port")) == options.end())
-		throw std::invalid_argument("missing port argument (-p or --port)");
+    if ((it = options.find("-p")) == options.end() && (it = options.find("--port")) == options.end())
+        throw std::invalid_argument("missing port argument (-p or --port)");
 
-	try {
-		port = util::toNumber<std::uint16_t>(it->second);
-	} catch (...) {
-		throw std::invalid_argument("invalid port number: " + it->second);
-	}
+    try {
+        port = util::toNumber<std::uint16_t>(it->second);
+    } catch (...) {
+        throw std::invalid_argument("invalid port number: " + it->second);
+    }
 
-	// Domain
-	int domain = (ipv6) ? AF_INET6 : AF_INET;
+    // Domain
+    int domain = (ipv6) ? AF_INET6 : AF_INET;
 
-	m_connection =  std::make_unique<ConnectionBase<Ip>>(Ip::resolve(host, std::to_string(port), domain, SOCK_STREAM));
+    m_connection =  std::make_unique<ConnectionBase<Ip>>(Ip::resolve(host, std::to_string(port), domain, SOCK_STREAM));
 }
 
 void Irccdctl::parseConnectUnix(const parser::Result &options)
 {
 #if !defined(IRCCD_SYSTEM_WINDOWS)
-	parser::Result::const_iterator it;
+    parser::Result::const_iterator it;
 
-	if ((it = options.find("-P")) == options.end() && (it = options.find("--path")) == options.end())
-		throw std::invalid_argument("missing path parameter (-P or --path)");
+    if ((it = options.find("-P")) == options.end() && (it = options.find("--path")) == options.end())
+        throw std::invalid_argument("missing path parameter (-P or --path)");
 
-	m_connection = std::make_unique<ConnectionBase<Local>>(Local{it->second, false});
+    m_connection = std::make_unique<ConnectionBase<Local>>(Local{it->second, false});
 #else
-	(void)options;
+    (void)options;
 
-	throw std::invalid_argument("unix connection not supported on Windows");
+    throw std::invalid_argument("unix connection not supported on Windows");
 #endif
 }
 
 void Irccdctl::parseConnect(const parser::Result &options)
 {
-	assert(options.count("-t") > 0 || options.count("--type") > 0);
+    assert(options.count("-t") > 0 || options.count("--type") > 0);
 
-	auto it = options.find("-t");
+    auto it = options.find("-t");
 
-	if (it == options.end())
-		it = options.find("--type");
-	if (it->second == "ip" || it->second == "ipv6")
-		return parseConnectIp(options, it->second == "ipv6");
-	if (it->second == "unix")
-		return parseConnectUnix(options);
+    if (it == options.end())
+        it = options.find("--type");
+    if (it->second == "ip" || it->second == "ipv6")
+        return parseConnectIp(options, it->second == "ipv6");
+    if (it->second == "unix")
+        return parseConnectUnix(options);
 
-	throw std::invalid_argument("invalid type given: " + it->second);
+    throw std::invalid_argument("invalid type given: " + it->second);
 }
 
 parser::Result Irccdctl::parse(int &argc, char **&argv) const
 {
-	// 1. Parse command line options.
-	parser::Options def{
-		{ "-c",		true	},
-		{ "--config",	true	},
-		{ "-h",		true	},
-		{ "--help",	false	},
-		{ "--host",	true	},
-		{ "-p",		true	},
-		{ "--port",	true	},
-		{ "-P",		true	},
-		{ "--path",	true	},
-		{ "-t",		true	},
-		{ "--type",	true	},
-		{ "-v",		false	},
-		{ "--verbose",	false	}
-	};
+    // 1. Parse command line options.
+    parser::Options def{
+        { "-c",         true    },
+        { "--config",   true    },
+        { "-h",         true    },
+        { "--help",     false   },
+        { "--host",     true    },
+        { "-p",         true    },
+        { "--port",     true    },
+        { "-P",         true    },
+        { "--path",     true    },
+        { "-t",         true    },
+        { "--type",     true    },
+        { "-v",         false   },
+        { "--verbose",  false   }
+    };
 
-	parser::Result result;
+    parser::Result result;
 
-	try {
-		result = parser::read(argc, argv, def);
+    try {
+        result = parser::read(argc, argv, def);
 
-		if (result.count("--help") != 0) {
-			usage();
-			// NOTREACHED
-		}
+        if (result.count("--help") != 0) {
+            usage();
+            // NOTREACHED
+        }
 
-		if (result.count("-v") != 0 || result.count("--verbose") != 0)
-			log::setVerbose(true);
-	} catch (const std::exception &ex) {
-		log::warning("{}: {}"_format(sys::programName(), ex.what()));
-		usage();
-	}
+        if (result.count("-v") != 0 || result.count("--verbose") != 0)
+            log::setVerbose(true);
+    } catch (const std::exception &ex) {
+        log::warning("{}: {}"_format(sys::programName(), ex.what()));
+        usage();
+    }
 
-	return result;
+    return result;
 }
 
 void Irccdctl::exec(const Command &cmd, std::vector<std::string> args)
 {
-	// 1. Build options from command line arguments.
-	parser::Options def;
+    // 1. Build options from command line arguments.
+    parser::Options def;
 
-	for (const auto &opt : cmd.options()) {
-		// parser::read needs '-' and '--' so add them.
-		if (!opt.simpleKey().empty())
-			def.emplace("-"s + opt.simpleKey(), !opt.arg().empty());
-		if (!opt.longKey().empty())
-			def.emplace("--"s + opt.longKey(), !opt.arg().empty());
-	}
+    for (const auto &opt : cmd.options()) {
+        // parser::read needs '-' and '--' so add them.
+        if (!opt.simpleKey().empty())
+            def.emplace("-"s + opt.simpleKey(), !opt.arg().empty());
+        if (!opt.longKey().empty())
+            def.emplace("--"s + opt.longKey(), !opt.arg().empty());
+    }
 
-	// 2. Parse them, remove them from args (in parser::read) and build the map with id.
-	CommandRequest::Options requestOptions;
+    // 2. Parse them, remove them from args (in parser::read) and build the map with id.
+    CommandRequest::Options requestOptions;
 
-	for (const auto &pair : parser::read(args, def)) {
-		auto options = cmd.options();
-		auto it = std::find_if(options.begin(), options.end(), [&] (const auto &opt) {
-			return ("-"s + opt.simpleKey()) == pair.first || ("--"s + opt.longKey()) == pair.first;
-		});
+    for (const auto &pair : parser::read(args, def)) {
+        auto options = cmd.options();
+        auto it = std::find_if(options.begin(), options.end(), [&] (const auto &opt) {
+            return ("-"s + opt.simpleKey()) == pair.first || ("--"s + opt.longKey()) == pair.first;
+        });
 
-		requestOptions.emplace(it->id(), pair.second);
-	}
+        requestOptions.emplace(it->id(), pair.second);
+    }
 
-	// 3. Check number of arguments.
-	if (args.size() < cmd.min())
-		throw std::runtime_error("too few arguments");
-	if (args.size() > cmd.max())
-		throw std::runtime_error("too many arguments");
+    // 3. Check number of arguments.
+    if (args.size() < cmd.min())
+        throw std::runtime_error("too few arguments");
+    if (args.size() > cmd.max())
+        throw std::runtime_error("too many arguments");
 
-	// 4. Construct the request, if the returned value is not an object, do not send anything (e.g. help).
-	json::Value request = cmd.request(*this, CommandRequest(std::move(requestOptions), std::move(args)));
+    // 4. Construct the request, if the returned value is not an object, do not send anything (e.g. help).
+    json::Value request = cmd.request(*this, CommandRequest(std::move(requestOptions), std::move(args)));
 
-	if (!request.isObject())
-		return;
+    if (!request.isObject())
+        return;
 
-	request.insert("command", cmd.name());
+    request.insert("command", cmd.name());
 
-	// 5. Send the command.
-	m_connection->send(request.toJson(0), 30000);
+    // 5. Send the command.
+    m_connection->send(request.toJson(0), 30000);
 
-	// 6. Parse the result.
-	cmd.result(*this, m_connection->next(cmd.name(), 30000));
+    // 6. Parse the result.
+    cmd.result(*this, m_connection->next(cmd.name(), 30000));
 }
 
 void Irccdctl::exec(const Alias &alias, std::vector<std::string> argsCopy)
 {
-	for (const AliasCommand &cmd : alias) {
-		std::vector<std::string> args(argsCopy);
-		std::vector<std::string> cmdArgs;
-		std::vector<std::string>::size_type toremove = 0;
+    for (const AliasCommand &cmd : alias) {
+        std::vector<std::string> args(argsCopy);
+        std::vector<std::string> cmdArgs;
+        std::vector<std::string>::size_type toremove = 0;
 
-		// 1. Append command name before.
-		cmdArgs.push_back(cmd.command());
+        // 1. Append command name before.
+        cmdArgs.push_back(cmd.command());
 
-		for (const AliasArg &arg : cmd.args()) {
-			if (arg.isPlaceholder()) {
-				if (args.size() < arg.index() + 1)
-					throw std::invalid_argument("missing argument for placeholder %" + std::to_string(arg.index()));
+        for (const AliasArg &arg : cmd.args()) {
+            if (arg.isPlaceholder()) {
+                if (args.size() < arg.index() + 1)
+                    throw std::invalid_argument("missing argument for placeholder %" + std::to_string(arg.index()));
 
-				cmdArgs.push_back(args[arg.index()]);
+                cmdArgs.push_back(args[arg.index()]);
 
-				if (arg.index() + 1 > toremove)
-					toremove = arg.index() + 1;
-			} else
-				cmdArgs.push_back(arg.value());
-		}
+                if (arg.index() + 1 > toremove)
+                    toremove = arg.index() + 1;
+            } else
+                cmdArgs.push_back(arg.value());
+        }
 
-		assert(toremove <= args.size());
+        assert(toremove <= args.size());
 
-		// 2. Remove the arguments that been placed in placeholders.
-		args.erase(args.begin(), args.begin() + toremove);
+        // 2. Remove the arguments that been placed in placeholders.
+        args.erase(args.begin(), args.begin() + toremove);
 
-		// 3. Now append the rest of arguments.
-		std::copy(args.begin(), args.end(), std::back_inserter(cmdArgs));
+        // 3. Now append the rest of arguments.
+        std::copy(args.begin(), args.end(), std::back_inserter(cmdArgs));
 
-		// 4. Finally try to execute.
-		exec(cmdArgs);
-	}
+        // 4. Finally try to execute.
+        exec(cmdArgs);
+    }
 }
 
 void Irccdctl::exec(std::vector<std::string> args)
 {
-	assert(args.size() > 0);
+    assert(args.size() > 0);
 
-	auto name = args[0];
-	auto alias = m_aliases.find(name);
+    auto name = args[0];
+    auto alias = m_aliases.find(name);
 
-	// Remove name.
-	args.erase(args.begin());
+    // Remove name.
+    args.erase(args.begin());
 
-	if (alias != m_aliases.end())
-		exec(alias->second, args);
-	else {
-		auto cmd = m_commandService.find(name);
+    if (alias != m_aliases.end())
+        exec(alias->second, args);
+    else {
+        auto cmd = m_commandService.find(name);
 
-		if (cmd)
-			exec(*cmd, args);
-		else
-			throw std::invalid_argument("no alias or command named " + name);
-	}
+        if (cmd)
+            exec(*cmd, args);
+        else
+            throw std::invalid_argument("no alias or command named " + name);
+    }
 }
 
 void Irccdctl::connect()
 {
-	log::info("{}: connecting to irccd..."_format(sys::programName()));
+    log::info("{}: connecting to irccd..."_format(sys::programName()));
 
-	// Try to connect.
-	m_connection->connect(30000);
+    // Try to connect.
+    m_connection->connect(30000);
 
-	// Get irccd information.
-	json::Value object = m_connection->next(30000);
+    // Get irccd information.
+    json::Value object = m_connection->next(30000);
 
-	if (!object.contains("program") || object.at("program").toString() != "irccd")
-		throw std::runtime_error("not an irccd server");
+    if (!object.contains("program") || object.at("program").toString() != "irccd")
+        throw std::runtime_error("not an irccd server");
 
-	// Get values.
-	m_major = object.at("major").toInt();
-	m_minor = object.at("minor").toInt();
-	m_patch = object.at("patch").toInt();
-	m_javascript = object.valueOr("javascript", json::Type::Boolean, false).toBool();
-	m_ssl = object.valueOr("ssl", json::Type::Boolean, false).toBool();
+    // Get values.
+    m_major = object.at("major").toInt();
+    m_minor = object.at("minor").toInt();
+    m_patch = object.at("patch").toInt();
+    m_javascript = object.valueOr("javascript", json::Type::Boolean, false).toBool();
+    m_ssl = object.valueOr("ssl", json::Type::Boolean, false).toBool();
 
-	log::info() << std::boolalpha;
-	log::info("{}: connected to irccd {}.{}.{}"_format(sys::programName(), m_major, m_minor, m_patch));
-	log::info("{}: javascript: {}, ssl support: {}"_format(sys::programName(), m_javascript, m_ssl));
+    log::info() << std::boolalpha;
+    log::info("{}: connected to irccd {}.{}.{}"_format(sys::programName(), m_major, m_minor, m_patch));
+    log::info("{}: javascript: {}, ssl support: {}"_format(sys::programName(), m_javascript, m_ssl));
 }
 
 void Irccdctl::run(int argc, char **argv)
 {
-	// 1. Read command line arguments.
-	parser::Result result = parse(argc, argv);
+    // 1. Read command line arguments.
+    parser::Result result = parse(argc, argv);
 
-	/*
-	 * 2. Open optional config by command line or by searching it
-	 *
-	 * The connection to irccd is searched in the following order :
-	 *
-	 * 1. From the command line if specified
-	 * 2. From the configuration file specified by -c
-	 * 3. From the configuration file searched through directories
-	 */
-	try {
-		if (result.count("-t") > 0 || result.count("--type") > 0)
-			parseConnect(result);
+    /*
+     * 2. Open optional config by command line or by searching it
+     *
+     * The connection to irccd is searched in the following order :
+     *
+     * 1. From the command line if specified
+     * 2. From the configuration file specified by -c
+     * 3. From the configuration file searched through directories
+     */
+    try {
+        if (result.count("-t") > 0 || result.count("--type") > 0)
+            parseConnect(result);
 
-		auto it = result.find("-c");
+        auto it = result.find("-c");
 
-		if (it != result.end() || (it = result.find("--config")) != result.end())
-			read(it->second, result);
-		else {
-			for (const std::string &dir : path::list(path::PathConfig)) {
-				std::string path = dir + "irccdctl.conf";
+        if (it != result.end() || (it = result.find("--config")) != result.end())
+            read(it->second, result);
+        else {
+            for (const std::string &dir : path::list(path::PathConfig)) {
+                std::string path = dir + "irccdctl.conf";
 
-				if (fs::exists(path))
-					read(path, result);
-			}
-		}
-	} catch (const std::exception &ex) {
-		log::warning("{}: {}"_format(sys::programName(), ex.what()));
-		std::exit(1);
-	}
+                if (fs::exists(path))
+                    read(path, result);
+            }
+        }
+    } catch (const std::exception &ex) {
+        log::warning("{}: {}"_format(sys::programName(), ex.what()));
+        std::exit(1);
+    }
 
-	if (argc <= 0) {
-		usage();
-		// NOTREACHED
-	}
+    if (argc <= 0) {
+        usage();
+        // NOTREACHED
+    }
 
-	// Help does not require connection.
-	if (std::strcmp(argv[0], "help") != 0) {
-		if (!m_connection) {
-			log::warning("{}: no connection specified"_format(sys::programName()));
-			std::exit(1);
-		}
+    // Help does not require connection.
+    if (std::strcmp(argv[0], "help") != 0) {
+        if (!m_connection) {
+            log::warning("{}: no connection specified"_format(sys::programName()));
+            std::exit(1);
+        }
 
-		connect();
-	}
+        connect();
+    }
 
-	// Build a vector of arguments.
-	std::vector<std::string> args;
+    // Build a vector of arguments.
+    std::vector<std::string> args;
 
-	for (int i = 0; i < argc; ++i)
-		args.push_back(argv[i]);
+    for (int i = 0; i < argc; ++i)
+        args.push_back(argv[i]);
 
-	exec(args);
+    exec(args);
 }
 
 } // !irccd
--- a/lib/irccd/irccdctl.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/irccdctl.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -49,88 +49,88 @@
  */
 class Irccdctl {
 private:
-	// Irccd's information.
-	unsigned short m_major{0};
-	unsigned short m_minor{0};
-	unsigned short m_patch{0};
+    // Irccd's information.
+    unsigned short m_major{0};
+    unsigned short m_minor{0};
+    unsigned short m_patch{0};
 
-	// Irccd's compilation option.
-	bool m_javascript{true};
-	bool m_ssl{true};
+    // Irccd's compilation option.
+    bool m_javascript{true};
+    bool m_ssl{true};
 
-	// Commands.
-	CommandService m_commandService;
+    // Commands.
+    CommandService m_commandService;
 
-	std::unique_ptr<Connection> m_connection;
-	std::unordered_map<std::string, Alias> m_aliases;
+    std::unique_ptr<Connection> m_connection;
+    std::unordered_map<std::string, Alias> m_aliases;
 
-	void usage() const;
+    void usage() const;
 
-	void readConnectIp(const ini::Section &sc);
-	void readConnectUnix(const ini::Section &sc);
-	void readConnect(const ini::Section &sc);
-	void readGeneral(const ini::Section &sc);
-	void readAliases(const ini::Section &sc);
-	void read(const std::string &path, const parser::Result &options);
+    void readConnectIp(const ini::Section &sc);
+    void readConnectUnix(const ini::Section &sc);
+    void readConnect(const ini::Section &sc);
+    void readGeneral(const ini::Section &sc);
+    void readAliases(const ini::Section &sc);
+    void read(const std::string &path, const parser::Result &options);
 
-	void parseConnectIp(const parser::Result &options, bool ipv6);
-	void parseConnectUnix(const parser::Result &options);
-	void parseConnect(const parser::Result &options);
-	parser::Result parse(int &argc, char **&argv) const;
+    void parseConnectIp(const parser::Result &options, bool ipv6);
+    void parseConnectUnix(const parser::Result &options);
+    void parseConnect(const parser::Result &options);
+    parser::Result parse(int &argc, char **&argv) const;
 
-	void connect();
+    void connect();
 
 public:
-	/**
-	 * Get the command service.
-	 *
-	 * \return the command service
-	 */
-	inline CommandService &commandService() noexcept
-	{
-		return m_commandService;
-	}
+    /**
+     * Get the command service.
+     *
+     * \return the command service
+     */
+    inline CommandService &commandService() noexcept
+    {
+        return m_commandService;
+    }
 
-	/**
-	 * Execute the given command and wait for its result.
-	 *
-	 * \param cmd the command
-	 * \param args the arguments
-	 */
-	IRCCD_EXPORT void exec(const Command &cmd, std::vector<std::string> args);
+    /**
+     * Execute the given command and wait for its result.
+     *
+     * \param cmd the command
+     * \param args the arguments
+     */
+    IRCCD_EXPORT void exec(const Command &cmd, std::vector<std::string> args);
 
-	/**
-	 * Execute the given alias.
-	 *
-	 * \param alias the alias
-	 * \param args the arguments
-	 */
-	IRCCD_EXPORT void exec(const Alias &alias, std::vector<std::string> args);
+    /**
+     * Execute the given alias.
+     *
+     * \param alias the alias
+     * \param args the arguments
+     */
+    IRCCD_EXPORT void exec(const Alias &alias, std::vector<std::string> args);
 
-	/**
-	 * Resolve the command line arguments.
-	 *
-	 * \param args the main arguments
-	 */
-	IRCCD_EXPORT void exec(std::vector<std::string> args);
+    /**
+     * Resolve the command line arguments.
+     *
+     * \param args the main arguments
+     */
+    IRCCD_EXPORT void exec(std::vector<std::string> args);
 
-	/**
-	 * Get the connection.
-	 *
-	 * \return the connection
-	 */
-	inline Connection &connection() noexcept
-	{
-		return *m_connection;
-	}
+    /**
+     * Get the connection.
+     *
+     * \return the connection
+     */
+    inline Connection &connection() noexcept
+    {
+        return *m_connection;
+    }
 
-	/**
-	 * Run the irccdctl front end.
-	 *
-	 * \param argc the number of arguments
-	 * \param argv the arguments
-	 */
-	IRCCD_EXPORT void run(int argc, char **argv);
+    /**
+     * Run the irccdctl front end.
+     *
+     * \param argc the number of arguments
+     * \param argv the arguments
+     */
+    IRCCD_EXPORT void run(int argc, char **argv);
 };
 
 } // !irccd
--- a/lib/irccd/json.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/json.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -33,311 +33,311 @@
 
 Value readValue(json_t *v)
 {
-	if (json_is_null(v))
-		return Value(nullptr);
-	if (json_is_string(v))
-		return Value(json_string_value(v));
-	if (json_is_real(v))
-		return Value(json_number_value(v));
-	if (json_is_integer(v))
-		return Value(static_cast<int>(json_integer_value(v)));
-	if (json_is_boolean(v))
-		return Value(json_boolean_value(v));
-	if (json_is_object(v)) {
-		Value object(Type::Object);
+    if (json_is_null(v))
+        return Value(nullptr);
+    if (json_is_string(v))
+        return Value(json_string_value(v));
+    if (json_is_real(v))
+        return Value(json_number_value(v));
+    if (json_is_integer(v))
+        return Value(static_cast<int>(json_integer_value(v)));
+    if (json_is_boolean(v))
+        return Value(json_boolean_value(v));
+    if (json_is_object(v)) {
+        Value object(Type::Object);
 
-		readObject(object, v);
+        readObject(object, v);
 
-		return object;
-	}
-	if (json_is_array(v)) {
-		Value array(Type::Array);
+        return object;
+    }
+    if (json_is_array(v)) {
+        Value array(Type::Array);
 
-		readArray(array, v);
+        readArray(array, v);
 
-		return array;
-	}
+        return array;
+    }
 
-	return Value();
+    return Value();
 }
 
 void readObject(Value &parent, json_t *object)
 {
-	const char *key;
-	json_t *value;
+    const char *key;
+    json_t *value;
 
-	json_object_foreach(object, key, value)
-		parent.insert(key, readValue(value));
+    json_object_foreach(object, key, value)
+        parent.insert(key, readValue(value));
 }
 
 void readArray(Value &parent, json_t *array)
 {
-	size_t index;
-	json_t *value;
+    size_t index;
+    json_t *value;
 
-	json_array_foreach(array, index, value)
-		parent.append(readValue(value));
+    json_array_foreach(array, index, value)
+        parent.append(readValue(value));
 }
 
 template <typename Func, typename... Args>
 Value convert(Func fn, Args&&... args)
 {
-	json_error_t error;
-	json_t *json = fn(std::forward<Args>(args)..., &error);
+    json_error_t error;
+    json_t *json = fn(std::forward<Args>(args)..., &error);
 
-	if (json == nullptr)
-		throw Error(error.text, error.source, error.line, error.column, error.position);
+    if (json == nullptr)
+        throw Error(error.text, error.source, error.line, error.column, error.position);
 
-	Value value;
+    Value value;
 
-	if (json_is_object(json)) {
-		value = Value(Type::Object);
-		readObject(value, json);
-	} else {
-		value = Value(Type::Array);
-		readArray(value, json);
-	}
+    if (json_is_object(json)) {
+        value = Value(Type::Object);
+        readObject(value, json);
+    } else {
+        value = Value(Type::Array);
+        readArray(value, json);
+    }
 
-	json_decref(json);
+    json_decref(json);
 
-	return value;
+    return value;
 }
 
 std::string indent(int param, int level)
 {
-	std::string str;
+    std::string str;
 
-	if (param < 0)
-		str = std::string(level, '\t');
-	else if (param > 0)
-		str = std::string(param * level, ' ');
+    if (param < 0)
+        str = std::string(level, '\t');
+    else if (param > 0)
+        str = std::string(param * level, ' ');
 
-	return str;
+    return str;
 }
 
 } // !namespace
 
 void Value::copy(const Value &other)
 {
-	switch (other.m_type) {
-	case Type::Array:
-		new (&m_array) std::vector<Value>(other.m_array);
-		break;
-	case Type::Boolean:
-		m_boolean = other.m_boolean;
-		break;
-	case Type::Int:
-		m_integer = other.m_integer;
-		break;
-	case Type::Object:
-		new (&m_object) std::map<std::string, Value>(other.m_object);
-		break;
-	case Type::Real:
-		m_number = other.m_number;
-		break;
-	case Type::String:
-		new (&m_string) std::string(other.m_string);
-		break;
-	default:
-		break;
-	}
+    switch (other.m_type) {
+    case Type::Array:
+        new (&m_array) std::vector<Value>(other.m_array);
+        break;
+    case Type::Boolean:
+        m_boolean = other.m_boolean;
+        break;
+    case Type::Int:
+        m_integer = other.m_integer;
+        break;
+    case Type::Object:
+        new (&m_object) std::map<std::string, Value>(other.m_object);
+        break;
+    case Type::Real:
+        m_number = other.m_number;
+        break;
+    case Type::String:
+        new (&m_string) std::string(other.m_string);
+        break;
+    default:
+        break;
+    }
 
-	m_type = other.m_type;
+    m_type = other.m_type;
 }
 
 void Value::move(Value &&other)
 {
-	switch (other.m_type) {
-	case Type::Array:
-		new (&m_array) std::vector<Value>(std::move(other.m_array));
-		break;
-	case Type::Boolean:
-		m_boolean = other.m_boolean;
-		break;
-	case Type::Int:
-		m_integer = other.m_integer;
-		break;
-	case Type::Object:
-		new (&m_object) std::map<std::string, Value>(std::move(other.m_object));
-		break;
-	case Type::Real:
-		m_number = other.m_number;
-		break;
-	case Type::String:
-		new (&m_string) std::string(std::move(other.m_string));
-		break;
-	default:
-		break;
-	}
+    switch (other.m_type) {
+    case Type::Array:
+        new (&m_array) std::vector<Value>(std::move(other.m_array));
+        break;
+    case Type::Boolean:
+        m_boolean = other.m_boolean;
+        break;
+    case Type::Int:
+        m_integer = other.m_integer;
+        break;
+    case Type::Object:
+        new (&m_object) std::map<std::string, Value>(std::move(other.m_object));
+        break;
+    case Type::Real:
+        m_number = other.m_number;
+        break;
+    case Type::String:
+        new (&m_string) std::string(std::move(other.m_string));
+        break;
+    default:
+        break;
+    }
 
-	m_type = other.m_type;
+    m_type = other.m_type;
 }
 
 Value::Value(Type type)
-	: m_type(type)
+    : m_type(type)
 {
-	switch (m_type) {
-	case Type::Array:
-		new (&m_array) std::vector<Value>();
-		break;
-	case Type::Boolean:
-		m_boolean = false;
-		break;
-	case Type::Int:
-		m_integer = 0;
-		break;
-	case Type::Object:
-		new (&m_object) std::map<std::string, Value>();
-		break;
-	case Type::Real:
-		m_number = 0;
-		break;
-	case Type::String:
-		new (&m_string) std::string();
-		break;
-	default:
-		break;
-	}
+    switch (m_type) {
+    case Type::Array:
+        new (&m_array) std::vector<Value>();
+        break;
+    case Type::Boolean:
+        m_boolean = false;
+        break;
+    case Type::Int:
+        m_integer = 0;
+        break;
+    case Type::Object:
+        new (&m_object) std::map<std::string, Value>();
+        break;
+    case Type::Real:
+        m_number = 0;
+        break;
+    case Type::String:
+        new (&m_string) std::string();
+        break;
+    default:
+        break;
+    }
 }
 
 Value::~Value()
 {
-	switch (m_type) {
-	case Type::Array:
-		m_array.~vector<Value>();
-		break;
-	case Type::Object:
-		m_object.~map<std::string, Value>();
-		break;
-	case Type::String:
-		m_string.~basic_string();
-		break;
-	default:
-		break;
-	}
+    switch (m_type) {
+    case Type::Array:
+        m_array.~vector<Value>();
+        break;
+    case Type::Object:
+        m_object.~map<std::string, Value>();
+        break;
+    case Type::String:
+        m_string.~basic_string();
+        break;
+    default:
+        break;
+    }
 }
 
 std::string Value::toString(bool coerce) const
 {
-	std::string result;
+    std::string result;
 
-	if (m_type == Type::String)
-		result = m_string;
-	else if (coerce)
-		result = toJson();
+    if (m_type == Type::String)
+        result = m_string;
+    else if (coerce)
+        result = toJson();
 
-	return result;
+    return result;
 }
 
 std::string Value::toJson(int level, int current) const
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	switch (m_type) {
-	case Type::Array: {
-		oss << '[' << (level != 0 ? "\n" : "");
+    switch (m_type) {
+    case Type::Array: {
+        oss << '[' << (level != 0 ? "\n" : "");
 
-		unsigned total = m_array.size();
-		unsigned i = 0;
-		for (const auto &v : m_array) {
-			oss << indent(level, current + 1) << v.toJson(level, current + 1);
-			oss << (++i < total ? "," : "");
-			oss << (level != 0 ? "\n" : "");
-		}
+        unsigned total = m_array.size();
+        unsigned i = 0;
+        for (const auto &v : m_array) {
+            oss << indent(level, current + 1) << v.toJson(level, current + 1);
+            oss << (++i < total ? "," : "");
+            oss << (level != 0 ? "\n" : "");
+        }
 
-		oss << (level != 0 ? indent(level, current) : "") << ']';
-		break;
-	}
-	case Type::Boolean:
-		oss << (m_boolean ? "true" : "false");
-		break;
-	case Type::Int:
-		oss << m_integer;
-		break;
-	case Type::Null:
-		oss << "null";
-		break;
-	case Type::Object: {
-		oss << '{' << (level != 0 ? "\n" : "");
+        oss << (level != 0 ? indent(level, current) : "") << ']';
+        break;
+    }
+    case Type::Boolean:
+        oss << (m_boolean ? "true" : "false");
+        break;
+    case Type::Int:
+        oss << m_integer;
+        break;
+    case Type::Null:
+        oss << "null";
+        break;
+    case Type::Object: {
+        oss << '{' << (level != 0 ? "\n" : "");
 
-		unsigned total = m_object.size();
-		unsigned i = 0;
-		for (const auto &pair : m_object) {
-			oss << indent(level, current + 1);
+        unsigned total = m_object.size();
+        unsigned i = 0;
+        for (const auto &pair : m_object) {
+            oss << indent(level, current + 1);
 
-			// Key and :.
-			oss << "\"" << pair.first << "\":" << (level != 0 ? " " : "");
+            // Key and :.
+            oss << "\"" << pair.first << "\":" << (level != 0 ? " " : "");
 
-			// Value.
-			oss << pair.second.toJson(level, current + 1);
+            // Value.
+            oss << pair.second.toJson(level, current + 1);
 
-			// Comma, new line if needed.
-			oss << (++i < total ? "," : "") << (level != 0 ? "\n" : "");
-		}
+            // Comma, new line if needed.
+            oss << (++i < total ? "," : "") << (level != 0 ? "\n" : "");
+        }
 
-		oss << (level != 0 ? indent(level, current) : "") << '}';
-		break;
-	}
-	case Type::Real:
-		oss << m_number;
-		break;
-	case Type::String:
-		oss << "\"" << escape(m_string) << "\"";
-		break;
-	default:
-		break;
-	}
+        oss << (level != 0 ? indent(level, current) : "") << '}';
+        break;
+    }
+    case Type::Real:
+        oss << m_number;
+        break;
+    case Type::String:
+        oss << "\"" << escape(m_string) << "\"";
+        break;
+    default:
+        break;
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 std::string escape(const std::string &value)
 {
-	std::string result;
+    std::string result;
 
-	for (auto it = value.begin(); it != value.end(); ++it) {
-		switch (*it) {
-		case '\\':
-			result += "\\\\";
-			break;
-		case '/':
-			result += "\\/";
-			break;
-		case '"':
-			result += "\\\"";
-			break;
-		case '\b':
-			result += "\\b";
-			break;
-		case '\f':
-			result += "\\f";
-			break;
-		case '\n':
-			result += "\\n";
-			break;
-		case '\r':
-			result += "\\r";
-			break;
-		case '\t':
-			result += "\\t";
-			break;
-		default:
-			result += *it;
-			break;
-		}
-	}
+    for (auto it = value.begin(); it != value.end(); ++it) {
+        switch (*it) {
+        case '\\':
+            result += "\\\\";
+            break;
+        case '/':
+            result += "\\/";
+            break;
+        case '"':
+            result += "\\\"";
+            break;
+        case '\b':
+            result += "\\b";
+            break;
+        case '\f':
+            result += "\\f";
+            break;
+        case '\n':
+            result += "\\n";
+            break;
+        case '\r':
+            result += "\\r";
+            break;
+        case '\t':
+            result += "\\t";
+            break;
+        default:
+            result += *it;
+            break;
+        }
+    }
 
-	return result;
+    return result;
 }
 
 Value fromString(const std::string &buffer)
 {
-	return convert(json_loads, buffer.c_str(), 0);
+    return convert(json_loads, buffer.c_str(), 0);
 }
 
 Value fromFile(const std::string &path)
 {
-	return convert(json_load_file, path.c_str(), 0);
+    return convert(json_load_file, path.c_str(), 0);
 }
 
 } // !json
--- a/lib/irccd/json.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/json.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -81,13 +81,13 @@
  * \brief Type of Value.
  */
 enum class Type {
-	Array,		//!< Value is an array []
-	Boolean,	//!< Value is boolean
-	Int,		//!< Value is integer
-	Null,		//!< Value is defined to null
-	Object,		//!< Value is object {}
-	Real,		//!< Value is float
-	String		//!< Value is unicode string
+    Array,      //!< Value is an array []
+    Boolean,    //!< Value is boolean
+    Int,        //!< Value is integer
+    Null,       //!< Value is defined to null
+    Object,     //!< Value is object {}
+    Real,       //!< Value is float
+    String      //!< Value is unicode string
 };
 
 /**
@@ -96,90 +96,90 @@
  */
 class Error : public std::exception {
 private:
-	std::string m_text;
-	std::string m_source;
-	int m_line;
-	int m_column;
-	int m_position;
+    std::string m_text;
+    std::string m_source;
+    int m_line;
+    int m_column;
+    int m_position;
 
 public:
-	/**
-	 * Create the error.
-	 *
-	 * \param text the text message
-	 * \param source the source (e.g. file name)
-	 * \param line the line number
-	 * \param column the column number
-	 * \param position the position
-	 */
-	inline Error(std::string text, std::string source, int line, int column, int position) noexcept
-		: m_text(std::move(text))
-		, m_source(std::move(source))
-		, m_line(line)
-		, m_column(column)
-		, m_position(position)
-	{
-	}
+    /**
+     * Create the error.
+     *
+     * \param text the text message
+     * \param source the source (e.g. file name)
+     * \param line the line number
+     * \param column the column number
+     * \param position the position
+     */
+    inline Error(std::string text, std::string source, int line, int column, int position) noexcept
+        : m_text(std::move(text))
+        , m_source(std::move(source))
+        , m_line(line)
+        , m_column(column)
+        , m_position(position)
+    {
+    }
 
-	/**
-	 * Get the error message.
-	 *
-	 * \return the text
-	 */
-	inline const std::string &text() const noexcept
-	{
-		return m_text;
-	}
+    /**
+     * Get the error message.
+     *
+     * \return the text
+     */
+    inline const std::string &text() const noexcept
+    {
+        return m_text;
+    }
 
-	/**
-	 * Get the source (e.g. a file name).
-	 *
-	 * \return the source
-	 */
-	inline const std::string &source() const noexcept
-	{
-		return m_source;
-	}
+    /**
+     * Get the source (e.g. a file name).
+     *
+     * \return the source
+     */
+    inline const std::string &source() const noexcept
+    {
+        return m_source;
+    }
 
-	/**
-	 * Get the line.
-	 *
-	 * \return the line
-	 */
-	inline int line() const noexcept
-	{
-		return m_line;
-	}
+    /**
+     * Get the line.
+     *
+     * \return the line
+     */
+    inline int line() const noexcept
+    {
+        return m_line;
+    }
 
-	/**
-	 * Get the column.
-	 *
-	 * \return the column
-	 */
-	inline int column() const noexcept
-	{
-		return m_column;
-	}
+    /**
+     * Get the column.
+     *
+     * \return the column
+     */
+    inline int column() const noexcept
+    {
+        return m_column;
+    }
 
-	/**
-	 * Get the position.
-	 *
-	 * \return the position
-	 */
-	inline int position() const noexcept
-	{
-		return m_position;
-	}
+    /**
+     * Get the position.
+     *
+     * \return the position
+     */
+    inline int position() const noexcept
+    {
+        return m_position;
+    }
 
-	/**
-	 * Get the error message.
-	 *
-	 * \return the message
-	 */
-	const char *what() const noexcept override
-	{
-		return m_text.c_str();
-	}
+    /**
+     * Get the error message.
+     *
+     * \return the message
+     */
+    const char *what() const noexcept override
+    {
+        return m_text.c_str();
+    }
 };
 
 /**
@@ -194,155 +194,155 @@
 template <typename ValueType, typename ArrayIteratorType, typename ObjectIteratorType>
 class Iterator : public std::iterator<std::forward_iterator_tag, ValueType> {
 private:
-	friend class Value;
+    friend class Value;
 
-	ValueType *m_parent{nullptr};
-	ArrayIteratorType m_ita;
-	ObjectIteratorType m_itm;
+    ValueType *m_parent{nullptr};
+    ArrayIteratorType m_ita;
+    ObjectIteratorType m_itm;
 
-	inline void increment()
-	{
-		if (m_parent->isObject())
-			m_itm++;
-		else
-			m_ita++;
-	}
+    inline void increment()
+    {
+        if (m_parent->isObject())
+            m_itm++;
+        else
+            m_ita++;
+    }
 
-	inline Iterator(ValueType *parent, ObjectIteratorType it)
-		: m_parent(parent)
-		, m_itm(it)
-	{
-		assert(parent);
-	}
+    inline Iterator(ValueType *parent, ObjectIteratorType it)
+        : m_parent(parent)
+        , m_itm(it)
+    {
+        assert(parent);
+    }
 
-	inline Iterator(ValueType *parent, ArrayIteratorType it)
-		: m_parent(parent)
-		, m_ita(it)
-	{
-		assert(parent);
-	}
+    inline Iterator(ValueType *parent, ArrayIteratorType it)
+        : m_parent(parent)
+        , m_ita(it)
+    {
+        assert(parent);
+    }
 
 public:
-	/**
-	 * Default constructor.
-	 */
-	Iterator() = default;
+    /**
+     * Default constructor.
+     */
+    Iterator() = default;
 
-	/**
-	 * Get the iterator key (for objects).
-	 *
-	 * \pre iterator must be dereferenceable
-	 * \pre iterator must come from object
-	 * \return the key
-	 */
-	inline const std::string &key() const noexcept
-	{
-		assert(m_parent && m_parent->isObject());
-		assert(m_itm != m_parent->m_object.end());
+    /**
+     * Get the iterator key (for objects).
+     *
+     * \pre iterator must be dereferenceable
+     * \pre iterator must come from object
+     * \return the key
+     */
+    inline const std::string &key() const noexcept
+    {
+        assert(m_parent && m_parent->isObject());
+        assert(m_itm != m_parent->m_object.end());
 
-		return m_itm->first;
-	}
+        return m_itm->first;
+    }
 
-	/**
-	 * Get the iterator position (for arrays).
-	 *
-	 * \pre iterator must be dereferenceable
-	 * \pre iterator must come from arrays
-	 * \return the index
-	 */
-	inline unsigned index() const noexcept
-	{
-		assert(m_parent && m_parent->isArray());
-		assert(m_ita != m_parent->m_array.end());
+    /**
+     * Get the iterator position (for arrays).
+     *
+     * \pre iterator must be dereferenceable
+     * \pre iterator must come from arrays
+     * \return the index
+     */
+    inline unsigned index() const noexcept
+    {
+        assert(m_parent && m_parent->isArray());
+        assert(m_ita != m_parent->m_array.end());
 
-		return std::distance(m_parent->m_array.begin(), m_ita);
-	}
+        return std::distance(m_parent->m_array.begin(), m_ita);
+    }
 
-	/**
-	 * Dereference the iterator.
-	 *
-	 * \pre iterator be dereferenceable
-	 * \return the value
-	 */
-	inline ValueType &operator*() noexcept
-	{
-		assert(m_parent);
-		assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
-		       (m_parent->isObject() && m_itm != m_parent->m_object.end()));
+    /**
+     * Dereference the iterator.
+     *
+     * \pre iterator be dereferenceable
+     * \return the value
+     */
+    inline ValueType &operator*() noexcept
+    {
+        assert(m_parent);
+        assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
+               (m_parent->isObject() && m_itm != m_parent->m_object.end()));
 
-		return (m_parent->m_type == Type::Object) ? m_itm->second : *m_ita;
-	}
+        return (m_parent->m_type == Type::Object) ? m_itm->second : *m_ita;
+    }
 
-	/**
-	 * Dereference the iterator as a pointer.
-	 *
-	 * \pre iterator must be dereferenceable
-	 * \return the value
-	 */
-	inline ValueType *operator->() noexcept
-	{
-		assert(m_parent);
-		assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
-		       (m_parent->isObject() && m_itm != m_parent->m_object.end()));
+    /**
+     * Dereference the iterator as a pointer.
+     *
+     * \pre iterator must be dereferenceable
+     * \return the value
+     */
+    inline ValueType *operator->() noexcept
+    {
+        assert(m_parent);
+        assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
+               (m_parent->isObject() && m_itm != m_parent->m_object.end()));
 
-		return (m_parent->m_type == Type::Object) ? &m_itm->second : &(*m_ita);
-	}
+        return (m_parent->m_type == Type::Object) ? &m_itm->second : &(*m_ita);
+    }
 
-	/**
-	 * Increment the iterator. (Prefix version).
-	 *
-	 * \pre iterator must be dereferenceable
-	 * \return *this;
-	 */
-	inline Iterator &operator++() noexcept
-	{
-		assert(m_parent);
-		assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
-		       (m_parent->isObject() && m_itm != m_parent->m_object.end()));
+    /**
+     * Increment the iterator. (Prefix version).
+     *
+     * \pre iterator must be dereferenceable
+     * \return *this;
+     */
+    inline Iterator &operator++() noexcept
+    {
+        assert(m_parent);
+        assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
+               (m_parent->isObject() && m_itm != m_parent->m_object.end()));
 
-		increment();
+        increment();
 
-		return *this;
-	}
+        return *this;
+    }
 
-	/**
-	 * Increment the iterator. (Postfix version).
-	 *
-	 * \pre iterator must be dereferenceable
-	 * \return *this;
-	 */
-	inline Iterator &operator++(int) noexcept
-	{
-		assert(m_parent);
-		assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
-		       (m_parent->isObject() && m_itm != m_parent->m_object.end()));
+    /**
+     * Increment the iterator. (Postfix version).
+     *
+     * \pre iterator must be dereferenceable
+     * \return *this;
+     */
+    inline Iterator &operator++(int) noexcept
+    {
+        assert(m_parent);
+        assert((m_parent->isArray()  && m_ita != m_parent->m_array.end()) ||
+               (m_parent->isObject() && m_itm != m_parent->m_object.end()));
 
-		increment();
+        increment();
 
-		return *this;
-	}
+        return *this;
+    }
 
-	/**
-	 * Compare two iterators.
-	 *
-	 * \param it the first iterator
-	 * \return true if they are same
-	 */
-	bool operator==(const Iterator &it) const noexcept
-	{
-		return m_parent == it.m_parent && m_itm == it.m_itm && m_ita == it.m_ita;
-	}
+    /**
+     * Compare two iterators.
+     *
+     * \param it the first iterator
+     * \return true if they are same
+     */
+    bool operator==(const Iterator &it) const noexcept
+    {
+        return m_parent == it.m_parent && m_itm == it.m_itm && m_ita == it.m_ita;
+    }
 
-	/**
-	 * Test if the iterator is different.
-	 *
-	 * \param it the iterator
-	 * \return true if they are different
-	 */
-	inline bool operator!=(const Iterator &it) const noexcept
-	{
-		return !(*this == it);
-	}
+    /**
+     * Test if the iterator is different.
+     *
+     * \param it the iterator
+     * \return true if they are different
+     */
+    inline bool operator!=(const Iterator &it) const noexcept
+    {
+        return !(*this == it);
+    }
 };
 
 /**
@@ -351,815 +351,815 @@
  */
 class Value {
 private:
-	Type m_type{Type::Null};
+    Type m_type{Type::Null};
 
-	union {
-		double m_number;
-		bool m_boolean;
-		int m_integer;
-		std::string m_string;
-		std::vector<Value> m_array;
-		std::map<std::string, Value> m_object;
-	};
+    union {
+        double m_number;
+        bool m_boolean;
+        int m_integer;
+        std::string m_string;
+        std::vector<Value> m_array;
+        std::map<std::string, Value> m_object;
+    };
 
-	void copy(const Value &);
-	void move(Value &&);
-	std::string toJson(int indent, int current) const;
+    void copy(const Value &);
+    void move(Value &&);
+    std::string toJson(int indent, int current) const;
 
-	friend class Iterator<Value, typename std::vector<Value>::iterator, typename std::map<std::string, Value>::iterator>;
-	friend class Iterator<const Value, typename std::vector<Value>::const_iterator, typename std::map<std::string, Value>::const_iterator>;
+    friend class Iterator<Value, typename std::vector<Value>::iterator, typename std::map<std::string, Value>::iterator>;
+    friend class Iterator<const Value, typename std::vector<Value>::const_iterator, typename std::map<std::string, Value>::const_iterator>;
 
 public:
-	/**
-	 * Forward iterator.
-	 */
-	using iterator = Iterator<Value, typename std::vector<Value>::iterator, typename std::map<std::string, Value>::iterator>;
+    /**
+     * Forward iterator.
+     */
+    using iterator = Iterator<Value, typename std::vector<Value>::iterator, typename std::map<std::string, Value>::iterator>;
 
-	/**
-	 * Const forward iterator.
-	 */
-	using const_iterator = Iterator<const Value, typename std::vector<Value>::const_iterator, typename std::map<std::string, Value>::const_iterator>;
+    /**
+     * Const forward iterator.
+     */
+    using const_iterator = Iterator<const Value, typename std::vector<Value>::const_iterator, typename std::map<std::string, Value>::const_iterator>;
 
-	/**
-	 * Construct a null value.
-	 */
-	inline Value() noexcept
-	{
-	}
+    /**
+     * Construct a null value.
+     */
+    inline Value() noexcept
+    {
+    }
 
-	/**
-	 * Create a value with a specified type, this is usually only needed when you want to create an object or
-	 * an array.
-	 *
-	 * For any other types, initialize with sane default value.
-	 *
-	 * \param type the type
-	 */
-	Value(Type type);
+    /**
+     * Create a value with a specified type, this is usually only needed when you want to create an object or
+     * an array.
+     *
+     * For any other types, initialize with sane default value.
+     *
+     * \param type the type
+     */
+    Value(Type type);
 
-	/**
-	 * Construct a null value.
-	 */
-	inline Value(std::nullptr_t) noexcept
-		: m_type(Type::Null)
-	{
-	}
+    /**
+     * Construct a null value.
+     */
+    inline Value(std::nullptr_t) noexcept
+        : m_type(Type::Null)
+    {
+    }
 
-	/**
-	 * Construct a boolean value.
-	 *
-	 * \param value the boolean value
-	 */
-	inline Value(bool value) noexcept
-		: m_type(Type::Boolean)
-		, m_boolean(value)
-	{
-	}
+    /**
+     * Construct a boolean value.
+     *
+     * \param value the boolean value
+     */
+    inline Value(bool value) noexcept
+        : m_type(Type::Boolean)
+        , m_boolean(value)
+    {
+    }
 
-	/**
-	 * Create value from integer.
-	 *
-	 * \param value the value
-	 */
-	inline Value(int value) noexcept
-		: m_type(Type::Int)
-		, m_integer(value)
-	{
-	}
+    /**
+     * Create value from integer.
+     *
+     * \param value the value
+     */
+    inline Value(int value) noexcept
+        : m_type(Type::Int)
+        , m_integer(value)
+    {
+    }
 
-	/**
-	 * Construct a value from a C-string.
-	 *
-	 * \param value the C-string
-	 */
-	inline Value(const char *value)
-		: m_type(Type::String)
-	{
-		new (&m_string) std::string{value ? value : ""};
-	}
+    /**
+     * Construct a value from a C-string.
+     *
+     * \param value the C-string
+     */
+    inline Value(const char *value)
+        : m_type(Type::String)
+    {
+        new (&m_string) std::string{value ? value : ""};
+    }
 
-	/**
-	 * Construct a number value.
-	 *
-	 * \param value the real value
-	 */
-	inline Value(double value) noexcept
-		: m_type(Type::Real)
-		, m_number(value)
-	{
-	}
+    /**
+     * Construct a number value.
+     *
+     * \param value the real value
+     */
+    inline Value(double value) noexcept
+        : m_type(Type::Real)
+        , m_number(value)
+    {
+    }
 
-	/**
-	 * Construct a string value.
-	 *
-	 * \param value the string
-	 */
-	inline Value(std::string value) noexcept
-		: m_type(Type::String)
-	{
-		new (&m_string) std::string(std::move(value));
-	}
+    /**
+     * Construct a string value.
+     *
+     * \param value the string
+     */
+    inline Value(std::string value) noexcept
+        : m_type(Type::String)
+    {
+        new (&m_string) std::string(std::move(value));
+    }
 
-	/**
-	 * Create an object from a map.
-	 *
-	 * \param values the values
-	 * \see fromObject
-	 */
-	inline Value(std::map<std::string, Value> values)
-		: Value(Type::Object)
-	{
-		for (const auto &pair : values)
-			insert(pair.first, pair.second);
-	}
+    /**
+     * Create an object from a map.
+     *
+     * \param values the values
+     * \see fromObject
+     */
+    inline Value(std::map<std::string, Value> values)
+        : Value(Type::Object)
+    {
+        for (const auto &pair : values)
+            insert(pair.first, pair.second);
+    }
 
-	/**
-	 * Create an array from a vector.
-	 *
-	 * \param values the values
-	 * \see fromArray
-	 */
-	inline Value(std::vector<Value> values)
-		: Value(Type::Array)
-	{
-		for (Value value : values)
-			append(std::move(value));
-	}
+    /**
+     * Create an array from a vector.
+     *
+     * \param values the values
+     * \see fromArray
+     */
+    inline Value(std::vector<Value> values)
+        : Value(Type::Array)
+    {
+        for (Value value : values)
+            append(std::move(value));
+    }
 
-	/**
-	 * Move constructor.
-	 *
-	 * \param other the value to move from
-	 */
-	inline Value(Value &&other)
-	{
-		move(std::move(other));
-	}
+    /**
+     * Move constructor.
+     *
+     * \param other the value to move from
+     */
+    inline Value(Value &&other)
+    {
+        move(std::move(other));
+    }
 
-	/**
-	 * Copy constructor.
-	 *
-	 * \param other the value to copy from
-	 */
-	inline Value(const Value &other)
-	{
-		copy(other);
-	}
+    /**
+     * Copy constructor.
+     *
+     * \param other the value to copy from
+     */
+    inline Value(const Value &other)
+    {
+        copy(other);
+    }
 
-	/**
-	 * Copy operator.
-	 *
-	 * \param other the value to copy from
-	 * \return *this
-	 */
-	inline Value &operator=(const Value &other)
-	{
-		copy(other);
+    /**
+     * Copy operator.
+     *
+     * \param other the value to copy from
+     * \return *this
+     */
+    inline Value &operator=(const Value &other)
+    {
+        copy(other);
 
-		return *this;
-	}
+        return *this;
+    }
 
-	/**
-	 * Move operator.
-	 *
-	 * \param other the value to move from
-	 * \return this
-	 */
-	inline Value &operator=(Value &&other)
-	{
-		move(std::move(other));
+    /**
+     * Move operator.
+     *
+     * \param other the value to move from
+     * \return this
+     */
+    inline Value &operator=(Value &&other)
+    {
+        move(std::move(other));
 
-		return *this;
-	}
+        return *this;
+    }
 
-	/**
-	 * Destructor.
-	 */
-	~Value();
+    /**
+     * Destructor.
+     */
+    ~Value();
 
-	/**
-	 * Get an iterator to the beginning.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline iterator begin() noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Get an iterator to the beginning.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline iterator begin() noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? iterator(this, m_object.begin()) : iterator(this, m_array.begin());
-	}
+        return m_type == Type::Object ? iterator(this, m_object.begin()) : iterator(this, m_array.begin());
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline const_iterator begin() const noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline const_iterator begin() const noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? const_iterator(this, m_object.begin()) : const_iterator(this, m_array.begin());
-	}
+        return m_type == Type::Object ? const_iterator(this, m_object.begin()) : const_iterator(this, m_array.begin());
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline const_iterator cbegin() const noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline const_iterator cbegin() const noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? const_iterator(this, m_object.cbegin()) : const_iterator(this, m_array.cbegin());
-	}
+        return m_type == Type::Object ? const_iterator(this, m_object.cbegin()) : const_iterator(this, m_array.cbegin());
+    }
 
-	/**
-	 * Get an iterator to the end.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline iterator end() noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Get an iterator to the end.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline iterator end() noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? iterator(this, m_object.end()) : iterator(this, m_array.end());
-	}
+        return m_type == Type::Object ? iterator(this, m_object.end()) : iterator(this, m_array.end());
+    }
 
-	/**
-	 * Get an iterator to the end.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline const_iterator end() const noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Get an iterator to the end.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline const_iterator end() const noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? const_iterator(this, m_object.end()) : const_iterator(this, m_array.end());
-	}
+        return m_type == Type::Object ? const_iterator(this, m_object.end()) : const_iterator(this, m_array.end());
+    }
 
-	/**
-	 * Get an iterator to the end.
-	 *
-	 * \pre must be an array or object
-	 * \return the iterator
-	 */
-	inline const_iterator cend() const noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Get an iterator to the end.
+     *
+     * \pre must be an array or object
+     * \return the iterator
+     */
+    inline const_iterator cend() const noexcept
+    {
+        assert(isArray() || isObject());
 
-		return m_type == Type::Object ? const_iterator(this, m_object.cend()) : const_iterator(this, m_array.cend());
-	}
+        return m_type == Type::Object ? const_iterator(this, m_object.cend()) : const_iterator(this, m_array.cend());
+    }
 
-	/**
-	 * Get the value type.
-	 *
-	 * \return the type
-	 */
-	inline Type typeOf() const noexcept
-	{
-		return m_type;
-	}
+    /**
+     * Get the value type.
+     *
+     * \return the type
+     */
+    inline Type typeOf() const noexcept
+    {
+        return m_type;
+    }
 
-	/**
-	 * Get the value as boolean.
-	 *
-	 * \return the value or false if not a boolean
-	 */
-	inline bool toBool() const noexcept
-	{
-		return m_type != Type::Boolean ? false : m_boolean;
-	}
+    /**
+     * Get the value as boolean.
+     *
+     * \return the value or false if not a boolean
+     */
+    inline bool toBool() const noexcept
+    {
+        return m_type != Type::Boolean ? false : m_boolean;
+    }
 
-	/**
-	 * Get the value as integer.
-	 *
-	 * \return the value or 0 if not a integer
-	 */
-	inline int toInt() const noexcept
-	{
-		return m_type != Type::Int ? 0 : m_integer;
-	}
+    /**
+     * Get the value as integer.
+     *
+     * \return the value or 0 if not a integer
+     */
+    inline int toInt() const noexcept
+    {
+        return m_type != Type::Int ? 0 : m_integer;
+    }
 
-	/**
-	 * Get the value as real.
-	 *
-	 * \return the value or 0 if not a real
-	 */
-	inline double toReal() const noexcept
-	{
-		return m_type != Type::Real ? 0 : m_number;
-	}
+    /**
+     * Get the value as real.
+     *
+     * \return the value or 0 if not a real
+     */
+    inline double toReal() const noexcept
+    {
+        return m_type != Type::Real ? 0 : m_number;
+    }
 
-	/**
-	 * Get the value as string.
-	 *
-	 * \param coerce set to true to coerce the value if not a string
-	 * \return the value or empty string if not a string
-	 */
-	std::string toString(bool coerce = false) const;
+    /**
+     * Get the value as string.
+     *
+     * \param coerce set to true to coerce the value if not a string
+     * \return the value or empty string if not a string
+     */
+    std::string toString(bool coerce = false) const;
 
-	/**
-	 * Check if the value is boolean type.
-	 *
-	 * \return true if boolean
-	 */
-	inline bool isBool() const noexcept
-	{
-		return m_type == Type::Boolean;
-	}
+    /**
+     * Check if the value is boolean type.
+     *
+     * \return true if boolean
+     */
+    inline bool isBool() const noexcept
+    {
+        return m_type == Type::Boolean;
+    }
 
-	/**
-	 * Check if the value is integer type.
-	 *
-	 * \return true if integer
-	 */
-	inline bool isInt() const noexcept
-	{
-		return m_type == Type::Int;
-	}
+    /**
+     * Check if the value is integer type.
+     *
+     * \return true if integer
+     */
+    inline bool isInt() const noexcept
+    {
+        return m_type == Type::Int;
+    }
 
-	/**
-	 * Check if the value is object type.
-	 *
-	 * \return true if object
-	 */
-	inline bool isObject() const noexcept
-	{
-		return m_type == Type::Object;
-	}
+    /**
+     * Check if the value is object type.
+     *
+     * \return true if object
+     */
+    inline bool isObject() const noexcept
+    {
+        return m_type == Type::Object;
+    }
 
-	/**
-	 * Check if the value is array type.
-	 *
-	 * \return true if array
-	 */
-	inline bool isArray() const noexcept
-	{
-		return m_type == Type::Array;
-	}
+    /**
+     * Check if the value is array type.
+     *
+     * \return true if array
+     */
+    inline bool isArray() const noexcept
+    {
+        return m_type == Type::Array;
+    }
 
-	/**
-	 * Check if the value is integer or real type.
-	 *
-	 * \return true if integer or real
-	 * \see toInt
-	 * \see toReal
-	 */
-	inline bool isNumber() const noexcept
-	{
-		return m_type == Type::Real || m_type == Type::Int;
-	}
+    /**
+     * Check if the value is integer or real type.
+     *
+     * \return true if integer or real
+     * \see toInt
+     * \see toReal
+     */
+    inline bool isNumber() const noexcept
+    {
+        return m_type == Type::Real || m_type == Type::Int;
+    }
 
-	/**
-	 * Check if the value is real type.
-	 *
-	 * \return true if real
-	 */
-	inline bool isReal() const noexcept
-	{
-		return m_type == Type::Real;
-	}
+    /**
+     * Check if the value is real type.
+     *
+     * \return true if real
+     */
+    inline bool isReal() const noexcept
+    {
+        return m_type == Type::Real;
+    }
 
-	/**
-	 * Check if the value is null type.
-	 *
-	 * \return true if null
-	 */
-	inline bool isNull() const noexcept
-	{
-		return m_type == Type::Null;
-	}
+    /**
+     * Check if the value is null type.
+     *
+     * \return true if null
+     */
+    inline bool isNull() const noexcept
+    {
+        return m_type == Type::Null;
+    }
 
-	/**
-	 * Check if the value is string type.
-	 *
-	 * \return true if string
-	 */
-	inline bool isString() const noexcept
-	{
-		return m_type == Type::String;
-	}
+    /**
+     * Check if the value is string type.
+     *
+     * \return true if string
+     */
+    inline bool isString() const noexcept
+    {
+        return m_type == Type::String;
+    }
 
-	/**
-	 * Get the array or object size.
-	 *
-	 * \pre must be an array or object
-	 * \return the size
-	 */
-	inline unsigned size() const noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Get the array or object size.
+     *
+     * \pre must be an array or object
+     * \return the size
+     */
+    inline unsigned size() const noexcept
+    {
+        assert(isArray() || isObject());
 
-		if (m_type == Type::Object)
-			return m_object.size();
+        if (m_type == Type::Object)
+            return m_object.size();
 
-		return m_array.size();
-	}
+        return m_array.size();
+    }
 
-	/**
-	 * Remove all the values.
-	 *
-	 * \pre must be an array or an object
-	 */
-	inline void clear() noexcept
-	{
-		assert(isArray() || isObject());
+    /**
+     * Remove all the values.
+     *
+     * \pre must be an array or an object
+     */
+    inline void clear() noexcept
+    {
+        assert(isArray() || isObject());
 
-		if (m_type == Type::Array)
-			m_array.clear();
-		else
-			m_object.clear();
-	}
+        if (m_type == Type::Array)
+            m_array.clear();
+        else
+            m_object.clear();
+    }
 
-	/*
-	 * Array functions.
-	 * ----------------------------------------------------------
-	 */
+    /*
+     * Array functions.
+     * ----------------------------------------------------------
+     */
 
-	/**
-	 * Get the value at the specified position or the defaultValue if position is out of bounds.
-	 *
-	 * \param position the position
-	 * \param defaultValue the value replacement
-	 * \return the value or defaultValue
-	 */
-	template <typename DefaultValue>
-	inline Value valueOr(unsigned position, DefaultValue &&defaultValue) const
-	{
-		if (m_type != Type::Array || position >= m_array.size())
-			return defaultValue;
+    /**
+     * Get the value at the specified position or the defaultValue if position is out of bounds.
+     *
+     * \param position the position
+     * \param defaultValue the value replacement
+     * \return the value or defaultValue
+     */
+    template <typename DefaultValue>
+    inline Value valueOr(unsigned position, DefaultValue &&defaultValue) const
+    {
+        if (m_type != Type::Array || position >= m_array.size())
+            return defaultValue;
 
-		return m_array[position];
-	}
+        return m_array[position];
+    }
 
-	/**
-	 * Overloaded function with type check.
-	 *
-	 * \param position the position
-	 * \param type the requested type
-	 * \param defaultValue the value replacement
-	 * \return the value or defaultValue
-	 */
-	template <typename DefaultValue>
-	inline Value valueOr(unsigned position, Type type, DefaultValue &&defaultValue) const
-	{
-		if (m_type != Type::Array || position >= m_array.size() || m_array[position].typeOf() != type)
-			return defaultValue;
+    /**
+     * Overloaded function with type check.
+     *
+     * \param position the position
+     * \param type the requested type
+     * \param defaultValue the value replacement
+     * \return the value or defaultValue
+     */
+    template <typename DefaultValue>
+    inline Value valueOr(unsigned position, Type type, DefaultValue &&defaultValue) const
+    {
+        if (m_type != Type::Array || position >= m_array.size() || m_array[position].typeOf() != type)
+            return defaultValue;
 
-		return m_array[position];
-	}
+        return m_array[position];
+    }
 
-	/**
-	 * Get a value at the specified index.
-	 *
-	 * \pre must be an array
-	 * \param position the position
-	 * \return the value
-	 * \throw std::out_of_range if out of bounds
-	 */
-	inline const Value &at(unsigned position) const
-	{
-		assert(isArray());
+    /**
+     * Get a value at the specified index.
+     *
+     * \pre must be an array
+     * \param position the position
+     * \return the value
+     * \throw std::out_of_range if out of bounds
+     */
+    inline const Value &at(unsigned position) const
+    {
+        assert(isArray());
 
-		return m_array.at(position);
-	}
+        return m_array.at(position);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array
-	 * \param position the position
-	 * \return the value
-	 * \throw std::out_of_range if out of bounds
-	 */
-	inline Value &at(unsigned position)
-	{
-		assert(isArray());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array
+     * \param position the position
+     * \return the value
+     * \throw std::out_of_range if out of bounds
+     */
+    inline Value &at(unsigned position)
+    {
+        assert(isArray());
 
-		return m_array.at(position);
-	}
+        return m_array.at(position);
+    }
 
-	/**
-	 * Get a value at the specified index.
-	 *
-	 * \pre must be an array
-	 * \pre position must be valid
-	 * \param position the position
-	 * \return the value
-	 */
-	inline const Value &operator[](unsigned position) const
-	{
-		assert(isArray());
-		assert(position < m_array.size());
+    /**
+     * Get a value at the specified index.
+     *
+     * \pre must be an array
+     * \pre position must be valid
+     * \param position the position
+     * \return the value
+     */
+    inline const Value &operator[](unsigned position) const
+    {
+        assert(isArray());
+        assert(position < m_array.size());
 
-		return m_array[position];
-	}
+        return m_array[position];
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array
-	 * \pre position must be valid
-	 * \param position the position
-	 * \return the value
-	 */
-	inline Value &operator[](unsigned position)
-	{
-		assert(isArray());
-		assert(position < m_array.size());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array
+     * \pre position must be valid
+     * \param position the position
+     * \return the value
+     */
+    inline Value &operator[](unsigned position)
+    {
+        assert(isArray());
+        assert(position < m_array.size());
 
-		return m_array[position];
-	}
+        return m_array[position];
+    }
 
-	/**
-	 * Push a value to the beginning of the array.
-	 *
-	 * \pre must be an array
-	 * \param value the value to push
-	 */
-	inline void push(const Value &value)
-	{
-		assert(isArray());
+    /**
+     * Push a value to the beginning of the array.
+     *
+     * \pre must be an array
+     * \param value the value to push
+     */
+    inline void push(const Value &value)
+    {
+        assert(isArray());
 
-		m_array.insert(m_array.begin(), value);
-	}
+        m_array.insert(m_array.begin(), value);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array
-	 * \param value the value to push
-	 */
-	inline void push(Value &&value)
-	{
-		assert(isArray());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array
+     * \param value the value to push
+     */
+    inline void push(Value &&value)
+    {
+        assert(isArray());
 
-		m_array.insert(m_array.begin(), std::move(value));
-	}
+        m_array.insert(m_array.begin(), std::move(value));
+    }
 
-	/**
-	 * Insert a value at the specified position.
-	 *
-	 * \pre must be an array
-	 * \pre position must be valid
-	 * \param position the position
-	 * \param value the value to push
-	 */
-	inline void insert(unsigned position, const Value &value)
-	{
-		assert(isArray());
-		assert(position <= m_array.size());
+    /**
+     * Insert a value at the specified position.
+     *
+     * \pre must be an array
+     * \pre position must be valid
+     * \param position the position
+     * \param value the value to push
+     */
+    inline void insert(unsigned position, const Value &value)
+    {
+        assert(isArray());
+        assert(position <= m_array.size());
 
-		m_array.insert(m_array.begin() + position, value);
-	}
+        m_array.insert(m_array.begin() + position, value);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array
-	 * \pre position must be valid
-	 * \param position the position
-	 * \param value the value to push
-	 */
-	inline void insert(unsigned position, Value &&value)
-	{
-		assert(isArray());
-		assert(position <= m_array.size());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array
+     * \pre position must be valid
+     * \param position the position
+     * \param value the value to push
+     */
+    inline void insert(unsigned position, Value &&value)
+    {
+        assert(isArray());
+        assert(position <= m_array.size());
 
-		m_array.insert(m_array.begin() + position, std::move(value));
-	}
+        m_array.insert(m_array.begin() + position, std::move(value));
+    }
 
-	/**
-	 * Add a new value to the end.
-	 *
-	 * \pre must be an array
-	 * \param value the value to append
-	 */
-	inline void append(const Value &value)
-	{
-		assert(isArray());
+    /**
+     * Add a new value to the end.
+     *
+     * \pre must be an array
+     * \param value the value to append
+     */
+    inline void append(const Value &value)
+    {
+        assert(isArray());
 
-		m_array.push_back(value);
-	}
+        m_array.push_back(value);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an array
-	 * \param value the value to append
-	 */
-	inline void append(Value &&value)
-	{
-		assert(isArray());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an array
+     * \param value the value to append
+     */
+    inline void append(Value &&value)
+    {
+        assert(isArray());
 
-		m_array.push_back(std::move(value));
-	}
+        m_array.push_back(std::move(value));
+    }
 
-	/**
-	 * Remove a value at the specified position.
-	 *
-	 * \pre must be an array
-	 * \pre position must be valid
-	 * \param position the position
-	 */
-	inline void erase(unsigned position)
-	{
-		assert(isArray());
-		assert(position < m_array.size());
+    /**
+     * Remove a value at the specified position.
+     *
+     * \pre must be an array
+     * \pre position must be valid
+     * \param position the position
+     */
+    inline void erase(unsigned position)
+    {
+        assert(isArray());
+        assert(position < m_array.size());
 
-		m_array.erase(m_array.begin() + position);
-	}
+        m_array.erase(m_array.begin() + position);
+    }
 
-	/*
-	 * Object functions.
-	 * ----------------------------------------------------------
-	 */
+    /*
+     * Object functions.
+     * ----------------------------------------------------------
+     */
 
-	/**
-	 * Get the value at the specified key or the defaultValue if key is absent.
-	 *
-	 * \param name the name
-	 * \param defaultValue the value replacement
-	 * \return the value or defaultValue
-	 */
-	template <typename DefaultValue>
-	Value valueOr(const std::string &name, DefaultValue &&defaultValue) const
-	{
-		if (m_type != Type::Object)
-			return defaultValue;
+    /**
+     * Get the value at the specified key or the defaultValue if key is absent.
+     *
+     * \param name the name
+     * \param defaultValue the value replacement
+     * \return the value or defaultValue
+     */
+    template <typename DefaultValue>
+    Value valueOr(const std::string &name, DefaultValue &&defaultValue) const
+    {
+        if (m_type != Type::Object)
+            return defaultValue;
 
-		auto it = m_object.find(name);
+        auto it = m_object.find(name);
 
-		if (it == m_object.end())
-			return defaultValue;
+        if (it == m_object.end())
+            return defaultValue;
 
-		return it->second;
-	}
+        return it->second;
+    }
 
-	/**
-	 * Overloaded function with type check.
-	 *
-	 * \param name the name
-	 * \param type the requested type
-	 * \param defaultValue the value replacement
-	 * \return the value or defaultValue
-	 */
-	template <typename DefaultValue>
-	Value valueOr(const std::string &name, Type type, DefaultValue &&defaultValue) const
-	{
-		if (m_type != Type::Object)
-			return defaultValue;
+    /**
+     * Overloaded function with type check.
+     *
+     * \param name the name
+     * \param type the requested type
+     * \param defaultValue the value replacement
+     * \return the value or defaultValue
+     */
+    template <typename DefaultValue>
+    Value valueOr(const std::string &name, Type type, DefaultValue &&defaultValue) const
+    {
+        if (m_type != Type::Object)
+            return defaultValue;
 
-		auto it = m_object.find(name);
+        auto it = m_object.find(name);
 
-		if (it == m_object.end() || it->second.typeOf() != type)
-			return defaultValue;
+        if (it == m_object.end() || it->second.typeOf() != type)
+            return defaultValue;
 
-		return it->second;
-	}
+        return it->second;
+    }
 
-	/**
-	 * Get a value from the object.
-	 *
-	 * \pre must be an object
-	 * \param name the value key
-	 * \return the value
-	 * \throw std::out_of_range if not found
-	 */
-	inline const Value &at(const std::string &name) const
-	{
-		assert(isObject());
+    /**
+     * Get a value from the object.
+     *
+     * \pre must be an object
+     * \param name the value key
+     * \return the value
+     * \throw std::out_of_range if not found
+     */
+    inline const Value &at(const std::string &name) const
+    {
+        assert(isObject());
 
-		return m_object.at(name);
-	}
+        return m_object.at(name);
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an object
-	 * \param name the value key
-	 * \return the value
-	 * \throw std::out_of_range if not found
-	 */
-	inline Value &at(const std::string &name)
-	{
-		assert(isObject());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an object
+     * \param name the value key
+     * \return the value
+     * \throw std::out_of_range if not found
+     */
+    inline Value &at(const std::string &name)
+    {
+        assert(isObject());
 
-		return m_object.at(name);
-	}
+        return m_object.at(name);
+    }
 
-	/**
-	 * Get a value from the object.
-	 *
-	 * \pre must be an object
-	 * \param name the value key
-	 * \return the value
-	 */
-	inline Value &operator[](const std::string &name)
-	{
-		assert(isObject());
+    /**
+     * Get a value from the object.
+     *
+     * \pre must be an object
+     * \param name the value key
+     * \return the value
+     */
+    inline Value &operator[](const std::string &name)
+    {
+        assert(isObject());
 
-		return m_object[name];
-	}
+        return m_object[name];
+    }
 
-	/**
-	 * Find a value by key.
-	 *
-	 * \pre must be an object
-	 * \param key the property key
-	 * \return the iterator or past the end if not found
-	 */
-	inline iterator find(const std::string &key)
-	{
-		assert(isObject());
+    /**
+     * Find a value by key.
+     *
+     * \pre must be an object
+     * \param key the property key
+     * \return the iterator or past the end if not found
+     */
+    inline iterator find(const std::string &key)
+    {
+        assert(isObject());
 
-		return iterator(this, m_object.find(key));
-	}
+        return iterator(this, m_object.find(key));
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an object
-	 * \param key the property key
-	 * \return the iterator or past the end if not found
-	 */
-	inline const_iterator find(const std::string &key) const
-	{
-		assert(isObject());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an object
+     * \param key the property key
+     * \return the iterator or past the end if not found
+     */
+    inline const_iterator find(const std::string &key) const
+    {
+        assert(isObject());
 
-		return const_iterator(this, m_object.find(key));
-	}
+        return const_iterator(this, m_object.find(key));
+    }
 
-	/**
-	 * Insert a new value.
-	 *
-	 * \pre must be an object
-	 * \param name the key
-	 * \param value the value
-	 */
-	inline void insert(std::string name, const Value &value)
-	{
-		assert(isObject());
+    /**
+     * Insert a new value.
+     *
+     * \pre must be an object
+     * \param name the key
+     * \param value the value
+     */
+    inline void insert(std::string name, const Value &value)
+    {
+        assert(isObject());
 
-		m_object.insert({std::move(name), value});
-	}
+        m_object.insert({std::move(name), value});
+    }
 
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre must be an object
-	 * \param name the key
-	 * \param value the value
-	 */
-	inline void insert(std::string name, Value &&value)
-	{
-		assert(isObject());
+    /**
+     * Overloaded function.
+     *
+     * \pre must be an object
+     * \param name the key
+     * \param value the value
+     */
+    inline void insert(std::string name, Value &&value)
+    {
+        assert(isObject());
 
-		m_object.insert({std::move(name), std::move(value)});
-	}
+        m_object.insert({std::move(name), std::move(value)});
+    }
 
-	/**
-	 * Check if a value exists.
-	 *
-	 * \pre must be an object
-	 * \param key the key value
-	 * \return true if exists
-	 */
-	inline bool contains(const std::string &key) const noexcept
-	{
-		assert(isObject());
+    /**
+     * Check if a value exists.
+     *
+     * \pre must be an object
+     * \param key the key value
+     * \return true if exists
+     */
+    inline bool contains(const std::string &key) const noexcept
+    {
+        assert(isObject());
 
-		return m_object.find(key) != m_object.end();
-	}
+        return m_object.find(key) != m_object.end();
+    }
 
-	/**
-	 * Remove a value of the specified key.
-	 *
-	 * \pre must be an object
-	 * \param key the value key
-	 */
-	inline void erase(const std::string &key)
-	{
-		assert(isObject());
+    /**
+     * Remove a value of the specified key.
+     *
+     * \pre must be an object
+     * \param key the value key
+     */
+    inline void erase(const std::string &key)
+    {
+        assert(isObject());
 
-		m_object.erase(key);
-	}
+        m_object.erase(key);
+    }
 
-	/**
-	 * Return this value as JSon representation.
-	 *
-	 * \param indent the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces)
-	 * \return the string
-	 */
-	inline std::string toJson(int indent = 2) const
-	{
-		return toJson(indent, 0);
-	}
+    /**
+     * Return this value as JSon representation.
+     *
+     * \param indent the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces)
+     * \return the string
+     */
+    inline std::string toJson(int indent = 2) const
+    {
+        return toJson(indent, 0);
+    }
 };
 
 /**
@@ -1177,7 +1177,7 @@
  */
 inline Value array()
 {
-	return Value(Type::Array);
+    return Value(Type::Array);
 }
 
 /**
@@ -1188,7 +1188,7 @@
  */
 inline Value array(std::initializer_list<Value> values)
 {
-	return Value(std::vector<Value>(values.begin(), values.end()));
+    return Value(std::vector<Value>(values.begin(), values.end()));
 }
 
 /**
@@ -1198,7 +1198,7 @@
  */
 inline Value object()
 {
-	return Value(Type::Object);
+    return Value(Type::Object);
 }
 
 /**
@@ -1209,7 +1209,7 @@
  */
 inline Value object(std::initializer_list<std::pair<std::string, Value>> values)
 {
-	return Value(std::map<std::string, Value>(values.begin(), values.end()));
+    return Value(std::map<std::string, Value>(values.begin(), values.end()));
 }
 
 /**
--- a/lib/irccd/logger.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/logger.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -57,74 +57,74 @@
 
 class Buffer : public std::stringbuf {
 public:
-	enum Level {
-		Debug,
-		Info,
-		Warning
-	};
+    enum Level {
+        Debug,
+        Info,
+        Warning
+    };
 
 private:
-	Level m_level;
+    Level m_level;
 
-	void debug(std::string line)
-	{
-		// Print only in debug mode, the buffer is flushed anyway.
+    void debug(std::string line)
+    {
+        // Print only in debug mode, the buffer is flushed anyway.
 #if !defined(NDEBUG)
-		iface->debug(filter->preDebug(std::move(line)));
+        iface->debug(filter->preDebug(std::move(line)));
 #else
-		(void)line;
+        (void)line;
 #endif
-	}
+    }
 
-	void info(std::string line)
-	{
-		// Print only if verbose, the buffer will be flushed anyway.
-		if (verbose)
-			iface->info(filter->preInfo(std::move(line)));
-	}
+    void info(std::string line)
+    {
+        // Print only if verbose, the buffer will be flushed anyway.
+        if (verbose)
+            iface->info(filter->preInfo(std::move(line)));
+    }
 
-	void warning(std::string line)
-	{
-		iface->warning(filter->preWarning(std::move(line)));
-	}
+    void warning(std::string line)
+    {
+        iface->warning(filter->preWarning(std::move(line)));
+    }
 
 public:
-	inline Buffer(Level level) noexcept
-		: m_level(level)
-	{
-		assert(level >= Debug && level <= Warning);
-	}
+    inline Buffer(Level level) noexcept
+        : m_level(level)
+    {
+        assert(level >= Debug && level <= Warning);
+    }
 
-	virtual int sync() override
-	{
-		std::string buffer = str();
-		std::string::size_type pos;
+    virtual int sync() override
+    {
+        std::string buffer = str();
+        std::string::size_type pos;
 
-		while ((pos = buffer.find("\n")) != std::string::npos) {
-			std::string line = buffer.substr(0, pos);
+        while ((pos = buffer.find("\n")) != std::string::npos) {
+            std::string line = buffer.substr(0, pos);
 
-			// Remove this line.
-			buffer.erase(buffer.begin(), buffer.begin() + pos + 1);
+            // Remove this line.
+            buffer.erase(buffer.begin(), buffer.begin() + pos + 1);
 
-			switch (m_level) {
-			case Level::Debug:
-				debug(std::move(line));
-				break;
-			case Level::Info:
-				info(std::move(line));
-				break;
-			case Level::Warning:
-				warning(std::move(line));
-				break;
-			default:
-				break;
-			}
-		}
+            switch (m_level) {
+            case Level::Debug:
+                debug(std::move(line));
+                break;
+            case Level::Info:
+                info(std::move(line));
+                break;
+            case Level::Warning:
+                warning(std::move(line));
+                break;
+            default:
+                break;
+            }
+        }
 
-		str(buffer);
+        str(buffer);
 
-		return 0;
-	}
+        return 0;
+    }
 };
 
 /*
@@ -151,17 +151,17 @@
 
 void Console::info(const std::string &line)
 {
-	std::cout << line << std::endl;
+    std::cout << line << std::endl;
 }
 
 void Console::warning(const std::string &line)
 {
-	std::cerr << line << std::endl;
+    std::cerr << line << std::endl;
 }
 
 void Console::debug(const std::string &line)
 {
-	std::cout << line << std::endl;
+    std::cout << line << std::endl;
 }
 
 /*
@@ -170,24 +170,24 @@
  */
 
 File::File(std::string normal, std::string errors)
-	: m_outputNormal(std::move(normal))
-	, m_outputError(std::move(errors))
+    : m_outputNormal(std::move(normal))
+    , m_outputError(std::move(errors))
 {
 }
 
 void File::info(const std::string &line)
 {
-	std::ofstream(m_outputNormal, std::ofstream::out | std::ofstream::app) << line << std::endl;
+    std::ofstream(m_outputNormal, std::ofstream::out | std::ofstream::app) << line << std::endl;
 }
 
 void File::warning(const std::string &line)
 {
-	std::ofstream(m_outputError, std::ofstream::out | std::ofstream::app) << line << std::endl;
+    std::ofstream(m_outputError, std::ofstream::out | std::ofstream::app) << line << std::endl;
 }
 
 void File::debug(const std::string &line)
 {
-	std::ofstream(m_outputNormal, std::ofstream::out | std::ofstream::app) << line << std::endl;
+    std::ofstream(m_outputNormal, std::ofstream::out | std::ofstream::app) << line << std::endl;
 }
 
 /*
@@ -216,27 +216,27 @@
 
 Syslog::Syslog()
 {
-	openlog(sys::programName().c_str(), LOG_PID, LOG_DAEMON);
+    openlog(sys::programName().c_str(), LOG_PID, LOG_DAEMON);
 }
 
 Syslog::~Syslog()
 {
-	closelog();
+    closelog();
 }
 
 void Syslog::info(const std::string &line)
 {
-	syslog(LOG_INFO | LOG_USER, "%s", line.c_str());
+    syslog(LOG_INFO | LOG_USER, "%s", line.c_str());
 }
 
 void Syslog::warning(const std::string &line)
 {
-	syslog(LOG_WARNING | LOG_USER, "%s", line.c_str());
+    syslog(LOG_WARNING | LOG_USER, "%s", line.c_str());
 }
 
 void Syslog::debug(const std::string &line)
 {
-	syslog(LOG_DEBUG | LOG_USER, "%s", line.c_str());
+    syslog(LOG_DEBUG | LOG_USER, "%s", line.c_str());
 }
 
 #endif // !HAVE_SYSLOG
@@ -248,50 +248,50 @@
 
 void setInterface(std::unique_ptr<Interface> newiface) noexcept
 {
-	assert(newiface);
+    assert(newiface);
 
-	iface = std::move(newiface);
+    iface = std::move(newiface);
 }
 
 void setFilter(std::unique_ptr<Filter> newfilter) noexcept
 {
-	assert(filter);
+    assert(filter);
 
-	filter = std::move(newfilter);
+    filter = std::move(newfilter);
 }
 
 std::ostream &info(const std::string &message)
 {
-	if (!message.empty())
-		streamInfo << message << std::endl;
+    if (!message.empty())
+        streamInfo << message << std::endl;
 
-	return streamInfo;
+    return streamInfo;
 }
 
 std::ostream &warning(const std::string &message)
 {
-	if (!message.empty())
-		streamWarning << message << std::endl;
+    if (!message.empty())
+        streamWarning << message << std::endl;
 
-	return streamWarning;
+    return streamWarning;
 }
 
 std::ostream &debug(const std::string &message)
 {
-	if (!message.empty())
-		streamDebug << message << std::endl;
+    if (!message.empty())
+        streamDebug << message << std::endl;
 
-	return streamDebug;
+    return streamDebug;
 }
 
 bool isVerbose() noexcept
 {
-	return verbose;
+    return verbose;
 }
 
 void setVerbose(bool mode) noexcept
 {
-	verbose = mode;
+    verbose = mode;
 }
 
 } // !log
--- a/lib/irccd/logger.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/logger.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -51,45 +51,45 @@
  */
 class Interface {
 public:
-	/**
-	 * Default constructor.
-	 */
-	Interface() = default;
+    /**
+     * Default constructor.
+     */
+    Interface() = default;
 
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~Interface() = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~Interface() = default;
 
-	/**
-	 * Write a debug message.
-	 *
-	 * This function is called only if NDEBUG is not defined.
-	 *
-	 * \param line the data
-	 * \see log::debug
-	 */
-	virtual void debug(const std::string &line) = 0;
+    /**
+     * Write a debug message.
+     *
+     * This function is called only if NDEBUG is not defined.
+     *
+     * \param line the data
+     * \see log::debug
+     */
+    virtual void debug(const std::string &line) = 0;
 
-	/**
-	 * Write a information message.
-	 *
-	 * The function is called only if verbose is true.
-	 *
-	 * \param line the data
-	 * \see log::info
-	 */
-	virtual void info(const std::string &line) = 0;
+    /**
+     * Write a information message.
+     *
+     * The function is called only if verbose is true.
+     *
+     * \param line the data
+     * \see log::info
+     */
+    virtual void info(const std::string &line) = 0;
 
-	/**
-	 * Write an error message.
-	 *
-	 * This function is always called.
-	 *
-	 * \param line the data
-	 * \see log::warning
-	 */
-	virtual void warning(const std::string &line) = 0;
+    /**
+     * Write an error message.
+     *
+     * This function is always called.
+     *
+     * \param line the data
+     * \see log::warning
+     */
+    virtual void warning(const std::string &line) = 0;
 };
 
 /*
@@ -104,48 +104,48 @@
  */
 class Filter {
 public:
-	/**
-	 * Default constructor.
-	 */
-	Filter() = default;
+    /**
+     * Default constructor.
+     */
+    Filter() = default;
 
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~Filter() = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~Filter() = default;
 
-	/**
-	 * Update the debug message.
-	 *
-	 * \param input the message
-	 * \return the updated message
-	 */
-	virtual std::string preDebug(std::string input) const
-	{
-		return input;
-	}
+    /**
+     * Update the debug message.
+     *
+     * \param input the message
+     * \return the updated message
+     */
+    virtual std::string preDebug(std::string input) const
+    {
+        return input;
+    }
 
-	/**
-	 * Update the information message.
-	 *
-	 * \param input the message
-	 * \return the updated message
-	 */
-	virtual std::string preInfo(std::string input) const
-	{
-		return input;
-	}
+    /**
+     * Update the information message.
+     *
+     * \param input the message
+     * \return the updated message
+     */
+    virtual std::string preInfo(std::string input) const
+    {
+        return input;
+    }
 
-	/**
-	 * Update the warning message.
-	 *
-	 * \param input the message
-	 * \return the updated message
-	 */
-	virtual std::string preWarning(std::string input) const
-	{
-		return input;
-	}
+    /**
+     * Update the warning message.
+     *
+     * \param input the message
+     * \return the updated message
+     */
+    virtual std::string preWarning(std::string input) const
+    {
+        return input;
+    }
 };
 
 /*
@@ -158,20 +158,20 @@
  */
 class Console : public Interface {
 public:
-	/**
-	 * \copydoc Interface::debug
-	 */
-	IRCCD_EXPORT void debug(const std::string &line) override;
+    /**
+     * \copydoc Interface::debug
+     */
+    IRCCD_EXPORT void debug(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::info
-	 */
-	IRCCD_EXPORT void info(const std::string &line) override;
+    /**
+     * \copydoc Interface::info
+     */
+    IRCCD_EXPORT void info(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::warning
-	 */
-	IRCCD_EXPORT void warning(const std::string &line) override;
+    /**
+     * \copydoc Interface::warning
+     */
+    IRCCD_EXPORT void warning(const std::string &line) override;
 };
 
 /*
@@ -184,32 +184,32 @@
  */
 class File : public Interface {
 private:
-	std::string m_outputNormal;
-	std::string m_outputError;
+    std::string m_outputNormal;
+    std::string m_outputError;
 
 public:
-	/**
-	 * Outputs to files.
-	 *
-	 * \param normal the path to the normal logs
-	 * \param errors the path to the errors logs
-	 */
-	IRCCD_EXPORT File(std::string normal, std::string errors);
+    /**
+     * Outputs to files.
+     *
+     * \param normal the path to the normal logs
+     * \param errors the path to the errors logs
+     */
+    IRCCD_EXPORT File(std::string normal, std::string errors);
 
-	/**
-	 * \copydoc Interface::debug
-	 */
-	IRCCD_EXPORT void debug(const std::string &line) override;
+    /**
+     * \copydoc Interface::debug
+     */
+    IRCCD_EXPORT void debug(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::info
-	 */
-	IRCCD_EXPORT void info(const std::string &line) override;
+    /**
+     * \copydoc Interface::info
+     */
+    IRCCD_EXPORT void info(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::warning
-	 */
-	IRCCD_EXPORT void warning(const std::string &line) override;
+    /**
+     * \copydoc Interface::warning
+     */
+    IRCCD_EXPORT void warning(const std::string &line) override;
 };
 
 /*
@@ -224,20 +224,20 @@
  */
 class Silent : public Interface {
 public:
-	/**
-	 * \copydoc Interface::debug
-	 */
-	IRCCD_EXPORT void debug(const std::string &line) override;
+    /**
+     * \copydoc Interface::debug
+     */
+    IRCCD_EXPORT void debug(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::info
-	 */
-	IRCCD_EXPORT void info(const std::string &line) override;
+    /**
+     * \copydoc Interface::info
+     */
+    IRCCD_EXPORT void info(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::warning
-	 */
-	IRCCD_EXPORT void warning(const std::string &line) override;
+    /**
+     * \copydoc Interface::warning
+     */
+    IRCCD_EXPORT void warning(const std::string &line) override;
 };
 
 /*
@@ -252,30 +252,30 @@
  */
 class Syslog : public Interface {
 public:
-	/**
-	 * Open the syslog.
-	 */
-	IRCCD_EXPORT Syslog();
+    /**
+     * Open the syslog.
+     */
+    IRCCD_EXPORT Syslog();
 
-	/**
-	 * Close the syslog.
-	 */
-	IRCCD_EXPORT ~Syslog();
+    /**
+     * Close the syslog.
+     */
+    IRCCD_EXPORT ~Syslog();
 
-	/**
-	 * \copydoc Interface::debug
-	 */
-	IRCCD_EXPORT void debug(const std::string &line) override;
+    /**
+     * \copydoc Interface::debug
+     */
+    IRCCD_EXPORT void debug(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::info
-	 */
-	IRCCD_EXPORT void info(const std::string &line) override;
+    /**
+     * \copydoc Interface::info
+     */
+    IRCCD_EXPORT void info(const std::string &line) override;
 
-	/**
-	 * \copydoc Interface::warning
-	 */
-	IRCCD_EXPORT void warning(const std::string &line) override;
+    /**
+     * \copydoc Interface::warning
+     */
+    IRCCD_EXPORT void warning(const std::string &line) override;
 };
 
 #endif // !HAVE_SYSLOG
--- a/lib/irccd/mod-directory.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-directory.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -38,20 +38,20 @@
 
 std::string path(duk_context *ctx)
 {
-	duk_push_this(ctx);
-	duk_get_prop_string(ctx, -1, "path");
+    duk_push_this(ctx);
+    duk_get_prop_string(ctx, -1, "path");
 
-	if (duk_get_type(ctx, -1) != DUK_TYPE_STRING)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Directory object");
+    if (duk_get_type(ctx, -1) != DUK_TYPE_STRING)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Directory object");
 
-	auto ret = dukx_get_std_string(ctx, -1);
+    auto ret = dukx_get_std_string(ctx, -1);
 
-	if (ret.empty())
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "directory object has empty path");
+    if (ret.empty())
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "directory object has empty path");
 
-	duk_pop_n(ctx, 2);
+    duk_pop_n(ctx, 2);
 
-	return ret;
+    return ret;
 }
 
 /*
@@ -65,31 +65,31 @@
 template <typename Pred>
 std::string findPath(const std::string &base, bool recursive, Pred pred)
 {
-	/*
-	 * For performance reason, we first iterate over all entries that are
-	 * not directories to avoid going deeper recursively if the requested
-	 * file is in the current directory.
-	 */
-	auto entries = fs::readdir(base);
+    /*
+     * For performance reason, we first iterate over all entries that are
+     * not directories to avoid going deeper recursively if the requested
+     * file is in the current directory.
+     */
+    auto entries = fs::readdir(base);
 
-	for (const auto &entry : entries)
-		if (entry.type != fs::Entry::Dir && pred(entry.name))
-			return base + entry.name;
+    for (const auto &entry : entries)
+        if (entry.type != fs::Entry::Dir && pred(entry.name))
+            return base + entry.name;
 
-	if (!recursive)
-		return "";
+    if (!recursive)
+        return "";
 
-	for (const auto &entry : entries) {
-		if (entry.type == fs::Entry::Dir) {
-			std::string next = base + entry.name + fs::separator();
-			std::string path = findPath(next, true, pred);
+    for (const auto &entry : entries) {
+        if (entry.type == fs::Entry::Dir) {
+            std::string next = base + entry.name + fs::separator();
+            std::string path = findPath(next, true, pred);
 
-			if (!path.empty())
-				return path;
-		}
-	}
+            if (!path.empty())
+                return path;
+        }
+    }
 
-	return "";
+    return "";
 }
 
 /*
@@ -97,9 +97,9 @@
  */
 std::string findName(std::string base, const std::string &pattern, bool recursive)
 {
-	return findPath(base, recursive, [&] (const std::string &entryname) -> bool {
-		return pattern == entryname;
-	});
+    return findPath(base, recursive, [&] (const std::string &entryname) -> bool {
+        return pattern == entryname;
+    });
 }
 
 /*
@@ -107,12 +107,12 @@
  */
 std::string findRegex(const std::string &base, std::string pattern, bool recursive)
 {
-	std::regex regexp(pattern, std::regex::ECMAScript);
-	std::smatch smatch;
+    std::regex regexp(pattern, std::regex::ECMAScript);
+    std::smatch smatch;
 
-	return findPath(base, recursive, [&] (const std::string &entryname) -> bool {
-		return std::regex_match(entryname, smatch, regexp);
-	});
+    return findPath(base, recursive, [&] (const std::string &entryname) -> bool {
+        return std::regex_match(entryname, smatch, regexp);
+    });
 }
 
 /*
@@ -125,38 +125,38 @@
  */
 duk_ret_t find(duk_context *ctx, std::string base, bool recursive, int patternIndex)
 {
-	base = path::clean(base);
+    base = path::clean(base);
 
-	try {
-		std::string path;
+    try {
+        std::string path;
 
-		if (duk_is_string(ctx, patternIndex))
-			path = findName(base, duk_get_string(ctx, patternIndex), recursive);
-		else {
-			// Check if it's a valid RegExp object.
-			duk_get_global_string(ctx, "RegExp");
-			auto isRegex = duk_instanceof(ctx, patternIndex, -1);
-			duk_pop(ctx);
+        if (duk_is_string(ctx, patternIndex))
+            path = findName(base, duk_get_string(ctx, patternIndex), recursive);
+        else {
+            // Check if it's a valid RegExp object.
+            duk_get_global_string(ctx, "RegExp");
+            auto isRegex = duk_instanceof(ctx, patternIndex, -1);
+            duk_pop(ctx);
 
-			if (isRegex) {
-				duk_get_prop_string(ctx, patternIndex, "source");
-				auto pattern = duk_to_string(ctx, -1);
-				duk_pop(ctx);
+            if (isRegex) {
+                duk_get_prop_string(ctx, patternIndex, "source");
+                auto pattern = duk_to_string(ctx, -1);
+                duk_pop(ctx);
 
-				path = findRegex(base, pattern, recursive);
-			} else
-				duk_error(ctx, DUK_ERR_TYPE_ERROR, "pattern must be a string or a regex expression");
-		}
+                path = findRegex(base, pattern, recursive);
+            } else
+                duk_error(ctx, DUK_ERR_TYPE_ERROR, "pattern must be a string or a regex expression");
+        }
 
-		if (path.empty())
-			return 0;
+        if (path.empty())
+            return 0;
 
-		dukx_push_std_string(ctx, path);
-	} catch (const std::exception &ex) {
-		duk_error(ctx, DUK_ERR_ERROR, "%s", ex.what());
-	}
+        dukx_push_std_string(ctx, path);
+    } catch (const std::exception &ex) {
+        duk_error(ctx, DUK_ERR_ERROR, "%s", ex.what());
+    }
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -167,19 +167,19 @@
  */
 duk_ret_t remove(duk_context *ctx, const std::string &path, bool recursive)
 {
-	if (!fs::isDirectory(path))
-		dukx_throw(ctx, SystemError(EINVAL, "not a directory"));
+    if (!fs::isDirectory(path))
+        dukx_throw(ctx, SystemError(EINVAL, "not a directory"));
 
-	if (!recursive) {
+    if (!recursive) {
 #if defined(_WIN32)
-		::RemoveDirectory(path.c_str());
+        ::RemoveDirectory(path.c_str());
 #else
-		::remove(path.c_str());
+        ::remove(path.c_str());
 #endif
-	} else
-		fs::rmdir(path.c_str());
+    } else
+        fs::rmdir(path.c_str());
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -199,7 +199,7 @@
  */
 duk_ret_t methodFind(duk_context *ctx)
 {
-	return find(ctx, path(ctx), duk_get_boolean(ctx, 1), 0);
+    return find(ctx, path(ctx), duk_get_boolean(ctx, 1), 0);
 }
 
 /*
@@ -216,13 +216,13 @@
  */
 duk_ret_t methodRemove(duk_context *ctx)
 {
-	return remove(ctx, path(ctx), duk_get_boolean(ctx, 0));
+    return remove(ctx, path(ctx), duk_get_boolean(ctx, 0));
 }
 
 const duk_function_list_entry methods[] = {
-	{ "find",	methodFind,	DUK_VARARGS	},
-	{ "remove",	methodRemove,	1		},
-	{ nullptr,	nullptr,	0		} 
+    { "find",       methodFind,     DUK_VARARGS },
+    { "remove",     methodRemove,   1           },
+    { nullptr,      nullptr,        0           }
 };
 
 /*
@@ -244,43 +244,43 @@
  */
 duk_ret_t constructor(duk_context *ctx)
 {
-	if (!duk_is_constructor_call(ctx))
-		return 0;
+    if (!duk_is_constructor_call(ctx))
+        return 0;
 
-	try {
-		std::string path = duk_require_string(ctx, 0);
-		std::int8_t flags = duk_get_uint(ctx, 1);
+    try {
+        std::string path = duk_require_string(ctx, 0);
+        std::int8_t flags = duk_get_uint(ctx, 1);
 
-		if (!fs::isDirectory(path))
-			dukx_throw(ctx, SystemError(EINVAL, "not a directory"));
+        if (!fs::isDirectory(path))
+            dukx_throw(ctx, SystemError(EINVAL, "not a directory"));
 
-		std::vector<fs::Entry> list = fs::readdir(path, flags);
+        std::vector<fs::Entry> list = fs::readdir(path, flags);
 
-		duk_push_this(ctx);
-		duk_push_string(ctx, "count");
-		duk_push_int(ctx, list.size());
-		duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
-		duk_push_string(ctx, "path");
-		dukx_push_std_string(ctx, path);
-		duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
-		duk_push_string(ctx, "entries");
-		duk_push_array(ctx);
+        duk_push_this(ctx);
+        duk_push_string(ctx, "count");
+        duk_push_int(ctx, list.size());
+        duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
+        duk_push_string(ctx, "path");
+        dukx_push_std_string(ctx, path);
+        duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
+        duk_push_string(ctx, "entries");
+        duk_push_array(ctx);
 
-		for (unsigned i = 0; i < list.size(); ++i) {
-			duk_push_object(ctx);
-			dukx_push_std_string(ctx, list[i].name);
-			duk_put_prop_string(ctx, -2, "name");
-			duk_push_int(ctx, list[i].type);
-			duk_put_prop_string(ctx, -2, "type");
-			duk_put_prop_index(ctx, -2, i);
-		}
+        for (unsigned i = 0; i < list.size(); ++i) {
+            duk_push_object(ctx);
+            dukx_push_std_string(ctx, list[i].name);
+            duk_put_prop_string(ctx, -2, "name");
+            duk_push_int(ctx, list[i].type);
+            duk_put_prop_string(ctx, -2, "type");
+            duk_put_prop_index(ctx, -2, i);
+        }
 
-		duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
-	} catch (const std::exception &ex) {
-		dukx_throw(ctx, SystemError(errno, ex.what()));
-	}
+        duk_def_prop(ctx, -3, DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_HAVE_VALUE);
+    } catch (const std::exception &ex) {
+        dukx_throw(ctx, SystemError(errno, ex.what()));
+    }
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -298,7 +298,7 @@
  */
 duk_ret_t funcFind(duk_context *ctx)
 {
-	return find(ctx, duk_require_string(ctx, 0), duk_get_boolean(ctx, 2), 1);
+    return find(ctx, duk_require_string(ctx, 0), duk_get_boolean(ctx, 2), 1);
 }
 
 /*
@@ -315,7 +315,7 @@
  */
 duk_ret_t funcRemove(duk_context *ctx)
 {
-	return remove(ctx, duk_require_string(ctx, 0), duk_get_boolean(ctx, 1));
+    return remove(ctx, duk_require_string(ctx, 0), duk_get_boolean(ctx, 1));
 }
 
 /*
@@ -333,57 +333,57 @@
  */
 duk_ret_t funcMkdir(duk_context *ctx)
 {
-	try {
-		fs::mkdir(
-			duk_require_string(ctx, 0),
-			duk_is_number(ctx, 1) ? duk_get_int(ctx, 1) : 0700
-		);
-	} catch (const std::exception &ex) {
-		dukx_throw(ctx, SystemError(errno, ex.what()));
-	}
+    try {
+        fs::mkdir(
+            duk_require_string(ctx, 0),
+            duk_is_number(ctx, 1) ? duk_get_int(ctx, 1) : 0700
+        );
+    } catch (const std::exception &ex) {
+        dukx_throw(ctx, SystemError(errno, ex.what()));
+    }
 
-	return 0;
+    return 0;
 }
 
 const duk_function_list_entry functions[] = {
-	{ "find",		funcFind,		DUK_VARARGS	},
-	{ "mkdir",		funcMkdir,		DUK_VARARGS	},
-	{ "remove",		funcRemove,		DUK_VARARGS	},
-	{ nullptr,		nullptr,		0		}
+    { "find",           funcFind,   DUK_VARARGS },
+    { "mkdir",          funcMkdir,  DUK_VARARGS },
+    { "remove",         funcRemove, DUK_VARARGS },
+    { nullptr,          nullptr,    0           }
 };
 
 const duk_number_list_entry constants[] = {
-	{ "Dot",		static_cast<int>(fs::Dot)		},
-	{ "DotDot",		static_cast<int>(fs::DotDot)		},
-	{ "TypeUnknown",	static_cast<int>(fs::Entry::Unknown)	},
-	{ "TypeDir",		static_cast<int>(fs::Entry::Dir)	},
-	{ "TypeFile",		static_cast<int>(fs::Entry::File)	},
-	{ "TypeLink",		static_cast<int>(fs::Entry::Link)	},
-	{ nullptr,		0					}
+    { "Dot",            static_cast<int>(fs::Dot)               },
+    { "DotDot",         static_cast<int>(fs::DotDot)            },
+    { "TypeUnknown",    static_cast<int>(fs::Entry::Unknown)    },
+    { "TypeDir",        static_cast<int>(fs::Entry::Dir)        },
+    { "TypeFile",       static_cast<int>(fs::Entry::File)       },
+    { "TypeLink",       static_cast<int>(fs::Entry::Link)       },
+    { nullptr,          0                                       }
 };
 
 } // !namespace
 
 DirectoryModule::DirectoryModule() noexcept
-	: Module("Irccd.Directory")
+    : Module("Irccd.Directory")
 {
 }
 
 void DirectoryModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_c_function(plugin->context(), constructor, 2);
-	duk_put_number_list(plugin->context(), -1, constants);
-	duk_put_function_list(plugin->context(), -1, functions);
-	dukx_push_std_string(plugin->context(), std::string{fs::separator()});
-	duk_put_prop_string(plugin->context(), -2, "separator");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, methods);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "Directory");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_c_function(plugin->context(), constructor, 2);
+    duk_put_number_list(plugin->context(), -1, constants);
+    duk_put_function_list(plugin->context(), -1, functions);
+    dukx_push_std_string(plugin->context(), std::string{fs::separator()});
+    duk_put_prop_string(plugin->context(), -2, "separator");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, methods);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "Directory");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-directory.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-directory.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,15 +36,15 @@
  */
 class DirectoryModule : public Module {
 public:
-	/**
-	 * Irccd.Directory.
-	 */
-	IRCCD_EXPORT DirectoryModule() noexcept;
+    /**
+     * Irccd.Directory.
+     */
+    IRCCD_EXPORT DirectoryModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-elapsed-timer.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-elapsed-timer.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -28,17 +28,17 @@
 
 ElapsedTimer *self(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_push_this(ctx);
-	duk_get_prop_string(ctx, -1, Signature);
-	auto ptr = static_cast<ElapsedTimer *>(duk_to_pointer(ctx, -1));
-	duk_pop_2(ctx);
+    duk_push_this(ctx);
+    duk_get_prop_string(ctx, -1, Signature);
+    auto ptr = static_cast<ElapsedTimer *>(duk_to_pointer(ctx, -1));
+    duk_pop_2(ctx);
 
-	if (!ptr)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not an ElapsedTimer object");
+    if (!ptr)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not an ElapsedTimer object");
 
-	return ptr;
+    return ptr;
 }
 
 /*
@@ -49,9 +49,9 @@
  */
 duk_ret_t pause(duk_context *ctx)
 {
-	self(ctx)->pause();
+    self(ctx)->pause();
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -62,9 +62,9 @@
  */
 duk_ret_t reset(duk_context *ctx)
 {
-	self(ctx)->reset();
+    self(ctx)->reset();
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -75,9 +75,9 @@
  */
 duk_ret_t restart(duk_context *ctx)
 {
-	self(ctx)->restart();
+    self(ctx)->restart();
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -91,9 +91,9 @@
  */
 duk_ret_t elapsed(duk_context *ctx)
 {
-	duk_push_uint(ctx, self(ctx)->elapsed());
+    duk_push_uint(ctx, self(ctx)->elapsed());
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -104,12 +104,12 @@
  */
 duk_ret_t constructor(duk_context *ctx)
 {
-	duk_push_this(ctx);
-	duk_push_pointer(ctx, new ElapsedTimer);
-	duk_put_prop_string(ctx, -2, Signature);
-	duk_pop(ctx);
+    duk_push_this(ctx);
+    duk_push_pointer(ctx, new ElapsedTimer);
+    duk_put_prop_string(ctx, -2, Signature);
+    duk_pop(ctx);
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -120,42 +120,42 @@
  */
 duk_ret_t destructor(duk_context *ctx)
 {
-	duk_get_prop_string(ctx, 0, Signature);
-	delete static_cast<ElapsedTimer *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
-	duk_del_prop_string(ctx, 0, Signature);
+    duk_get_prop_string(ctx, 0, Signature);
+    delete static_cast<ElapsedTimer *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
+    duk_del_prop_string(ctx, 0, Signature);
 
-	return 0;
+    return 0;
 }
 
 const duk_function_list_entry methods[] = {
-	{ "elapsed",	elapsed,	0 },
-	{ "pause",	pause,		0 },
-	{ "reset",	reset,		0 },
-	{ "restart",	restart,	0 },
-	{ nullptr,	nullptr,	0 }
+    { "elapsed",    elapsed,    0 },
+    { "pause",      pause,      0 },
+    { "reset",      reset,      0 },
+    { "restart",    restart,    0 },
+    { nullptr,      nullptr,    0 }
 };
 
 } // !namespace
 
 ElapsedTimerModule::ElapsedTimerModule() noexcept
-	: Module("Irccd.ElapsedTimer")
+    : Module("Irccd.ElapsedTimer")
 {
 }
 
 void ElapsedTimerModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_c_function(plugin->context(), constructor, 0);
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, methods);
-	duk_push_c_function(plugin->context(), destructor, 1);
-	duk_set_finalizer(plugin->context(), -2);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "ElapsedTimer");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_c_function(plugin->context(), constructor, 0);
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, methods);
+    duk_push_c_function(plugin->context(), destructor, 1);
+    duk_set_finalizer(plugin->context(), -2);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "ElapsedTimer");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-elapsed-timer.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-elapsed-timer.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class ElapsedTimerModule : public Module {
 public:
-	/**
-	 * Irccd.ElapsedTimer.
-	 */
-	IRCCD_EXPORT ElapsedTimerModule() noexcept;
+    /**
+     * Irccd.ElapsedTimer.
+     */
+    IRCCD_EXPORT ElapsedTimerModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-file.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-file.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -50,61 +50,61 @@
 
 void pushStat(duk_context *ctx, const struct stat &st)
 {
-	StackAssert sa(ctx, 1);
+    StackAssert sa(ctx, 1);
 
-	duk_push_object(ctx);
+    duk_push_object(ctx);
 
 #if defined(HAVE_STAT_ST_ATIME)
-	duk_push_int(ctx, st.st_atime);
-	duk_put_prop_string(ctx, -2, "atime");
+    duk_push_int(ctx, st.st_atime);
+    duk_put_prop_string(ctx, -2, "atime");
 #endif
 #if defined(HAVE_STAT_ST_BLKSIZE)
-	duk_push_int(ctx, st.st_blksize);
-	duk_put_prop_string(ctx, -2, "blksize");
+    duk_push_int(ctx, st.st_blksize);
+    duk_put_prop_string(ctx, -2, "blksize");
 #endif
 #if defined(HAVE_STAT_ST_BLOCKS)
-	duk_push_int(ctx, st.st_blocks);
-	duk_put_prop_string(ctx, -2, "blocks");
+    duk_push_int(ctx, st.st_blocks);
+    duk_put_prop_string(ctx, -2, "blocks");
 #endif
 #if defined(HAVE_STAT_ST_CTIME)
-	duk_push_int(ctx, st.st_ctime);
-	duk_put_prop_string(ctx, -2, "ctime");
+    duk_push_int(ctx, st.st_ctime);
+    duk_put_prop_string(ctx, -2, "ctime");
 #endif
 #if defined(HAVE_STAT_ST_DEV)
-	duk_push_int(ctx, st.st_dev);
-	duk_put_prop_string(ctx, -2, "dev");
+    duk_push_int(ctx, st.st_dev);
+    duk_put_prop_string(ctx, -2, "dev");
 #endif
 #if defined(HAVE_STAT_ST_GID)
-	duk_push_int(ctx, st.st_gid);
-	duk_put_prop_string(ctx, -2, "gid");
+    duk_push_int(ctx, st.st_gid);
+    duk_put_prop_string(ctx, -2, "gid");
 #endif
 #if defined(HAVE_STAT_ST_INO)
-	duk_push_int(ctx, st.st_ino);
-	duk_put_prop_string(ctx, -2, "ino");
+    duk_push_int(ctx, st.st_ino);
+    duk_put_prop_string(ctx, -2, "ino");
 #endif
 #if defined(HAVE_STAT_ST_MODE)
-	duk_push_int(ctx, st.st_mode);
-	duk_put_prop_string(ctx, -2, "mode");
+    duk_push_int(ctx, st.st_mode);
+    duk_put_prop_string(ctx, -2, "mode");
 #endif
 #if defined(HAVE_STAT_ST_MTIME)
-	duk_push_int(ctx, st.st_mtime);
-	duk_put_prop_string(ctx, -2, "mtime");
+    duk_push_int(ctx, st.st_mtime);
+    duk_put_prop_string(ctx, -2, "mtime");
 #endif
 #if defined(HAVE_STAT_ST_NLINK)
-	duk_push_int(ctx, st.st_nlink);
-	duk_put_prop_string(ctx, -2, "nlink");
+    duk_push_int(ctx, st.st_nlink);
+    duk_put_prop_string(ctx, -2, "nlink");
 #endif
 #if defined(HAVE_STAT_ST_RDEV)
-	duk_push_int(ctx, st.st_rdev);
-	duk_put_prop_string(ctx, -2, "rdev");
+    duk_push_int(ctx, st.st_rdev);
+    duk_put_prop_string(ctx, -2, "rdev");
 #endif
 #if defined(HAVE_STAT_ST_SIZE)
-	duk_push_int(ctx, st.st_size);
-	duk_put_prop_string(ctx, -2, "size");
+    duk_push_int(ctx, st.st_size);
+    duk_put_prop_string(ctx, -2, "size");
 #endif
 #if defined(HAVE_STAT_ST_UID)
-	duk_push_int(ctx, st.st_uid);
-	duk_put_prop_string(ctx, -2, "uid");
+    duk_push_int(ctx, st.st_uid);
+    duk_put_prop_string(ctx, -2, "uid");
 #endif
 }
 
@@ -113,25 +113,25 @@
 // Remove trailing \r for CRLF line style.
 inline std::string clearCr(std::string input)
 {
-	if (input.length() > 0 && input.back() == '\r')
-		input.pop_back();
+    if (input.length() > 0 && input.back() == '\r')
+        input.pop_back();
 
-	return input;
+    return input;
 }
 
 File *self(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_push_this(ctx);
-	duk_get_prop_string(ctx, -1, Signature);
-	auto ptr = static_cast<File *>(duk_to_pointer(ctx, -1));
-	duk_pop_2(ctx);
+    duk_push_this(ctx);
+    duk_get_prop_string(ctx, -1, Signature);
+    auto ptr = static_cast<File *>(duk_to_pointer(ctx, -1));
+    duk_pop_2(ctx);
 
-	if (!ptr)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a File object");
+    if (!ptr)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a File object");
 
-	return ptr;
+    return ptr;
 }
 
 /*
@@ -150,9 +150,9 @@
  */
 duk_ret_t methodBasename(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, fs::baseName(self(ctx)->path()));
+    dukx_push_std_string(ctx, fs::baseName(self(ctx)->path()));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -163,9 +163,9 @@
  */
 duk_ret_t methodClose(duk_context *ctx)
 {
-	self(ctx)->close();
+    self(ctx)->close();
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -179,9 +179,9 @@
  */
 duk_ret_t methodDirname(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, fs::dirName(self(ctx)->path()));
+    dukx_push_std_string(ctx, fs::dirName(self(ctx)->path()));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -197,37 +197,37 @@
  */
 duk_ret_t methodLines(duk_context *ctx)
 {
-	duk_push_array(ctx);
+    duk_push_array(ctx);
 
-	std::FILE *fp = self(ctx)->handle();
-	std::string buffer;
-	std::array<char, 128> data;
-	std::int32_t i = 0;
+    std::FILE *fp = self(ctx)->handle();
+    std::string buffer;
+    std::array<char, 128> data;
+    std::int32_t i = 0;
 
-	while (std::fgets(&data[0], data.size(), fp) != nullptr) {
-		buffer += data.data();
+    while (std::fgets(&data[0], data.size(), fp) != nullptr) {
+        buffer += data.data();
 
-		auto pos = buffer.find('\n');
+        auto pos = buffer.find('\n');
 
-		if (pos != std::string::npos) {
-			dukx_push_std_string(ctx, clearCr(buffer.substr(0, pos)));
-			duk_put_prop_index(ctx, -2, i++);
+        if (pos != std::string::npos) {
+            dukx_push_std_string(ctx, clearCr(buffer.substr(0, pos)));
+            duk_put_prop_index(ctx, -2, i++);
 
-			buffer.erase(0, pos + 1);
-		}
-	}
+            buffer.erase(0, pos + 1);
+        }
+    }
 
-	// Maybe an error in the stream.
-	if (std::ferror(fp))
-		dukx_throw(ctx, SystemError());
+    // Maybe an error in the stream.
+    if (std::ferror(fp))
+        dukx_throw(ctx, SystemError());
 
-	// Missing '\n' in end of file.
-	if (!buffer.empty()) {
-		dukx_push_std_string(ctx, clearCr(buffer));
-		duk_put_prop_index(ctx, -2, i++);
-	}
+    // Missing '\n' in end of file.
+    if (!buffer.empty()) {
+        dukx_push_std_string(ctx, clearCr(buffer));
+        duk_put_prop_index(ctx, -2, i++);
+    }
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -245,43 +245,43 @@
  */
 duk_ret_t methodRead(duk_context *ctx)
 {
-	auto file = self(ctx);
-	auto amount = duk_is_number(ctx, 0) ? duk_get_int(ctx, 0) : -1;
+    auto file = self(ctx);
+    auto amount = duk_is_number(ctx, 0) ? duk_get_int(ctx, 0) : -1;
 
-	if (amount == 0 || file->handle() == nullptr)
-		return 0;
+    if (amount == 0 || file->handle() == nullptr)
+        return 0;
 
-	try {
-		std::string data;
-		std::size_t total = 0;
+    try {
+        std::string data;
+        std::size_t total = 0;
 
-		if (amount < 0) {
-			std::array<char, 128> buffer;
-			std::size_t nread;
+        if (amount < 0) {
+            std::array<char, 128> buffer;
+            std::size_t nread;
 
-			while ((nread = std::fread(&buffer[0], sizeof (buffer[0]), buffer.size(), file->handle())) > 0) {
-				if (std::ferror(file->handle()))
-					dukx_throw(ctx, SystemError());
+            while ((nread = std::fread(&buffer[0], sizeof (buffer[0]), buffer.size(), file->handle())) > 0) {
+                if (std::ferror(file->handle()))
+                    dukx_throw(ctx, SystemError());
 
-				std::copy(buffer.begin(), buffer.begin() + nread, std::back_inserter(data));
-				total += nread;
-			}
-		} else {
-			data.resize((std::size_t)amount);
-			total = std::fread(&data[0], sizeof (data[0]), (std::size_t)amount, file->handle());
+                std::copy(buffer.begin(), buffer.begin() + nread, std::back_inserter(data));
+                total += nread;
+            }
+        } else {
+            data.resize((std::size_t)amount);
+            total = std::fread(&data[0], sizeof (data[0]), (std::size_t)amount, file->handle());
 
-			if (std::ferror(file->handle()))
-				dukx_throw(ctx, SystemError());
+            if (std::ferror(file->handle()))
+                dukx_throw(ctx, SystemError());
 
-			data.resize(total);
-		}
+            data.resize(total);
+        }
 
-		dukx_push_std_string(ctx, data);
-	} catch (const std::exception &) {
-		dukx_throw(ctx, SystemError());
-	}
+        dukx_push_std_string(ctx, data);
+    } catch (const std::exception &) {
+        dukx_throw(ctx, SystemError());
+    }
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -297,19 +297,19 @@
  */
 duk_ret_t methodReadline(duk_context *ctx)
 {
-	std::FILE *fp = self(ctx)->handle();
-	std::string result;
+    std::FILE *fp = self(ctx)->handle();
+    std::string result;
 
-	if (fp == nullptr || std::feof(fp))
-		return 0;
-	for (int ch; (ch = std::fgetc(fp)) != EOF && ch != '\n'; )
-		result += (char)ch;
-	if (std::ferror(fp))
-		dukx_throw(ctx, SystemError());
+    if (fp == nullptr || std::feof(fp))
+        return 0;
+    for (int ch; (ch = std::fgetc(fp)) != EOF && ch != '\n'; )
+        result += (char)ch;
+    if (std::ferror(fp))
+        dukx_throw(ctx, SystemError());
 
-	dukx_push_std_string(ctx, clearCr(result));
+    dukx_push_std_string(ctx, clearCr(result));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -323,10 +323,10 @@
  */
 duk_ret_t methodRemove(duk_context *ctx)
 {
-	if (::remove(self(ctx)->path().c_str()) < 0)
-		dukx_throw(ctx, SystemError());
+    if (::remove(self(ctx)->path().c_str()) < 0)
+        dukx_throw(ctx, SystemError());
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -343,14 +343,14 @@
  */
 duk_ret_t methodSeek(duk_context *ctx)
 {
-	auto fp = self(ctx)->handle();
-	auto type = duk_require_int(ctx, 0);
-	auto amount = duk_require_int(ctx, 1);
+    auto fp = self(ctx)->handle();
+    auto type = duk_require_int(ctx, 0);
+    auto amount = duk_require_int(ctx, 1);
 
-	if (fp != nullptr && std::fseek(fp, amount, type) != 0)
-		dukx_throw(ctx, SystemError());
+    if (fp != nullptr && std::fseek(fp, amount, type) != 0)
+        dukx_throw(ctx, SystemError());
 
-	return 0;
+    return 0;
 }
 
 #if defined(HAVE_STAT)
@@ -368,15 +368,15 @@
  */
 duk_ret_t methodStat(duk_context *ctx)
 {
-	auto file = self(ctx);
-	struct stat st;
+    auto file = self(ctx);
+    struct stat st;
 
-	if (file->handle() == nullptr && ::stat(file->path().c_str(), &st) < 0)
-		dukx_throw(ctx, SystemError());
-	else
-		pushStat(ctx, st);
+    if (file->handle() == nullptr && ::stat(file->path().c_str(), &st) < 0)
+        dukx_throw(ctx, SystemError());
+    else
+        pushStat(ctx, st);
 
-	return 1;
+    return 1;
 }
 
 #endif // !HAVE_STAT
@@ -394,18 +394,18 @@
  */
 duk_ret_t methodTell(duk_context *ctx)
 {
-	auto fp = self(ctx)->handle();
-	long pos;
+    auto fp = self(ctx)->handle();
+    long pos;
 
-	if (fp == nullptr)
-		return 0;
+    if (fp == nullptr)
+        return 0;
 
-	if ((pos = std::ftell(fp)) == -1L)
-		dukx_throw(ctx, SystemError());
-	else
-		duk_push_int(ctx, pos);
+    if ((pos = std::ftell(fp)) == -1L)
+        dukx_throw(ctx, SystemError());
+    else
+        duk_push_int(ctx, pos);
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -423,37 +423,37 @@
  */
 duk_ret_t methodWrite(duk_context *ctx)
 {
-	std::FILE *fp = self(ctx)->handle();
-	std::string data = duk_require_string(ctx, 0);
+    std::FILE *fp = self(ctx)->handle();
+    std::string data = duk_require_string(ctx, 0);
 
-	if (fp == nullptr)
-		return 0;
+    if (fp == nullptr)
+        return 0;
 
-	std::size_t nwritten = std::fwrite(data.c_str(), 1, data.length(), fp);
+    std::size_t nwritten = std::fwrite(data.c_str(), 1, data.length(), fp);
 
-	if (std::ferror(fp))
-		dukx_throw(ctx, SystemError());
+    if (std::ferror(fp))
+        dukx_throw(ctx, SystemError());
 
-	duk_push_uint(ctx, nwritten);
+    duk_push_uint(ctx, nwritten);
 
-	return 1;
+    return 1;
 }
 
 const duk_function_list_entry methods[] = {
-	{ "basename",	methodBasename,	0 },
-	{ "close",	methodClose,	0 },
-	{ "dirname",	methodDirname,	0 },
-	{ "lines",	methodLines,	0 },
-	{ "read",	methodRead,	1 },
-	{ "readline",	methodReadline,	0 },
-	{ "remove",	methodRemove,	0 },
-	{ "seek",	methodSeek,	2 },
+    { "basename",   methodBasename, 0 },
+    { "close",      methodClose,    0 },
+    { "dirname",    methodDirname,  0 },
+    { "lines",      methodLines,    0 },
+    { "read",       methodRead,     1 },
+    { "readline",   methodReadline, 0 },
+    { "remove",     methodRemove,   0 },
+    { "seek",       methodSeek,     2 },
 #if defined(HAVE_STAT)
-	{ "stat",	methodStat,	0 },
+    { "stat",       methodStat,     0 },
 #endif
-	{ "tell",	methodTell,	0 },
-	{ "write",	methodWrite,	1 },
-	{ nullptr,	nullptr,	0 }
+    { "tell",       methodTell,     0 },
+    { "write",      methodWrite,    1 },
+    { nullptr,      nullptr,        0 }
 };
 
 /*
@@ -475,16 +475,16 @@
  */
 duk_ret_t constructor(duk_context *ctx)
 {
-	if (!duk_is_constructor_call(ctx))
-		return 0;
+    if (!duk_is_constructor_call(ctx))
+        return 0;
 
-	try {
-		dukx_new_file(ctx, new File(duk_require_string(ctx, 0), duk_require_string(ctx, 1)));
-	} catch (const std::exception &) {
-		dukx_throw(ctx, SystemError());
-	}
+    try {
+        dukx_new_file(ctx, new File(duk_require_string(ctx, 0), duk_require_string(ctx, 1)));
+    } catch (const std::exception &) {
+        dukx_throw(ctx, SystemError());
+    }
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -495,12 +495,12 @@
  */
 duk_ret_t destructor(duk_context *ctx)
 {
-	duk_get_prop_string(ctx, 0, Signature);
-	delete static_cast<File *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
-	duk_del_prop_string(ctx, 0, Signature);
+    duk_get_prop_string(ctx, 0, Signature);
+    delete static_cast<File *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
+    duk_del_prop_string(ctx, 0, Signature);
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -516,9 +516,9 @@
  */
 duk_ret_t functionBasename(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, fs::baseName(duk_require_string(ctx, 0)));
+    dukx_push_std_string(ctx, fs::baseName(duk_require_string(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -534,9 +534,9 @@
  */
 duk_ret_t functionDirname(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, fs::dirName(duk_require_string(ctx, 0)));
+    dukx_push_std_string(ctx, fs::dirName(duk_require_string(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -554,9 +554,9 @@
  */
 duk_ret_t functionExists(duk_context *ctx)
 {
-	duk_push_boolean(ctx, fs::exists(duk_require_string(ctx, 0)));
+    duk_push_boolean(ctx, fs::exists(duk_require_string(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -572,10 +572,10 @@
  */
 duk_ret_t functionRemove(duk_context *ctx)
 {
-	if (::remove(duk_require_string(ctx, 0)) < 0)
-		dukx_throw(ctx, SystemError());
+    if (::remove(duk_require_string(ctx, 0)) < 0)
+        dukx_throw(ctx, SystemError());
 
-	return 0;
+    return 0;
 }
 
 #if defined(HAVE_STAT)
@@ -595,99 +595,99 @@
  */
 duk_ret_t functionStat(duk_context *ctx)
 {
-	struct stat st;
+    struct stat st;
 
-	if (::stat(duk_require_string(ctx, 0), &st) < 0)
-		dukx_throw(ctx, SystemError());
+    if (::stat(duk_require_string(ctx, 0), &st) < 0)
+        dukx_throw(ctx, SystemError());
 
-	pushStat(ctx, st);
+    pushStat(ctx, st);
 
-	return 1;
+    return 1;
 }
 
 #endif // !HAVE_STAT
 
 const duk_function_list_entry functions[] = {
-	{ "basename",	functionBasename,	1 },
-	{ "dirname",	functionDirname,	1 },
-	{ "exists",	functionExists,		1 },
-	{ "remove",	functionRemove,		1 },
+    { "basename",   functionBasename,   1 },
+    { "dirname",    functionDirname,    1 },
+    { "exists",     functionExists,     1 },
+    { "remove",     functionRemove,     1 },
 #if defined(HAVE_STAT)
-	{ "stat",	functionStat,		1 },
+    { "stat",       functionStat,       1 },
 #endif
-	{ nullptr,	nullptr,		0 }
+    { nullptr,      nullptr,            0 }
 };
 
 const duk_number_list_entry constants[] = {
-	{ "SeekCur",	SEEK_CUR		},
-	{ "SeekEnd",	SEEK_END		},
-	{ "SeekSet",	SEEK_SET		},
-	{ nullptr, 	0			} 
+    { "SeekCur",    SEEK_CUR },
+    { "SeekEnd",    SEEK_END },
+    { "SeekSet",    SEEK_SET },
+    { nullptr,      0        }
 };
 
 } // !namespace
 
 FileModule::FileModule() noexcept
-	: Module("Irccd.File")
+    : Module("Irccd.File")
 {
 }
 
 void FileModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_c_function(plugin->context(), constructor, 2);
-	duk_put_number_list(plugin->context(), -1, constants);
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, methods);
-	duk_push_c_function(plugin->context(), destructor, 1);
-	duk_set_finalizer(plugin->context(), -2);
-	duk_dup(plugin->context(), -1);
-	duk_put_global_string(plugin->context(), Prototype);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "File");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_c_function(plugin->context(), constructor, 2);
+    duk_put_number_list(plugin->context(), -1, constants);
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, methods);
+    duk_push_c_function(plugin->context(), destructor, 1);
+    duk_set_finalizer(plugin->context(), -2);
+    duk_dup(plugin->context(), -1);
+    duk_put_global_string(plugin->context(), Prototype);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "File");
+    duk_pop(plugin->context());
 }
 
 void dukx_new_file(duk_context *ctx, File *fp)
 {
-	assert(ctx);
-	assert(fp);
+    assert(ctx);
+    assert(fp);
 
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_push_this(ctx);
-	duk_push_pointer(ctx, fp);
-	duk_put_prop_string(ctx, -2, Signature);
-	duk_pop(ctx);
+    duk_push_this(ctx);
+    duk_push_pointer(ctx, fp);
+    duk_put_prop_string(ctx, -2, Signature);
+    duk_pop(ctx);
 }
 
 void dukx_push_file(duk_context *ctx, File *fp)
 {
-	assert(ctx);
-	assert(fp);
+    assert(ctx);
+    assert(fp);
 
-	StackAssert sa(ctx, 1);
+    StackAssert sa(ctx, 1);
 
-	duk_push_object(ctx);
-	duk_push_pointer(ctx, fp);
-	duk_put_prop_string(ctx, -2, Signature);
-	duk_get_global_string(ctx, Prototype);
-	duk_set_prototype(ctx, -2);
+    duk_push_object(ctx);
+    duk_push_pointer(ctx, fp);
+    duk_put_prop_string(ctx, -2, Signature);
+    duk_get_global_string(ctx, Prototype);
+    duk_set_prototype(ctx, -2);
 }
 
 File *dukx_require_file(duk_context *ctx, duk_idx_t index)
 {
-	if (!duk_is_object(ctx, index) || !duk_has_prop_string(ctx, index, Signature))
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a File object");
+    if (!duk_is_object(ctx, index) || !duk_has_prop_string(ctx, index, Signature))
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a File object");
 
-	duk_get_prop_string(ctx, index, Signature);
-	File *file = static_cast<File *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
+    duk_get_prop_string(ctx, index, Signature);
+    File *file = static_cast<File *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
 
-	return file;
+    return file;
 }
 
 } // !irccd
--- a/lib/irccd/mod-file.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-file.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -52,88 +52,88 @@
  */
 class File {
 private:
-	File(const File &) = delete;
-	File &operator=(const File &) = delete;
+    File(const File &) = delete;
+    File &operator=(const File &) = delete;
 
-	File(File &&) = delete;
-	File &operator=(File &&) = delete;
+    File(File &&) = delete;
+    File &operator=(File &&) = delete;
 
 private:
-	std::string m_path;
-	std::FILE *m_stream;
-	std::function<void (std::FILE *)> m_destructor;
+    std::string m_path;
+    std::FILE *m_stream;
+    std::function<void (std::FILE *)> m_destructor;
 
 public:
-	/**
-	 * Construct a file specified by path
-	 *
-	 * \param path the path
-	 * \param mode the mode string (for std::fopen)
-	 * \throw std::runtime_error on failures
-	 */
-	inline File(std::string path, const std::string &mode)
-		: m_path(std::move(path))
-		, m_destructor([] (std::FILE *fp) { std::fclose(fp); })
-	{
-		if ((m_stream = std::fopen(m_path.c_str(), mode.c_str())) == nullptr)
-			throw std::runtime_error(std::strerror(errno));
-	}
+    /**
+     * Construct a file specified by path
+     *
+     * \param path the path
+     * \param mode the mode string (for std::fopen)
+     * \throw std::runtime_error on failures
+     */
+    inline File(std::string path, const std::string &mode)
+        : m_path(std::move(path))
+        , m_destructor([] (std::FILE *fp) { std::fclose(fp); })
+    {
+        if ((m_stream = std::fopen(m_path.c_str(), mode.c_str())) == nullptr)
+            throw std::runtime_error(std::strerror(errno));
+    }
 
-	/**
-	 * Construct a file from a already created FILE pointer (e.g. popen).
-	 *
-	 * The class takes ownership of fp and will close it.
-	 *
-	 * \pre destructor must not be null
-	 * \param fp the file pointer
-	 * \param destructor the function to close fp (e.g. std::fclose)
-	 */
-	inline File(std::FILE *fp, std::function<void (std::FILE *)> destructor) noexcept
-		: m_stream(fp)
-		, m_destructor(std::move(destructor))
-	{
-		assert(m_destructor != nullptr);
-	}
+    /**
+     * Construct a file from a already created FILE pointer (e.g. popen).
+     *
+     * The class takes ownership of fp and will close it.
+     *
+     * \pre destructor must not be null
+     * \param fp the file pointer
+     * \param destructor the function to close fp (e.g. std::fclose)
+     */
+    inline File(std::FILE *fp, std::function<void (std::FILE *)> destructor) noexcept
+        : m_stream(fp)
+        , m_destructor(std::move(destructor))
+    {
+        assert(m_destructor != nullptr);
+    }
 
-	/**
-	 * Closes the file.
-	 */
-	virtual ~File() noexcept
-	{
-		close();
-	}
+    /**
+     * Closes the file.
+     */
+    virtual ~File() noexcept
+    {
+        close();
+    }
 
-	/**
-	 * Get the path.
-	 *
-	 * \return the path
-	 * \warning empty when constructed from the FILE constructor
-	 */
-	inline const std::string &path() const noexcept
-	{
-		return m_path;
-	}
+    /**
+     * Get the path.
+     *
+     * \return the path
+     * \warning empty when constructed from the FILE constructor
+     */
+    inline const std::string &path() const noexcept
+    {
+        return m_path;
+    }
 
-	/**
-	 * Get the handle.
-	 *
-	 * \return the handle or nullptr if the stream was closed
-	 */
-	inline std::FILE *handle() noexcept
-	{
-		return m_stream;
-	}
+    /**
+     * Get the handle.
+     *
+     * \return the handle or nullptr if the stream was closed
+     */
+    inline std::FILE *handle() noexcept
+    {
+        return m_stream;
+    }
 
-	/**
-	 * Force close, can be safely called multiple times.
-	 */
-	inline void close() noexcept
-	{
-		if (m_stream) {
-			m_destructor(m_stream);
-			m_stream = nullptr;
-		}
-	}
+    /**
+     * Force close, can be safely called multiple times.
+     */
+    inline void close() noexcept
+    {
+        if (m_stream) {
+            m_destructor(m_stream);
+            m_stream = nullptr;
+        }
+    }
 };
 
 /**
@@ -142,15 +142,15 @@
  */
 class FileModule : public Module {
 public:
-	/**
-	 * Irccd.File.
-	 */
-	IRCCD_EXPORT FileModule() noexcept;
+    /**
+     * Irccd.File.
+     */
+    IRCCD_EXPORT FileModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 /**
--- a/lib/irccd/mod-irccd.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-irccd.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,94 +26,94 @@
 
 duk_ret_t constructor(duk_context *ctx)
 {
-	duk_push_this(ctx);
-	duk_push_int(ctx, duk_require_int(ctx, 0));
-	duk_put_prop_string(ctx, -2, "errno");
-	duk_push_string(ctx, duk_require_string(ctx, 1));
-	duk_put_prop_string(ctx, -2, "message");
-	duk_push_string(ctx, "SystemError");
-	duk_put_prop_string(ctx, -2, "name");
-	duk_pop(ctx);
+    duk_push_this(ctx);
+    duk_push_int(ctx, duk_require_int(ctx, 0));
+    duk_put_prop_string(ctx, -2, "errno");
+    duk_push_string(ctx, duk_require_string(ctx, 1));
+    duk_put_prop_string(ctx, -2, "message");
+    duk_push_string(ctx, "SystemError");
+    duk_put_prop_string(ctx, -2, "name");
+    duk_pop(ctx);
 
-	return 0;
+    return 0;
 }
 
 } // !namespace
 
 SystemError::SystemError()
-	: m_errno(errno)
-	, m_message(std::strerror(m_errno))
+    : m_errno(errno)
+    , m_message(std::strerror(m_errno))
 {
 }
 
 SystemError::SystemError(int e, std::string message)
-	: m_errno(e)
-	, m_message(std::move(message))
+    : m_errno(e)
+    , m_message(std::move(message))
 {
 }
 
 void SystemError::raise(duk_context *ctx) const
 {
-	StackAssert sa(ctx, 0);
+    StackAssert sa(ctx, 0);
 
-	duk_get_global_string(ctx, "Irccd");
-	duk_get_prop_string(ctx, -1, "SystemError");
-	duk_remove(ctx, -2);
-	duk_push_int(ctx, m_errno);
-	dukx_push_std_string(ctx, m_message);
-	duk_new(ctx, 2);
-	duk_throw(ctx);
+    duk_get_global_string(ctx, "Irccd");
+    duk_get_prop_string(ctx, -1, "SystemError");
+    duk_remove(ctx, -2);
+    duk_push_int(ctx, m_errno);
+    dukx_push_std_string(ctx, m_message);
+    duk_new(ctx, 2);
+    duk_throw(ctx);
 }
 
 IrccdModule::IrccdModule() noexcept
-	: Module("Irccd")
+    : Module("Irccd")
 {
 }
 
 void IrccdModule::load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	// Irccd.
-	duk_push_object(plugin->context());
+    // Irccd.
+    duk_push_object(plugin->context());
 
-	// Version.
-	duk_push_object(plugin->context());
-	duk_push_int(plugin->context(), IRCCD_VERSION_MAJOR);
-	duk_put_prop_string(plugin->context(), -2, "major");
-	duk_push_int(plugin->context(), IRCCD_VERSION_MINOR);
-	duk_put_prop_string(plugin->context(), -2, "minor");
-	duk_push_int(plugin->context(), IRCCD_VERSION_PATCH);
-	duk_put_prop_string(plugin->context(), -2, "patch");
-	duk_put_prop_string(plugin->context(), -2, "version");
+    // Version.
+    duk_push_object(plugin->context());
+    duk_push_int(plugin->context(), IRCCD_VERSION_MAJOR);
+    duk_put_prop_string(plugin->context(), -2, "major");
+    duk_push_int(plugin->context(), IRCCD_VERSION_MINOR);
+    duk_put_prop_string(plugin->context(), -2, "minor");
+    duk_push_int(plugin->context(), IRCCD_VERSION_PATCH);
+    duk_put_prop_string(plugin->context(), -2, "patch");
+    duk_put_prop_string(plugin->context(), -2, "version");
 
-	// Create the SystemError that inherits from Error.
-	duk_push_c_function(plugin->context(), constructor, 2);
-	duk_push_object(plugin->context());
-	duk_get_global_string(plugin->context(), "Error");
-	duk_get_prop_string(plugin->context(), -1, "prototype");
-	duk_remove(plugin->context(), -2);
-	duk_set_prototype(plugin->context(), -2);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "SystemError");
+    // Create the SystemError that inherits from Error.
+    duk_push_c_function(plugin->context(), constructor, 2);
+    duk_push_object(plugin->context());
+    duk_get_global_string(plugin->context(), "Error");
+    duk_get_prop_string(plugin->context(), -1, "prototype");
+    duk_remove(plugin->context(), -2);
+    duk_set_prototype(plugin->context(), -2);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "SystemError");
 
-	// Set Irccd as global.
-	duk_put_global_string(plugin->context(), "Irccd");
+    // Set Irccd as global.
+    duk_put_global_string(plugin->context(), "Irccd");
 
-	// Store global instance.
-	duk_push_pointer(plugin->context(), &irccd);
-	duk_put_global_string(plugin->context(), "\xff""\xff""irccd-ref");
+    // Store global instance.
+    duk_push_pointer(plugin->context(), &irccd);
+    duk_put_global_string(plugin->context(), "\xff""\xff""irccd-ref");
 }
 
 Irccd &duk_get_irccd(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_get_global_string(ctx, "\xff""\xff""irccd-ref");
-	Irccd *irccd = static_cast<Irccd *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
+    duk_get_global_string(ctx, "\xff""\xff""irccd-ref");
+    Irccd *irccd = static_cast<Irccd *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
 
-	return *irccd;
+    return *irccd;
 }
 
 } // !irccd
--- a/lib/irccd/mod-irccd.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-irccd.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -40,29 +40,29 @@
  */
 class SystemError {
 private:
-	int m_errno;
-	std::string m_message;
+    int m_errno;
+    std::string m_message;
 
 public:
-	/**
-	 * Create a system error from the current errno value.
-	 */
-	IRCCD_EXPORT SystemError();
+    /**
+     * Create a system error from the current errno value.
+     */
+    IRCCD_EXPORT SystemError();
 
-	/**
-	 * Create a system error with the given errno and message.
-	 *
-	 * \param e the errno number
-	 * \param message the message
-	 */
-	IRCCD_EXPORT SystemError(int e, std::string message);
+    /**
+     * Create a system error with the given errno and message.
+     *
+     * \param e the errno number
+     * \param message the message
+     */
+    IRCCD_EXPORT SystemError(int e, std::string message);
 
-	/**
-	 * Raise the SystemError.
-	 *
-	 * \param ctx the context
-	 */
-	IRCCD_EXPORT void raise(duk_context *ctx) const;
+    /**
+     * Raise the SystemError.
+     *
+     * \param ctx the context
+     */
+    IRCCD_EXPORT void raise(duk_context *ctx) const;
 };
 
 /**
@@ -71,15 +71,15 @@
  */
 class IrccdModule : public Module {
 public:
-	/**
-	 * Irccd.
-	 */
-	IRCCD_EXPORT IrccdModule() noexcept;
+    /**
+     * Irccd.
+     */
+    IRCCD_EXPORT IrccdModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 /**
--- a/lib/irccd/mod-logger.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-logger.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -27,9 +27,9 @@
 
 duk_ret_t print(duk_context *ctx, std::ostream &out)
 {
-	out << "plugin " << duk_get_plugin(ctx)->name() << ": " << duk_require_string(ctx, 0) << std::endl;
+    out << "plugin " << duk_get_plugin(ctx)->name() << ": " << duk_require_string(ctx, 0) << std::endl;
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -43,7 +43,7 @@
  */
 duk_ret_t info(duk_context *ctx)
 {
-	return print(ctx, log::info());
+    return print(ctx, log::info());
 }
 
 /*
@@ -57,7 +57,7 @@
  */
 duk_ret_t warning(duk_context *ctx)
 {
-	return print(ctx, log::warning());
+    return print(ctx, log::warning());
 }
 
 /*
@@ -71,32 +71,32 @@
  */
 duk_ret_t debug(duk_context *ctx)
 {
-	return print(ctx, log::debug());
+    return print(ctx, log::debug());
 }
 
 const duk_function_list_entry functions[] = {
-	{ "info",	info,		1 },
-	{ "warning",	warning,	1 },
-	{ "debug",	debug,		1 },
-	{ nullptr,	nullptr,	0 }
+    { "info",       info,       1 },
+    { "warning",    warning,    1 },
+    { "debug",      debug,      1 },
+    { nullptr,      nullptr,    0 }
 };
 
 } // !namespace
 
 LoggerModule::LoggerModule() noexcept
-	: Module("Irccd.Logger")
+    : Module("Irccd.Logger")
 {
 }
 
 void LoggerModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_put_prop_string(plugin->context(), -2, "Logger");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_put_prop_string(plugin->context(), -2, "Logger");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-logger.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-logger.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class LoggerModule : public Module {
 public:
-	/**
-	 * Irccd.Logger.
-	 */
-	IRCCD_EXPORT LoggerModule() noexcept;
+    /**
+     * Irccd.Logger.
+     */
+    IRCCD_EXPORT LoggerModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-plugin.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-plugin.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -38,17 +38,17 @@
 template <typename Func>
 duk_idx_t wrap(duk_context *ctx, int nret, Func &&func)
 {
-	std::string name = duk_require_string(ctx, 0);
+    std::string name = duk_require_string(ctx, 0);
 
-	try {
-		func(duk_get_irccd(ctx), name);
-	} catch (const std::out_of_range &ex) {
-		dukx_throw(ctx, ReferenceError(ex.what()));
-	} catch (const std::exception &ex) {
-		dukx_throw(ctx, Error(ex.what()));
-	}
+    try {
+        func(duk_get_irccd(ctx), name);
+    } catch (const std::out_of_range &ex) {
+        dukx_throw(ctx, ReferenceError(ex.what()));
+    } catch (const std::exception &ex) {
+        dukx_throw(ctx, Error(ex.what()));
+    }
 
-	return nret;
+    return nret;
 }
 
 /*
@@ -72,29 +72,29 @@
  */
 duk_idx_t info(duk_context *ctx)
 {
-	std::shared_ptr<Plugin> plugin;
+    std::shared_ptr<Plugin> plugin;
 
-	if (duk_get_top(ctx) >= 1)
-		plugin = duk_get_irccd(ctx).pluginService().get(duk_require_string(ctx, 0));
-	else
-		plugin = duk_get_plugin(ctx);
+    if (duk_get_top(ctx) >= 1)
+        plugin = duk_get_irccd(ctx).pluginService().get(duk_require_string(ctx, 0));
+    else
+        plugin = duk_get_plugin(ctx);
 
-	if (!plugin)
-		return 0;
+    if (!plugin)
+        return 0;
 
-	duk_push_object(ctx);
-	dukx_push_std_string(ctx, plugin->name());
-	duk_put_prop_string(ctx, -2, "name");
-	dukx_push_std_string(ctx, plugin->author());
-	duk_put_prop_string(ctx, -2, "author");
-	dukx_push_std_string(ctx, plugin->license());
-	duk_put_prop_string(ctx, -2, "license");
-	dukx_push_std_string(ctx, plugin->summary());
-	duk_put_prop_string(ctx, -2, "summary");
-	dukx_push_std_string(ctx, plugin->version());
-	duk_put_prop_string(ctx, -2, "version");
+    duk_push_object(ctx);
+    dukx_push_std_string(ctx, plugin->name());
+    duk_put_prop_string(ctx, -2, "name");
+    dukx_push_std_string(ctx, plugin->author());
+    duk_put_prop_string(ctx, -2, "author");
+    dukx_push_std_string(ctx, plugin->license());
+    duk_put_prop_string(ctx, -2, "license");
+    dukx_push_std_string(ctx, plugin->summary());
+    duk_put_prop_string(ctx, -2, "summary");
+    dukx_push_std_string(ctx, plugin->version());
+    duk_put_prop_string(ctx, -2, "version");
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -108,11 +108,11 @@
  */
 duk_idx_t list(duk_context *ctx)
 {
-	dukx_push_array(ctx, duk_get_irccd(ctx).pluginService().plugins(), [] (auto ctx, auto plugin) {
-		dukx_push_std_string(ctx, plugin->name());
-	});
+    dukx_push_array(ctx, duk_get_irccd(ctx).pluginService().plugins(), [] (auto ctx, auto plugin) {
+        dukx_push_std_string(ctx, plugin->name());
+    });
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -129,9 +129,9 @@
  */
 duk_idx_t load(duk_context *ctx)
 {
-	return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
-		irccd.pluginService().load(name);
-	});
+    return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
+        irccd.pluginService().load(name);
+    });
 }
 
 /*
@@ -148,9 +148,9 @@
  */
 duk_idx_t reload(duk_context *ctx)
 {
-	return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
-		irccd.pluginService().reload(name);
-	});
+    return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
+        irccd.pluginService().reload(name);
+    });
 }
 
 /*
@@ -167,65 +167,65 @@
  */
 duk_idx_t unload(duk_context *ctx)
 {
-	return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
-		irccd.pluginService().unload(name);
-	});
+    return wrap(ctx, 0, [&] (Irccd &irccd, const std::string &name) {
+        irccd.pluginService().unload(name);
+    });
 }
 
 const duk_function_list_entry functions[] = {
-	{ "info",	info,		DUK_VARARGS	},
-	{ "list",	list,		0		},
-	{ "load",	load,		1		},
-	{ "reload",	reload,		1		},
-	{ "unload",	unload,		1		},
-	{ nullptr,	nullptr,	0		}
+    { "info",   info,       DUK_VARARGS     },
+    { "list",   list,       0               },
+    { "load",   load,       1               },
+    { "reload", reload,     1               },
+    { "unload", unload,     1               },
+    { nullptr,  nullptr,    0               }
 };
 
 } // !namespace
 
 PluginModule::PluginModule() noexcept
-	: Module("Irccd.Plugin")
+    : Module("Irccd.Plugin")
 {
 }
 
 void PluginModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_push_pointer(plugin->context(), new std::shared_ptr<JsPlugin>(plugin));
-	duk_put_global_string(plugin->context(), PluginGlobal);
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_get_global_string(plugin->context(), "\xff""\xff""irccd-plugin-config");
-	duk_put_prop_string(plugin->context(), -2, "config");
-	duk_get_global_string(plugin->context(), "\xff""\xff""irccd-plugin-format");
-	duk_put_prop_string(plugin->context(), -2, "format");
-	duk_put_prop_string(plugin->context(), -2, "Plugin");
-	duk_pop(plugin->context());
+    duk_push_pointer(plugin->context(), new std::shared_ptr<JsPlugin>(plugin));
+    duk_put_global_string(plugin->context(), PluginGlobal);
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_get_global_string(plugin->context(), "\xff""\xff""irccd-plugin-config");
+    duk_put_prop_string(plugin->context(), -2, "config");
+    duk_get_global_string(plugin->context(), "\xff""\xff""irccd-plugin-format");
+    duk_put_prop_string(plugin->context(), -2, "format");
+    duk_put_prop_string(plugin->context(), -2, "Plugin");
+    duk_pop(plugin->context());
 }
 
 void PluginModule::unload(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_push_global_object(plugin->context());
-	duk_get_prop_string(plugin->context(), -1, PluginGlobal);
-	delete static_cast<std::shared_ptr<JsPlugin> *>(duk_to_pointer(plugin->context(), -1));
-	duk_pop(plugin->context());
-	duk_del_prop_string(plugin->context(), -1, PluginGlobal);
-	duk_pop(plugin->context());
+    duk_push_global_object(plugin->context());
+    duk_get_prop_string(plugin->context(), -1, PluginGlobal);
+    delete static_cast<std::shared_ptr<JsPlugin> *>(duk_to_pointer(plugin->context(), -1));
+    duk_pop(plugin->context());
+    duk_del_prop_string(plugin->context(), -1, PluginGlobal);
+    duk_pop(plugin->context());
 }
 
 std::shared_ptr<JsPlugin> duk_get_plugin(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_get_global_string(ctx, PluginGlobal);
-	auto plugin = static_cast<std::shared_ptr<JsPlugin> *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
+    duk_get_global_string(ctx, PluginGlobal);
+    auto plugin = static_cast<std::shared_ptr<JsPlugin> *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
 
-	return *plugin;
+    return *plugin;
 }
 
 } // !irccd
--- a/lib/irccd/mod-plugin.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-plugin.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -35,20 +35,20 @@
  */
 class PluginModule : public Module {
 public:
-	/**
-	 * Irccd.Plugin.
-	 */
-	IRCCD_EXPORT PluginModule() noexcept;
+    /**
+     * Irccd.Plugin.
+     */
+    IRCCD_EXPORT PluginModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 
-	/**
-	 * \copydoc Module::unload
-	 */
-	IRCCD_EXPORT void unload(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::unload
+     */
+    IRCCD_EXPORT void unload(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 /**
--- a/lib/irccd/mod-server.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-server.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,120 +36,120 @@
 
 std::shared_ptr<Server> self(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_push_this(ctx);
-	duk_get_prop_string(ctx, -1, Signature);
-	auto ptr = duk_to_pointer(ctx, -1);
-	duk_pop_2(ctx);
+    duk_push_this(ctx);
+    duk_get_prop_string(ctx, -1, Signature);
+    auto ptr = duk_to_pointer(ctx, -1);
+    duk_pop_2(ctx);
 
-	if (!ptr)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Server object");
+    if (!ptr)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Server object");
 
-	return *static_cast<std::shared_ptr<Server> *>(ptr);
+    return *static_cast<std::shared_ptr<Server> *>(ptr);
 }
 
 std::string readName(duk_context *ctx)
 {
-	duk_get_prop_string(ctx, 0, "name");
-	auto name = dukx_get_std_string(ctx, -1);
-	duk_pop(ctx);
+    duk_get_prop_string(ctx, 0, "name");
+    auto name = dukx_get_std_string(ctx, -1);
+    duk_pop(ctx);
 
-	if (!util::isIdentifierValid(name))
-		duk_error(ctx, DUK_ERR_ERROR, "invalid 'name' property");
+    if (!util::isIdentifierValid(name))
+        duk_error(ctx, DUK_ERR_ERROR, "invalid 'name' property");
 
-	return name;
+    return name;
 }
 
 ServerInfo readInfo(duk_context *ctx)
 {
-	ServerInfo info;
+    ServerInfo info;
 
-	// 'host' property.
-	duk_get_prop_string(ctx, 0, "host");
-	info.host = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : info.host;
-	duk_pop(ctx);
+    // 'host' property.
+    duk_get_prop_string(ctx, 0, "host");
+    info.host = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : info.host;
+    duk_pop(ctx);
 
-	// 'port' property.
-	duk_get_prop_string(ctx, 0, "port");
-	info.port = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : info.port;
-	duk_pop(ctx);
+    // 'port' property.
+    duk_get_prop_string(ctx, 0, "port");
+    info.port = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : info.port;
+    duk_pop(ctx);
 
-	// 'password' property.
-	duk_get_prop_string(ctx, 0, "password");
-	info.password = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : info.password;
-	duk_pop(ctx);
+    // 'password' property.
+    duk_get_prop_string(ctx, 0, "password");
+    info.password = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : info.password;
+    duk_pop(ctx);
 
-	// 'ipv6' property.
-	duk_get_prop_string(ctx, 0, "ipv6");
-	if (duk_get_boolean(ctx, -1))
-		info.flags |= ServerInfo::Ipv6;
-	duk_pop(ctx);
+    // 'ipv6' property.
+    duk_get_prop_string(ctx, 0, "ipv6");
+    if (duk_get_boolean(ctx, -1))
+        info.flags |= ServerInfo::Ipv6;
+    duk_pop(ctx);
 
-	return info;
+    return info;
 }
 
 ServerIdentity readIdentity(duk_context *ctx)
 {
-	ServerIdentity identity;
+    ServerIdentity identity;
 
-	// 'nickname' property.
-	duk_get_prop_string(ctx, 0, "nickname");
-	identity.nickname = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.nickname;
-	duk_pop(ctx);
+    // 'nickname' property.
+    duk_get_prop_string(ctx, 0, "nickname");
+    identity.nickname = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.nickname;
+    duk_pop(ctx);
 
-	// 'username' property.
-	duk_get_prop_string(ctx, 0, "username");
-	identity.username = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.username;
-	duk_pop(ctx);
+    // 'username' property.
+    duk_get_prop_string(ctx, 0, "username");
+    identity.username = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.username;
+    duk_pop(ctx);
 
-	// 'realname' property.
-	duk_get_prop_string(ctx, 0, "realname");
-	identity.realname = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.realname;
-	duk_pop(ctx);
+    // 'realname' property.
+    duk_get_prop_string(ctx, 0, "realname");
+    identity.realname = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.realname;
+    duk_pop(ctx);
 
-	// 'ctcpversion' property.
-	duk_get_prop_string(ctx, 0, "version");
-	identity.ctcpversion = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.ctcpversion;
-	duk_pop(ctx);
+    // 'ctcpversion' property.
+    duk_get_prop_string(ctx, 0, "version");
+    identity.ctcpversion = duk_is_string(ctx, -1) ? dukx_get_std_string(ctx, -1) : identity.ctcpversion;
+    duk_pop(ctx);
 
-	return identity;
+    return identity;
 }
 
 ServerSettings readSettings(duk_context *ctx)
 {
-	ServerSettings settings;
+    ServerSettings settings;
 
-	// 'channels' property.
-	duk_get_prop_string(ctx, 0, "channels");
-	settings.channels = dukx_get_array(ctx, -1, [] (auto ctx, auto) {
-		return Server::splitChannel(dukx_get_std_string(ctx, -1));
-	});
-	duk_pop(ctx);
+    // 'channels' property.
+    duk_get_prop_string(ctx, 0, "channels");
+    settings.channels = dukx_get_array(ctx, -1, [] (auto ctx, auto) {
+        return Server::splitChannel(dukx_get_std_string(ctx, -1));
+    });
+    duk_pop(ctx);
 
-	// 'recoTries' property.
-	duk_get_prop_string(ctx, 0, "recoTries");
-	settings.reconnectTries = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : settings.reconnectTries;
-	duk_pop(ctx);
+    // 'recoTries' property.
+    duk_get_prop_string(ctx, 0, "recoTries");
+    settings.reconnectTries = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : settings.reconnectTries;
+    duk_pop(ctx);
 
-	// 'recoTimeout' property.
-	duk_get_prop_string(ctx, 0, "recoTimeout");
-	settings.reconnectDelay = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : settings.reconnectDelay;
-	duk_pop(ctx);
+    // 'recoTimeout' property.
+    duk_get_prop_string(ctx, 0, "recoTimeout");
+    settings.reconnectDelay = duk_is_number(ctx, -1) ? duk_get_int(ctx, -1) : settings.reconnectDelay;
+    duk_pop(ctx);
 
-	// 'joinInvite' property.
-	duk_get_prop_string(ctx, 0, "joinInvite");
-	if (duk_get_boolean(ctx, -1))
-		settings.flags |= ServerSettings::JoinInvite;
-	duk_pop(ctx);
+    // 'joinInvite' property.
+    duk_get_prop_string(ctx, 0, "joinInvite");
+    if (duk_get_boolean(ctx, -1))
+        settings.flags |= ServerSettings::JoinInvite;
+    duk_pop(ctx);
 
-	// 'autoRejoin' property.
-	duk_get_prop_string(ctx, 0, "autoRejoin");
-	if (duk_get_boolean(ctx, -1))
-		settings.flags |= ServerSettings::AutoRejoin;
-	duk_pop(ctx);
+    // 'autoRejoin' property.
+    duk_get_prop_string(ctx, 0, "autoRejoin");
+    if (duk_get_boolean(ctx, -1))
+        settings.flags |= ServerSettings::AutoRejoin;
+    duk_pop(ctx);
 
-	return settings;
+    return settings;
 }
 
 /*
@@ -164,9 +164,9 @@
  */
 duk_ret_t cmode(duk_context *ctx)
 {
-	self(ctx)->cmode(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->cmode(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -181,9 +181,9 @@
  */
 duk_ret_t cnotice(duk_context *ctx)
 {
-	self(ctx)->cnotice(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->cnotice(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -201,33 +201,33 @@
  */
 duk_ret_t info(duk_context *ctx)
 {
-	auto server = self(ctx);
+    auto server = self(ctx);
 
-	duk_push_object(ctx);
-	dukx_push_std_string(ctx, server->name());
-	duk_put_prop_string(ctx, -2, "name");
-	dukx_push_std_string(ctx, server->info().host);
-	duk_put_prop_string(ctx, -2, "host");
-	duk_push_int(ctx, server->info().port);
-	duk_put_prop_string(ctx, -2, "port");
-	duk_push_boolean(ctx, server->info().flags & ServerInfo::Ssl);
-	duk_put_prop_string(ctx, -2, "ssl");
-	duk_push_boolean(ctx, server->info().flags & ServerInfo::SslVerify);
-	duk_put_prop_string(ctx, -2, "sslVerify");
-	dukx_push_std_string(ctx, server->settings().command);
-	duk_put_prop_string(ctx, -2, "commandChar");
-	dukx_push_std_string(ctx, server->identity().realname);
-	duk_put_prop_string(ctx, -2, "realname");
-	dukx_push_std_string(ctx, server->identity().nickname);
-	duk_put_prop_string(ctx, -2, "nickname");
-	dukx_push_std_string(ctx, server->identity().username);
-	duk_put_prop_string(ctx, -2, "username");
-	dukx_push_array(ctx, server->settings().channels, [] (auto ctx, auto channel) {
-		dukx_push_std_string(ctx, channel.name);
-	});
-	duk_put_prop_string(ctx, -2, "channels");
+    duk_push_object(ctx);
+    dukx_push_std_string(ctx, server->name());
+    duk_put_prop_string(ctx, -2, "name");
+    dukx_push_std_string(ctx, server->info().host);
+    duk_put_prop_string(ctx, -2, "host");
+    duk_push_int(ctx, server->info().port);
+    duk_put_prop_string(ctx, -2, "port");
+    duk_push_boolean(ctx, server->info().flags & ServerInfo::Ssl);
+    duk_put_prop_string(ctx, -2, "ssl");
+    duk_push_boolean(ctx, server->info().flags & ServerInfo::SslVerify);
+    duk_put_prop_string(ctx, -2, "sslVerify");
+    dukx_push_std_string(ctx, server->settings().command);
+    duk_put_prop_string(ctx, -2, "commandChar");
+    dukx_push_std_string(ctx, server->identity().realname);
+    duk_put_prop_string(ctx, -2, "realname");
+    dukx_push_std_string(ctx, server->identity().nickname);
+    duk_put_prop_string(ctx, -2, "nickname");
+    dukx_push_std_string(ctx, server->identity().username);
+    duk_put_prop_string(ctx, -2, "username");
+    dukx_push_array(ctx, server->settings().channels, [] (auto ctx, auto channel) {
+        dukx_push_std_string(ctx, channel.name);
+    });
+    duk_put_prop_string(ctx, -2, "channels");
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -242,9 +242,9 @@
  */
 duk_ret_t invite(duk_context *ctx)
 {
-	self(ctx)->invite(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->invite(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -259,9 +259,9 @@
  */
 duk_ret_t join(duk_context *ctx)
 {
-	self(ctx)->join(duk_require_string(ctx, 0), dukx_get_std_string(ctx, 1));
+    self(ctx)->join(duk_require_string(ctx, 0), dukx_get_std_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -277,9 +277,9 @@
  */
 duk_ret_t kick(duk_context *ctx)
 {
-	self(ctx)->kick(duk_require_string(ctx, 0), duk_require_string(ctx, 1), dukx_get_std_string(ctx, 2));
+    self(ctx)->kick(duk_require_string(ctx, 0), duk_require_string(ctx, 1), dukx_get_std_string(ctx, 2));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -294,9 +294,9 @@
  */
 duk_ret_t me(duk_context *ctx)
 {
-	self(ctx)->me(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->me(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -311,9 +311,9 @@
  */
 duk_ret_t message(duk_context *ctx)
 {
-	self(ctx)->message(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->message(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -327,9 +327,9 @@
  */
 duk_ret_t mode(duk_context *ctx)
 {
-	self(ctx)->mode(duk_require_string(ctx, 0));
+    self(ctx)->mode(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -343,9 +343,9 @@
  */
 duk_ret_t names(duk_context *ctx)
 {
-	self(ctx)->names(duk_require_string(ctx, 0));
+    self(ctx)->names(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -359,9 +359,9 @@
  */
 duk_ret_t nick(duk_context *ctx)
 {
-	self(ctx)->nick(duk_require_string(ctx, 0));
+    self(ctx)->nick(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -376,9 +376,9 @@
  */
 duk_ret_t notice(duk_context *ctx)
 {
-	self(ctx)->notice(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->notice(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -393,9 +393,9 @@
  */
 duk_ret_t part(duk_context *ctx)
 {
-	self(ctx)->part(duk_require_string(ctx, 0), dukx_get_std_string(ctx, 1));
+    self(ctx)->part(duk_require_string(ctx, 0), dukx_get_std_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -409,9 +409,9 @@
  */
 duk_ret_t send(duk_context *ctx)
 {
-	self(ctx)->send(duk_require_string(ctx, 0));
+    self(ctx)->send(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -426,9 +426,9 @@
  */
 duk_ret_t topic(duk_context *ctx)
 {
-	self(ctx)->topic(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    self(ctx)->topic(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -442,9 +442,9 @@
  */
 duk_ret_t whois(duk_context *ctx)
 {
-	self(ctx)->whois(duk_require_string(ctx, 0));
+    self(ctx)->whois(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -459,9 +459,9 @@
  */
 duk_ret_t toString(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, self(ctx)->name());
+    dukx_push_std_string(ctx, self(ctx)->name());
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -474,34 +474,34 @@
  *
  * name: the name,
  * host: the host,
- * ipv6: true to use ipv6,	(Optional: default false)
- * port: the port number,	(Optional: default 6667)
- * password: the password,	(Optional: default none)
- * channels: array of channels	(Optiona: default empty)
- * ssl: true to use ssl,	(Optional: default false)
- * sslVerify: true to verify	(Optional: default true)
- * nickname: "nickname",	(Optional, default: irccd)
- * username: "user name",	(Optional, default: irccd)
- * realname: "real name",	(Optional, default: IRC Client Daemon)
- * commandChar: "!",		(Optional, the command char, default: "!")
+ * ipv6: true to use ipv6,    (Optional: default false)
+ * port: the port number,    (Optional: default 6667)
+ * password: the password,    (Optional: default none)
+ * channels: array of channels    (Optiona: default empty)
+ * ssl: true to use ssl,    (Optional: default false)
+ * sslVerify: true to verify    (Optional: default true)
+ * nickname: "nickname",    (Optional, default: irccd)
+ * username: "user name",    (Optional, default: irccd)
+ * realname: "real name",    (Optional, default: IRC Client Daemon)
+ * commandChar: "!",        (Optional, the command char, default: "!")
  */
 duk_ret_t constructor(duk_context *ctx)
 {
-	if (!duk_is_constructor_call(ctx))
-		return 0;
+    if (!duk_is_constructor_call(ctx))
+        return 0;
 
-	try {
-		auto s = std::make_shared<Server>(readName(ctx), readInfo(ctx), readIdentity(ctx), readSettings(ctx));
+    try {
+        auto s = std::make_shared<Server>(readName(ctx), readInfo(ctx), readIdentity(ctx), readSettings(ctx));
 
-		duk_push_this(ctx);
-		duk_push_pointer(ctx, new std::shared_ptr<Server>(std::move(s)));
-		duk_put_prop_string(ctx, -2, Signature);
-		duk_pop(ctx);
-	} catch (const std::exception &ex) {
-		duk_error(ctx, DUK_ERR_ERROR, "%s", ex.what());
-	}
+        duk_push_this(ctx);
+        duk_push_pointer(ctx, new std::shared_ptr<Server>(std::move(s)));
+        duk_put_prop_string(ctx, -2, Signature);
+        duk_pop(ctx);
+    } catch (const std::exception &ex) {
+        duk_error(ctx, DUK_ERR_ERROR, "%s", ex.what());
+    }
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -512,12 +512,12 @@
  */
 duk_ret_t destructor(duk_context *ctx)
 {
-	duk_get_prop_string(ctx, 0, Signature);
-	delete static_cast<std::shared_ptr<Server> *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
-	duk_del_prop_string(ctx, 0, Signature);
+    duk_get_prop_string(ctx, 0, Signature);
+    delete static_cast<std::shared_ptr<Server> *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
+    duk_del_prop_string(ctx, 0, Signature);
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -531,9 +531,9 @@
  */
 duk_ret_t add(duk_context *ctx)
 {
-	duk_get_irccd(ctx).serverService().add(duk_require_server(ctx, 0));
+    duk_get_irccd(ctx).serverService().add(duk_require_server(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -549,14 +549,14 @@
  */
 duk_ret_t find(duk_context *ctx)
 {
-	auto server = duk_get_irccd(ctx).serverService().get(duk_require_string(ctx, 0));
+    auto server = duk_get_irccd(ctx).serverService().get(duk_require_string(ctx, 0));
 
-	if (!server)
-		return 0;
+    if (!server)
+        return 0;
 
-	duk_push_server(ctx, server);
+    duk_push_server(ctx, server);
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -570,14 +570,14 @@
  */
 duk_ret_t list(duk_context *ctx)
 {
-	duk_push_object(ctx);
+    duk_push_object(ctx);
 
-	for (const auto &server : duk_get_irccd(ctx).serverService().servers()) {
-		duk_push_server(ctx, server);
-		duk_put_prop_string(ctx, -2, server->name().c_str());
-	}
+    for (const auto &server : duk_get_irccd(ctx).serverService().servers()) {
+        duk_push_server(ctx, server);
+        duk_put_prop_string(ctx, -2, server->name().c_str());
+    }
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -591,89 +591,89 @@
  */
 duk_ret_t remove(duk_context *ctx)
 {
-	duk_get_irccd(ctx).serverService().remove(duk_require_string(ctx, 0));
+    duk_get_irccd(ctx).serverService().remove(duk_require_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 const duk_function_list_entry methods[] = {
-	{ "cmode",	cmode,		2		},
-	{ "cnotice",	cnotice,	2		},
-	{ "info",	info,		0		},
-	{ "invite",	invite,		2		},
-	{ "join",	join,		DUK_VARARGS	},
-	{ "kick",	kick,		DUK_VARARGS	},
-	{ "me",		me,		2		},
-	{ "message",	message,	2		},
-	{ "mode",	mode,		1		},
-	{ "names",	names,		1		},
-	{ "nick",	nick,		1		},
-	{ "notice",	notice,		2		},
-	{ "part",	part,		DUK_VARARGS	},
-	{ "send",	send,		1		},
-	{ "topic",	topic,		2		},
-	{ "whois",	whois,		1		},
-	{ "toString",	toString,	0		},
-	{ nullptr,	nullptr,	0		}
+    { "cmode",      cmode,      2           },
+    { "cnotice",    cnotice,    2           },
+    { "info",       info,       0           },
+    { "invite",     invite,     2           },
+    { "join",       join,       DUK_VARARGS },
+    { "kick",       kick,       DUK_VARARGS },
+    { "me",         me,         2           },
+    { "message",    message,    2           },
+    { "mode",       mode,       1           },
+    { "names",      names,      1           },
+    { "nick",       nick,       1           },
+    { "notice",     notice,     2           },
+    { "part",       part,       DUK_VARARGS },
+    { "send",       send,       1           },
+    { "topic",      topic,      2           },
+    { "whois",      whois,      1           },
+    { "toString",   toString,   0           },
+    { nullptr,      nullptr,    0           }
 };
 
 const duk_function_list_entry functions[] = {
-	{ "add",	add,		1		},
-	{ "find",	find,		1		},
-	{ "list",	list,		0		},
-	{ "remove",	remove,		1		},
-	{ nullptr,	nullptr,	0		}
+    { "add",        add,        1           },
+    { "find",       find,       1           },
+    { "list",       list,       0           },
+    { "remove",     remove,     1           },
+    { nullptr,      nullptr,    0           }
 };
 
 } // !namespace
 
 ServerModule::ServerModule() noexcept
-	: Module("Irccd.Server")
+    : Module("Irccd.Server")
 {
 }
 
 void ServerModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_c_function(plugin->context(), constructor, 1);
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, methods);
-	duk_push_c_function(plugin->context(), destructor, 1);
-	duk_set_finalizer(plugin->context(), -2);
-	duk_dup_top(plugin->context());
-	duk_put_global_string(plugin->context(), Prototype);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "Server");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_c_function(plugin->context(), constructor, 1);
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, methods);
+    duk_push_c_function(plugin->context(), destructor, 1);
+    duk_set_finalizer(plugin->context(), -2);
+    duk_dup_top(plugin->context());
+    duk_put_global_string(plugin->context(), Prototype);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "Server");
+    duk_pop(plugin->context());
 }
 
 void duk_push_server(duk_context *ctx, std::shared_ptr<Server> server)
 {
-	assert(ctx);
-	assert(server);
+    assert(ctx);
+    assert(server);
 
-	StackAssert sa(ctx, 1);
+    StackAssert sa(ctx, 1);
 
-	duk_push_object(ctx);
-	duk_push_pointer(ctx, new std::shared_ptr<Server>(std::move(server)));
-	duk_put_prop_string(ctx, -2, Signature);
-	duk_get_global_string(ctx, Prototype);
-	duk_set_prototype(ctx, -2);
+    duk_push_object(ctx);
+    duk_push_pointer(ctx, new std::shared_ptr<Server>(std::move(server)));
+    duk_put_prop_string(ctx, -2, Signature);
+    duk_get_global_string(ctx, Prototype);
+    duk_set_prototype(ctx, -2);
 }
 
 std::shared_ptr<Server> duk_require_server(duk_context *ctx, duk_idx_t index)
 {
-	if (!duk_is_object(ctx, index) || !duk_has_prop_string(ctx, index, Signature))
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Server object");
+    if (!duk_is_object(ctx, index) || !duk_has_prop_string(ctx, index, Signature))
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Server object");
 
-	duk_get_prop_string(ctx, index, Signature);
-	auto file = *static_cast<std::shared_ptr<Server> *>(duk_to_pointer(ctx, -1));
-	duk_pop(ctx);
-	
-	return file;
+    duk_get_prop_string(ctx, index, Signature);
+    auto file = *static_cast<std::shared_ptr<Server> *>(duk_to_pointer(ctx, -1));
+    duk_pop(ctx);
+    
+    return file;
 }
 
 } // !irccd
--- a/lib/irccd/mod-server.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-server.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,15 +36,15 @@
  */
 class ServerModule : public Module {
 public:
-	/**
-	 * Irccd.Server.
-	 */
-	IRCCD_EXPORT ServerModule() noexcept;
+    /**
+     * Irccd.Server.
+     */
+    IRCCD_EXPORT ServerModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 /**
--- a/lib/irccd/mod-system.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-system.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -49,9 +49,9 @@
  */
 duk_ret_t env(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, sys::env(dukx_get_std_string(ctx, 0)));
+    dukx_push_std_string(ctx, sys::env(dukx_get_std_string(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -65,9 +65,9 @@
  */
 duk_ret_t exec(duk_context *ctx)
 {
-	std::system(duk_get_string(ctx, 0));
+    std::system(duk_get_string(ctx, 0));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -81,9 +81,9 @@
  */
 duk_ret_t home(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, sys::home());
+    dukx_push_std_string(ctx, sys::home());
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -97,9 +97,9 @@
  */
 duk_ret_t name(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, sys::name());
+    dukx_push_std_string(ctx, sys::name());
 
-	return 1;
+    return 1;
 }
 
 #if defined(HAVE_POPEN)
@@ -120,14 +120,14 @@
  */
 duk_ret_t popen(duk_context *ctx)
 {
-	auto fp = ::popen(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
+    auto fp = ::popen(duk_require_string(ctx, 0), duk_require_string(ctx, 1));
 
-	if (fp == nullptr)
-		dukx_throw(ctx, SystemError());
+    if (fp == nullptr)
+        dukx_throw(ctx, SystemError());
 
-	dukx_push_file(ctx, new File(fp, [] (std::FILE *fp) { ::pclose(fp); }));
+    dukx_push_file(ctx, new File(fp, [] (std::FILE *fp) { ::pclose(fp); }));
 
-	return 1;
+    return 1;
 }
 
 #endif // !HAVE_POPEN
@@ -140,9 +140,9 @@
  */
 duk_ret_t sleep(duk_context *ctx)
 {
-	std::this_thread::sleep_for(std::chrono::seconds(duk_get_int(ctx, 0)));
+    std::this_thread::sleep_for(std::chrono::seconds(duk_get_int(ctx, 0)));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -156,9 +156,9 @@
  */
 duk_ret_t ticks(duk_context *ctx)
 {
-	duk_push_int(ctx, sys::ticks());
+    duk_push_int(ctx, sys::ticks());
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -169,9 +169,9 @@
  */
 duk_ret_t usleep(duk_context *ctx)
 {
-	std::this_thread::sleep_for(std::chrono::microseconds(duk_get_int(ctx, 0)));
+    std::this_thread::sleep_for(std::chrono::microseconds(duk_get_int(ctx, 0)));
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -185,9 +185,9 @@
  */
 duk_ret_t uptime(duk_context *ctx)
 {
-	duk_push_int(ctx, sys::uptime());
+    duk_push_int(ctx, sys::uptime());
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -201,43 +201,43 @@
  */
 duk_ret_t version(duk_context *ctx)
 {
-	dukx_push_std_string(ctx, sys::version());
+    dukx_push_std_string(ctx, sys::version());
 
-	return 1;
+    return 1;
 }
 
 const duk_function_list_entry functions[] = {
-	{ "env",	env,		1 },
-	{ "exec",	exec,		1 },
-	{ "home",	home,		0 },
-	{ "name",	name,		0 },
+    { "env",        env,        1 },
+    { "exec",       exec,       1 },
+    { "home",       home,       0 },
+    { "name",       name,       0 },
 #if defined(HAVE_POPEN)
-	{ "popen",	popen,		2 },
+    { "popen",      popen,      2 },
 #endif
-	{ "sleep",	sleep,		1 },
-	{ "ticks",	ticks,		0 },
-	{ "uptime",	uptime,		0 },
-	{ "usleep",	usleep,		1 },
-	{ "version",	version,	0 },
-	{ nullptr,	nullptr,	0 }
+    { "sleep",      sleep,      1 },
+    { "ticks",      ticks,      0 },
+    { "uptime",     uptime,     0 },
+    { "usleep",     usleep,     1 },
+    { "version",    version,    0 },
+    { nullptr,      nullptr,    0 }
 };
 
 } // !namespace
 
 SystemModule::SystemModule() noexcept
-	: Module("Irccd.System")
+    : Module("Irccd.System")
 {
 }
 
 void SystemModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_put_prop_string(plugin->context(), -2, "System");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_put_prop_string(plugin->context(), -2, "System");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-system.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-system.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class SystemModule : public Module {
 public:
-	/**
-	 * Irccd.System.
-	 */
-	IRCCD_EXPORT SystemModule() noexcept;
+    /**
+     * Irccd.System.
+     */
+    IRCCD_EXPORT SystemModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-timer.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-timer.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -37,43 +37,43 @@
 
 void handleSignal(std::weak_ptr<JsPlugin> ptr, std::string key)
 {
-	auto plugin = ptr.lock();
+    auto plugin = ptr.lock();
 
-	if (!plugin)
-		return;
+    if (!plugin)
+        return;
 
-	auto &irccd = duk_get_irccd(plugin->context());
+    auto &irccd = duk_get_irccd(plugin->context());
 
-	irccd.post([plugin, key] (Irccd &) {
-		StackAssert sa(plugin->context());
+    irccd.post([plugin, key] (Irccd &) {
+        StackAssert sa(plugin->context());
 
-		duk_get_global_string(plugin->context(), CallbackTable);
-		duk_get_prop_string(plugin->context(), -1, key.c_str());
-		duk_remove(plugin->context(), -2);
+        duk_get_global_string(plugin->context(), CallbackTable);
+        duk_get_prop_string(plugin->context(), -1, key.c_str());
+        duk_remove(plugin->context(), -2);
 
-		if (duk_is_callable(plugin->context(), -1)) {
-			if (duk_pcall(plugin->context(), 0) != 0)
-				log::warning("plugin {}: {}"_format(plugin->name(), dukx_exception(plugin->context(), -1).stack));
-			else
-				duk_pop(plugin->context());
-		} else
-			duk_pop(plugin->context());
-	});
+        if (duk_is_callable(plugin->context(), -1)) {
+            if (duk_pcall(plugin->context(), 0) != 0)
+                log::warning("plugin {}: {}"_format(plugin->name(), dukx_exception(plugin->context(), -1).stack));
+            else
+                duk_pop(plugin->context());
+        } else
+            duk_pop(plugin->context());
+    });
 }
 
 std::shared_ptr<Timer> self(duk_context *ctx)
 {
-	StackAssert sa(ctx);
+    StackAssert sa(ctx);
 
-	duk_push_this(ctx);
-	duk_get_prop_string(ctx, -1, Signature);
-	auto ptr = duk_to_pointer(ctx, -1);
-	duk_pop_2(ctx);
+    duk_push_this(ctx);
+    duk_get_prop_string(ctx, -1, Signature);
+    auto ptr = duk_to_pointer(ctx, -1);
+    duk_pop_2(ctx);
 
-	if (!ptr)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Timer object");
+    if (!ptr)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "not a Timer object");
 
-	return *static_cast<std::shared_ptr<Timer> *>(ptr);
+    return *static_cast<std::shared_ptr<Timer> *>(ptr);
 }
 
 /*
@@ -84,12 +84,12 @@
  */
 duk_ret_t start(duk_context *ctx)
 {
-	auto timer = self(ctx);
+    auto timer = self(ctx);
 
-	if (!timer->isRunning())
-		timer->start();
+    if (!timer->isRunning())
+        timer->start();
 
-	return 0;
+    return 0;
 }
 
 /*
@@ -100,18 +100,18 @@
  */
 duk_ret_t stop(duk_context *ctx)
 {
-	auto timer = self(ctx);
+    auto timer = self(ctx);
 
-	if (timer->isRunning())
-		timer->stop();
+    if (timer->isRunning())
+        timer->stop();
 
-	return 0;
+    return 0;
 }
 
 const duk_function_list_entry methods[] = {
-	{ "start",	start,		0 },
-	{ "stop",	stop,		0 },
-	{ nullptr,	nullptr,	0 }
+    { "start",  start,      0 },
+    { "stop",   stop,       0 },
+    { nullptr,  nullptr,    0 }
 };
 
 /*
@@ -127,83 +127,83 @@
  */
 duk_ret_t constructor(duk_context *ctx)
 {
-	// Check parameters.
-	auto type = duk_require_int(ctx, 0);
-	auto delay = duk_require_int(ctx, 1);
+    // Check parameters.
+    auto type = duk_require_int(ctx, 0);
+    auto delay = duk_require_int(ctx, 1);
 
-	if (type < static_cast<int>(TimerType::Single) || type > static_cast<int>(TimerType::Repeat))
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "invalid timer type");
-	if (delay < 0)
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "negative delay given");
-	if (!duk_is_callable(ctx, 2))
-		duk_error(ctx, DUK_ERR_TYPE_ERROR, "missing callback function");
+    if (type < static_cast<int>(TimerType::Single) || type > static_cast<int>(TimerType::Repeat))
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "invalid timer type");
+    if (delay < 0)
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "negative delay given");
+    if (!duk_is_callable(ctx, 2))
+        duk_error(ctx, DUK_ERR_TYPE_ERROR, "missing callback function");
 
-	// Construct the timer in 'this'.
-	auto timer = std::make_shared<Timer>(static_cast<TimerType>(type), delay);
-	auto hash = std::to_string(reinterpret_cast<std::uintptr_t>(timer.get()));
+    // Construct the timer in 'this'.
+    auto timer = std::make_shared<Timer>(static_cast<TimerType>(type), delay);
+    auto hash = std::to_string(reinterpret_cast<std::uintptr_t>(timer.get()));
 
-	timer->onSignal.connect(std::bind(handleSignal, std::weak_ptr<JsPlugin>(duk_get_plugin(ctx)), hash));
+    timer->onSignal.connect(std::bind(handleSignal, std::weak_ptr<JsPlugin>(duk_get_plugin(ctx)), hash));
 
-	duk_push_this(ctx);
-	duk_push_pointer(ctx, new std::shared_ptr<Timer>(std::move(timer)));
-	duk_put_prop_string(ctx, -2, Signature);
-	duk_push_string(ctx, hash.c_str());
-	duk_put_prop_string(ctx, -2, "\xff""\xff""timer-key");
-	duk_push_c_function(ctx, [] (duk_context *ctx) -> duk_ret_t {
-		StackAssert sa(ctx);
+    duk_push_this(ctx);
+    duk_push_pointer(ctx, new std::shared_ptr<Timer>(std::move(timer)));
+    duk_put_prop_string(ctx, -2, Signature);
+    duk_push_string(ctx, hash.c_str());
+    duk_put_prop_string(ctx, -2, "\xff""\xff""timer-key");
+    duk_push_c_function(ctx, [] (duk_context *ctx) -> duk_ret_t {
+        StackAssert sa(ctx);
 
-		duk_get_prop_string(ctx, 0, "\xff""\xff""timer-key");
-		auto hash = duk_get_string(ctx, -1);
-		duk_pop(ctx);
-		duk_get_prop_string(ctx, 0, Signature);
-		static_cast<std::shared_ptr<Timer> *>(duk_to_pointer(ctx, -1))->get()->stop();
-		delete static_cast<std::shared_ptr<Timer> *>(duk_to_pointer(ctx, -1));
-		duk_pop(ctx);
-		duk_get_global_string(ctx, CallbackTable);
-		duk_del_prop_string(ctx, -1, hash);
-		duk_pop(ctx);
-		log::debug("plugin: timer destroyed");
+        duk_get_prop_string(ctx, 0, "\xff""\xff""timer-key");
+        auto hash = duk_get_string(ctx, -1);
+        duk_pop(ctx);
+        duk_get_prop_string(ctx, 0, Signature);
+        static_cast<std::shared_ptr<Timer> *>(duk_to_pointer(ctx, -1))->get()->stop();
+        delete static_cast<std::shared_ptr<Timer> *>(duk_to_pointer(ctx, -1));
+        duk_pop(ctx);
+        duk_get_global_string(ctx, CallbackTable);
+        duk_del_prop_string(ctx, -1, hash);
+        duk_pop(ctx);
+        log::debug("plugin: timer destroyed");
 
-		return 0;
-	}, 1);
-	duk_set_finalizer(ctx, -2);
+        return 0;
+    }, 1);
+    duk_set_finalizer(ctx, -2);
 
-	// Save a callback function into the callback table.
-	duk_get_global_string(ctx, CallbackTable);
-	duk_dup(ctx, 2);
-	duk_put_prop_string(ctx, -2, hash.c_str());
-	duk_pop(ctx);
+    // Save a callback function into the callback table.
+    duk_get_global_string(ctx, CallbackTable);
+    duk_dup(ctx, 2);
+    duk_put_prop_string(ctx, -2, hash.c_str());
+    duk_pop(ctx);
 
-	return 0;
+    return 0;
 }
 
 const duk_number_list_entry constants[] = {
-	{ "Single",	static_cast<int>(TimerType::Single)	},
-	{ "Repeat",	static_cast<int>(TimerType::Repeat)	},
-	{ nullptr,	0					} 
+    { "Single",     static_cast<int>(TimerType::Single) },
+    { "Repeat",     static_cast<int>(TimerType::Repeat) },
+    { nullptr,      0                                   }
 };
 
 } // !namespace
 
 TimerModule::TimerModule() noexcept
-	: Module("Irccd.Timer")
+    : Module("Irccd.Timer")
 {
 }
 
 void TimerModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_c_function(plugin->context(), constructor, 3);
-	duk_put_number_list(plugin->context(), -1, constants);
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, methods);
-	duk_put_prop_string(plugin->context(), -2, "prototype");
-	duk_put_prop_string(plugin->context(), -2, "Timer");
-	duk_pop(plugin->context());
-	duk_push_object(plugin->context());
-	duk_put_global_string(plugin->context(), CallbackTable);
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_c_function(plugin->context(), constructor, 3);
+    duk_put_number_list(plugin->context(), -1, constants);
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, methods);
+    duk_put_prop_string(plugin->context(), -2, "prototype");
+    duk_put_prop_string(plugin->context(), -2, "Timer");
+    duk_pop(plugin->context());
+    duk_push_object(plugin->context());
+    duk_put_global_string(plugin->context(), CallbackTable);
 }
 
 } // !irccd
--- a/lib/irccd/mod-timer.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-timer.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class TimerModule : public Module {
 public:
-	/**
-	 * Irccd.Timer.
-	 */
-	IRCCD_EXPORT TimerModule() noexcept;
+    /**
+     * Irccd.Timer.
+     */
+    IRCCD_EXPORT TimerModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-unicode.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-unicode.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,9 +36,9 @@
  */
 duk_ret_t isDigit(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::isdigit(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::isdigit(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -52,9 +52,9 @@
  */
 duk_ret_t isLetter(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::isalpha(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::isalpha(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -68,9 +68,9 @@
  */
 duk_ret_t isLower(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::islower(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::islower(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -84,9 +84,9 @@
  */
 duk_ret_t isSpace(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::isspace(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::isspace(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -100,9 +100,9 @@
  */
 duk_ret_t isTitle(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::istitle(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::istitle(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -116,37 +116,37 @@
  */
 duk_ret_t isUpper(duk_context *ctx)
 {
-	duk_push_boolean(ctx, unicode::isupper(duk_get_int(ctx, 0)));
+    duk_push_boolean(ctx, unicode::isupper(duk_get_int(ctx, 0)));
 
-	return 1;
+    return 1;
 }
 
 const duk_function_list_entry functions[] = {
-	{ "isDigit",		isDigit,	1 },
-	{ "isLetter",		isLetter,	1 },
-	{ "isLower",		isLower,	1 },
-	{ "isSpace",		isSpace,	1 },
-	{ "isTitle",		isTitle,	1 },
-	{ "isUpper",		isUpper,	1 },
-	{ nullptr,		nullptr,	0 } 
+    { "isDigit",        isDigit,    1 },
+    { "isLetter",       isLetter,   1 },
+    { "isLower",        isLower,    1 },
+    { "isSpace",        isSpace,    1 },
+    { "isTitle",        isTitle,    1 },
+    { "isUpper",        isUpper,    1 },
+    { nullptr,          nullptr,    0 }
 };
 
 } // !namespace
 
 UnicodeModule::UnicodeModule() noexcept
-	: Module("Irccd.Unicode")
+    : Module("Irccd.Unicode")
 {
 }
 
 void UnicodeModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_put_prop_string(plugin->context(), -2, "Unicode");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_put_prop_string(plugin->context(), -2, "Unicode");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-unicode.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-unicode.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class UnicodeModule : public Module {
 public:
-	/**
-	 * Irccd.Unicode.
-	 */
-	IRCCD_EXPORT UnicodeModule() noexcept;
+    /**
+     * Irccd.Unicode.
+     */
+    IRCCD_EXPORT UnicodeModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/mod-util.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-util.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -39,19 +39,19 @@
  */
 util::Substitution getSubstitution(duk_context *ctx, int index)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	if (!duk_is_object(ctx, index))
-		return params;
+    if (!duk_is_object(ctx, index))
+        return params;
 
-	dukx_enumerate(ctx, index, 0, true, [&] (duk_context *) {
-		if (dukx_get_std_string(ctx, -2) == "date")
-			params.time = static_cast<time_t>(duk_get_number(ctx, -1) / 1000);
-		else
-			params.keywords.insert({dukx_get_std_string(ctx, -2), dukx_get_std_string(ctx, -1)});
-	});
+    dukx_enumerate(ctx, index, 0, true, [&] (duk_context *) {
+        if (dukx_get_std_string(ctx, -2) == "date")
+            params.time = static_cast<time_t>(duk_get_number(ctx, -1) / 1000);
+        else
+            params.keywords.insert({dukx_get_std_string(ctx, -2), dukx_get_std_string(ctx, -1)});
+    });
 
-	return params;
+    return params;
 }
 
 /*
@@ -68,13 +68,13 @@
  */
 duk_ret_t format(duk_context *ctx)
 {
-	try {
-		dukx_push_std_string(ctx, util::format(dukx_get_std_string(ctx, 0), getSubstitution(ctx, 1)));
-	} catch (const std::exception &ex) {
-		dukx_throw(ctx, SyntaxError(ex.what()));
-	}
+    try {
+        dukx_push_std_string(ctx, util::format(dukx_get_std_string(ctx, 0), getSubstitution(ctx, 1)));
+    } catch (const std::exception &ex) {
+        dukx_throw(ctx, SyntaxError(ex.what()));
+    }
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -90,13 +90,13 @@
  */
 duk_ret_t splituser(duk_context *ctx)
 {
-	auto target = duk_require_string(ctx, 0);
-	char nick[32] = {0};
+    auto target = duk_require_string(ctx, 0);
+    char nick[32] = {0};
 
-	irc_target_get_nick(target, nick, sizeof (nick) -1);
-	duk_push_string(ctx, nick);
+    irc_target_get_nick(target, nick, sizeof (nick) -1);
+    duk_push_string(ctx, nick);
 
-	return 1;
+    return 1;
 }
 
 /*
@@ -112,38 +112,38 @@
  */
 duk_ret_t splithost(duk_context *ctx)
 {
-	auto target = duk_require_string(ctx, 0);
-	char host[32] = {0};
+    auto target = duk_require_string(ctx, 0);
+    char host[32] = {0};
 
-	irc_target_get_host(target, host, sizeof (host) -1);
-	duk_push_string(ctx, host);
+    irc_target_get_host(target, host, sizeof (host) -1);
+    duk_push_string(ctx, host);
 
-	return 1;
+    return 1;
 }
 
 const duk_function_list_entry functions[] = {
-	{ "format",	format,		DUK_VARARGS	},
-	{ "splituser",	splituser,	1		},
-	{ "splithost",	splithost,	1		},
-	{ nullptr,	nullptr,	0		}
+    { "format",     format,     DUK_VARARGS },
+    { "splituser",  splituser,  1           },
+    { "splithost",  splithost,  1           },
+    { nullptr,      nullptr,    0           }
 };
 
 } // !namespace
 
 UtilModule::UtilModule() noexcept
-	: Module("Irccd.Util")
+    : Module("Irccd.Util")
 {
 }
 
 void UtilModule::load(Irccd &, const std::shared_ptr<JsPlugin> &plugin)
 {
-	StackAssert sa(plugin->context());
+    StackAssert sa(plugin->context());
 
-	duk_get_global_string(plugin->context(), "Irccd");
-	duk_push_object(plugin->context());
-	duk_put_function_list(plugin->context(), -1, functions);
-	duk_put_prop_string(plugin->context(), -2, "Util");
-	duk_pop(plugin->context());
+    duk_get_global_string(plugin->context(), "Irccd");
+    duk_push_object(plugin->context());
+    duk_put_function_list(plugin->context(), -1, functions);
+    duk_put_prop_string(plugin->context(), -2, "Util");
+    duk_pop(plugin->context());
 }
 
 } // !irccd
--- a/lib/irccd/mod-util.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/mod-util.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,15 +34,15 @@
  */
 class UtilModule : public Module {
 public:
-	/**
-	 * Irccd.Util.
-	 */
-	IRCCD_EXPORT UtilModule() noexcept;
+    /**
+     * Irccd.Util.
+     */
+    IRCCD_EXPORT UtilModule() noexcept;
 
-	/**
-	 * \copydoc Module::load
-	 */
-	IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
+    /**
+     * \copydoc Module::load
+     */
+    IRCCD_EXPORT void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin) override;
 };
 
 } // !irccd
--- a/lib/irccd/module.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/module.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -45,56 +45,56 @@
  */
 class Module {
 private:
-	std::string m_name;
+    std::string m_name;
 
 public:
-	/**
-	 * Default constructor.
-	 *
-	 * \pre !name.empty()
-	 */
-	inline Module(std::string name) noexcept
-		: m_name(std::move(name))
-	{
-		assert(!m_name.empty());
-	}
+    /**
+     * Default constructor.
+     *
+     * \pre !name.empty()
+     */
+    inline Module(std::string name) noexcept
+        : m_name(std::move(name))
+    {
+        assert(!m_name.empty());
+    }
 
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~Module() = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~Module() = default;
 
-	/**
-	 * Get the module name.
-	 *
-	 * \return the name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the module name.
+     *
+     * \return the name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Load the module into the JavaScript plugin.
-	 *
-	 * \param irccd the irccd instance
-	 * \param plugin the plugin
-	 */
-	virtual void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin)
-	{
-		util::unused(irccd, plugin);
-	}
+    /**
+     * Load the module into the JavaScript plugin.
+     *
+     * \param irccd the irccd instance
+     * \param plugin the plugin
+     */
+    virtual void load(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin)
+    {
+        util::unused(irccd, plugin);
+    }
 
-	/**
-	 * Unload the module from the JavaScript plugin.
-	 *
-	 * \param irccd the irccd instance
-	 * \param plugin the plugin
-	 */
-	virtual void unload(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin)
-	{
-		util::unused(irccd, plugin);
-	}
+    /**
+     * Unload the module from the JavaScript plugin.
+     *
+     * \param irccd the irccd instance
+     * \param plugin the plugin
+     */
+    virtual void unload(Irccd &irccd, const std::shared_ptr<JsPlugin> &plugin)
+    {
+        util::unused(irccd, plugin);
+    }
 };
 
 } // !irccd
--- a/lib/irccd/net.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/net.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -794,7 +794,7 @@
 inline void finish() noexcept
 {
 #if defined(_WIN32)
-	WSACleanup();
+    WSACleanup();
 #endif
 }
 
@@ -805,22 +805,22 @@
 inline void init() noexcept
 {
 #if defined(_WIN32)
-	static std::atomic<bool> initialized;
-	static std::mutex mutex;
-
-	std::lock_guard<std::mutex> lock(mutex);
-
-	if (!initialized) {
-		initialized = true;
-
-		WSADATA wsa;
-		WSAStartup(MAKEWORD(2, 2), &wsa);
-
-		// If NET_NO_AUTO_INIT is not set then the user must also call finish himself.
+    static std::atomic<bool> initialized;
+    static std::mutex mutex;
+
+    std::lock_guard<std::mutex> lock(mutex);
+
+    if (!initialized) {
+        initialized = true;
+
+        WSADATA wsa;
+        WSAStartup(MAKEWORD(2, 2), &wsa);
+
+        // If NET_NO_AUTO_INIT is not set then the user must also call finish himself.
 #if !defined(NET_NO_AUTO_INIT)
-		atexit(finish);
+        atexit(finish);
 #endif
-	}
+    }
 #endif
 }
 
@@ -833,25 +833,25 @@
 inline std::string error(int errn)
 {
 #if defined(_WIN32)
-	LPSTR str = nullptr;
-	std::string errmsg = "Unknown error";
-
-	FormatMessageA(
-		FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-		NULL,
-		errn,
-		MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-		(LPSTR)&str, 0, NULL);
-
-
-	if (str) {
-		errmsg = std::string(str);
-		LocalFree(str);
-	}
-
-	return errmsg;
+    LPSTR str = nullptr;
+    std::string errmsg = "Unknown error";
+
+    FormatMessageA(
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+        NULL,
+        errn,
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+        (LPSTR)&str, 0, NULL);
+
+
+    if (str) {
+        errmsg = std::string(str);
+        LocalFree(str);
+    }
+
+    return errmsg;
 #else
-	return strerror(errn);
+    return strerror(errn);
 #endif
 }
 
@@ -863,9 +863,9 @@
 inline std::string error()
 {
 #if defined(_WIN32)
-	return error(WSAGetLastError());
+    return error(WSAGetLastError());
 #else
-	return error(errno);
+    return error(errno);
 #endif
 }
 
@@ -878,8 +878,8 @@
  * \brief Which OpenSSL method to use.
  */
 enum Method {
-	Tlsv1,		//!< TLS v1.2 (recommended)
-	Sslv3		//!< SSLv3
+    Tlsv1,        //!< TLS v1.2 (recommended)
+    Sslv3        //!< SSLv3
 };
 
 /**
@@ -888,22 +888,22 @@
  */
 inline void init() noexcept
 {
-	static std::atomic<bool> initialized;
-	static std::mutex mutex;
-
-	std::lock_guard<std::mutex> lock(mutex);
-
-	if (!initialized) {
-		initialized = true;
-
-		SSL_library_init();
-		SSL_load_error_strings();
-		OpenSSL_add_all_algorithms();
+    static std::atomic<bool> initialized;
+    static std::mutex mutex;
+
+    std::lock_guard<std::mutex> lock(mutex);
+
+    if (!initialized) {
+        initialized = true;
+
+        SSL_library_init();
+        SSL_load_error_strings();
+        OpenSSL_add_all_algorithms();
 
 #if !defined(NET_NO_AUTO_SSL_INIT)
-		atexit(finish);
+        atexit(finish);
 #endif
-	}
+    }
 }
 
 /**
@@ -911,7 +911,7 @@
  */
 inline void finish() noexcept
 {
-	ERR_free_strings();
+    ERR_free_strings();
 }
 
 } // !ssl
@@ -930,92 +930,92 @@
  */
 class Error : public std::exception {
 public:
-	/**
-	 * \enum Code
-	 * \brief Which kind of error
-	 */
-	enum Code {
-		Timeout,		///!< The action did timeout
-		System,			///!< There is a system error
-		Other			///!< Other custom error
-	};
+    /**
+     * \enum Code
+     * \brief Which kind of error
+     */
+    enum Code {
+        Timeout,        ///!< The action did timeout
+        System,            ///!< There is a system error
+        Other            ///!< Other custom error
+    };
 
 private:
-	Code m_code;
-	std::string m_function;
-	std::string m_error;
+    Code m_code;
+    std::string m_function;
+    std::string m_error;
 
 public:
-	/**
-	 * Constructor that use the last system error.
-	 *
-	 * \param code which kind of error
-	 * \param function the function name
-	 */
-	inline Error(Code code, std::string function)
-		: m_code(code)
-		, m_function(std::move(function))
-		, m_error(error())
-	{
-	}
-
-	/**
-	 * Constructor that use the system error set by the user.
-	 *
-	 * \param code which kind of error
-	 * \param function the function name
-	 * \param n the error
-	 */
-	inline Error(Code code, std::string function, int n)
-		: m_code(code)
-		, m_function(std::move(function))
-		, m_error(error(n))
-	{
-	}
-
-	/**
-	 * Constructor that set the error specified by the user.
-	 *
-	 * \param code which kind of error
-	 * \param function the function name
-	 * \param error the error
-	 */
-	inline Error(Code code, std::string function, std::string error)
-		: m_code(code)
-		, m_function(std::move(function))
-		, m_error(std::move(error))
-	{
-	}
-
-	/**
-	 * Get which function has triggered the error.
-	 *
-	 * \return the function name (e.g connect)
-	 */
-	inline const std::string &function() const noexcept
-	{
-		return m_function;
-	}
-
-	/**
-	 * The error code.
-	 *
-	 * \return the code
-	 */
-	inline Code code() const noexcept
-	{
-		return m_code;
-	}
-
-	/**
-	 * Get the error (only the error content).
-	 *
-	 * \return the error
-	 */
-	const char *what() const noexcept override
-	{
-		return m_error.c_str();
-	}
+    /**
+     * Constructor that use the last system error.
+     *
+     * \param code which kind of error
+     * \param function the function name
+     */
+    inline Error(Code code, std::string function)
+        : m_code(code)
+        , m_function(std::move(function))
+        , m_error(error())
+    {
+    }
+
+    /**
+     * Constructor that use the system error set by the user.
+     *
+     * \param code which kind of error
+     * \param function the function name
+     * \param n the error
+     */
+    inline Error(Code code, std::string function, int n)
+        : m_code(code)
+        , m_function(std::move(function))
+        , m_error(error(n))
+    {
+    }
+
+    /**
+     * Constructor that set the error specified by the user.
+     *
+     * \param code which kind of error
+     * \param function the function name
+     * \param error the error
+     */
+    inline Error(Code code, std::string function, std::string error)
+        : m_code(code)
+        , m_function(std::move(function))
+        , m_error(std::move(error))
+    {
+    }
+
+    /**
+     * Get which function has triggered the error.
+     *
+     * \return the function name (e.g connect)
+     */
+    inline const std::string &function() const noexcept
+    {
+        return m_function;
+    }
+
+    /**
+     * The error code.
+     *
+     * \return the code
+     */
+    inline Code code() const noexcept
+    {
+        return m_code;
+    }
+
+    /**
+     * Get the error (only the error content).
+     *
+     * \return the error
+     */
+    const char *what() const noexcept override
+    {
+        return m_error.c_str();
+    }
 };
 
 /*
@@ -1033,9 +1033,9 @@
  * operations, the user must wait the socket to be readable or writable. This can be checked with Socket::condition.
  */
 enum class Condition {
-	None,			//!< No condition is required
-	Readable = (1 << 0),	//!< The socket must be readable
-	Writable = (1 << 1)	//!< The socket must be writable
+    None,            //!< No condition is required
+    Readable = (1 << 0),    //!< The socket must be readable
+    Writable = (1 << 1)    //!< The socket must be writable
 };
 
 /**
@@ -1047,7 +1047,7 @@
  */
 inline Condition operator^(Condition v1, Condition v2) noexcept
 {
-	return static_cast<Condition>(static_cast<int>(v1) ^ static_cast<int>(v2));
+    return static_cast<Condition>(static_cast<int>(v1) ^ static_cast<int>(v2));
 }
 
 /**
@@ -1059,7 +1059,7 @@
  */
 inline Condition operator&(Condition v1, Condition v2) noexcept
 {
-	return static_cast<Condition>(static_cast<int>(v1) & static_cast<int>(v2));
+    return static_cast<Condition>(static_cast<int>(v1) & static_cast<int>(v2));
 }
 
 /**
@@ -1071,7 +1071,7 @@
  */
 inline Condition operator|(Condition v1, Condition v2) noexcept
 {
-	return static_cast<Condition>(static_cast<int>(v1) | static_cast<int>(v2));
+    return static_cast<Condition>(static_cast<int>(v1) | static_cast<int>(v2));
 }
 
 /**
@@ -1082,7 +1082,7 @@
  */
 inline Condition operator~(Condition v) noexcept
 {
-	return static_cast<Condition>(~static_cast<int>(v));
+    return static_cast<Condition>(~static_cast<int>(v));
 }
 
 /**
@@ -1094,9 +1094,9 @@
  */
 inline Condition &operator|=(Condition &v1, Condition v2) noexcept
 {
-	v1 = static_cast<Condition>(static_cast<int>(v1) | static_cast<int>(v2));
-
-	return v1;
+    v1 = static_cast<Condition>(static_cast<int>(v1) | static_cast<int>(v2));
+
+    return v1;
 }
 
 /**
@@ -1108,9 +1108,9 @@
  */
 inline Condition &operator&=(Condition &v1, Condition v2) noexcept
 {
-	v1 = static_cast<Condition>(static_cast<int>(v1) & static_cast<int>(v2));
-
-	return v1;
+    v1 = static_cast<Condition>(static_cast<int>(v1) & static_cast<int>(v2));
+
+    return v1;
 }
 
 /**
@@ -1122,9 +1122,9 @@
  */
 inline Condition &operator^=(Condition &v1, Condition v2) noexcept
 {
-	v1 = static_cast<Condition>(static_cast<int>(v1) ^ static_cast<int>(v2));
-
-	return v1;
+    v1 = static_cast<Condition>(static_cast<int>(v1) ^ static_cast<int>(v2));
+
+    return v1;
 }
 
 /*
@@ -1158,911 +1158,911 @@
 template <typename Address, typename Protocol>
 class Socket {
 private:
-	Protocol m_proto;
+    Protocol m_proto;
 
 protected:
-	/**
-	 * The native handle.
-	 */
-	Handle m_handle{Invalid};
+    /**
+     * The native handle.
+     */
+    Handle m_handle{Invalid};
 
 public:
-	/**
-	 * Create a socket handle.
-	 *
-	 * This is the primary function and the only one that creates the socket handle, all other constructors
-	 * are just overloaded functions.
-	 *
-	 * \param domain the domain AF_*
-	 * \param type the type SOCK_*
-	 * \param protocol the protocol
-	 * \param iface the implementation
-	 * \throw net::Error on errors
-	 */
-	Socket(int domain, int type, int protocol, Protocol iface = {})
-		: m_proto(std::move(iface))
-	{
+    /**
+     * Create a socket handle.
+     *
+     * This is the primary function and the only one that creates the socket handle, all other constructors
+     * are just overloaded functions.
+     *
+     * \param domain the domain AF_*
+     * \param type the type SOCK_*
+     * \param protocol the protocol
+     * \param iface the implementation
+     * \throw net::Error on errors
+     */
+    Socket(int domain, int type, int protocol, Protocol iface = {})
+        : m_proto(std::move(iface))
+    {
 #if !defined(NET_NO_AUTO_INIT)
-		init();
+        init();
 #endif
-		m_handle = ::socket(domain, type, protocol);
-
-		if (m_handle == Invalid)
-			throw Error(Error::System, "socket");
-
-		m_proto.create(*this);
-	}
-
-	/**
-	 * This tries to create a socket.
-	 *
-	 * Domain and type are determined by the Address and Protocol object.
-	 *
-	 * \param address which type of address
-	 * \param protocol the protocol
-	 * \throw net::Error on errors
-	 */
-	explicit inline Socket(const Address &address = {}, Protocol protocol = {})
-		: Socket(address.domain(), protocol.type(), 0, std::move(protocol))
-	{
-	}
-
-	/**
-	 * Create the socket with an already defined handle and its protocol.
-	 *
-	 * \param handle the handle
-	 * \param protocol the protocol
-	 */
-	explicit inline Socket(Handle handle, Protocol protocol = {}) noexcept
-		: m_proto(std::move(protocol))
-		, m_handle(handle)
-	{
-	}
-
-	/**
-	 * Create an invalid socket. Can be used when you cannot instanciate the socket immediately.
-	 */
-	explicit inline Socket(std::nullptr_t) noexcept
-		: m_handle(Invalid)
-	{
-	}
-
-	/**
-	 * Copy constructor deleted.
-	 */
-	Socket(const Socket &) = delete;
-
-	/**
-	 * Transfer ownership from other to this.
-	 *
-	 * \param other the other socket
-	 */
-	inline Socket(Socket &&other) noexcept
-		: m_proto(std::move(other.m_proto))
-		, m_handle(other.m_handle)
-	{
-		other.m_handle = Invalid;
-	}
-
-	/**
-	 * Default destructor.
-	 */
-	virtual ~Socket()
-	{
-		close();
-	}
-
-	/**
-	 * Access the implementation.
-	 *
-	 * \return the implementation
-	 * \warning use this function with care
-	 */
-	inline const Protocol &protocol() const noexcept
-	{
-		return m_proto;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the implementation
-	 */
-	inline Protocol &protocol() noexcept
-	{
-		return m_proto;
-	}
-
-	/**
-	 * Tells if the socket is not invalid.
-	 *
-	 * \return true if not invalid
-	 */
-	inline bool isOpen() const noexcept
-	{
-		return m_handle != Invalid;
-	}
-
-	/**
-	 * Set an option for the socket. Wrapper of setsockopt(2).
-	 *
-	 * \pre isOpen()
-	 * \param level the setting level
-	 * \param name the name
-	 * \param arg the value
-	 * \throw net::Error on errors
-	 */
-	template <typename Argument>
-	inline void set(int level, int name, const Argument &arg)
-	{
-		assert(m_handle != Invalid);
-
-		if (setsockopt(m_handle, level, name, (ConstArg)&arg, sizeof (arg)) == Failure)
-			throw Error(Error::System, "set");
-	}
-
-	/**
-	 * Object-oriented option setter.
-	 *
-	 * The object must have `set(Socket<Address, Protocol> &) const`.
-	 *
-	 * \pre isOpen()
-	 * \param option the option
-	 * \throw net::Error on errors
-	 */
-	template <typename Option>
-	inline void set(const Option &option)
-	{
-		assert(m_handle != Invalid);
-
-		option.set(*this);
-	}
-
-	/**
-	 * Get an option for the socket. Wrapper of getsockopt(2).
-	 *
-	 * \pre isOpen()
-	 * \param level the setting level
-	 * \param name the name
-	 * \return the value
-	 * \throw net::Error on errors
-	 */
-	template <typename Argument>
-	Argument get(int level, int name)
-	{
-		assert(m_handle != Invalid);
-
-		Argument desired, result{};
-		socklen_t size = sizeof (result);
-
-		if (getsockopt(m_handle, level, name, (Arg)&desired, &size) == Failure)
-			throw Error(Error::System, "get");
-
-		std::memcpy(&result, &desired, size);
-
-		return result;
-	}
-
-	/**
-	 * Object-oriented option getter.
-	 *
-	 * The object must have `T get(Socket<Address, Protocol> &) const`, T can be any type and it is the value
-	 * returned from this function.
-	 *
-	 * \pre isOpen()
-	 * \return the same value as get() in the option
-	 * \throw net::Error on errors
-	 */
-	template <typename Option>
-	inline auto get() -> decltype(std::declval<Option>().get(*this))
-	{
-		assert(m_handle != Invalid);
-
-		return Option().get(*this);
-	}
-
-	/**
-	 * Get the native handle.
-	 *
-	 * \return the handle
-	 * \warning Not portable
-	 */
-	inline Handle handle() const noexcept
-	{
-		return m_handle;
-	}
-
-	/**
-	 * Bind using a native address.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \param length the size
-	 * \throw net::Error on errors
-	 */
-	inline void bind(const sockaddr *address, socklen_t length)
-	{
-		assert(m_handle != Invalid);
-
-		if (::bind(m_handle, address, length) == Failure)
-			throw Error(Error::System, "bind");
-	}
-
-	/**
-	 * Overload that takes an address.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \throw net::Error on errors
-	 */
-	inline void bind(const Address &address)
-	{
-		assert(m_handle != Invalid);
-
-		if (::bind(m_handle, address.address(), address.length()) == Failure)
-			throw Error(Error::System, "bind");
-	}
-
-	/**
-	 * Listen for pending connection.
-	 *
-	 * \pre isOpen()
-	 * \param max the maximum number
-	 * \throw net::Error on errors
-	 */
-	inline void listen(int max = 128)
-	{
-		assert(m_handle != Invalid);
-
-		if (::listen(this->m_handle, max) == Failure)
-			throw Error(Error::System, "listen");
-	}
-
-	/**
-	 * Get the local name. This is a wrapper of getsockname().
-	 *
-	 * \pre isOpen()
-	 * \return the address
-	 * \throw Error on failures
-	 */
-	Address getsockname() const
-	{
-		assert(m_handle != Invalid);
-
-		sockaddr_storage ss;
-		socklen_t length = sizeof (sockaddr_storage);
-
-		if (::getsockname(m_handle, reinterpret_cast<sockaddr *>(&ss), &length) == Failure)
-			throw Error(Error::System, "getsockname");
-
-		return Address(reinterpret_cast<sockaddr *>(&ss), length);
-	}
-
-	/**
-	 * Get connected address. This is a wrapper for getpeername().
-	 *
-	 * \pre isOpen()
-	 * \return the address
-	 * \throw Error on failures
-	 */
-	Address getpeername() const
-	{
-		assert(m_handle != Invalid);
-
-		sockaddr_storage ss;
-		socklen_t length = sizeof (sockaddr_storage);
-
-		if (::getpeername(m_handle, reinterpret_cast<sockaddr *>(&ss), &length) == Failure)
-			throw Error(Error::System, "getpeername");
-
-		return Address(reinterpret_cast<sockaddr *>(&ss), length);
-	}
-
-	/**
-	 * Initialize connection to the given address.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \param length the address length
-	 * \param cond the condition
-	 * \throw net::Error on failures
-	 */
-	inline void connect(const sockaddr *address, socklen_t length, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		m_proto.connect(*this, address, length, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \param length the address length
-	 * \throw net::Error on failures
-	 */
-	inline void connect(const sockaddr *address, socklen_t length)
-	{
-		Condition dummy;
-
-		connect(address, length, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \param cond the condition
-	 * \throw net::Error on failures
-	 */
-	inline void connect(const Address &address, Condition &cond)
-	{
-		connect(address.address(), address.length(), cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param address the address
-	 * \throw net::Error on failures
-	 */
-	inline void connect(const Address &address)
-	{
-		Condition dummy;
-
-		connect(address.address(), address.length(), dummy);
-	}
-
-	/**
-	 * Continue connect process.
-	 *
-	 * \pre isOpen()
-	 * \param cond the condition require for next selection
-	 * \throw net::Error on failures
-	 */
-	inline void resumeConnect(Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		m_proto.resumeConnect(*this, cond);
-	}
-
-	/**
-	 * Continue connect process.
-	 *
-	 * \pre isOpen()
-	 * \throw net::Error on failures
-	 */
-	inline void resumeConnect()
-	{
-		Condition dummy;
-
-		resumeConnect(dummy);
-	}
-
-	/**
-	 * Accept a new client.
-	 *
-	 * If no connection is available immediately, returns an invalid socket.
-	 *
-	 * \pre isOpen()
-	 * \param address the client information
-	 * \param cond the condition to wait to complete accept on the **client**
-	 * \return the new client or an invalid if no client is immediately available
-	 * \throw net::Error on failures
-	 */
-	Socket<Address, Protocol> accept(Address &address, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		sockaddr_storage storage;
-		socklen_t length = sizeof (storage);
-
-		cond = Condition::None;
-
-		Socket<Address, Protocol> client = m_proto.accept(*this, reinterpret_cast<sockaddr *>(&storage), &length, cond);
-
-		address = Address(reinterpret_cast<sockaddr *>(&storage), length);
-
-		return client;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param address the client information
-	 * \return the new client or an invalid if no client is immediately available
-	 * \throw net::Error on failures
-	 */
-	inline Socket<Address, Protocol> accept(Address &address)
-	{
-		Condition dummy;
-
-		return accept(address, dummy);
-	}
-
-	/**
-	 * Overlaoded function.
-	 *
-	 * \pre isOpen()
-	 * \return the new client or an invalid if no client is immediately available
-	 * \throw net::Error on failures
-	 */
-	inline Socket<Address, Protocol> accept()
-	{
-		Address da;
-		Condition dc;
-
-		return accept(da, dc);
-	}
-
-	/**
-	 * Continue accept process.
-	 *
-	 * \pre isOpen()
-	 * \param cond the condition
-	 * \throw net::Error on failures
-	 * \note This should be called on the returned client from accept
-	 */
-	inline void resumeAccept(Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		m_proto.resumeAccept(*this, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \throw net::Error on failures
-	 */
-	inline void resumeAccept()
-	{
-		Condition dummy;
-
-		resumeAccept(dummy);
-	}
-
-	/**
-	 * Receive some data.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the data length
-	 * \param cond the condition
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recv(void *data, std::size_t length, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		return m_proto.recv(*this, data, length, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the data length
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recv(void *data, std::size_t length)
-	{
-		Condition dummy;
-
-		return recv(data, length, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param count number of bytes desired
-	 * \param cond the condition
-	 * \return the result string
-	 * \throw net::Error on failures
-	 */
-	std::string recv(std::size_t count, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		std::string result;
-
-		result.resize(count);
-		auto n = recv(const_cast<char *>(result.data()), count, cond);
-		result.resize(n);
-
-		return result;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param count number of bytes desired
-	 * \return the result string
-	 * \throw net::Error on failures
-	 */
-	inline std::string recv(std::size_t count)
-	{
-		Condition dummy;
-
-		return recv(count, dummy);
-	}
-
-	/**
-	 * Send some data.
-	 *
-	 * \pre isOpen()
-	 * \param data the data to send
-	 * \param length the length
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t send(const void *data, std::size_t length, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		return m_proto.send(*this, data, length, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data to send
-	 * \param length the length
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t send(const void *data, std::size_t length)
-	{
-		Condition dummy;
-
-		return send(data, length, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data to send
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t send(const std::string &data, Condition &cond)
-	{
-		return send(data.c_str(), data.length(), cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data to send
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t send(const std::string &data)
-	{
-		Condition dummy;
-
-		return send(data.c_str(), data.length(), dummy);
-	}
-
-	/**
-	 * Send some data to the given client.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param length the length
-	 * \param address the client address
-	 * \param addrlen the client address length
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		return m_proto.sendto(*this, data, length, address, addrlen, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param length the length
-	 * \param address the client address
-	 * \param addrlen the client address length
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen)
-	{
-		Condition dummy;
-
-		return send(data, length, address, addrlen, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param length the length
-	 * \param address the client address
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const void *data, std::size_t length, const Address &address, Condition &cond)
-	{
-		return sendto(data, length, address.address(), address.length(), cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param length the length
-	 * \param address the client address
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const void *data, std::size_t length, const Address &address)
-	{
-		Condition dummy;
-
-		return sendto(data, length, address.address(), address.length(), dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param cond the condition
-	 * \param address the client address
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const std::string &data, const Address &address, Condition &cond)
-	{
-		return sendto(data.c_str(), data.length(), address.address(), address.length(), cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the data
-	 * \param address the client address
-	 * \return the number of bytes sent
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t sendto(const std::string &data, const Address &address)
-	{
-		Condition dummy;
-
-		return sendto(data.c_str(), data.length(), address.address(), address.length(), dummy);
-	}
-
-	/**
-	 * Receive some data from a client.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param address the client information
-	 * \param addrlen the client address initial length
-	 * \param cond the condition
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recvfrom(void *data, std::size_t length, sockaddr *address, socklen_t *addrlen, Condition &cond)
-	{
-		assert(m_handle != Invalid);
-
-		cond = Condition::None;
-
-		return m_proto.recvfrom(*this, data, length, address, addrlen, cond);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param address the client information
-	 * \param addrlen the client address initial length
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recvfrom(void *data, std::size_t length, sockaddr *address, socklen_t *addrlen)
-	{
-		Condition dummy;
-
-		return recvfrom(data, length, address, addrlen, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param address the client information
-	 * \param cond the condition
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	std::size_t recvfrom(void *data, std::size_t length, Address &address, Condition &cond)
-	{
-		sockaddr_storage storage;
-		socklen_t addrlen = sizeof (sockaddr_storage);
-
-		auto n = recvfrom(data, length, reinterpret_cast<sockaddr *>(&storage), &addrlen, cond);
-
-		if (n != 0 && cond == Condition::None)
-			address = Address(reinterpret_cast<sockaddr *>(&storage), addrlen);
-
-		return n;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param address the client information
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recvfrom(void *data, std::size_t length, Address &address)
-	{
-		Condition dummy;
-
-		return recvfrom(data, length, address, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \return the number of bytes received
-	 * \throw net::Error on failures
-	 */
-	inline std::size_t recvfrom(void *data, std::size_t length)
-	{
-		Address da;
-		Condition dc;
-
-		return recvfrom(data, length, da, dc);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param count the number of bytes desired
-	 * \param address the client information
-	 * \param cond the condition
-	 * \return the result string
-	 * \throw net::Error on failures
-	 */
-	std::string recvfrom(std::size_t count, Address &address, Condition &cond)
-	{
-		std::string result;
-
-		result.resize(count);
-		auto n = recvfrom(const_cast<char *>(result.data()), count, address, cond);
-		result.resize(n);
-
-		return result;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param count the number of bytes desired
-	 * \param address the client information
-	 * \return the result string
-	 * \throw net::Error on failures
-	 */
-	inline std::string recvfrom(std::size_t count, Address &address)
-	{
-		Condition dummy;
-
-		return recvfrom(count, address, dummy);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre isOpen()
-	 * \param count the number of bytes desired
-	 * \return the result string
-	 * \throw net::Error on failures
-	 */
-	inline std::string recvfrom(std::size_t count)
-	{
-		Address da;
-		Condition dc;
-
-		return recvfrom(count, da, dc);
-	}
-
-	/**
-	 * Close the socket.
-	 *
-	 * Automatically called from the destructor.
-	 */
-	void close()
-	{
-		if (m_handle != Invalid) {
+        m_handle = ::socket(domain, type, protocol);
+
+        if (m_handle == Invalid)
+            throw Error(Error::System, "socket");
+
+        m_proto.create(*this);
+    }
+
+    /**
+     * This tries to create a socket.
+     *
+     * Domain and type are determined by the Address and Protocol object.
+     *
+     * \param address which type of address
+     * \param protocol the protocol
+     * \throw net::Error on errors
+     */
+    explicit inline Socket(const Address &address = {}, Protocol protocol = {})
+        : Socket(address.domain(), protocol.type(), 0, std::move(protocol))
+    {
+    }
+
+    /**
+     * Create the socket with an already defined handle and its protocol.
+     *
+     * \param handle the handle
+     * \param protocol the protocol
+     */
+    explicit inline Socket(Handle handle, Protocol protocol = {}) noexcept
+        : m_proto(std::move(protocol))
+        , m_handle(handle)
+    {
+    }
+
+    /**
+     * Create an invalid socket. Can be used when you cannot instanciate the socket immediately.
+     */
+    explicit inline Socket(std::nullptr_t) noexcept
+        : m_handle(Invalid)
+    {
+    }
+
+    /**
+     * Copy constructor deleted.
+     */
+    Socket(const Socket &) = delete;
+
+    /**
+     * Transfer ownership from other to this.
+     *
+     * \param other the other socket
+     */
+    inline Socket(Socket &&other) noexcept
+        : m_proto(std::move(other.m_proto))
+        , m_handle(other.m_handle)
+    {
+        other.m_handle = Invalid;
+    }
+
+    /**
+     * Default destructor.
+     */
+    virtual ~Socket()
+    {
+        close();
+    }
+
+    /**
+     * Access the implementation.
+     *
+     * \return the implementation
+     * \warning use this function with care
+     */
+    inline const Protocol &protocol() const noexcept
+    {
+        return m_proto;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the implementation
+     */
+    inline Protocol &protocol() noexcept
+    {
+        return m_proto;
+    }
+
+    /**
+     * Tells if the socket is not invalid.
+     *
+     * \return true if not invalid
+     */
+    inline bool isOpen() const noexcept
+    {
+        return m_handle != Invalid;
+    }
+
+    /**
+     * Set an option for the socket. Wrapper of setsockopt(2).
+     *
+     * \pre isOpen()
+     * \param level the setting level
+     * \param name the name
+     * \param arg the value
+     * \throw net::Error on errors
+     */
+    template <typename Argument>
+    inline void set(int level, int name, const Argument &arg)
+    {
+        assert(m_handle != Invalid);
+
+        if (setsockopt(m_handle, level, name, (ConstArg)&arg, sizeof (arg)) == Failure)
+            throw Error(Error::System, "set");
+    }
+
+    /**
+     * Object-oriented option setter.
+     *
+     * The object must have `set(Socket<Address, Protocol> &) const`.
+     *
+     * \pre isOpen()
+     * \param option the option
+     * \throw net::Error on errors
+     */
+    template <typename Option>
+    inline void set(const Option &option)
+    {
+        assert(m_handle != Invalid);
+
+        option.set(*this);
+    }
+
+    /**
+     * Get an option for the socket. Wrapper of getsockopt(2).
+     *
+     * \pre isOpen()
+     * \param level the setting level
+     * \param name the name
+     * \return the value
+     * \throw net::Error on errors
+     */
+    template <typename Argument>
+    Argument get(int level, int name)
+    {
+        assert(m_handle != Invalid);
+
+        Argument desired, result{};
+        socklen_t size = sizeof (result);
+
+        if (getsockopt(m_handle, level, name, (Arg)&desired, &size) == Failure)
+            throw Error(Error::System, "get");
+
+        std::memcpy(&result, &desired, size);
+
+        return result;
+    }
+
+    /**
+     * Object-oriented option getter.
+     *
+     * The object must have `T get(Socket<Address, Protocol> &) const`, T can be any type and it is the value
+     * returned from this function.
+     *
+     * \pre isOpen()
+     * \return the same value as get() in the option
+     * \throw net::Error on errors
+     */
+    template <typename Option>
+    inline auto get() -> decltype(std::declval<Option>().get(*this))
+    {
+        assert(m_handle != Invalid);
+
+        return Option().get(*this);
+    }
+
+    /**
+     * Get the native handle.
+     *
+     * \return the handle
+     * \warning Not portable
+     */
+    inline Handle handle() const noexcept
+    {
+        return m_handle;
+    }
+
+    /**
+     * Bind using a native address.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \param length the size
+     * \throw net::Error on errors
+     */
+    inline void bind(const sockaddr *address, socklen_t length)
+    {
+        assert(m_handle != Invalid);
+
+        if (::bind(m_handle, address, length) == Failure)
+            throw Error(Error::System, "bind");
+    }
+
+    /**
+     * Overload that takes an address.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \throw net::Error on errors
+     */
+    inline void bind(const Address &address)
+    {
+        assert(m_handle != Invalid);
+
+        if (::bind(m_handle, address.address(), address.length()) == Failure)
+            throw Error(Error::System, "bind");
+    }
+
+    /**
+     * Listen for pending connection.
+     *
+     * \pre isOpen()
+     * \param max the maximum number
+     * \throw net::Error on errors
+     */
+    inline void listen(int max = 128)
+    {
+        assert(m_handle != Invalid);
+
+        if (::listen(this->m_handle, max) == Failure)
+            throw Error(Error::System, "listen");
+    }
+
+    /**
+     * Get the local name. This is a wrapper of getsockname().
+     *
+     * \pre isOpen()
+     * \return the address
+     * \throw Error on failures
+     */
+    Address getsockname() const
+    {
+        assert(m_handle != Invalid);
+
+        sockaddr_storage ss;
+        socklen_t length = sizeof (sockaddr_storage);
+
+        if (::getsockname(m_handle, reinterpret_cast<sockaddr *>(&ss), &length) == Failure)
+            throw Error(Error::System, "getsockname");
+
+        return Address(reinterpret_cast<sockaddr *>(&ss), length);
+    }
+
+    /**
+     * Get connected address. This is a wrapper for getpeername().
+     *
+     * \pre isOpen()
+     * \return the address
+     * \throw Error on failures
+     */
+    Address getpeername() const
+    {
+        assert(m_handle != Invalid);
+
+        sockaddr_storage ss;
+        socklen_t length = sizeof (sockaddr_storage);
+
+        if (::getpeername(m_handle, reinterpret_cast<sockaddr *>(&ss), &length) == Failure)
+            throw Error(Error::System, "getpeername");
+
+        return Address(reinterpret_cast<sockaddr *>(&ss), length);
+    }
+
+    /**
+     * Initialize connection to the given address.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \param length the address length
+     * \param cond the condition
+     * \throw net::Error on failures
+     */
+    inline void connect(const sockaddr *address, socklen_t length, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        m_proto.connect(*this, address, length, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \param length the address length
+     * \throw net::Error on failures
+     */
+    inline void connect(const sockaddr *address, socklen_t length)
+    {
+        Condition dummy;
+
+        connect(address, length, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \param cond the condition
+     * \throw net::Error on failures
+     */
+    inline void connect(const Address &address, Condition &cond)
+    {
+        connect(address.address(), address.length(), cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param address the address
+     * \throw net::Error on failures
+     */
+    inline void connect(const Address &address)
+    {
+        Condition dummy;
+
+        connect(address.address(), address.length(), dummy);
+    }
+
+    /**
+     * Continue connect process.
+     *
+     * \pre isOpen()
+     * \param cond the condition require for next selection
+     * \throw net::Error on failures
+     */
+    inline void resumeConnect(Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        m_proto.resumeConnect(*this, cond);
+    }
+
+    /**
+     * Continue connect process.
+     *
+     * \pre isOpen()
+     * \throw net::Error on failures
+     */
+    inline void resumeConnect()
+    {
+        Condition dummy;
+
+        resumeConnect(dummy);
+    }
+
+    /**
+     * Accept a new client.
+     *
+     * If no connection is available immediately, returns an invalid socket.
+     *
+     * \pre isOpen()
+     * \param address the client information
+     * \param cond the condition to wait to complete accept on the **client**
+     * \return the new client or an invalid if no client is immediately available
+     * \throw net::Error on failures
+     */
+    Socket<Address, Protocol> accept(Address &address, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        sockaddr_storage storage;
+        socklen_t length = sizeof (storage);
+
+        cond = Condition::None;
+
+        Socket<Address, Protocol> client = m_proto.accept(*this, reinterpret_cast<sockaddr *>(&storage), &length, cond);
+
+        address = Address(reinterpret_cast<sockaddr *>(&storage), length);
+
+        return client;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param address the client information
+     * \return the new client or an invalid if no client is immediately available
+     * \throw net::Error on failures
+     */
+    inline Socket<Address, Protocol> accept(Address &address)
+    {
+        Condition dummy;
+
+        return accept(address, dummy);
+    }
+
+    /**
+     * Overlaoded function.
+     *
+     * \pre isOpen()
+     * \return the new client or an invalid if no client is immediately available
+     * \throw net::Error on failures
+     */
+    inline Socket<Address, Protocol> accept()
+    {
+        Address da;
+        Condition dc;
+
+        return accept(da, dc);
+    }
+
+    /**
+     * Continue accept process.
+     *
+     * \pre isOpen()
+     * \param cond the condition
+     * \throw net::Error on failures
+     * \note This should be called on the returned client from accept
+     */
+    inline void resumeAccept(Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        m_proto.resumeAccept(*this, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \throw net::Error on failures
+     */
+    inline void resumeAccept()
+    {
+        Condition dummy;
+
+        resumeAccept(dummy);
+    }
+
+    /**
+     * Receive some data.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the data length
+     * \param cond the condition
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recv(void *data, std::size_t length, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        return m_proto.recv(*this, data, length, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the data length
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recv(void *data, std::size_t length)
+    {
+        Condition dummy;
+
+        return recv(data, length, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param count number of bytes desired
+     * \param cond the condition
+     * \return the result string
+     * \throw net::Error on failures
+     */
+    std::string recv(std::size_t count, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        std::string result;
+
+        result.resize(count);
+        auto n = recv(const_cast<char *>(result.data()), count, cond);
+        result.resize(n);
+
+        return result;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param count number of bytes desired
+     * \return the result string
+     * \throw net::Error on failures
+     */
+    inline std::string recv(std::size_t count)
+    {
+        Condition dummy;
+
+        return recv(count, dummy);
+    }
+
+    /**
+     * Send some data.
+     *
+     * \pre isOpen()
+     * \param data the data to send
+     * \param length the length
+     * \param cond the condition
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t send(const void *data, std::size_t length, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        return m_proto.send(*this, data, length, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data to send
+     * \param length the length
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t send(const void *data, std::size_t length)
+    {
+        Condition dummy;
+
+        return send(data, length, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data to send
+     * \param cond the condition
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t send(const std::string &data, Condition &cond)
+    {
+        return send(data.c_str(), data.length(), cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data to send
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t send(const std::string &data)
+    {
+        Condition dummy;
+
+        return send(data.c_str(), data.length(), dummy);
+    }
+
+    /**
+     * Send some data to the given client.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param length the length
+     * \param address the client address
+     * \param addrlen the client address length
+     * \param cond the condition
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        return m_proto.sendto(*this, data, length, address, addrlen, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param length the length
+     * \param address the client address
+     * \param addrlen the client address length
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen)
+    {
+        Condition dummy;
+
+        return send(data, length, address, addrlen, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param length the length
+     * \param address the client address
+     * \param cond the condition
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const void *data, std::size_t length, const Address &address, Condition &cond)
+    {
+        return sendto(data, length, address.address(), address.length(), cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param length the length
+     * \param address the client address
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const void *data, std::size_t length, const Address &address)
+    {
+        Condition dummy;
+
+        return sendto(data, length, address.address(), address.length(), dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param cond the condition
+     * \param address the client address
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const std::string &data, const Address &address, Condition &cond)
+    {
+        return sendto(data.c_str(), data.length(), address.address(), address.length(), cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the data
+     * \param address the client address
+     * \return the number of bytes sent
+     * \throw net::Error on failures
+     */
+    inline std::size_t sendto(const std::string &data, const Address &address)
+    {
+        Condition dummy;
+
+        return sendto(data.c_str(), data.length(), address.address(), address.length(), dummy);
+    }
+
+    /**
+     * Receive some data from a client.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param address the client information
+     * \param addrlen the client address initial length
+     * \param cond the condition
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recvfrom(void *data, std::size_t length, sockaddr *address, socklen_t *addrlen, Condition &cond)
+    {
+        assert(m_handle != Invalid);
+
+        cond = Condition::None;
+
+        return m_proto.recvfrom(*this, data, length, address, addrlen, cond);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param address the client information
+     * \param addrlen the client address initial length
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recvfrom(void *data, std::size_t length, sockaddr *address, socklen_t *addrlen)
+    {
+        Condition dummy;
+
+        return recvfrom(data, length, address, addrlen, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param address the client information
+     * \param cond the condition
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    std::size_t recvfrom(void *data, std::size_t length, Address &address, Condition &cond)
+    {
+        sockaddr_storage storage;
+        socklen_t addrlen = sizeof (sockaddr_storage);
+
+        auto n = recvfrom(data, length, reinterpret_cast<sockaddr *>(&storage), &addrlen, cond);
+
+        if (n != 0 && cond == Condition::None)
+            address = Address(reinterpret_cast<sockaddr *>(&storage), addrlen);
+
+        return n;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param address the client information
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recvfrom(void *data, std::size_t length, Address &address)
+    {
+        Condition dummy;
+
+        return recvfrom(data, length, address, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \return the number of bytes received
+     * \throw net::Error on failures
+     */
+    inline std::size_t recvfrom(void *data, std::size_t length)
+    {
+        Address da;
+        Condition dc;
+
+        return recvfrom(data, length, da, dc);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param count the number of bytes desired
+     * \param address the client information
+     * \param cond the condition
+     * \return the result string
+     * \throw net::Error on failures
+     */
+    std::string recvfrom(std::size_t count, Address &address, Condition &cond)
+    {
+        std::string result;
+
+        result.resize(count);
+        auto n = recvfrom(const_cast<char *>(result.data()), count, address, cond);
+        result.resize(n);
+
+        return result;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param count the number of bytes desired
+     * \param address the client information
+     * \return the result string
+     * \throw net::Error on failures
+     */
+    inline std::string recvfrom(std::size_t count, Address &address)
+    {
+        Condition dummy;
+
+        return recvfrom(count, address, dummy);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre isOpen()
+     * \param count the number of bytes desired
+     * \return the result string
+     * \throw net::Error on failures
+     */
+    inline std::string recvfrom(std::size_t count)
+    {
+        Address da;
+        Condition dc;
+
+        return recvfrom(count, da, dc);
+    }
+
+    /**
+     * Close the socket.
+     *
+     * Automatically called from the destructor.
+     */
+    void close()
+    {
+        if (m_handle != Invalid) {
 #if defined(_WIN32)
-			::closesocket(m_handle);
+            ::closesocket(m_handle);
 #else
-			::close(m_handle);
+            ::close(m_handle);
 #endif
-			m_handle = Invalid;
-		}
-	}
-
-	/**
-	 * Assignment operator forbidden.
-	 *
-	 * \return *this
-	 */
-	Socket &operator=(const Socket &) = delete;
-
-	/**
-	 * Transfer ownership from other to this. The other socket is left
-	 * invalid and will not be closed.
-	 *
-	 * \param other the other socket
-	 * \return this
-	 */
-	Socket &operator=(Socket &&other) noexcept
-	{
-		m_handle = other.m_handle;
-		m_proto = std::move(other.m_proto);
-
-		other.m_handle = Invalid;
-
-		return *this;
-	}
+            m_handle = Invalid;
+        }
+    }
+
+    /**
+     * Assignment operator forbidden.
+     *
+     * \return *this
+     */
+    Socket &operator=(const Socket &) = delete;
+
+    /**
+     * Transfer ownership from other to this. The other socket is left
+     * invalid and will not be closed.
+     *
+     * \param other the other socket
+     * \return this
+     */
+    Socket &operator=(Socket &&other) noexcept
+    {
+        m_handle = other.m_handle;
+        m_proto = std::move(other.m_proto);
+
+        other.m_handle = Invalid;
+
+        return *this;
+    }
 };
 
 /**
@@ -2075,7 +2075,7 @@
 template <typename Address, typename Protocol>
 inline bool operator==(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() == s2.handle();
+    return s1.handle() == s2.handle();
 }
 
 /**
@@ -2088,7 +2088,7 @@
 template <typename Address, typename Protocol>
 inline bool operator!=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() != s2.handle();
+    return s1.handle() != s2.handle();
 }
 
 /**
@@ -2101,7 +2101,7 @@
 template <typename Address, typename Protocol>
 inline bool operator<(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() < s2.handle();
+    return s1.handle() < s2.handle();
 }
 
 /**
@@ -2114,7 +2114,7 @@
 template <typename Address, typename Protocol>
 inline bool operator>(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() > s2.handle();
+    return s1.handle() > s2.handle();
 }
 
 /**
@@ -2127,7 +2127,7 @@
 template <typename Address, typename Protocol>
 inline bool operator<=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() <= s2.handle();
+    return s1.handle() <= s2.handle();
 }
 
 /**
@@ -2140,7 +2140,7 @@
 template <typename Address, typename Protocol>
 inline bool operator>=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2)
 {
-	return s1.handle() >= s2.handle();
+    return s1.handle() >= s2.handle();
 }
 
 /**
@@ -2157,188 +2157,188 @@
  */
 class Tcp {
 public:
-	/**
-	 * Socket type.
-	 *
-	 * \return SOCK_STREAM
-	 */
-	inline int type() const noexcept
-	{
-		return SOCK_STREAM;
-	}
-
-	/**
-	 * Do nothing.
-	 *
-	 * This function is just present for compatibility, it should never be called.
-	 */
-	template <typename Address>
-	inline void create(Socket<Address, Tcp> &) const noexcept
-	{
-	}
-
-	/**
-	 * Initiate connection.
-	 *
-	 * \param sc the socket
-	 * \param address the address
-	 * \param length the address length
-	 * \param cond the condition
-	 */
-	template <typename Address, typename Protocol>
-	void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length, Condition &cond)
-	{
-		if (::connect(sc.handle(), address, length) == Failure) {
-			/*
-			 * Determine if the error comes from a non-blocking connect that cannot be
-			 * accomplished yet.
-			 */
+    /**
+     * Socket type.
+     *
+     * \return SOCK_STREAM
+     */
+    inline int type() const noexcept
+    {
+        return SOCK_STREAM;
+    }
+
+    /**
+     * Do nothing.
+     *
+     * This function is just present for compatibility, it should never be called.
+     */
+    template <typename Address>
+    inline void create(Socket<Address, Tcp> &) const noexcept
+    {
+    }
+
+    /**
+     * Initiate connection.
+     *
+     * \param sc the socket
+     * \param address the address
+     * \param length the address length
+     * \param cond the condition
+     */
+    template <typename Address, typename Protocol>
+    void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length, Condition &cond)
+    {
+        if (::connect(sc.handle(), address, length) == Failure) {
+            /*
+             * Determine if the error comes from a non-blocking connect that cannot be
+             * accomplished yet.
+             */
 #if defined(_WIN32)
-			int error = WSAGetLastError();
-
-			if (error == WSAEWOULDBLOCK)
-				cond = Condition::Writable;
-			else
-				throw Error(Error::System, "connect", error);
+            int error = WSAGetLastError();
+
+            if (error == WSAEWOULDBLOCK)
+                cond = Condition::Writable;
+            else
+                throw Error(Error::System, "connect", error);
 #else
-			if (errno == EINPROGRESS)
-				cond = Condition::Writable;
-			else
-				throw Error(Error::System, "connect");
+            if (errno == EINPROGRESS)
+                cond = Condition::Writable;
+            else
+                throw Error(Error::System, "connect");
 #endif
-		}
-	}
-
-	/**
-	 * Resume the connection.
-	 *
-	 * Just check for SOL_SOCKET/SO_ERROR.
-	 *
-	 * User is responsible to wait before the socket is writable, otherwise behavior is undefined.
-	 *
-	 * \param sc the socket
-	 * \param cond the condition
-	 */
-	template <typename Address, typename Protocol>
-	void resumeConnect(Socket<Address, Protocol> &sc, Condition &cond)
-	{
-		int error = sc.template get<int>(SOL_SOCKET, SO_ERROR);
+        }
+    }
+
+    /**
+     * Resume the connection.
+     *
+     * Just check for SOL_SOCKET/SO_ERROR.
+     *
+     * User is responsible to wait before the socket is writable, otherwise behavior is undefined.
+     *
+     * \param sc the socket
+     * \param cond the condition
+     */
+    template <typename Address, typename Protocol>
+    void resumeConnect(Socket<Address, Protocol> &sc, Condition &cond)
+    {
+        int error = sc.template get<int>(SOL_SOCKET, SO_ERROR);
 
 #if defined(_WIN32)
-		if (error == WSAEWOULDBLOCK)
-			cond = Condition::Writable;
-		else if (error != 0)
-			throw Error(Error::System, "connect", error);
+        if (error == WSAEWOULDBLOCK)
+            cond = Condition::Writable;
+        else if (error != 0)
+            throw Error(Error::System, "connect", error);
 #else
-		if (error == EINPROGRESS)
-			cond = Condition::Writable;
-		else if (error != 0)
-			throw Error(Error::System, "connect", error);
+        if (error == EINPROGRESS)
+            cond = Condition::Writable;
+        else if (error != 0)
+            throw Error(Error::System, "connect", error);
 #endif
-	}
-
-	/**
-	 * Accept a new client.
-	 *
-	 * If there are no pending connection, an invalid socket is returned, condition is left to Condition::None.
-	 *
-	 * \param sc the socket
-	 * \param address the address
-	 * \param length the length
-	 * \return the new socket
-	 */
-	template <typename Address, typename Protocol>
-	Socket<Address, Protocol> accept(Socket<Address, Protocol> &sc, sockaddr *address, socklen_t *length, Condition &)
-	{
-		Handle handle = ::accept(sc.handle(), address, length);
-
-		if (handle == Invalid)
-			return Socket<Address, Protocol>();
-
-		return Socket<Address, Protocol>(handle);
-	}
-
-	/**
-	 * Resume accept process.
-	 *
-	 * No-op for TCP.
-	 */
-	template <typename Address, typename Protocol>
-	inline void resumeAcept(Socket<Address, Protocol> &, Condition &) const noexcept
-	{
-	}
-
-	/**
-	 * Receive some data.
-	 *
-	 * \param sc the socket
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param cond the condition
-	 * \return the number of byte received
-	 */
-	template <typename Address>
-	std::size_t recv(Socket<Address, Tcp> &sc, void *data, std::size_t length, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbread = ::recv(sc.handle(), (Arg)data, max, 0);
-
-		if (nbread == Failure) {
+    }
+
+    /**
+     * Accept a new client.
+     *
+     * If there are no pending connection, an invalid socket is returned, condition is left to Condition::None.
+     *
+     * \param sc the socket
+     * \param address the address
+     * \param length the length
+     * \return the new socket
+     */
+    template <typename Address, typename Protocol>
+    Socket<Address, Protocol> accept(Socket<Address, Protocol> &sc, sockaddr *address, socklen_t *length, Condition &)
+    {
+        Handle handle = ::accept(sc.handle(), address, length);
+
+        if (handle == Invalid)
+            return Socket<Address, Protocol>();
+
+        return Socket<Address, Protocol>(handle);
+    }
+
+    /**
+     * Resume accept process.
+     *
+     * No-op for TCP.
+     */
+    template <typename Address, typename Protocol>
+    inline void resumeAcept(Socket<Address, Protocol> &, Condition &) const noexcept
+    {
+    }
+
+    /**
+     * Receive some data.
+     *
+     * \param sc the socket
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param cond the condition
+     * \return the number of byte received
+     */
+    template <typename Address>
+    std::size_t recv(Socket<Address, Tcp> &sc, void *data, std::size_t length, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbread = ::recv(sc.handle(), (Arg)data, max, 0);
+
+        if (nbread == Failure) {
 #if defined(_WIN32)
-			int error = WSAGetLastError();
-
-			if (error == WSAEWOULDBLOCK) {
-				nbread = 0;
-				cond = Condition::Readable;
-			} else
-				throw Error(Error::System, "recv", error);
+            int error = WSAGetLastError();
+
+            if (error == WSAEWOULDBLOCK) {
+                nbread = 0;
+                cond = Condition::Readable;
+            } else
+                throw Error(Error::System, "recv", error);
 #else
-			if (errno == EAGAIN || errno == EWOULDBLOCK) {
-				nbread = 0;
-				cond = Condition::Readable;
-			} else
-				throw Error(Error::System, "recv");
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                nbread = 0;
+                cond = Condition::Readable;
+            } else
+                throw Error(Error::System, "recv");
 #endif
-		}
-
-		return static_cast<std::size_t>(nbread);
-	}
-
-	/**
-	 * Send some data.
-	 *
-	 * \param sc the socket
-	 * \param data the data to send
-	 * \param length the length
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 */
-	template <typename Address>
-	std::size_t send(Socket<Address, Tcp> &sc, const void *data, std::size_t length, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbsent = ::send(sc.handle(), (ConstArg)data, max, 0);
-
-		if (nbsent == Failure) {
+        }
+
+        return static_cast<std::size_t>(nbread);
+    }
+
+    /**
+     * Send some data.
+     *
+     * \param sc the socket
+     * \param data the data to send
+     * \param length the length
+     * \param cond the condition
+     * \return the number of bytes sent
+     */
+    template <typename Address>
+    std::size_t send(Socket<Address, Tcp> &sc, const void *data, std::size_t length, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbsent = ::send(sc.handle(), (ConstArg)data, max, 0);
+
+        if (nbsent == Failure) {
 #if defined(_WIN32)
-			int error = WSAGetLastError();
-
-			if (error == WSAEWOULDBLOCK) {
-				nbsent = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "send", error);
+            int error = WSAGetLastError();
+
+            if (error == WSAEWOULDBLOCK) {
+                nbsent = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "send", error);
 #else
-			if (errno == EAGAIN || errno == EWOULDBLOCK) {
-				nbsent = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "send");
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                nbsent = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "send");
 #endif
-		}
-
-		return static_cast<unsigned>(nbsent);
-	}
+        }
+
+        return static_cast<unsigned>(nbsent);
+    }
 };
 
 /**
@@ -2348,102 +2348,102 @@
  */
 class Udp {
 public:
-	/**
-	 * Socket type.
-	 *
-	 * \return SOCK_DGRAM
-	 */
-	inline int type() const noexcept
-	{
-		return SOCK_DGRAM;
-	}
-
-	/**
-	 * Do nothing.
-	 */
-	template <typename Address, typename Protocol>
-	inline void create(Socket<Address, Protocol> &) noexcept
-	{
-	}
-
-	/**
-	 * Receive some data.
-	 *
-	 * \param sc the socket
-	 * \param data the data
-	 * \param length the length
-	 * \param address the source address
-	 * \param addrlen the source address in/out length
-	 * \param cond the condition
-	 * \return the number of bytes received
-	 */
-	template <typename Address, typename Protocol>
-	std::size_t recvfrom(Socket<Address, Protocol> &sc, void *data, std::size_t length, sockaddr *address, socklen_t *addrlen, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbread;
-
-		nbread = ::recvfrom(sc.handle(), (Arg)data, max, 0, address, addrlen);
-
-		if (nbread == Failure) {
+    /**
+     * Socket type.
+     *
+     * \return SOCK_DGRAM
+     */
+    inline int type() const noexcept
+    {
+        return SOCK_DGRAM;
+    }
+
+    /**
+     * Do nothing.
+     */
+    template <typename Address, typename Protocol>
+    inline void create(Socket<Address, Protocol> &) noexcept
+    {
+    }
+
+    /**
+     * Receive some data.
+     *
+     * \param sc the socket
+     * \param data the data
+     * \param length the length
+     * \param address the source address
+     * \param addrlen the source address in/out length
+     * \param cond the condition
+     * \return the number of bytes received
+     */
+    template <typename Address, typename Protocol>
+    std::size_t recvfrom(Socket<Address, Protocol> &sc, void *data, std::size_t length, sockaddr *address, socklen_t *addrlen, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbread;
+
+        nbread = ::recvfrom(sc.handle(), (Arg)data, max, 0, address, addrlen);
+
+        if (nbread == Failure) {
 #if defined(_WIN32)
-			int error = WSAGetLastError();
-
-			if (error == WSAEWOULDBLOCK) {
-				nbread = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "recvfrom");
+            int error = WSAGetLastError();
+
+            if (error == WSAEWOULDBLOCK) {
+                nbread = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "recvfrom");
 #else
-			if (errno == EAGAIN || errno == EWOULDBLOCK) {
-				nbread = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "recvfrom");
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                nbread = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "recvfrom");
 #endif
-		}
-
-		return static_cast<unsigned>(nbread);
-	}
-
-	/**
-	 * Send some data.
-	 *
-	 * \param sc the socket
-	 * \param data the data to send
-	 * \param length the data length
-	 * \param address the destination address
-	 * \param addrlen the destination address length
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 */
-	template <typename Address, typename Protocol>
-	std::size_t sendto(Socket<Address, Protocol> &sc, const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbsent;
-
-		nbsent = ::sendto(sc.handle(), (ConstArg)data, max, 0, address, addrlen);
-		if (nbsent == Failure) {
+        }
+
+        return static_cast<unsigned>(nbread);
+    }
+
+    /**
+     * Send some data.
+     *
+     * \param sc the socket
+     * \param data the data to send
+     * \param length the data length
+     * \param address the destination address
+     * \param addrlen the destination address length
+     * \param cond the condition
+     * \return the number of bytes sent
+     */
+    template <typename Address, typename Protocol>
+    std::size_t sendto(Socket<Address, Protocol> &sc, const void *data, std::size_t length, const sockaddr *address, socklen_t addrlen, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbsent;
+
+        nbsent = ::sendto(sc.handle(), (ConstArg)data, max, 0, address, addrlen);
+        if (nbsent == Failure) {
 #if defined(_WIN32)
-			int error = WSAGetLastError();
-
-			if (error == WSAEWOULDBLOCK) {
-				nbsent = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "sendto", error);
+            int error = WSAGetLastError();
+
+            if (error == WSAEWOULDBLOCK) {
+                nbsent = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "sendto", error);
 #else
-			if (errno == EAGAIN || errno == EWOULDBLOCK) {
-				nbsent = 0;
-				cond = Condition::Writable;
-			} else
-				throw Error(Error::System, "sendto");
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                nbsent = 0;
+                cond = Condition::Writable;
+            } else
+                throw Error(Error::System, "sendto");
 #endif
-		}
-
-		return static_cast<unsigned>(nbsent);
-	}
+        }
+
+        return static_cast<unsigned>(nbsent);
+    }
 };
 
 #if !defined(NET_NO_SSL)
@@ -2455,310 +2455,310 @@
  */
 class Tls : private Tcp {
 private:
-	using Context = std::shared_ptr<SSL_CTX>;
-	using Ssl = std::unique_ptr<SSL, void (*)(SSL *)>;
-
-	// OpenSSL objects.
-	Context m_context;
-	Ssl m_ssl{nullptr, nullptr};
-
-	// Status.
-	bool m_tcpconnected{false};
-
-	/*
-	 * User definable parameters.
-	 */
-	ssl::Method m_method{ssl::Tlsv1};
-	std::string m_key;
-	std::string m_certificate;
-	bool m_verify{false};
-
-	// Construct with a context and ssl, for Tls::accept.
-	Tls(Context context, Ssl ssl)
-		: m_context(std::move(context))
-		, m_ssl(std::move(ssl))
-	{
-	}
-
-	inline std::string error()
-	{
-		BIO *bio = BIO_new(BIO_s_mem());
-		char *buf = nullptr;
-
-		ERR_print_errors(bio);
-
-		std::size_t length = BIO_get_mem_data (bio, &buf);
-		std::string result(buf, length);
-
-		BIO_free(bio);
-
-		return result;
-	}
-
-	template <typename Function>
-	void wrap(const std::string &func, Condition &cond, Function &&function)
-	{
-		auto ret = function();
-
-		if (ret <= 0) {
-			int no = SSL_get_error(m_ssl.get(), ret);
-
-			switch (no) {
-			case SSL_ERROR_WANT_READ:
-				cond = Condition::Readable;
-				break;
-			case SSL_ERROR_WANT_WRITE:
-				cond = Condition::Writable;
-				break;
-			default:
-				throw Error(Error::System, func, error());
-			}
-		}
-	}
-
-	template <typename Address, typename Protocol>
-	void doConnect(Socket<Address, Protocol> &, Condition &cond)
-	{
-		wrap("connect", cond, [&] () -> int {
-			return SSL_connect(m_ssl.get());
-		});
-	}
-
-	template <typename Address, typename Protocol>
-	void doAccept(Socket<Address, Protocol> &, Condition &cond)
-	{
-		wrap("accept", cond, [&] () -> int {
-			return SSL_accept(m_ssl.get());
-		});
-	}
+    using Context = std::shared_ptr<SSL_CTX>;
+    using Ssl = std::unique_ptr<SSL, void (*)(SSL *)>;
+
+    // OpenSSL objects.
+    Context m_context;
+    Ssl m_ssl{nullptr, nullptr};
+
+    // Status.
+    bool m_tcpconnected{false};
+
+    /*
+     * User definable parameters.
+     */
+    ssl::Method m_method{ssl::Tlsv1};
+    std::string m_key;
+    std::string m_certificate;
+    bool m_verify{false};
+
+    // Construct with a context and ssl, for Tls::accept.
+    Tls(Context context, Ssl ssl)
+        : m_context(std::move(context))
+        , m_ssl(std::move(ssl))
+    {
+    }
+
+    inline std::string error()
+    {
+        BIO *bio = BIO_new(BIO_s_mem());
+        char *buf = nullptr;
+
+        ERR_print_errors(bio);
+
+        std::size_t length = BIO_get_mem_data (bio, &buf);
+        std::string result(buf, length);
+
+        BIO_free(bio);
+
+        return result;
+    }
+
+    template <typename Function>
+    void wrap(const std::string &func, Condition &cond, Function &&function)
+    {
+        auto ret = function();
+
+        if (ret <= 0) {
+            int no = SSL_get_error(m_ssl.get(), ret);
+
+            switch (no) {
+            case SSL_ERROR_WANT_READ:
+                cond = Condition::Readable;
+                break;
+            case SSL_ERROR_WANT_WRITE:
+                cond = Condition::Writable;
+                break;
+            default:
+                throw Error(Error::System, func, error());
+            }
+        }
+    }
+
+    template <typename Address, typename Protocol>
+    void doConnect(Socket<Address, Protocol> &, Condition &cond)
+    {
+        wrap("connect", cond, [&] () -> int {
+            return SSL_connect(m_ssl.get());
+        });
+    }
+
+    template <typename Address, typename Protocol>
+    void doAccept(Socket<Address, Protocol> &, Condition &cond)
+    {
+        wrap("accept", cond, [&] () -> int {
+            return SSL_accept(m_ssl.get());
+        });
+    }
 
 public:
-	/**
-	 * \copydoc Tcp::type
-	 */
-	inline int type() const noexcept
-	{
-		return SOCK_STREAM;
-	}
-
-	/**
-	 * Empty TLS constructor.
-	 */
-	inline Tls()
-	{
+    /**
+     * \copydoc Tcp::type
+     */
+    inline int type() const noexcept
+    {
+        return SOCK_STREAM;
+    }
+
+    /**
+     * Empty TLS constructor.
+     */
+    inline Tls()
+    {
 #if !defined(NET_NO_SSL_AUTO_INIT)
-		ssl::init();
+        ssl::init();
 #endif
-	}
-
-	/**
-	 * Set the method.
-	 *
-	 * \param method the method
-	 * \pre the socket must not be already created
-	 */
-	inline void setMethod(ssl::Method method) noexcept
-	{
-		assert(!m_context);
-		assert(!m_ssl);
-
-		m_method = method;
-	}
-
-	/**
-	 * Use the specified private key file.
-	 *
-	 * \param file the path to the private key
-	 */
-	inline void setPrivateKey(std::string file) noexcept
-	{
-		m_key = std::move(file);
-	}
-
-	/**
-	 * Use the specified certificate file.
-	 *
-	 * \param file the path to the file
-	 */
-	inline void setCertificate(std::string file) noexcept
-	{
-		m_certificate = std::move(file);
-	}
-
-	/**
-	 * Set to true if we must verify the certificate and private key.
-	 *
-	 * \param verify the mode
-	 */
-	inline void setVerify(bool verify = true) noexcept
-	{
-		m_verify = verify;
-	}
-
-	/**
-	 * Initialize the SSL objects after have created.
-	 *
-	 * \param sc the socket
-	 * \throw net::Error on errors
-	 */
-	template <typename Address>
-	void create(Socket<Address, Tls> &sc)
-	{
-		auto method = (m_method == ssl::Tlsv1) ? TLSv1_method() : SSLv23_method();
-
-		m_context = Context(SSL_CTX_new(method), SSL_CTX_free);
-		m_ssl = Ssl(SSL_new(m_context.get()), SSL_free);
-
-		SSL_set_fd(m_ssl.get(), static_cast<int>(sc.handle()));
-
-		/*
-		 * Load certificates, the wrap function requires a condition so just add a dummy value.
-		 */
-		Condition dummy;
-
-		if (m_certificate.size() > 0)
-			wrap("SSL_CTX_use_certificate_file", dummy, [&] () -> int {
-				return SSL_CTX_use_certificate_file(m_context.get(), m_certificate.c_str(), SSL_FILETYPE_PEM);
-			});
-		if (m_key.size() > 0)
-			wrap("SSL_CTX_use_PrivateKey_file", dummy, [&] () -> int {
-				return SSL_CTX_use_PrivateKey_file(m_context.get(), m_key.c_str(), SSL_FILETYPE_PEM);
-			});
-		if (m_verify && !SSL_CTX_check_private_key(m_context.get()))
-			throw Error(Error::System, "(openssl)", "unable to verify key");
-	}
-
-	/**
-	 * Initiate connection.
-	 *
-	 * \param sc the socket
-	 * \param address the address
-	 * \param length the address length
-	 * \param cond the condition
-	 */
-	template <typename Address, typename Protocol>
-	void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length, Condition &cond)
-	{
-		// 1. Connect using raw TCP.
-		Tcp::connect(sc, address, length, cond);
-
-		// 2. If the connection is complete (e.g. non-blocking), try handshake.
-		if (cond == Condition::None) {
-			m_tcpconnected = true;
-			doConnect(sc, cond);
-		}
-	}
-
-	/**
-	 * Resume the connection.
-	 *
-	 * \param sc the socket
-	 * \param cond the condition to wait
-	 */
-	template <typename Address, typename Protocol>
-	void connect(Socket<Address, Protocol> &sc, Condition &cond)
-	{
-		// 1. Be sure to complete standard connect before.
-		if (!m_tcpconnected) {
-			Tcp::connect(sc, cond);
-			m_tcpconnected = (cond == Condition::None);
-		}
-
-		// 2. Do SSL connect.
-		if (m_tcpconnected)
-			doConnect(sc, cond);
-	}
-
-	/**
-	 * Accept a new client.
-	 *
-	 * If there are no pending connection, an invalid socket is returned, condition is left to Condition::None.
-	 *
-	 * \param sc the socket
-	 * \param address the address
-	 * \param length the length
-	 * \param cond the condition to wait
-	 * \return the new socket
-	 */
-	template <typename Address>
-	Socket<Address, Tls> accept(Socket<Address, Tls> &sc, sockaddr *address, socklen_t *length, Condition &cond)
-	{
-		// 1. TCP returns empty client if no pending connection is available.
-		auto client = Tcp::accept(sc, address, length, cond);
-
-		// 2. If a client is available, try initial accept.
-		if (client.isOpen()) {
-			Tls &proto = client.protocol();
-
-			// 2.1. Share the context.
-			proto.m_context = m_context;
-
-			// 2.2. Create new SSL instance.
-			proto.m_ssl = Ssl(SSL_new(m_context.get()), SSL_free);
-
-			SSL_set_fd(proto.m_ssl.get(), static_cast<int>(client.handle()));
-
-			// 2.3. Try accept process on the **new** client.
-			proto.doAccept(client, cond);
-		}
-
-		return client;
-	}
-
-	/**
-	 * Resume accept process.
-	 *
-	 * \param sc the socket
-	 * \param cond the condition to wait
-	 * \throw net::Error on failures
-	 */
-	template <typename Address, typename Protocol>
-	inline void accept(Socket<Address, Protocol> &sc, Condition &cond)
-	{
-		doAccept(sc, cond);
-	}
-
-	/**
-	 * Receive some data.
-	 *
-	 * \param data the destination buffer
-	 * \param length the buffer length
-	 * \param cond the condition
-	 * \return the number of bytes received
-	 */
-	template <typename Address>
-	std::size_t recv(Socket<Address, Tls> &, void *data, std::size_t length, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbread = 0;
-
-		wrap("recv", cond, [&] () -> int {
-			return (nbread = SSL_read(m_ssl.get(), data, max));
-		});
-
-		return static_cast<std::size_t>(nbread < 0 ? 0 : nbread);
-	}
-
-	/**
-	 * Send some data.
-	 *
-	 * \param data the data to send
-	 * \param length the length
-	 * \param cond the condition
-	 * \return the number of bytes sent
-	 */
-	template <typename Address>
-	std::size_t send(Socket<Address, Tls> &, const void *data, std::size_t length, Condition &cond)
-	{
-		int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
-		int nbsent = 0;
-
-		wrap("send", cond, [&] () -> int {
-			return (nbsent = SSL_write(m_ssl.get(), data, max));
-		});
-
-		return static_cast<std::size_t>(nbsent < 0 ? 0 : nbsent);
-	}
+    }
+
+    /**
+     * Set the method.
+     *
+     * \param method the method
+     * \pre the socket must not be already created
+     */
+    inline void setMethod(ssl::Method method) noexcept
+    {
+        assert(!m_context);
+        assert(!m_ssl);
+
+        m_method = method;
+    }
+
+    /**
+     * Use the specified private key file.
+     *
+     * \param file the path to the private key
+     */
+    inline void setPrivateKey(std::string file) noexcept
+    {
+        m_key = std::move(file);
+    }
+
+    /**
+     * Use the specified certificate file.
+     *
+     * \param file the path to the file
+     */
+    inline void setCertificate(std::string file) noexcept
+    {
+        m_certificate = std::move(file);
+    }
+
+    /**
+     * Set to true if we must verify the certificate and private key.
+     *
+     * \param verify the mode
+     */
+    inline void setVerify(bool verify = true) noexcept
+    {
+        m_verify = verify;
+    }
+
+    /**
+     * Initialize the SSL objects after have created.
+     *
+     * \param sc the socket
+     * \throw net::Error on errors
+     */
+    template <typename Address>
+    void create(Socket<Address, Tls> &sc)
+    {
+        auto method = (m_method == ssl::Tlsv1) ? TLSv1_method() : SSLv23_method();
+
+        m_context = Context(SSL_CTX_new(method), SSL_CTX_free);
+        m_ssl = Ssl(SSL_new(m_context.get()), SSL_free);
+
+        SSL_set_fd(m_ssl.get(), static_cast<int>(sc.handle()));
+
+        /*
+         * Load certificates, the wrap function requires a condition so just add a dummy value.
+         */
+        Condition dummy;
+
+        if (m_certificate.size() > 0)
+            wrap("SSL_CTX_use_certificate_file", dummy, [&] () -> int {
+                return SSL_CTX_use_certificate_file(m_context.get(), m_certificate.c_str(), SSL_FILETYPE_PEM);
+            });
+        if (m_key.size() > 0)
+            wrap("SSL_CTX_use_PrivateKey_file", dummy, [&] () -> int {
+                return SSL_CTX_use_PrivateKey_file(m_context.get(), m_key.c_str(), SSL_FILETYPE_PEM);
+            });
+        if (m_verify && !SSL_CTX_check_private_key(m_context.get()))
+            throw Error(Error::System, "(openssl)", "unable to verify key");
+    }
+
+    /**
+     * Initiate connection.
+     *
+     * \param sc the socket
+     * \param address the address
+     * \param length the address length
+     * \param cond the condition
+     */
+    template <typename Address, typename Protocol>
+    void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length, Condition &cond)
+    {
+        // 1. Connect using raw TCP.
+        Tcp::connect(sc, address, length, cond);
+
+        // 2. If the connection is complete (e.g. non-blocking), try handshake.
+        if (cond == Condition::None) {
+            m_tcpconnected = true;
+            doConnect(sc, cond);
+        }
+    }
+
+    /**
+     * Resume the connection.
+     *
+     * \param sc the socket
+     * \param cond the condition to wait
+     */
+    template <typename Address, typename Protocol>
+    void connect(Socket<Address, Protocol> &sc, Condition &cond)
+    {
+        // 1. Be sure to complete standard connect before.
+        if (!m_tcpconnected) {
+            Tcp::connect(sc, cond);
+            m_tcpconnected = (cond == Condition::None);
+        }
+
+        // 2. Do SSL connect.
+        if (m_tcpconnected)
+            doConnect(sc, cond);
+    }
+
+    /**
+     * Accept a new client.
+     *
+     * If there are no pending connection, an invalid socket is returned, condition is left to Condition::None.
+     *
+     * \param sc the socket
+     * \param address the address
+     * \param length the length
+     * \param cond the condition to wait
+     * \return the new socket
+     */
+    template <typename Address>
+    Socket<Address, Tls> accept(Socket<Address, Tls> &sc, sockaddr *address, socklen_t *length, Condition &cond)
+    {
+        // 1. TCP returns empty client if no pending connection is available.
+        auto client = Tcp::accept(sc, address, length, cond);
+
+        // 2. If a client is available, try initial accept.
+        if (client.isOpen()) {
+            Tls &proto = client.protocol();
+
+            // 2.1. Share the context.
+            proto.m_context = m_context;
+
+            // 2.2. Create new SSL instance.
+            proto.m_ssl = Ssl(SSL_new(m_context.get()), SSL_free);
+
+            SSL_set_fd(proto.m_ssl.get(), static_cast<int>(client.handle()));
+
+            // 2.3. Try accept process on the **new** client.
+            proto.doAccept(client, cond);
+        }
+
+        return client;
+    }
+
+    /**
+     * Resume accept process.
+     *
+     * \param sc the socket
+     * \param cond the condition to wait
+     * \throw net::Error on failures
+     */
+    template <typename Address, typename Protocol>
+    inline void accept(Socket<Address, Protocol> &sc, Condition &cond)
+    {
+        doAccept(sc, cond);
+    }
+
+    /**
+     * Receive some data.
+     *
+     * \param data the destination buffer
+     * \param length the buffer length
+     * \param cond the condition
+     * \return the number of bytes received
+     */
+    template <typename Address>
+    std::size_t recv(Socket<Address, Tls> &, void *data, std::size_t length, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbread = 0;
+
+        wrap("recv", cond, [&] () -> int {
+            return (nbread = SSL_read(m_ssl.get(), data, max));
+        });
+
+        return static_cast<std::size_t>(nbread < 0 ? 0 : nbread);
+    }
+
+    /**
+     * Send some data.
+     *
+     * \param data the data to send
+     * \param length the length
+     * \param cond the condition
+     * \return the number of bytes sent
+     */
+    template <typename Address>
+    std::size_t send(Socket<Address, Tls> &, const void *data, std::size_t length, Condition &cond)
+    {
+        int max = length > INT_MAX ? INT_MAX : static_cast<int>(length);
+        int nbsent = 0;
+
+        wrap("send", cond, [&] () -> int {
+            return (nbsent = SSL_write(m_ssl.get(), data, max));
+        });
+
+        return static_cast<std::size_t>(nbsent < 0 ? 0 : nbsent);
+    }
 };
 
 #endif // !NET_NO_SSL
@@ -2778,75 +2778,75 @@
  */
 class GenericAddress {
 private:
-	sockaddr_storage m_address;
-	socklen_t m_length{0};
+    sockaddr_storage m_address;
+    socklen_t m_length{0};
 
 public:
-	/**
-	 * Construct a null address.
-	 */
-	inline GenericAddress() noexcept
-	{
-		std::memset(&m_address, 0, sizeof (sockaddr_storage));
-	}
-
-	/**
-	 * Construct an address.
-	 *
-	 * \pre address is not null
-	 * \pre length <= sizeof (sockaddr_storage)
-	 * \param address the address to copy
-	 * \param length the address length
-	 */
-	inline GenericAddress(const sockaddr *address, socklen_t length) noexcept
-		: m_length(length)
-	{
-		assert(address);
-		assert(static_cast<unsigned>(length) <= sizeof (sockaddr_storage));
-
-		std::memset(&m_address, 0, sizeof (sockaddr_storage));
-		std::memcpy(&m_address, address, length);
-	}
-
-	/**
-	 * Get the address family.
-	 *
-	 * \return the address family
-	 */
-	inline int domain() const noexcept
-	{
-		return m_address.ss_family;
-	}
-
-	/**
-	 * Get the underlying address.
-	 *
-	 * \return the address
-	 */
-	inline sockaddr *address() noexcept
-	{
-		return reinterpret_cast<sockaddr *>(&m_address);
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the address
-	 */
-	inline const sockaddr *address() const noexcept
-	{
-		return reinterpret_cast<const sockaddr *>(&m_address);
-	}
-
-	/**
-	 * Get the underlying address length.
-	 *
-	 * \return the length
-	 */
-	inline socklen_t length() const noexcept
-	{
-		return m_length;
-	}
+    /**
+     * Construct a null address.
+     */
+    inline GenericAddress() noexcept
+    {
+        std::memset(&m_address, 0, sizeof (sockaddr_storage));
+    }
+
+    /**
+     * Construct an address.
+     *
+     * \pre address is not null
+     * \pre length <= sizeof (sockaddr_storage)
+     * \param address the address to copy
+     * \param length the address length
+     */
+    inline GenericAddress(const sockaddr *address, socklen_t length) noexcept
+        : m_length(length)
+    {
+        assert(address);
+        assert(static_cast<unsigned>(length) <= sizeof (sockaddr_storage));
+
+        std::memset(&m_address, 0, sizeof (sockaddr_storage));
+        std::memcpy(&m_address, address, length);
+    }
+
+    /**
+     * Get the address family.
+     *
+     * \return the address family
+     */
+    inline int domain() const noexcept
+    {
+        return m_address.ss_family;
+    }
+
+    /**
+     * Get the underlying address.
+     *
+     * \return the address
+     */
+    inline sockaddr *address() noexcept
+    {
+        return reinterpret_cast<sockaddr *>(&m_address);
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the address
+     */
+    inline const sockaddr *address() const noexcept
+    {
+        return reinterpret_cast<const sockaddr *>(&m_address);
+    }
+
+    /**
+     * Get the underlying address length.
+     *
+     * \return the length
+     */
+    inline socklen_t length() const noexcept
+    {
+        return m_length;
+    }
 };
 
 /**
@@ -2858,7 +2858,7 @@
  */
 inline bool operator==(const GenericAddress &a1, const GenericAddress &a2) noexcept
 {
-	return a1.length() == a2.length() && std::memcmp(a1.address(), a2.address(), a1.length()) == 0;
+    return a1.length() == a2.length() && std::memcmp(a1.address(), a2.address(), a1.length()) == 0;
 }
 
 /**
@@ -2870,7 +2870,7 @@
  */
 inline bool operator!=(const GenericAddress &a1, const GenericAddress &a2) noexcept
 {
-	return !(a1 == a2);
+    return !(a1 == a2);
 }
 
 /**
@@ -2882,266 +2882,266 @@
  */
 class Ip {
 private:
-	union {
-		sockaddr_in6 m_sin6;
-		sockaddr_in m_sin;
-	};
-
-	int m_domain;
+    union {
+        sockaddr_in6 m_sin6;
+        sockaddr_in m_sin;
+    };
+
+    int m_domain;
 
 public:
-	/**
-	 * Create IP address, defaults to IPv4.
-	 *
-	 * \pre domain must be AF_INET or AF_INET6
-	 * \param domain the domain
-	 */
-	inline Ip(int domain = AF_INET) noexcept
-		: m_domain(domain)
-	{
-		assert(domain == AF_INET || domain == AF_INET6);
-
-		std::memset(&m_sin, 0, sizeof (sockaddr_in));
-	}
-
-	/**
-	 * Create an IP address on the specific ip address.
-	 *
-	 * \pre domain must be AF_INET or AF_INET6
-	 * \param ip the address or "*" for any
-	 * \param port the port
-	 * \param domain the domain
-	 * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
-	 * \throw net::Error on failures or if inet_pton is unavailable
-	 */
-	inline Ip(const std::string &ip, std::uint16_t port, int domain)
-		: Ip(domain)
-	{
-		if (m_domain == AF_INET)
-			make(ip, port, m_sin);
-		else
-			make(ip, port, m_sin6);
-	}
-
-	/**
-	 * Create the IP address from the storage.
-	 *
-	 * \pre the storage domain must be AF_INET or AF_INET6
-	 * \param ss the the storage
-	 * \param length the storage length
-	 */
-	inline Ip(const sockaddr *ss, socklen_t length) noexcept
-		: Ip(ss->sa_family)
-	{
-		assert(ss->sa_family == AF_INET || ss->sa_family == AF_INET6);
-
-		if (ss->sa_family == AF_INET)
-			std::memcpy(&m_sin, ss, length);
-		else
-			std::memcpy(&m_sin6, ss, length);
-	}
-
-	/**
-	 * Get the domain.
-	 *
-	 * \return AF_INET or AF_INET6
-	 */
-	inline int domain() const noexcept
-	{
-		return m_domain;
-	}
-
-	/**
-	 * Get the underlying address, may be a sockaddr_in or sockaddr_in6.
-	 *
-	 * \return the address
-	 */
-	inline const sockaddr *address() const noexcept
-	{
-		return m_domain == AF_INET ? reinterpret_cast<const sockaddr *>(&m_sin) : reinterpret_cast<const sockaddr *>(&m_sin6);
-	}
-
-	/**
-	 * Get the address length.
-	 *
-	 * \return the address length
-	 */
-	inline socklen_t length() const noexcept
-	{
-		return m_domain == AF_INET ? sizeof (sockaddr_in) : sizeof (sockaddr_in6);
-	}
-
-	/**
-	 * Retrieve the port.
-	 *
-	 * \return the port
-	 */
-	inline std::uint16_t port() const noexcept
-	{
-		return m_domain == AF_INET ? ntohs(m_sin.sin_port) : ntohs(m_sin6.sin6_port);
-	}
-
-	/**
-	 * Get the ip address.
-	 *
-	 * \return the ip address
-	 * \throw net::Error on errors or if inet_ntop is unavailable
-	 */
-	inline std::string ip() const
-	{
-		return m_domain == AF_INET ? ip(m_sin) : ip(m_sin6);
-	}
-
-	/**
-	 * Prepare the sockaddr_in structure with the given ip.
-	 *
-	 * \param ip the ip address
-	 * \param port the port
-	 * \param sin the Ipv4 address
-	 * \throw net::Error if inet_pton is unavailable
-	 */
-	static void make(const std::string &ip, std::uint16_t port, sockaddr_in &sin)
-	{
+    /**
+     * Create IP address, defaults to IPv4.
+     *
+     * \pre domain must be AF_INET or AF_INET6
+     * \param domain the domain
+     */
+    inline Ip(int domain = AF_INET) noexcept
+        : m_domain(domain)
+    {
+        assert(domain == AF_INET || domain == AF_INET6);
+
+        std::memset(&m_sin, 0, sizeof (sockaddr_in));
+    }
+
+    /**
+     * Create an IP address on the specific ip address.
+     *
+     * \pre domain must be AF_INET or AF_INET6
+     * \param ip the address or "*" for any
+     * \param port the port
+     * \param domain the domain
+     * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
+     * \throw net::Error on failures or if inet_pton is unavailable
+     */
+    inline Ip(const std::string &ip, std::uint16_t port, int domain)
+        : Ip(domain)
+    {
+        if (m_domain == AF_INET)
+            make(ip, port, m_sin);
+        else
+            make(ip, port, m_sin6);
+    }
+
+    /**
+     * Create the IP address from the storage.
+     *
+     * \pre the storage domain must be AF_INET or AF_INET6
+     * \param ss the the storage
+     * \param length the storage length
+     */
+    inline Ip(const sockaddr *ss, socklen_t length) noexcept
+        : Ip(ss->sa_family)
+    {
+        assert(ss->sa_family == AF_INET || ss->sa_family == AF_INET6);
+
+        if (ss->sa_family == AF_INET)
+            std::memcpy(&m_sin, ss, length);
+        else
+            std::memcpy(&m_sin6, ss, length);
+    }
+
+    /**
+     * Get the domain.
+     *
+     * \return AF_INET or AF_INET6
+     */
+    inline int domain() const noexcept
+    {
+        return m_domain;
+    }
+
+    /**
+     * Get the underlying address, may be a sockaddr_in or sockaddr_in6.
+     *
+     * \return the address
+     */
+    inline const sockaddr *address() const noexcept
+    {
+        return m_domain == AF_INET ? reinterpret_cast<const sockaddr *>(&m_sin) : reinterpret_cast<const sockaddr *>(&m_sin6);
+    }
+
+    /**
+     * Get the address length.
+     *
+     * \return the address length
+     */
+    inline socklen_t length() const noexcept
+    {
+        return m_domain == AF_INET ? sizeof (sockaddr_in) : sizeof (sockaddr_in6);
+    }
+
+    /**
+     * Retrieve the port.
+     *
+     * \return the port
+     */
+    inline std::uint16_t port() const noexcept
+    {
+        return m_domain == AF_INET ? ntohs(m_sin.sin_port) : ntohs(m_sin6.sin6_port);
+    }
+
+    /**
+     * Get the ip address.
+     *
+     * \return the ip address
+     * \throw net::Error on errors or if inet_ntop is unavailable
+     */
+    inline std::string ip() const
+    {
+        return m_domain == AF_INET ? ip(m_sin) : ip(m_sin6);
+    }
+
+    /**
+     * Prepare the sockaddr_in structure with the given ip.
+     *
+     * \param ip the ip address
+     * \param port the port
+     * \param sin the Ipv4 address
+     * \throw net::Error if inet_pton is unavailable
+     */
+    static void make(const std::string &ip, std::uint16_t port, sockaddr_in &sin)
+    {
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
-		sin.sin_family = AF_INET;
-		sin.sin_port = htons(port);
-
-		if (ip == "*")
-			sin.sin_addr.s_addr = INADDR_ANY;
+        sin.sin_family = AF_INET;
+        sin.sin_port = htons(port);
+
+        if (ip == "*")
+            sin.sin_addr.s_addr = INADDR_ANY;
 #if defined(NET_HAVE_INET_PTON)
-		else if (inet_pton(AF_INET, ip.c_str(), &sin.sin_addr) <= 0)
-			throw Error(Error::System, "inet_pton");
+        else if (inet_pton(AF_INET, ip.c_str(), &sin.sin_addr) <= 0)
+            throw Error(Error::System, "inet_pton");
 #else
-		else
-			throw Error(Error::System, "inet_pton", std::strerror(ENOSYS));
+        else
+            throw Error(Error::System, "inet_pton", std::strerror(ENOSYS));
 #endif
-	}
-
-	/**
-	 * Prepare the sockaddr_in structure with the given ip.
-	 *
-	 * \param ip the ip address
-	 * \param port the port
-	 * \param sin6 the Ipv6 address
-	 * \throw net::Error if inet_pton is unavailable
-	 */
-	static void make(const std::string &ip, std::uint16_t port, sockaddr_in6 &sin6)
-	{
+    }
+
+    /**
+     * Prepare the sockaddr_in structure with the given ip.
+     *
+     * \param ip the ip address
+     * \param port the port
+     * \param sin6 the Ipv6 address
+     * \throw net::Error if inet_pton is unavailable
+     */
+    static void make(const std::string &ip, std::uint16_t port, sockaddr_in6 &sin6)
+    {
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
-		sin6.sin6_family = AF_INET6;
-		sin6.sin6_port = htons(port);
-
-		if (ip == "*")
-			sin6.sin6_addr = in6addr_any;
+        sin6.sin6_family = AF_INET6;
+        sin6.sin6_port = htons(port);
+
+        if (ip == "*")
+            sin6.sin6_addr = in6addr_any;
 #if defined(NET_HAVE_INET_PTON)
-		else if (inet_pton(AF_INET6, ip.c_str(), &sin6.sin6_addr) <= 0)
-			throw Error(Error::System, "inet_pton");
+        else if (inet_pton(AF_INET6, ip.c_str(), &sin6.sin6_addr) <= 0)
+            throw Error(Error::System, "inet_pton");
 #else
-		else
-			throw Error(Error::System, "inet_pton", std::strerror(ENOSYS));
+        else
+            throw Error(Error::System, "inet_pton", std::strerror(ENOSYS));
 #endif
-	}
-
-	/**
-	 * Get the underlying ip from the given address.
-	 *
-	 * \param sin the Ipv4 address
-	 * \return the ip address
-	 * \throw net::Error if inet_ntop is unavailable
-	 */
-	static std::string ip(const sockaddr_in &sin)
-	{
+    }
+
+    /**
+     * Get the underlying ip from the given address.
+     *
+     * \param sin the Ipv4 address
+     * \return the ip address
+     * \throw net::Error if inet_ntop is unavailable
+     */
+    static std::string ip(const sockaddr_in &sin)
+    {
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
 #if !defined(NET_HAVE_INET_NTOP)
-		(void)sin;
-
-		throw Error(Error::System, "inet_ntop", std::strerror(ENOSYS));
+        (void)sin;
+
+        throw Error(Error::System, "inet_ntop", std::strerror(ENOSYS));
 #else
-		char result[INET_ADDRSTRLEN + 1];
-
-		std::memset(result, 0, sizeof (result));
-
-		if (!inet_ntop(AF_INET, const_cast<in_addr *>(&sin.sin_addr), result, sizeof (result)))
-			throw Error(Error::System, "inet_ntop");
-
-		return result;
+        char result[INET_ADDRSTRLEN + 1];
+
+        std::memset(result, 0, sizeof (result));
+
+        if (!inet_ntop(AF_INET, const_cast<in_addr *>(&sin.sin_addr), result, sizeof (result)))
+            throw Error(Error::System, "inet_ntop");
+
+        return result;
 #endif
-	}
-
-	/**
-	 * Get the underlying ip from the given address.
-	 *
-	 * \param sin6 the Ipv6 address
-	 * \return the ip address
-	 * \throw net::Error if inet_ntop is unavailable
-	 */
-	static std::string ip(const sockaddr_in6 &sin6)
-	{
+    }
+
+    /**
+     * Get the underlying ip from the given address.
+     *
+     * \param sin6 the Ipv6 address
+     * \return the ip address
+     * \throw net::Error if inet_ntop is unavailable
+     */
+    static std::string ip(const sockaddr_in6 &sin6)
+    {
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
 #if !defined(NET_HAVE_INET_NTOP)
-		(void)sin6;
-
-		throw Error(Error::System, "inet_ntop", std::strerror(ENOSYS));
+        (void)sin6;
+
+        throw Error(Error::System, "inet_ntop", std::strerror(ENOSYS));
 #else
-		char result[INET6_ADDRSTRLEN];
-
-		std::memset(result, 0, sizeof (result));
-
-		if (!inet_ntop(AF_INET6, const_cast<in6_addr *>(&sin6.sin6_addr), result, sizeof (result)))
-			throw Error(Error::System, "inet_ntop");
-
-		return result;
+        char result[INET6_ADDRSTRLEN];
+
+        std::memset(result, 0, sizeof (result));
+
+        if (!inet_ntop(AF_INET6, const_cast<in6_addr *>(&sin6.sin6_addr), result, sizeof (result)))
+            throw Error(Error::System, "inet_ntop");
+
+        return result;
 #endif
-	}
-
-	/**
-	 * Resolve an hostname.
-	 *
-	 * This function wraps getaddrinfo and returns the first result.
-	 *
-	 * \param host the hostname
-	 * \param service the service name (port or name)
-	 * \param domain the domain (e.g. AF_INET)
-	 * \param type the socket type (e.g. SOCK_STREAM)
-	 * \return the resolved address
-	 * \throw net::Error on failures
-	 */
-	static Ip resolve(const std::string &host, const std::string &service, int domain = AF_INET, int type = SOCK_STREAM)
-	{
-		assert(domain == AF_INET || domain == AF_INET6);
+    }
+
+    /**
+     * Resolve an hostname.
+     *
+     * This function wraps getaddrinfo and returns the first result.
+     *
+     * \param host the hostname
+     * \param service the service name (port or name)
+     * \param domain the domain (e.g. AF_INET)
+     * \param type the socket type (e.g. SOCK_STREAM)
+     * \return the resolved address
+     * \throw net::Error on failures
+     */
+    static Ip resolve(const std::string &host, const std::string &service, int domain = AF_INET, int type = SOCK_STREAM)
+    {
+        assert(domain == AF_INET || domain == AF_INET6);
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
-		struct addrinfo hints, *res;
-
-		std::memset(&hints, 0, sizeof (struct addrinfo));
-		hints.ai_family = domain;
-		hints.ai_socktype = type;
-
-		int e = getaddrinfo(host.c_str(), service.c_str(), &hints, &res);
-
-		if (e != 0)
-			throw Error(Error::System, "getaddrinfo", gai_strerror(e));
-
-		Ip ip(res->ai_addr, res->ai_addrlen);
-
-		freeaddrinfo(res);
-
-		return ip;
-	}
+        struct addrinfo hints, *res;
+
+        std::memset(&hints, 0, sizeof (struct addrinfo));
+        hints.ai_family = domain;
+        hints.ai_socktype = type;
+
+        int e = getaddrinfo(host.c_str(), service.c_str(), &hints, &res);
+
+        if (e != 0)
+            throw Error(Error::System, "getaddrinfo", gai_strerror(e));
+
+        Ip ip(res->ai_addr, res->ai_addrlen);
+
+        freeaddrinfo(res);
+
+        return ip;
+    }
 };
 
 /**
@@ -3150,111 +3150,111 @@
  */
 class Ipv4 {
 private:
-	sockaddr_in m_sin;
+    sockaddr_in m_sin;
 
 public:
-	/**
-	 * Create an Ipv4 address.
-	 */
-	inline Ipv4() noexcept
-	{
-		std::memset(&m_sin, 0, sizeof (sockaddr_in));
-	}
-
-	/**
-	 * Create an Ipv4 address on the specific ip address.
-	 *
-	 * \param ip the address or "*" for any
-	 * \param port the port
-	 * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
-	 * \throw net::Error on failures or if inet_pton is unavailable
-	 */
-	inline Ipv4(const std::string &ip, std::uint16_t port)
-		: Ipv4()
-	{
-		Ip::make(ip, port, m_sin);
-	}
-
-	/**
-	 * Create the IP address from the storage.
-	 *
-	 * \pre the storage domain must be AF_INET
-	 * \param ss the the storage
-	 * \param length the storage length
-	 */
-	inline Ipv4(const sockaddr *ss, socklen_t length) noexcept
-	{
-		assert(ss->sa_family == AF_INET);
-
-		std::memcpy(&m_sin, ss, length);
-	}
-
-	/**
-	 * Get the domain.
-	 *
-	 * \return AF_INET
-	 */
-	inline int domain() const noexcept
-	{
-		return AF_INET;
-	}
-
-	/**
-	 * Get the underlying address.
-	 *
-	 * \return the address
-	 */
-	inline const sockaddr *address() const noexcept
-	{
-		return reinterpret_cast<const sockaddr *>(&m_sin);
-	}
-
-	/**
-	 * Get the address length.
-	 *
-	 * \return the size of sockaddr_in
-	 */
-	inline socklen_t length() const noexcept
-	{
-		return sizeof (sockaddr_in);
-	}
-
-	/**
-	 * Get the port.
-	 *
-	 * \return the port
-	 */
-	inline std::uint16_t port() const noexcept
-	{
-		return ntohs(m_sin.sin_port);
-	}
-
-	/**
-	 * Get the ip address.
-	 *
-	 * \return the ip address
-	 * \throw net::Error on errors or if inet_ntop is unavailable
-	 */
-	inline std::string ip() const
-	{
-		return Ip::ip(m_sin);
-	}
-
-	/**
-	 * Same as Ip::resolve with AF_INET as domain.
-	 *
-	 * \param host the hostname
-	 * \param service the service name (port or name)
-	 * \param type the socket type (e.g. SOCK_STREAM)
-	 * \return the resolved address
-	 * \throw net::Error on failures
-	 */
-	static Ipv4 resolve(const std::string &host, const std::string &service, int type = SOCK_STREAM)
-	{
-		Ip result = Ip::resolve(host, service, AF_INET, type);
-
-		return Ipv4(result.address(), result.length());
-	}
+    /**
+     * Create an Ipv4 address.
+     */
+    inline Ipv4() noexcept
+    {
+        std::memset(&m_sin, 0, sizeof (sockaddr_in));
+    }
+
+    /**
+     * Create an Ipv4 address on the specific ip address.
+     *
+     * \param ip the address or "*" for any
+     * \param port the port
+     * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
+     * \throw net::Error on failures or if inet_pton is unavailable
+     */
+    inline Ipv4(const std::string &ip, std::uint16_t port)
+        : Ipv4()
+    {
+        Ip::make(ip, port, m_sin);
+    }
+
+    /**
+     * Create the IP address from the storage.
+     *
+     * \pre the storage domain must be AF_INET
+     * \param ss the the storage
+     * \param length the storage length
+     */
+    inline Ipv4(const sockaddr *ss, socklen_t length) noexcept
+    {
+        assert(ss->sa_family == AF_INET);
+
+        std::memcpy(&m_sin, ss, length);
+    }
+
+    /**
+     * Get the domain.
+     *
+     * \return AF_INET
+     */
+    inline int domain() const noexcept
+    {
+        return AF_INET;
+    }
+
+    /**
+     * Get the underlying address.
+     *
+     * \return the address
+     */
+    inline const sockaddr *address() const noexcept
+    {
+        return reinterpret_cast<const sockaddr *>(&m_sin);
+    }
+
+    /**
+     * Get the address length.
+     *
+     * \return the size of sockaddr_in
+     */
+    inline socklen_t length() const noexcept
+    {
+        return sizeof (sockaddr_in);
+    }
+
+    /**
+     * Get the port.
+     *
+     * \return the port
+     */
+    inline std::uint16_t port() const noexcept
+    {
+        return ntohs(m_sin.sin_port);
+    }
+
+    /**
+     * Get the ip address.
+     *
+     * \return the ip address
+     * \throw net::Error on errors or if inet_ntop is unavailable
+     */
+    inline std::string ip() const
+    {
+        return Ip::ip(m_sin);
+    }
+
+    /**
+     * Same as Ip::resolve with AF_INET as domain.
+     *
+     * \param host the hostname
+     * \param service the service name (port or name)
+     * \param type the socket type (e.g. SOCK_STREAM)
+     * \return the resolved address
+     * \throw net::Error on failures
+     */
+    static Ipv4 resolve(const std::string &host, const std::string &service, int type = SOCK_STREAM)
+    {
+        Ip result = Ip::resolve(host, service, AF_INET, type);
+
+        return Ipv4(result.address(), result.length());
+    }
 };
 
 /**
@@ -3263,111 +3263,111 @@
  */
 class Ipv6 {
 private:
-	sockaddr_in6 m_sin6;
+    sockaddr_in6 m_sin6;
 
 public:
-	/**
-	 * Create an Ipv6 address.
-	 */
-	inline Ipv6() noexcept
-	{
-		std::memset(&m_sin6, 0, sizeof (sockaddr_in6));
-	}
-
-	/**
-	 * Create an Ipv6 address on the specific ip address.
-	 *
-	 * \param ip the address or "*" for any
-	 * \param port the port
-	 * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
-	 * \throw net::Error on failures or if inet_pton is unavailable
-	 */
-	inline Ipv6(const std::string &ip, std::uint16_t port)
-		: Ipv6()
-	{
-		Ip::make(ip, port, m_sin6);
-	}
-
-	/**
-	 * Create the IP address from the storage.
-	 *
-	 * \pre the storage domain must be AF_INET6
-	 * \param ss the the storage
-	 * \param length the storage length
-	 */
-	inline Ipv6(const sockaddr *ss, socklen_t length) noexcept
-	{
-		assert(ss->sa_family == AF_INET6);
-
-		std::memcpy(&m_sin6, ss, length);
-	}
-
-	/**
-	 * Get the domain.
-	 *
-	 * \return AF_INET6
-	 */
-	inline int domain() const noexcept
-	{
-		return AF_INET6;
-	}
-
-	/**
-	 * Get the underlying address.
-	 *
-	 * \return the address
-	 */
-	inline const sockaddr *address() const noexcept
-	{
-		return reinterpret_cast<const sockaddr *>(&m_sin6);
-	}
-
-	/**
-	 * Get the address length.
-	 *
-	 * \return the size of sockaddr_in
-	 */
-	inline socklen_t length() const noexcept
-	{
-		return sizeof (sockaddr_in6);
-	}
-
-	/**
-	 * Get the port.
-	 *
-	 * \return the port
-	 */
-	inline std::uint16_t port() const noexcept
-	{
-		return ntohs(m_sin6.sin6_port);
-	}
-
-	/**
-	 * Get the ip address.
-	 *
-	 * \return the ip address
-	 * \throw net::Error on errors or if inet_ntop is unavailable
-	 */
-	inline std::string ip() const
-	{
-		return Ip::ip(m_sin6);
-	}
-
-	/**
-	 * Same as Ip::resolve with AF_INET6 as domain.
-	 *
-	 * \param host the hostname
-	 * \param service the service name (port or name)
-	 * \param type the socket type (e.g. SOCK_STREAM)
-	 * \return the resolved address
-	 * \throw net::Error on failures
-	 */
-	static Ipv6 resolve(const std::string &host, const std::string &service, int type = SOCK_STREAM)
-	{
-		Ip result = Ip::resolve(host, service, AF_INET6, type);
-
-		return Ipv6(result.address(), result.length());
-	}
+    /**
+     * Create an Ipv6 address.
+     */
+    inline Ipv6() noexcept
+    {
+        std::memset(&m_sin6, 0, sizeof (sockaddr_in6));
+    }
+
+    /**
+     * Create an Ipv6 address on the specific ip address.
+     *
+     * \param ip the address or "*" for any
+     * \param port the port
+     * \warning If NET_HAVE_INET_PTON is undefined, host can not be other than "*"
+     * \throw net::Error on failures or if inet_pton is unavailable
+     */
+    inline Ipv6(const std::string &ip, std::uint16_t port)
+        : Ipv6()
+    {
+        Ip::make(ip, port, m_sin6);
+    }
+
+    /**
+     * Create the IP address from the storage.
+     *
+     * \pre the storage domain must be AF_INET6
+     * \param ss the the storage
+     * \param length the storage length
+     */
+    inline Ipv6(const sockaddr *ss, socklen_t length) noexcept
+    {
+        assert(ss->sa_family == AF_INET6);
+
+        std::memcpy(&m_sin6, ss, length);
+    }
+
+    /**
+     * Get the domain.
+     *
+     * \return AF_INET6
+     */
+    inline int domain() const noexcept
+    {
+        return AF_INET6;
+    }
+
+    /**
+     * Get the underlying address.
+     *
+     * \return the address
+     */
+    inline const sockaddr *address() const noexcept
+    {
+        return reinterpret_cast<const sockaddr *>(&m_sin6);
+    }
+
+    /**
+     * Get the address length.
+     *
+     * \return the size of sockaddr_in
+     */
+    inline socklen_t length() const noexcept
+    {
+        return sizeof (sockaddr_in6);
+    }
+
+    /**
+     * Get the port.
+     *
+     * \return the port
+     */
+    inline std::uint16_t port() const noexcept
+    {
+        return ntohs(m_sin6.sin6_port);
+    }
+
+    /**
+     * Get the ip address.
+     *
+     * \return the ip address
+     * \throw net::Error on errors or if inet_ntop is unavailable
+     */
+    inline std::string ip() const
+    {
+        return Ip::ip(m_sin6);
+    }
+
+    /**
+     * Same as Ip::resolve with AF_INET6 as domain.
+     *
+     * \param host the hostname
+     * \param service the service name (port or name)
+     * \param type the socket type (e.g. SOCK_STREAM)
+     * \return the resolved address
+     * \throw net::Error on failures
+     */
+    static Ipv6 resolve(const std::string &host, const std::string &service, int type = SOCK_STREAM)
+    {
+        Ip result = Ip::resolve(host, service, AF_INET6, type);
+
+        return Ipv6(result.address(), result.length());
+    }
 };
 
 #if !defined(_WIN32)
@@ -3380,87 +3380,87 @@
  */
 class Local {
 private:
-	sockaddr_un m_sun;
-	std::string m_path;
+    sockaddr_un m_sun;
+    std::string m_path;
 
 public:
-	/**
-	 * Get the domain AF_LOCAL.
-	 *
-	 * \return AF_LOCAL
-	 */
-	inline int domain() const noexcept
-	{
-		return AF_LOCAL;
-	}
-
-	/**
-	 * Default constructor.
-	 */
-	inline Local() noexcept
-	{
-		std::memset(&m_sun, 0, sizeof (sockaddr_un));
-	}
-
-	/**
-	 * Construct an address to a path.
-	 *
-	 * \param path the path
-	 * \param rm remove the file before (default: false)
-	 */
-	Local(std::string path, bool rm = false) noexcept
-		: m_path(std::move(path))
-	{
-		// Silently remove the file even if it fails.
-		if (rm)
-			::remove(m_path.c_str());
-
-		// Copy the path.
-		std::memset(m_sun.sun_path, 0, sizeof (m_sun.sun_path));
-		std::strncpy(m_sun.sun_path, m_path.c_str(), sizeof (m_sun.sun_path) - 1);
-
-		// Set the parameters.
-		m_sun.sun_family = AF_LOCAL;
-	}
-
-	/**
-	 * Construct an unix address from a storage address.
-	 *
-	 * \pre storage's domain must be AF_LOCAL
-	 * \param ss the storage
-	 * \param length the length
-	 */
-	Local(const sockaddr *ss, socklen_t length) noexcept
-	{
-		assert(ss->sa_family == AF_LOCAL);
-
-		std::memcpy(&m_sun, ss, length);
-		m_path = reinterpret_cast<const sockaddr_un &>(m_sun).sun_path;
-	}
-
-	/**
-	 * Get the sockaddr_un.
-	 *
-	 * \return the address
-	 */
-	inline const sockaddr *address() const noexcept
-	{
-		return reinterpret_cast<const sockaddr *>(&m_sun);
-	}
-
-	/**
-	 * Get the address length.
-	 *
-	 * \return the length
-	 */
-	inline socklen_t length() const noexcept
-	{
+    /**
+     * Get the domain AF_LOCAL.
+     *
+     * \return AF_LOCAL
+     */
+    inline int domain() const noexcept
+    {
+        return AF_LOCAL;
+    }
+
+    /**
+     * Default constructor.
+     */
+    inline Local() noexcept
+    {
+        std::memset(&m_sun, 0, sizeof (sockaddr_un));
+    }
+
+    /**
+     * Construct an address to a path.
+     *
+     * \param path the path
+     * \param rm remove the file before (default: false)
+     */
+    Local(std::string path, bool rm = false) noexcept
+        : m_path(std::move(path))
+    {
+        // Silently remove the file even if it fails.
+        if (rm)
+            ::remove(m_path.c_str());
+
+        // Copy the path.
+        std::memset(m_sun.sun_path, 0, sizeof (m_sun.sun_path));
+        std::strncpy(m_sun.sun_path, m_path.c_str(), sizeof (m_sun.sun_path) - 1);
+
+        // Set the parameters.
+        m_sun.sun_family = AF_LOCAL;
+    }
+
+    /**
+     * Construct an unix address from a storage address.
+     *
+     * \pre storage's domain must be AF_LOCAL
+     * \param ss the storage
+     * \param length the length
+     */
+    Local(const sockaddr *ss, socklen_t length) noexcept
+    {
+        assert(ss->sa_family == AF_LOCAL);
+
+        std::memcpy(&m_sun, ss, length);
+        m_path = reinterpret_cast<const sockaddr_un &>(m_sun).sun_path;
+    }
+
+    /**
+     * Get the sockaddr_un.
+     *
+     * \return the address
+     */
+    inline const sockaddr *address() const noexcept
+    {
+        return reinterpret_cast<const sockaddr *>(&m_sun);
+    }
+
+    /**
+     * Get the address length.
+     *
+     * \return the length
+     */
+    inline socklen_t length() const noexcept
+    {
 #if defined(NET_HAVE_SUN_LEN)
-		return SUN_LEN(&m_sun);
+        return SUN_LEN(&m_sun);
 #else
-		return sizeof (m_sun);
+        return sizeof (m_sun);
 #endif
-	}
+    }
 };
 
 #endif // !_WIN32
@@ -3489,119 +3489,119 @@
  */
 class AddressIterator : public std::iterator<std::forward_iterator_tag, GenericAddress> {
 private:
-	std::vector<GenericAddress> m_addresses;
-	std::size_t m_index{0};
+    std::vector<GenericAddress> m_addresses;
+    std::size_t m_index{0};
 
 public:
-	/**
-	 * Construct a null iterator.
-	 *
-	 * The default constructed iterator is not dereferenceable.
-	 */
-	inline AddressIterator() noexcept = default;
-
-	/**
-	 * Construct an address iterator with a set of addresses.
-	 *
-	 * \pre index < m_addresses.size()
-	 * \param addresses the addresses
-	 * \param index the first index
-	 */
-	inline AddressIterator(std::vector<GenericAddress> addresses, std::size_t index = 0) noexcept
-		: m_addresses(std::move(addresses))
-		, m_index(index)
-	{
-		assert(index < m_addresses.size());
-	}
-
-	/**
-	 * Get the generic address.
-	 *
-	 * \pre this is dereferenceable
-	 * \return the generic address
-	 */
-	inline const GenericAddress &operator*() const noexcept
-	{
-		assert(m_index <= m_addresses.size());
-
-		return m_addresses[m_index];
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre this is dereferenceable
-	 * \return the generic address
-	 */
-	inline GenericAddress &operator*() noexcept
-	{
-		assert(m_index <= m_addresses.size());
-
-		return m_addresses[m_index];
-	}
-
-	/**
-	 * Get the generic address.
-	 *
-	 * \pre this is dereferenceable
-	 * \return the generic address
-	 */
-	inline const GenericAddress *operator->() const noexcept
-	{
-		assert(m_index <= m_addresses.size());
-
-		return &m_addresses[m_index];
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \pre this is dereferenceable
-	 * \return the generic address
-	 */
-	inline GenericAddress *operator->() noexcept
-	{
-		assert(m_index <= m_addresses.size());
-
-		return &m_addresses[m_index];
-	}
-
-	/**
-	 * Pre-increment the iterator.
-	 *
-	 * \return this
-	 */
-	inline AddressIterator &operator++(int) noexcept
-	{
-		if (m_index + 1 >= m_addresses.size()) {
-			m_addresses.clear();
-			m_index = 0;
-		} else
-			m_index ++;
-
-		return *this;
-	}
-
-	/**
-	 * Post-increment the iterator.
-	 *
-	 * \return copy of this
-	 */
-	inline AddressIterator operator++() noexcept
-	{
-		AddressIterator save = *this;
-
-		if (m_index + 1 >= m_addresses.size()) {
-			m_addresses.clear();
-			m_index = 0;
-		} else
-			m_index ++;
-
-		return save;
-	}
-
-	friend bool operator==(const AddressIterator &, const AddressIterator &) noexcept;
-	friend bool operator!=(const AddressIterator &, const AddressIterator &) noexcept;
+    /**
+     * Construct a null iterator.
+     *
+     * The default constructed iterator is not dereferenceable.
+     */
+    inline AddressIterator() noexcept = default;
+
+    /**
+     * Construct an address iterator with a set of addresses.
+     *
+     * \pre index < m_addresses.size()
+     * \param addresses the addresses
+     * \param index the first index
+     */
+    inline AddressIterator(std::vector<GenericAddress> addresses, std::size_t index = 0) noexcept
+        : m_addresses(std::move(addresses))
+        , m_index(index)
+    {
+        assert(index < m_addresses.size());
+    }
+
+    /**
+     * Get the generic address.
+     *
+     * \pre this is dereferenceable
+     * \return the generic address
+     */
+    inline const GenericAddress &operator*() const noexcept
+    {
+        assert(m_index <= m_addresses.size());
+
+        return m_addresses[m_index];
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre this is dereferenceable
+     * \return the generic address
+     */
+    inline GenericAddress &operator*() noexcept
+    {
+        assert(m_index <= m_addresses.size());
+
+        return m_addresses[m_index];
+    }
+
+    /**
+     * Get the generic address.
+     *
+     * \pre this is dereferenceable
+     * \return the generic address
+     */
+    inline const GenericAddress *operator->() const noexcept
+    {
+        assert(m_index <= m_addresses.size());
+
+        return &m_addresses[m_index];
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \pre this is dereferenceable
+     * \return the generic address
+     */
+    inline GenericAddress *operator->() noexcept
+    {
+        assert(m_index <= m_addresses.size());
+
+        return &m_addresses[m_index];
+    }
+
+    /**
+     * Pre-increment the iterator.
+     *
+     * \return this
+     */
+    inline AddressIterator &operator++(int) noexcept
+    {
+        if (m_index + 1 >= m_addresses.size()) {
+            m_addresses.clear();
+            m_index = 0;
+        } else
+            m_index ++;
+
+        return *this;
+    }
+
+    /**
+     * Post-increment the iterator.
+     *
+     * \return copy of this
+     */
+    inline AddressIterator operator++() noexcept
+    {
+        AddressIterator save = *this;
+
+        if (m_index + 1 >= m_addresses.size()) {
+            m_addresses.clear();
+            m_index = 0;
+        } else
+            m_index ++;
+
+        return save;
+    }
+
+    friend bool operator==(const AddressIterator &, const AddressIterator &) noexcept;
+    friend bool operator!=(const AddressIterator &, const AddressIterator &) noexcept;
 };
 
 /**
@@ -3613,7 +3613,7 @@
  */
 inline bool operator==(const AddressIterator &i1, const AddressIterator &i2) noexcept
 {
-	return i1.m_addresses == i2.m_addresses && i1.m_index == i2.m_index;
+    return i1.m_addresses == i2.m_addresses && i1.m_index == i2.m_index;
 }
 
 /**
@@ -3625,7 +3625,7 @@
  */
 inline bool operator!=(const AddressIterator &i1, const AddressIterator &i2) noexcept
 {
-	return !(i1 == i2);
+    return !(i1 == i2);
 }
 
 } // !address
@@ -3642,74 +3642,74 @@
  */
 class SockBlockMode {
 private:
-	bool m_value;
+    bool m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * By default the blocking mode is set to true.
-	 *
-	 * \param value set to true to make blocking sockets
-	 */
-	inline SockBlockMode(bool value = true) noexcept
-		: m_value(value)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	void set(Socket<Address, Protocol> &sc) const
-	{
+    /**
+     * Create the option.
+     *
+     * By default the blocking mode is set to true.
+     *
+     * \param value set to true to make blocking sockets
+     */
+    inline SockBlockMode(bool value = true) noexcept
+        : m_value(value)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    void set(Socket<Address, Protocol> &sc) const
+    {
 #if defined(O_NONBLOCK) && !defined(_WIN32)
-		int flags;
-
-		if ((flags = fcntl(sc.handle(), F_GETFL, 0)) < 0)
-			flags = 0;
-
-		if (m_value)
-			flags &= ~(O_NONBLOCK);
-		else
-			flags |= O_NONBLOCK;
-
-		if (fcntl(sc.handle(), F_SETFL, flags) < 0)
-			throw Error(Error::System, "fcntl");
+        int flags;
+
+        if ((flags = fcntl(sc.handle(), F_GETFL, 0)) < 0)
+            flags = 0;
+
+        if (m_value)
+            flags &= ~(O_NONBLOCK);
+        else
+            flags |= O_NONBLOCK;
+
+        if (fcntl(sc.handle(), F_SETFL, flags) < 0)
+            throw Error(Error::System, "fcntl");
 #else
-		unsigned long flags = (m_value) ? 0 : 1;
-
-		if (ioctlsocket(sc.handle(), FIONBIO, &flags) == Failure)
-			throw Error(Error::System, "fcntl");
+        unsigned long flags = (m_value) ? 0 : 1;
+
+        if (ioctlsocket(sc.handle(), FIONBIO, &flags) == Failure)
+            throw Error(Error::System, "fcntl");
 #endif
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	bool get(Socket<Address, Protocol> &sc) const
-	{
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    bool get(Socket<Address, Protocol> &sc) const
+    {
 #if defined(O_NONBLOCK) && !defined(_WIN32)
-		int flags = fcntl(sc.handle(), F_GETFL, 0);
-
-		if (flags < 0)
-			throw Error(Error::System, "fcntl");
-
-		return !(flags & O_NONBLOCK);
+        int flags = fcntl(sc.handle(), F_GETFL, 0);
+
+        if (flags < 0)
+            throw Error(Error::System, "fcntl");
+
+        return !(flags & O_NONBLOCK);
 #else
-		(void)sc;
-
-		throw Error(Error::Other, "get", std::strerror(ENOSYS));
+        (void)sc;
+
+        throw Error(Error::Other, "get", std::strerror(ENOSYS));
 #endif
-	}
+    }
 };
 
 /**
@@ -3718,43 +3718,43 @@
  */
 class SockReceiveBuffer {
 private:
-	int m_value;
+    int m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * \param size the buffer size
-	 */
-	inline SockReceiveBuffer(int size = 2048) noexcept
-		: m_value(size)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline void set(Socket<Address, Protocol> &sc) const
-	{
-		sc.set(SOL_SOCKET, SO_RCVBUF, m_value);
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline int get(Socket<Address, Protocol> &sc) const
-	{
-		return sc.template get<int>(SOL_SOCKET, SO_RCVBUF);
-	}
+    /**
+     * Create the option.
+     *
+     * \param size the buffer size
+     */
+    inline SockReceiveBuffer(int size = 2048) noexcept
+        : m_value(size)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline void set(Socket<Address, Protocol> &sc) const
+    {
+        sc.set(SOL_SOCKET, SO_RCVBUF, m_value);
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline int get(Socket<Address, Protocol> &sc) const
+    {
+        return sc.template get<int>(SOL_SOCKET, SO_RCVBUF);
+    }
 };
 
 /**
@@ -3763,45 +3763,45 @@
  */
 class SockReuseAddress {
 private:
-	bool m_value;
+    bool m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * By default the option reuses the address.
-	 *
-	 * \param value set to true to reuse the address
-	 */
-	inline SockReuseAddress(bool value = true) noexcept
-		: m_value(value)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline void set(Socket<Address, Protocol> &sc) const
-	{
-		sc.set(SOL_SOCKET, SO_REUSEADDR, m_value ? 1 : 0);
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline bool get(Socket<Address, Protocol> &sc) const
-	{
-		return sc.template get<int>(SOL_SOCKET, SO_REUSEADDR) != 0;
-	}
+    /**
+     * Create the option.
+     *
+     * By default the option reuses the address.
+     *
+     * \param value set to true to reuse the address
+     */
+    inline SockReuseAddress(bool value = true) noexcept
+        : m_value(value)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline void set(Socket<Address, Protocol> &sc) const
+    {
+        sc.set(SOL_SOCKET, SO_REUSEADDR, m_value ? 1 : 0);
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline bool get(Socket<Address, Protocol> &sc) const
+    {
+        return sc.template get<int>(SOL_SOCKET, SO_REUSEADDR) != 0;
+    }
 };
 
 /**
@@ -3810,43 +3810,43 @@
  */
 class SockSendBuffer {
 private:
-	int m_value;
+    int m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * \param size the buffer size
-	 */
-	inline SockSendBuffer(int size = 2048) noexcept
-		: m_value(size)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline void set(Socket<Address, Protocol> &sc) const
-	{
-		sc.set(SOL_SOCKET, SO_SNDBUF, m_value);
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline int get(Socket<Address, Protocol> &sc) const
-	{
-		return sc.template get<int>(SOL_SOCKET, SO_SNDBUF);
-	}
+    /**
+     * Create the option.
+     *
+     * \param size the buffer size
+     */
+    inline SockSendBuffer(int size = 2048) noexcept
+        : m_value(size)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline void set(Socket<Address, Protocol> &sc) const
+    {
+        sc.set(SOL_SOCKET, SO_SNDBUF, m_value);
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline int get(Socket<Address, Protocol> &sc) const
+    {
+        return sc.template get<int>(SOL_SOCKET, SO_SNDBUF);
+    }
 };
 
 /**
@@ -3855,45 +3855,45 @@
  */
 class TcpNoDelay {
 private:
-	bool m_value;
+    bool m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * By default disable TCP delay.
-	 *
-	 * \param value set to true to disable TCP delay
-	 */
-	inline TcpNoDelay(bool value = true) noexcept
-		: m_value(value)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline void set(Socket<Address, Protocol> &sc) const
-	{
-		sc.set(IPPROTO_TCP, TCP_NODELAY, m_value ? 1 : 0);
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline bool get(Socket<Address, Protocol> &sc) const
-	{
-		return sc.template get<int>(IPPROTO_TCP, TCP_NODELAY) != 0;
-	}
+    /**
+     * Create the option.
+     *
+     * By default disable TCP delay.
+     *
+     * \param value set to true to disable TCP delay
+     */
+    inline TcpNoDelay(bool value = true) noexcept
+        : m_value(value)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline void set(Socket<Address, Protocol> &sc) const
+    {
+        sc.set(IPPROTO_TCP, TCP_NODELAY, m_value ? 1 : 0);
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline bool get(Socket<Address, Protocol> &sc) const
+    {
+        return sc.template get<int>(IPPROTO_TCP, TCP_NODELAY) != 0;
+    }
 };
 
 /**
@@ -3905,45 +3905,45 @@
  */
 class Ipv6Only {
 private:
-	bool m_value;
+    bool m_value;
 
 public:
-	/**
-	 * Create the option.
-	 *
-	 * By default with want IPv6 only.
-	 *
-	 * \param value set to true to use IPv6 only
-	 */
-	inline Ipv6Only(bool value = true) noexcept
-		: m_value(value)
-	{
-	}
-
-	/**
-	 * Set the option.
-	 *
-	 * \param sc the socket
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline void set(Socket<Address, Protocol> &sc) const
-	{
-		sc.set(IPPROTO_IPV6, IPV6_V6ONLY, m_value ? 1 : 0);
-	}
-
-	/**
-	 * Get the option.
-	 *
-	 * \param sc the socket
-	 * \return the value
-	 * \throw Error on errors
-	 */
-	template <typename Address, typename Protocol>
-	inline bool get(Socket<Address, Protocol> &sc) const
-	{
-		return sc.template get<int>(IPPROTO_IPV6, IPV6_V6ONLY) != 0;
-	}
+    /**
+     * Create the option.
+     *
+     * By default with want IPv6 only.
+     *
+     * \param value set to true to use IPv6 only
+     */
+    inline Ipv6Only(bool value = true) noexcept
+        : m_value(value)
+    {
+    }
+
+    /**
+     * Set the option.
+     *
+     * \param sc the socket
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline void set(Socket<Address, Protocol> &sc) const
+    {
+        sc.set(IPPROTO_IPV6, IPV6_V6ONLY, m_value ? 1 : 0);
+    }
+
+    /**
+     * Get the option.
+     *
+     * \param sc the socket
+     * \return the value
+     * \throw Error on errors
+     */
+    template <typename Address, typename Protocol>
+    inline bool get(Socket<Address, Protocol> &sc) const
+    {
+        return sc.template get<int>(IPPROTO_IPV6, IPV6_V6ONLY) != 0;
+    }
 };
 
 } // !option
@@ -3956,8 +3956,8 @@
  */
 class ListenerStatus {
 public:
-	Handle socket;		//!< which socket is ready
-	Condition flags;	//!< the flags
+    Handle socket;        //!< which socket is ready
+    Condition flags;    //!< the flags
 };
 
 /**
@@ -3979,171 +3979,171 @@
  */
 class Epoll {
 private:
-	int m_handle{-1};
-	std::vector<epoll_event> m_events;
-
-	Epoll(const Epoll &) = delete;
-	Epoll &operator=(const Epoll &) = delete;
-
-	std::uint32_t toEpoll(Condition condition) const noexcept
-	{
-		std::uint32_t events = 0;
-
-		if ((condition & Condition::Readable) == Condition::Readable)
-			events |= EPOLLIN;
-		if ((condition & Condition::Writable) == Condition::Writable)
-			events |= EPOLLOUT;
-
-		return events;
-	}
-
-	Condition toCondition(std::uint32_t events) const noexcept
-	{
-		Condition condition = Condition::None;
-
-		if ((events & EPOLLIN) || (events & EPOLLHUP))
-			condition |= Condition::Readable;
-		if (events & EPOLLOUT)
-			condition |= Condition::Writable;
-
-		return condition;
-	}
-
-	void update(Handle h, int op, int eflags)
-	{
-		epoll_event ev;
-
-		std::memset(&ev, 0, sizeof (epoll_event));
-
-		ev.events = eflags;
-		ev.data.fd = h;
-
-		if (epoll_ctl(m_handle, op, h, &ev) < 0)
-			throw Error(Error::System, "epoll_ctl");
-	}
+    int m_handle{-1};
+    std::vector<epoll_event> m_events;
+
+    Epoll(const Epoll &) = delete;
+    Epoll &operator=(const Epoll &) = delete;
+
+    std::uint32_t toEpoll(Condition condition) const noexcept
+    {
+        std::uint32_t events = 0;
+
+        if ((condition & Condition::Readable) == Condition::Readable)
+            events |= EPOLLIN;
+        if ((condition & Condition::Writable) == Condition::Writable)
+            events |= EPOLLOUT;
+
+        return events;
+    }
+
+    Condition toCondition(std::uint32_t events) const noexcept
+    {
+        Condition condition = Condition::None;
+
+        if ((events & EPOLLIN) || (events & EPOLLHUP))
+            condition |= Condition::Readable;
+        if (events & EPOLLOUT)
+            condition |= Condition::Writable;
+
+        return condition;
+    }
+
+    void update(Handle h, int op, int eflags)
+    {
+        epoll_event ev;
+
+        std::memset(&ev, 0, sizeof (epoll_event));
+
+        ev.events = eflags;
+        ev.data.fd = h;
+
+        if (epoll_ctl(m_handle, op, h, &ev) < 0)
+            throw Error(Error::System, "epoll_ctl");
+    }
 
 public:
-	/**
-	 * Create epoll.
-	 *
-	 * \throw net::Error on failures
-	 */
-	inline Epoll()
-		: m_handle(epoll_create1(0))
-	{
-		if (m_handle < 0)
-			throw Error(Error::System, "epoll_create");
-	}
-
-	/**
-	 * Move constructor.
-	 *
-	 * \param other the other backend
-	 */
-	inline Epoll(Epoll &&other) noexcept
-		: m_handle(other.m_handle)
-	{
-		other.m_handle = -1;
-	}
-
-	/**
-	 * Close the kqueue descriptor.
-	 */
-	inline ~Epoll()
-	{
-		if (m_handle != -1)
-			close(m_handle);
-	}
-
-	/**
-	 * Get the backend name.
-	 *
-	 * \return kqueue
-	 */
-	inline std::string name() const noexcept
-	{
-		return "epoll";
-	}
-
-	/**
-	 * For set and unset, we need to apply the whole flags required, so if the socket
-	 * was set to Connection::Readable and user *8adds** Connection::Writable, we must
-	 * place both.
-	 *
-	 * \param table the listener table
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param add set to true if the socket is new to the backend
-	 * \throw net::Error on failures
-	 */
-	void set(const ListenerTable &table, Handle h, Condition condition, bool add)
-	{
-		if (add) {
-			update(h, EPOLL_CTL_ADD, toEpoll(condition));
-			m_events.resize(m_events.size() + 1);
-		} else
-			update(h, EPOLL_CTL_MOD, toEpoll(table.at(h) | condition));
-	}
-
-	/**
-	 * Unset is a bit complicated case because Listener tells us which
-	 * flag to remove but to update epoll descriptor we need to pass
-	 * the effective flags that we want to be applied.
-	 *
-	 * So we put the same flags that are currently effective and remove the
-	 * requested one.
-	 *
-	 * \param table the listener table
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param add set to true if the socket is new to the backend
-	 * \throw net::Error on failures
-	 */
-	void unset(const ListenerTable &table, Handle h, Condition condition, bool remove)
-	{
-		if (remove) {
-			update(h, EPOLL_CTL_DEL, 0);
-			m_events.resize(m_events.size() - 1);
-		} else
-			update(h, EPOLL_CTL_MOD, toEpoll(table.at(h) & ~(condition)));
-	}
-
-	/**
-	 * Wait for sockets to be ready.
-	 *
-	 * \param ms the milliseconds timeout
-	 * \return the sockets ready
-	 * \throw net::Error on failures
-	 */
-	std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
-	{
-		int ret = epoll_wait(m_handle, m_events.data(), m_events.size(), ms);
-		std::vector<ListenerStatus> result;
-
-		if (ret == 0)
-			throw Error(Error::Timeout, "epoll_wait", std::strerror(ETIMEDOUT));
-		if (ret < 0)
-			throw Error(Error::System, "epoll_wait");
-
-		for (int i = 0; i < ret; ++i)
-			result.push_back(ListenerStatus{m_events[i].data.fd, toCondition(m_events[i].events)});
-
-		return result;
-	}
-
-	/**
-	 * Move operator.
-	 *
-	 * \param other the other
-	 * \return this
-	 */
-	inline Epoll &operator=(Epoll &&other)
-	{
-		m_handle = other.m_handle;
-		other.m_handle = -1;
-
-		return *this;
-	}
+    /**
+     * Create epoll.
+     *
+     * \throw net::Error on failures
+     */
+    inline Epoll()
+        : m_handle(epoll_create1(0))
+    {
+        if (m_handle < 0)
+            throw Error(Error::System, "epoll_create");
+    }
+
+    /**
+     * Move constructor.
+     *
+     * \param other the other backend
+     */
+    inline Epoll(Epoll &&other) noexcept
+        : m_handle(other.m_handle)
+    {
+        other.m_handle = -1;
+    }
+
+    /**
+     * Close the kqueue descriptor.
+     */
+    inline ~Epoll()
+    {
+        if (m_handle != -1)
+            close(m_handle);
+    }
+
+    /**
+     * Get the backend name.
+     *
+     * \return kqueue
+     */
+    inline std::string name() const noexcept
+    {
+        return "epoll";
+    }
+
+    /**
+     * For set and unset, we need to apply the whole flags required, so if the socket
+     * was set to Connection::Readable and user *8adds** Connection::Writable, we must
+     * place both.
+     *
+     * \param table the listener table
+     * \param h the handle
+     * \param condition the condition
+     * \param add set to true if the socket is new to the backend
+     * \throw net::Error on failures
+     */
+    void set(const ListenerTable &table, Handle h, Condition condition, bool add)
+    {
+        if (add) {
+            update(h, EPOLL_CTL_ADD, toEpoll(condition));
+            m_events.resize(m_events.size() + 1);
+        } else
+            update(h, EPOLL_CTL_MOD, toEpoll(table.at(h) | condition));
+    }
+
+    /**
+     * Unset is a bit complicated case because Listener tells us which
+     * flag to remove but to update epoll descriptor we need to pass
+     * the effective flags that we want to be applied.
+     *
+     * So we put the same flags that are currently effective and remove the
+     * requested one.
+     *
+     * \param table the listener table
+     * \param h the handle
+     * \param condition the condition
+     * \param add set to true if the socket is new to the backend
+     * \throw net::Error on failures
+     */
+    void unset(const ListenerTable &table, Handle h, Condition condition, bool remove)
+    {
+        if (remove) {
+            update(h, EPOLL_CTL_DEL, 0);
+            m_events.resize(m_events.size() - 1);
+        } else
+            update(h, EPOLL_CTL_MOD, toEpoll(table.at(h) & ~(condition)));
+    }
+
+    /**
+     * Wait for sockets to be ready.
+     *
+     * \param ms the milliseconds timeout
+     * \return the sockets ready
+     * \throw net::Error on failures
+     */
+    std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
+    {
+        int ret = epoll_wait(m_handle, m_events.data(), m_events.size(), ms);
+        std::vector<ListenerStatus> result;
+
+        if (ret == 0)
+            throw Error(Error::Timeout, "epoll_wait", std::strerror(ETIMEDOUT));
+        if (ret < 0)
+            throw Error(Error::System, "epoll_wait");
+
+        for (int i = 0; i < ret; ++i)
+            result.push_back(ListenerStatus{m_events[i].data.fd, toCondition(m_events[i].events)});
+
+        return result;
+    }
+
+    /**
+     * Move operator.
+     *
+     * \param other the other
+     * \return this
+     */
+    inline Epoll &operator=(Epoll &&other)
+    {
+        m_handle = other.m_handle;
+        other.m_handle = -1;
+
+        return *this;
+    }
 };
 
 #endif // !NET_HAVE_EPOLL
@@ -4159,147 +4159,147 @@
  */
 class Kqueue {
 private:
-	std::vector<struct kevent> m_result;
-	int m_handle;
-
-	Kqueue(const Kqueue &) = delete;
-	Kqueue &operator=(const Kqueue &) = delete;
-
-	void update(Handle h, int filter, int kflags)
-	{
-		struct kevent ev;
-
-		EV_SET(&ev, h, filter, kflags, 0, 0, nullptr);
-
-		if (kevent(m_handle, &ev, 1, nullptr, 0, nullptr) < 0)
-			throw Error(Error::System, "kevent");
-	}
+    std::vector<struct kevent> m_result;
+    int m_handle;
+
+    Kqueue(const Kqueue &) = delete;
+    Kqueue &operator=(const Kqueue &) = delete;
+
+    void update(Handle h, int filter, int kflags)
+    {
+        struct kevent ev;
+
+        EV_SET(&ev, h, filter, kflags, 0, 0, nullptr);
+
+        if (kevent(m_handle, &ev, 1, nullptr, 0, nullptr) < 0)
+            throw Error(Error::System, "kevent");
+    }
 
 public:
-	/**
-	 * Create kqueue.
-	 *
-	 * \throw net::Error on failures
-	 */
-	inline Kqueue()
-		: m_handle(kqueue())
-	{
-		if (m_handle < 0)
-			throw Error(Error::System, "kqueue");
-	}
-
-	/**
-	 * Move constructor.
-	 *
-	 * \param other the other backend
-	 */
-	inline Kqueue(Kqueue &&other) noexcept
-		: m_handle(other.m_handle)
-	{
-		other.m_handle = -1;
-	}
-
-	/**
-	 * Close the kqueue descriptor.
-	 */
-	inline ~Kqueue()
-	{
-		if (m_handle != -1)
-			close(m_handle);
-	}
-
-	/**
-	 * Get the backend name.
-	 *
-	 * \return kqueue
-	 */
-	inline std::string name() const noexcept
-	{
-		return "kqueue";
-	}
-
-	/**
-	 * Set socket.
-	 *
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param add set to true if the socket is new to the backend
-	 * \throw net::Error on failures
-	 */
-	void set(const ListenerTable &, Handle h, Condition condition, bool add)
-	{
-		if ((condition & Condition::Readable) == Condition::Readable)
-			update(h, EVFILT_READ, EV_ADD | EV_ENABLE);
-		if ((condition & Condition::Writable) == Condition::Writable)
-			update(h, EVFILT_WRITE, EV_ADD | EV_ENABLE);
-		if (add)
-			m_result.resize(m_result.size() + 1);
-	}
-
-	/**
-	 * Unset socket.
-	 *
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param remove set to true if the socket is completely removed
-	 * \throw net::Error on failures
-	 */
-	void unset(const ListenerTable &, Handle h, Condition condition, bool remove)
-	{
-		if ((condition & Condition::Readable) == Condition::Readable)
-			update(h, EVFILT_READ, EV_DELETE);
-		if ((condition & Condition::Writable) == Condition::Writable)
-			update(h, EVFILT_WRITE, EV_DELETE);
-		if (remove)
-			m_result.resize(m_result.size() - 1);
-	}
-
-	/**
-	 * Wait for sockets to be ready.
-	 *
-	 * \param ms the milliseconds timeout
-	 * \return the sockets ready
-	 * \throw net::Error on failures
-	 */
-	std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
-	{
-		std::vector<ListenerStatus> sockets;
-		timespec ts = { 0, 0 };
-		timespec *pts = (ms <= 0) ? nullptr : &ts;
-
-		ts.tv_sec = ms / 1000;
-		ts.tv_nsec = (ms % 1000) * 1000000;
-
-		int nevents = kevent(m_handle, nullptr, 0, &m_result[0], m_result.capacity(), pts);
-
-		if (nevents == 0)
-			throw Error(Error::Timeout, "kevent", std::strerror(ETIMEDOUT));
-		if (nevents < 0)
-			throw Error(Error::System, "kevent");
-
-		for (int i = 0; i < nevents; ++i) {
-			sockets.push_back(ListenerStatus{
-				static_cast<Handle>(m_result[i].ident),
-				m_result[i].filter == EVFILT_READ ? Condition::Readable : Condition::Writable
-			});
-		}
-
-		return sockets;
-	}
-
-	/**
-	 * Move operator.
-	 *
-	 * \param other the other
-	 * \return this
-	 */
-	inline Kqueue &operator=(Kqueue &&other) noexcept
-	{
-		m_handle = other.m_handle;
-		other.m_handle = -1;
-
-		return *this;
-	}
+    /**
+     * Create kqueue.
+     *
+     * \throw net::Error on failures
+     */
+    inline Kqueue()
+        : m_handle(kqueue())
+    {
+        if (m_handle < 0)
+            throw Error(Error::System, "kqueue");
+    }
+
+    /**
+     * Move constructor.
+     *
+     * \param other the other backend
+     */
+    inline Kqueue(Kqueue &&other) noexcept
+        : m_handle(other.m_handle)
+    {
+        other.m_handle = -1;
+    }
+
+    /**
+     * Close the kqueue descriptor.
+     */
+    inline ~Kqueue()
+    {
+        if (m_handle != -1)
+            close(m_handle);
+    }
+
+    /**
+     * Get the backend name.
+     *
+     * \return kqueue
+     */
+    inline std::string name() const noexcept
+    {
+        return "kqueue";
+    }
+
+    /**
+     * Set socket.
+     *
+     * \param h the handle
+     * \param condition the condition
+     * \param add set to true if the socket is new to the backend
+     * \throw net::Error on failures
+     */
+    void set(const ListenerTable &, Handle h, Condition condition, bool add)
+    {
+        if ((condition & Condition::Readable) == Condition::Readable)
+            update(h, EVFILT_READ, EV_ADD | EV_ENABLE);
+        if ((condition & Condition::Writable) == Condition::Writable)
+            update(h, EVFILT_WRITE, EV_ADD | EV_ENABLE);
+        if (add)
+            m_result.resize(m_result.size() + 1);
+    }
+
+    /**
+     * Unset socket.
+     *
+     * \param h the handle
+     * \param condition the condition
+     * \param remove set to true if the socket is completely removed
+     * \throw net::Error on failures
+     */
+    void unset(const ListenerTable &, Handle h, Condition condition, bool remove)
+    {
+        if ((condition & Condition::Readable) == Condition::Readable)
+            update(h, EVFILT_READ, EV_DELETE);
+        if ((condition & Condition::Writable) == Condition::Writable)
+            update(h, EVFILT_WRITE, EV_DELETE);
+        if (remove)
+            m_result.resize(m_result.size() - 1);
+    }
+
+    /**
+     * Wait for sockets to be ready.
+     *
+     * \param ms the milliseconds timeout
+     * \return the sockets ready
+     * \throw net::Error on failures
+     */
+    std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
+    {
+        std::vector<ListenerStatus> sockets;
+        timespec ts = { 0, 0 };
+        timespec *pts = (ms <= 0) ? nullptr : &ts;
+
+        ts.tv_sec = ms / 1000;
+        ts.tv_nsec = (ms % 1000) * 1000000;
+
+        int nevents = kevent(m_handle, nullptr, 0, &m_result[0], m_result.capacity(), pts);
+
+        if (nevents == 0)
+            throw Error(Error::Timeout, "kevent", std::strerror(ETIMEDOUT));
+        if (nevents < 0)
+            throw Error(Error::System, "kevent");
+
+        for (int i = 0; i < nevents; ++i) {
+            sockets.push_back(ListenerStatus{
+                static_cast<Handle>(m_result[i].ident),
+                m_result[i].filter == EVFILT_READ ? Condition::Readable : Condition::Writable
+            });
+        }
+
+        return sockets;
+    }
+
+    /**
+     * Move operator.
+     *
+     * \param other the other
+     * \return this
+     */
+    inline Kqueue &operator=(Kqueue &&other) noexcept
+    {
+        m_handle = other.m_handle;
+        other.m_handle = -1;
+
+        return *this;
+    }
 };
 
 #endif // !NET_HAVE_KQUEUE
@@ -4315,120 +4315,120 @@
  */
 class Poll {
 private:
-	std::vector<pollfd> m_fds;
-
-	short toPoll(Condition condition) const noexcept
-	{
-		short result = 0;
-
-		if ((condition & Condition::Readable) == Condition::Readable)
-			result |= POLLIN;
-		if ((condition & Condition::Writable) == Condition::Writable)
-			result |= POLLOUT;
-
-		return result;
-	}
-
-	Condition toCondition(short &event) const noexcept
-	{
-		Condition condition = Condition::None;
-
-		/*
-		 * Poll implementations mark the socket differently regarding the disconnection of a socket.
-		 *
-		 * At least, even if POLLHUP or POLLIN is set, recv() always return 0 so we mark the socket as readable.
-		 */
-		if ((event & POLLIN) || (event & POLLHUP))
-			condition |= Condition::Readable;
-		if (event & POLLOUT)
-			condition |= Condition::Writable;
-
-		// Reset event for safety.
-		event = 0;
-
-		return condition;
-	}
+    std::vector<pollfd> m_fds;
+
+    short toPoll(Condition condition) const noexcept
+    {
+        short result = 0;
+
+        if ((condition & Condition::Readable) == Condition::Readable)
+            result |= POLLIN;
+        if ((condition & Condition::Writable) == Condition::Writable)
+            result |= POLLOUT;
+
+        return result;
+    }
+
+    Condition toCondition(short &event) const noexcept
+    {
+        Condition condition = Condition::None;
+
+        /*
+         * Poll implementations mark the socket differently regarding the disconnection of a socket.
+         *
+         * At least, even if POLLHUP or POLLIN is set, recv() always return 0 so we mark the socket as readable.
+         */
+        if ((event & POLLIN) || (event & POLLHUP))
+            condition |= Condition::Readable;
+        if (event & POLLOUT)
+            condition |= Condition::Writable;
+
+        // Reset event for safety.
+        event = 0;
+
+        return condition;
+    }
 
 public:
-	/**
-	 * Get the backend name.
-	 *
-	 * \return kqueue
-	 */
-	inline std::string name() const noexcept
-	{
-		return "poll";
-	}
-
-	/**
-	 * Set socket.
-	 *
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param add set to true if the socket is new to the backend
-	 * \throw net::Error on failures
-	 */
-	void set(const ListenerTable &, Handle h, Condition condition, bool add)
-	{
-		if (add)
-			m_fds.push_back(pollfd{h, toPoll(condition), 0});
-		else {
-			auto it = std::find_if(m_fds.begin(), m_fds.end(), [&] (const pollfd &pfd) {
-				return pfd.fd == h;
-			});
-
-			it->events |= toPoll(condition);
-		}
-	}
-
-	/**
-	 * Unset socket.
-	 *
-	 * \param h the handle
-	 * \param condition the condition
-	 * \param remove set to true if the socket is completely removed
-	 * \throw net::Error on failures
-	 */
-	void unset(const ListenerTable &, Handle h, Condition condition, bool remove)
-	{
-		auto it = std::find_if(m_fds.begin(), m_fds.end(), [&] (const pollfd &pfd) {
-			return pfd.fd == h;
-		});
-
-		if (remove)
-			m_fds.erase(it);
-		else
-			it->events &= ~(toPoll(condition));
-	}
-
-	/**
-	 * Wait for sockets to be ready.
-	 *
-	 * \param ms the milliseconds timeout
-	 * \return the sockets ready
-	 * \throw net::Error on failures
-	 */
-	std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
-	{
+    /**
+     * Get the backend name.
+     *
+     * \return kqueue
+     */
+    inline std::string name() const noexcept
+    {
+        return "poll";
+    }
+
+    /**
+     * Set socket.
+     *
+     * \param h the handle
+     * \param condition the condition
+     * \param add set to true if the socket is new to the backend
+     * \throw net::Error on failures
+     */
+    void set(const ListenerTable &, Handle h, Condition condition, bool add)
+    {
+        if (add)
+            m_fds.push_back(pollfd{h, toPoll(condition), 0});
+        else {
+            auto it = std::find_if(m_fds.begin(), m_fds.end(), [&] (const pollfd &pfd) {
+                return pfd.fd == h;
+            });
+
+            it->events |= toPoll(condition);
+        }
+    }
+
+    /**
+     * Unset socket.
+     *
+     * \param h the handle
+     * \param condition the condition
+     * \param remove set to true if the socket is completely removed
+     * \throw net::Error on failures
+     */
+    void unset(const ListenerTable &, Handle h, Condition condition, bool remove)
+    {
+        auto it = std::find_if(m_fds.begin(), m_fds.end(), [&] (const pollfd &pfd) {
+            return pfd.fd == h;
+        });
+
+        if (remove)
+            m_fds.erase(it);
+        else
+            it->events &= ~(toPoll(condition));
+    }
+
+    /**
+     * Wait for sockets to be ready.
+     *
+     * \param ms the milliseconds timeout
+     * \return the sockets ready
+     * \throw net::Error on failures
+     */
+    std::vector<ListenerStatus> wait(const ListenerTable &, int ms)
+    {
 #if defined(_WIN32)
-		auto result = WSAPoll(m_fds.data(), (ULONG)m_fds.size(), ms);
+        auto result = WSAPoll(m_fds.data(), (ULONG)m_fds.size(), ms);
 #else
-		auto result = poll(m_fds.data(), m_fds.size(), ms);
+        auto result = poll(m_fds.data(), m_fds.size(), ms);
 #endif
 
-		if (result == 0)
-			throw Error(Error::Timeout, "select", std::strerror(ETIMEDOUT));
-		if (result < 0)
-			throw Error(Error::System, "poll");
-
-		std::vector<ListenerStatus> sockets;
-
-		for (auto &fd : m_fds)
-			if (fd.revents != 0)
-				sockets.push_back(ListenerStatus{fd.fd, toCondition(fd.revents)});
-
-		return sockets;
-	}
+        if (result == 0)
+            throw Error(Error::Timeout, "select", std::strerror(ETIMEDOUT));
+        if (result < 0)
+            throw Error(Error::System, "poll");
+
+        std::vector<ListenerStatus> sockets;
+
+        for (auto &fd : m_fds)
+            if (fd.revents != 0)
+                sockets.push_back(ListenerStatus{fd.fd, toCondition(fd.revents)});
+
+        return sockets;
+    }
 };
 
 #endif // !NET_HAVE_POLL
@@ -4441,82 +4441,82 @@
  */
 class Select {
 public:
-	/**
-	 * Get the backend name.
-	 *
-	 * \return select
-	 */
-	inline std::string name() const
-	{
-		return "select";
-	}
-
-	/**
-	 * No-op.
-	 */
-	inline void set(const ListenerTable &, Handle, Condition, bool) noexcept
-	{
-	}
-
-	/**
-	 * No-op.
-	 */
-	inline void unset(const ListenerTable &, Handle, Condition, bool) noexcept
-	{
-	}
-
-	/**
-	 * Wait for sockets to be ready.
-	 *
-	 * \param table the listener table
-	 * \param ms the milliseconds timeout
-	 * \return the sockets ready
-	 * \throw net::Error on failures
-	 */
-	std::vector<ListenerStatus> wait(const ListenerTable &table, int ms)
-	{
-		timeval maxwait, *towait;
-		fd_set readset;
-		fd_set writeset;
-
-		FD_ZERO(&readset);
-		FD_ZERO(&writeset);
-
-		Handle max = 0;
-
-		for (const auto &pair : table) {
-			if ((pair.second & Condition::Readable) == Condition::Readable)
-				FD_SET(pair.first, &readset);
-			if ((pair.second & Condition::Writable) == Condition::Writable)
-				FD_SET(pair.first, &writeset);
-			if (pair.first > max)
-				max = pair.first;
-		}
-
-		maxwait.tv_sec = 0;
-		maxwait.tv_usec = ms * 1000;
-
-		// Set to nullptr for infinite timeout.
-		towait = (ms < 0) ? nullptr : &maxwait;
-
-		auto error = ::select(static_cast<int>(max + 1), &readset, &writeset, nullptr, towait);
-
-		if (error == Failure)
-			throw Error(Error::System, "select");
-		if (error == 0)
-			throw Error(Error::Timeout, "select", std::strerror(ETIMEDOUT));
-
-		std::vector<ListenerStatus> sockets;
-
-		for (const auto &pair : table) {
-			if (FD_ISSET(pair.first, &readset))
-				sockets.push_back(ListenerStatus{pair.first, Condition::Readable});
-			if (FD_ISSET(pair.first, &writeset))
-				sockets.push_back(ListenerStatus{pair.first, Condition::Writable});
-		}
-
-		return sockets;
-	}
+    /**
+     * Get the backend name.
+     *
+     * \return select
+     */
+    inline std::string name() const
+    {
+        return "select";
+    }
+
+    /**
+     * No-op.
+     */
+    inline void set(const ListenerTable &, Handle, Condition, bool) noexcept
+    {
+    }
+
+    /**
+     * No-op.
+     */
+    inline void unset(const ListenerTable &, Handle, Condition, bool) noexcept
+    {
+    }
+
+    /**
+     * Wait for sockets to be ready.
+     *
+     * \param table the listener table
+     * \param ms the milliseconds timeout
+     * \return the sockets ready
+     * \throw net::Error on failures
+     */
+    std::vector<ListenerStatus> wait(const ListenerTable &table, int ms)
+    {
+        timeval maxwait, *towait;
+        fd_set readset;
+        fd_set writeset;
+
+        FD_ZERO(&readset);
+        FD_ZERO(&writeset);
+
+        Handle max = 0;
+
+        for (const auto &pair : table) {
+            if ((pair.second & Condition::Readable) == Condition::Readable)
+                FD_SET(pair.first, &readset);
+            if ((pair.second & Condition::Writable) == Condition::Writable)
+                FD_SET(pair.first, &writeset);
+            if (pair.first > max)
+                max = pair.first;
+        }
+
+        maxwait.tv_sec = 0;
+        maxwait.tv_usec = ms * 1000;
+
+        // Set to nullptr for infinite timeout.
+        towait = (ms < 0) ? nullptr : &maxwait;
+
+        auto error = ::select(static_cast<int>(max + 1), &readset, &writeset, nullptr, towait);
+
+        if (error == Failure)
+            throw Error(Error::System, "select");
+        if (error == 0)
+            throw Error(Error::Timeout, "select", std::strerror(ETIMEDOUT));
+
+        std::vector<ListenerStatus> sockets;
+
+        for (const auto &pair : table) {
+            if (FD_ISSET(pair.first, &readset))
+                sockets.push_back(ListenerStatus{pair.first, Condition::Readable});
+            if (FD_ISSET(pair.first, &writeset))
+                sockets.push_back(ListenerStatus{pair.first, Condition::Writable});
+        }
+
+        return sockets;
+    }
 };
 
 } // !backend
@@ -4538,237 +4538,237 @@
 template <typename Backend = backend :: NET_DEFAULT_BACKEND>
 class Listener {
 private:
-	Backend m_backend;
-	ListenerTable m_table;
+    Backend m_backend;
+    ListenerTable m_table;
 
 public:
-	/**
-	 * Construct an empty listener.
-	 */
-	Listener() = default;
-
-	/**
-	 * Get the backend.
-	 *
-	 * \return the backend
-	 */
-	inline const Backend &backend() const noexcept
-	{
-		return m_backend;
-	}
-
-	/**
-	 * Get the non-modifiable table.
-	 *
-	 * \return the table
-	 */
-	inline const ListenerTable &table() const noexcept
-	{
-		return m_table;
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the iterator
-	 */
-	inline ListenerTable::const_iterator begin() const noexcept
-	{
-		return m_table.begin();
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the iterator
-	 */
-	inline ListenerTable::const_iterator cbegin() const noexcept
-	{
-		return m_table.cbegin();
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the iterator
-	 */
-	inline ListenerTable::const_iterator end() const noexcept
-	{
-		return m_table.end();
-	}
-
-	/**
-	 * Overloaded function.
-	 *
-	 * \return the iterator
-	 */
-	inline ListenerTable::const_iterator cend() const noexcept
-	{
-		return m_table.cend();
-	}
-
-	/**
-	 * Add or update a socket to the listener.
-	 *
-	 * If the socket is already placed with the appropriate flags, the
-	 * function is a no-op.
-	 *
-	 * If incorrect flags are passed, the function does nothing.
-	 *
-	 * \param sc the socket
-	 * \param condition the condition (may be OR'ed)
-	 * \throw Error if the backend failed to set
-	 */
-	void set(Handle sc, Condition condition)
-	{
-		// Invalid or useless flags.
-		if (condition == Condition::None || static_cast<int>(condition) > 0x3)
-			return;
-
-		auto it = m_table.find(sc);
-
-		// Do not update the table if the backend failed to add or update.
-		if (it == m_table.end()) {
-			m_backend.set(m_table, sc, condition, true);
-			m_table.emplace(sc, condition);
-		} else {
-			// Remove flag if already present.
-			if ((condition & Condition::Readable) == Condition::Readable &&
-			    (it->second & Condition::Readable) == Condition::Readable)
-				condition &= ~(Condition::Readable);
-			if ((condition & Condition::Writable) == Condition::Writable &&
-			    (it->second & Condition::Writable) == Condition::Writable)
-				condition &= ~(Condition::Writable);
-
-			// Still need a call?
-			if (condition != Condition::None) {
-				m_backend.set(m_table, sc, condition, false);
-				it->second |= condition;
-			}
-		}
-	}
-
-	/**
-	 * Unset a socket from the listener, only the flags is removed
-	 * unless the two flagss are requested.
-	 *
-	 * For example, if you added a socket for both reading and writing,
-	 * unsetting the write flags will keep the socket for reading.
-	 *
-	 * \param sc the socket
-	 * \param condition the condition (may be OR'ed)
-	 * \see remove
-	 */
-	void unset(Handle sc, Condition condition)
-	{
-		auto it = m_table.find(sc);
-
-		// Invalid or useless flags.
-		if (condition == Condition::None || static_cast<int>(condition) > 0x3 || it == m_table.end())
-			return;
-
-		// Like set, do not update if the socket is already at the appropriate state.
-		if ((condition & Condition::Readable) == Condition::Readable &&
-		    (it->second & Condition::Readable) != Condition::Readable)
-			condition &= ~(Condition::Readable);
-		if ((condition & Condition::Writable) == Condition::Writable &&
-		    (it->second & Condition::Writable) != Condition::Writable)
-			condition &= ~(Condition::Writable);
-
-		if (condition != Condition::None) {
-			// Determine if it's a complete removal.
-			bool removal = ((it->second) & ~(condition)) == Condition::None;
-
-			m_backend.unset(m_table, sc, condition, removal);
-
-			if (removal)
-				m_table.erase(it);
-			else
-				it->second &= ~(condition);
-		}
-	}
-
-	/**
-	 * Remove completely the socket from the listener.
-	 *
-	 * It is a shorthand for unset(sc, Condition::Readable | Condition::Writable);
-	 *
-	 * \param sc the socket
-	 */
-	inline void remove(Handle sc)
-	{
-		unset(sc, Condition::Readable | Condition::Writable);
-	}
-
-	/**
-	 * Remove all sockets.
-	 */
-	inline void clear()
-	{
-		while (!m_table.empty())
-			remove(m_table.begin()->first);
-	}
-
-	/**
-	 * Get the number of sockets in the listener.
-	 *
-	 * \return the number of sockets
-	 */
-	inline ListenerTable::size_type size() const noexcept
-	{
-		return m_table.size();
-	}
-
-	/**
-	 * Select a socket. Waits for a specific amount of time specified as the duration.
-	 *
-	 * \param duration the duration
-	 * \return the socket ready
-	 */
-	template <typename Rep, typename Ratio>
-	inline ListenerStatus wait(const std::chrono::duration<Rep, Ratio> &duration)
-	{
-		auto cvt = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
-		auto max = cvt.count() > INT_MAX ? INT_MAX : static_cast<int>(cvt.count());
-
-		return m_backend.wait(m_table, max)[0];
-	}
-
-	/**
-	 * Overload with milliseconds.
-	 *
-	 * \param timeout the optional timeout in milliseconds
-	 * \return the socket ready
-	 */
-	inline ListenerStatus wait(long long int timeout = -1)
-	{
-		return wait(std::chrono::milliseconds(timeout));
-	}
-
-	/**
-	 * Select multiple sockets.
-	 *
-	 * \param duration the duration
-	 * \return the socket ready
-	 */
-	template <typename Rep, typename Ratio>
-	inline std::vector<ListenerStatus> waitMultiple(const std::chrono::duration<Rep, Ratio> &duration)
-	{
-		auto cvt = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
-
-		return m_backend.wait(m_table, cvt.count());
-	}
-
-	/**
-	 * Overload with milliseconds.
-	 *
-	 * \param timeout the optional timeout in milliseconds
-	 * \return the socket ready
-	 */
-	inline std::vector<ListenerStatus> waitMultiple(int timeout = -1)
-	{
-		return waitMultiple(std::chrono::milliseconds(timeout));
-	}
+    /**
+     * Construct an empty listener.
+     */
+    Listener() = default;
+
+    /**
+     * Get the backend.
+     *
+     * \return the backend
+     */
+    inline const Backend &backend() const noexcept
+    {
+        return m_backend;
+    }
+
+    /**
+     * Get the non-modifiable table.
+     *
+     * \return the table
+     */
+    inline const ListenerTable &table() const noexcept
+    {
+        return m_table;
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the iterator
+     */
+    inline ListenerTable::const_iterator begin() const noexcept
+    {
+        return m_table.begin();
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the iterator
+     */
+    inline ListenerTable::const_iterator cbegin() const noexcept
+    {
+        return m_table.cbegin();
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the iterator
+     */
+    inline ListenerTable::const_iterator end() const noexcept
+    {
+        return m_table.end();
+    }
+
+    /**
+     * Overloaded function.
+     *
+     * \return the iterator
+     */
+    inline ListenerTable::const_iterator cend() const noexcept
+    {
+        return m_table.cend();
+    }
+
+    /**
+     * Add or update a socket to the listener.
+     *
+     * If the socket is already placed with the appropriate flags, the
+     * function is a no-op.
+     *
+     * If incorrect flags are passed, the function does nothing.
+     *
+     * \param sc the socket
+     * \param condition the condition (may be OR'ed)
+     * \throw Error if the backend failed to set
+     */
+    void set(Handle sc, Condition condition)
+    {
+        // Invalid or useless flags.
+        if (condition == Condition::None || static_cast<int>(condition) > 0x3)
+            return;
+
+        auto it = m_table.find(sc);
+
+        // Do not update the table if the backend failed to add or update.
+        if (it == m_table.end()) {
+            m_backend.set(m_table, sc, condition, true);
+            m_table.emplace(sc, condition);
+        } else {
+            // Remove flag if already present.
+            if ((condition & Condition::Readable) == Condition::Readable &&
+                (it->second & Condition::Readable) == Condition::Readable)
+                condition &= ~(Condition::Readable);
+            if ((condition & Condition::Writable) == Condition::Writable &&
+                (it->second & Condition::Writable) == Condition::Writable)
+                condition &= ~(Condition::Writable);
+
+            // Still need a call?
+            if (condition != Condition::None) {
+                m_backend.set(m_table, sc, condition, false);
+                it->second |= condition;
+            }
+        }
+    }
+
+    /**
+     * Unset a socket from the listener, only the flags is removed
+     * unless the two flagss are requested.
+     *
+     * For example, if you added a socket for both reading and writing,
+     * unsetting the write flags will keep the socket for reading.
+     *
+     * \param sc the socket
+     * \param condition the condition (may be OR'ed)
+     * \see remove
+     */
+    void unset(Handle sc, Condition condition)
+    {
+        auto it = m_table.find(sc);
+
+        // Invalid or useless flags.
+        if (condition == Condition::None || static_cast<int>(condition) > 0x3 || it == m_table.end())
+            return;
+
+        // Like set, do not update if the socket is already at the appropriate state.
+        if ((condition & Condition::Readable) == Condition::Readable &&
+            (it->second & Condition::Readable) != Condition::Readable)
+            condition &= ~(Condition::Readable);
+        if ((condition & Condition::Writable) == Condition::Writable &&
+            (it->second & Condition::Writable) != Condition::Writable)
+            condition &= ~(Condition::Writable);
+
+        if (condition != Condition::None) {
+            // Determine if it's a complete removal.
+            bool removal = ((it->second) & ~(condition)) == Condition::None;
+
+            m_backend.unset(m_table, sc, condition, removal);
+
+            if (removal)
+                m_table.erase(it);
+            else
+                it->second &= ~(condition);
+        }
+    }
+
+    /**
+     * Remove completely the socket from the listener.
+     *
+     * It is a shorthand for unset(sc, Condition::Readable | Condition::Writable);
+     *
+     * \param sc the socket
+     */
+    inline void remove(Handle sc)
+    {
+        unset(sc, Condition::Readable | Condition::Writable);
+    }
+
+    /**
+     * Remove all sockets.
+     */
+    inline void clear()
+    {
+        while (!m_table.empty())
+            remove(m_table.begin()->first);
+    }
+
+    /**
+     * Get the number of sockets in the listener.
+     *
+     * \return the number of sockets
+     */
+    inline ListenerTable::size_type size() const noexcept
+    {
+        return m_table.size();
+    }
+
+    /**
+     * Select a socket. Waits for a specific amount of time specified as the duration.
+     *
+     * \param duration the duration
+     * \return the socket ready
+     */
+    template <typename Rep, typename Ratio>
+    inline ListenerStatus wait(const std::chrono::duration<Rep, Ratio> &duration)
+    {
+        auto cvt = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
+        auto max = cvt.count() > INT_MAX ? INT_MAX : static_cast<int>(cvt.count());
+
+        return m_backend.wait(m_table, max)[0];
+    }
+
+    /**
+     * Overload with milliseconds.
+     *
+     * \param timeout the optional timeout in milliseconds
+     * \return the socket ready
+     */
+    inline ListenerStatus wait(long long int timeout = -1)
+    {
+        return wait(std::chrono::milliseconds(timeout));
+    }
+
+    /**
+     * Select multiple sockets.
+     *
+     * \param duration the duration
+     * \return the socket ready
+     */
+    template <typename Rep, typename Ratio>
+    inline std::vector<ListenerStatus> waitMultiple(const std::chrono::duration<Rep, Ratio> &duration)
+    {
+        auto cvt = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
+
+        return m_backend.wait(m_table, cvt.count());
+    }
+
+    /**
+     * Overload with milliseconds.
+     *
+     * \param timeout the optional timeout in milliseconds
+     * \return the socket ready
+     */
+    inline std::vector<ListenerStatus> waitMultiple(int timeout = -1)
+    {
+        return waitMultiple(std::chrono::milliseconds(timeout));
+    }
 };
 
 /**
@@ -4881,26 +4881,26 @@
 inline address::AddressIterator resolve(const std::string &host, const std::string &service, int domain = AF_UNSPEC, int type = 0)
 {
 #if !defined(NET_NO_AUTO_INIT)
-		net::init();
+        net::init();
 #endif
 
-	struct addrinfo hints, *res, *p;
-
-	std::memset(&hints, 0, sizeof (hints));
-	hints.ai_family = domain;
-	hints.ai_socktype = type;
-
-	int e = getaddrinfo(host.c_str(), service.c_str(), &hints, &res);
-
-	if (e != 0)
-		throw Error(Error::System, "getaddrinfo", gai_strerror(e));
-
-	std::vector<address::GenericAddress> addresses;
-
-	for (p = res; p != nullptr; p = p->ai_next)
-		addresses.push_back(address::GenericAddress(p->ai_addr, p->ai_addrlen));
-
-	return address::AddressIterator(addresses, 0);
+    struct addrinfo hints, *res, *p;
+
+    std::memset(&hints, 0, sizeof (hints));
+    hints.ai_family = domain;
+    hints.ai_socktype = type;
+
+    int e = getaddrinfo(host.c_str(), service.c_str(), &hints, &res);
+
+    if (e != 0)
+        throw Error(Error::System, "getaddrinfo", gai_strerror(e));
+
+    std::vector<address::GenericAddress> addresses;
+
+    for (p = res; p != nullptr; p = p->ai_next)
+        addresses.push_back(address::GenericAddress(p->ai_addr, p->ai_addrlen));
+
+    return address::AddressIterator(addresses, 0);
 }
 
 /**
@@ -4915,7 +4915,7 @@
 template <typename Address, typename Protocol>
 address::AddressIterator resolve(const Socket<Address, Protocol> &sc, const std::string &host, const std::string &service)
 {
-	return resolve(host, service, Address().domain(), sc.protocol().type());
+    return resolve(host, service, Address().domain(), sc.protocol().type());
 }
 
 /**
@@ -4931,13 +4931,13 @@
  */
 inline address::GenericAddress resolveOne(const std::string &host, const std::string &service, int domain, int type)
 {
-	address::AddressIterator end;
-	address::AddressIterator it = resolve(host, service, domain, type);
-
-	if (it == end)
-		throw Error(Error::Other, "resolveOne", "no address available");
-
-	return *it;
+    address::AddressIterator end;
+    address::AddressIterator it = resolve(host, service, domain, type);
+
+    if (it == end)
+        throw Error(Error::Other, "resolveOne", "no address available");
+
+    return *it;
 }
 
 /**
@@ -4952,7 +4952,7 @@
 template <typename Address, typename Protocol>
 address::GenericAddress resolveOne(const Socket<Address, Protocol> &sc, const std::string &host, const std::string &service)
 {
-	return resolveOne(host, service, Address().domain(), sc.protocol().type());
+    return resolveOne(host, service, Address().domain(), sc.protocol().type());
 }
 
 } // !irccd
--- a/lib/irccd/options.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/options.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -20,9 +20,7 @@
 
 #include "options.hpp"
 
-namespace irccd {
-
-namespace parser {
+namespace option {
 
 namespace {
 
@@ -31,153 +29,151 @@
 
 inline bool isOption(const std::string &arg) noexcept
 {
-	return arg.size() >= 2 && arg[0] == '-';
+    return arg.size() >= 2 && arg[0] == '-';
 }
 
 inline bool isLongOption(const std::string &arg) noexcept
 {
-	assert(isOption(arg));
+    assert(isOption(arg));
 
-	return arg.size() >= 3 && arg[1] == '-';
+    return arg.size() >= 3 && arg[1] == '-';
 }
 
 inline bool isShortSimple(const std::string &arg) noexcept
 {
-	assert(isOption(arg));
-	assert(!isLongOption(arg));
+    assert(isOption(arg));
+    assert(!isLongOption(arg));
 
-	return arg.size() == 2;
+    return arg.size() == 2;
 }
 
 void parseLongOption(Result &result, Args &args, Iterator &it, Iterator &end, const Options &definition)
 {
-	auto arg = *it++;
-	auto opt = definition.find(arg);
+    auto arg = *it++;
+    auto opt = definition.find(arg);
 
-	if (opt == definition.end())
-		throw InvalidOption(arg);
+    if (opt == definition.end())
+        throw InvalidOption{arg};
 
-	// Need argument?
-	if (opt->second) {
-		if (it == end || isOption(*it))
-			throw MissingValue(arg);
+    // Need argument?
+    if (opt->second) {
+        if (it == end || isOption(*it))
+            throw MissingValue{arg};
 
-		result.insert(std::make_pair(arg, *it++));
-		it = args.erase(args.begin(), it);
-		end = args.end();
-	} else {
-		result.insert(std::make_pair(arg, ""));
-		it = args.erase(args.begin());
-		end = args.end();
-	}
+        result.insert(std::make_pair(arg, *it++));
+        it = args.erase(args.begin(), it);
+        end = args.end();
+    } else {
+        result.insert(std::make_pair(arg, ""));
+        it = args.erase(args.begin());
+        end = args.end();
+    }
 }
 
 void parseShortOption(Result &result, Args &args, Iterator &it, Iterator &end, const Options &definition)
 {
-	if (isShortSimple(*it)) {
-		/*
-		 * Here two cases:
-		 *
-		 * -v (no option)
-		 * -c value
-		 */
-		auto arg = *it++;
-		auto opt = definition.find(arg);
+    if (isShortSimple(*it)) {
+        /*
+         * Here two cases:
+         *
+         * -v (no option)
+         * -c value
+         */
+        auto arg = *it++;
+        auto opt = definition.find(arg);
 
-		if (opt == definition.end())
-			throw InvalidOption(arg);
+        if (opt == definition.end())
+            throw InvalidOption{arg};
 
-		/* Need argument? */
-		if (opt->second) {
-			if (it == end || isOption(*it))
-				throw MissingValue(arg);
+        // Need argument?
+        if (opt->second) {
+            if (it == end || isOption(*it))
+                throw MissingValue{arg};
 
-			result.insert(std::make_pair(arg, *it++));
-			it = args.erase(args.begin(), it);
-			end = args.end();
-		} else {
-			result.insert(std::make_pair(arg, ""));
-			it = args.erase(args.begin());
-			end = args.end();
-		}
-	} else {
-		/*
-		 * Here multiple scenarios:
-		 *
-		 * 1. -abc (-a -b -c if all are simple boolean arguments)
-		 * 2. -vc foo.conf (-v -c foo.conf if -c is argument dependant)
-		 * 3. -vcfoo.conf (-v -c foo.conf also)
-		 */
-		auto value = it->substr(1);
-		auto len = value.length();
-		int toremove = 1;
+            result.insert(std::make_pair(arg, *it++));
+            it = args.erase(args.begin(), it);
+            end = args.end();
+        } else {
+            result.insert(std::make_pair(arg, ""));
+            it = args.erase(args.begin());
+            end = args.end();
+        }
+    } else {
+        /*
+         * Here multiple scenarios:
+         *
+         * 1. -abc (-a -b -c if all are simple boolean arguments)
+         * 2. -vc foo.conf (-v -c foo.conf if -c is argument dependant)
+         * 3. -vcfoo.conf (-v -c foo.conf also)
+         */
+        auto value = it->substr(1);
+        auto len = value.length();
+        int toremove = 1;
 
-		for (decltype(len) i = 0; i < len; ++i) {
-			auto arg = std::string{'-'} + value[i];
-			auto opt = definition.find(arg);
+        for (decltype(len) i = 0; i < len; ++i) {
+            auto arg = std::string{'-'} + value[i];
+            auto opt = definition.find(arg);
 
-			if (opt == definition.end())
-				throw InvalidOption(arg);
+            if (opt == definition.end())
+                throw InvalidOption{arg};
 
-			if (opt->second) {
-				if (i == (len - 1)) {
-					// End of string, get the next argument (see 2.).
-					if (++it == end || isOption(*it))
-						throw MissingValue(arg);
+            if (opt->second) {
+                if (i == (len - 1)) {
+                    // End of string, get the next argument (see 2.).
+                    if (++it == end || isOption(*it))
+                        throw MissingValue{arg};
 
-					result.insert(std::make_pair(arg, *it));
-					toremove += 1;
-				} else {
-					result.insert(std::make_pair(arg, value.substr(i + 1)));
-					i = len;
-				}
-			} else
-				result.insert(std::make_pair(arg, ""));
-		}
+                    result.insert(std::make_pair(arg, *it));
+                    toremove += 1;
+                } else {
+                    result.insert(std::make_pair(arg, value.substr(i + 1)));
+                    i = len;
+                }
+            } else
+                result.insert(std::make_pair(arg, ""));
+        }
 
-		it = args.erase(args.begin(), args.begin() + toremove);
-		end = args.end();
-	}
+        it = args.erase(args.begin(), args.begin() + toremove);
+        end = args.end();
+    }
 }
 
 } // !namespace
 
 Result read(std::vector<std::string> &args, const Options &definition)
 {
-	Result result;
+    Result result;
 
-	auto it = args.begin();
-	auto end = args.end();
+    auto it = args.begin();
+    auto end = args.end();
 
-	while (it != end) {
-		if (!isOption(*it))
-			break;
+    while (it != end) {
+        if (!isOption(*it))
+            break;
 
-		if (isLongOption(*it))
-			parseLongOption(result, args, it, end, definition);
-		else
-			parseShortOption(result, args, it, end, definition);
-	}
+        if (isLongOption(*it))
+            parseLongOption(result, args, it, end, definition);
+        else
+            parseShortOption(result, args, it, end, definition);
+    }
 
-	return result;
+    return result;
 }
 
 Result read(int &argc, char **&argv, const Options &definition)
 {
-	std::vector<std::string> args;
+    std::vector<std::string> args;
 
-	for (int i = 0; i < argc; ++i)
-		args.push_back(argv[i]);
+    for (int i = 0; i < argc; ++i)
+        args.push_back(argv[i]);
 
-	auto before = args.size();
-	auto result = read(args, definition);
+    auto before = args.size();
+    auto result = read(args, definition);
 
-	argc -= before - args.size();
-	argv += before - args.size();
+    argc -= before - args.size();
+    argv += before - args.size();
 
-	return result;
+    return result;
 }
 
-} // !parser
-
-} // !irccd
+} // !option
--- a/lib/irccd/options.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/options.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * options.hpp -- parse Unix command line options
+ * options.h -- parse Unix command line options
  *
  * Copyright (c) 2015 David Demelier <markand@malikania.fr>
  *
@@ -16,12 +16,12 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifndef IRCCD_OPTION_PARSER_HPP
-#define IRCCD_OPTION_PARSER_HPP
+#ifndef OPTIONS_HPP
+#define OPTIONS_HPP
 
 /**
- * \file options.hpp
- * \brief Basic options parsing.
+ * \file options.h
+ * \brief Basic Unix options parser.
  */
 
 #include <exception>
@@ -30,85 +30,87 @@
 #include <utility>
 #include <vector>
 
-#include "sysconfig.hpp"
-
 namespace irccd {
 
 /**
  * Namespace for options parsing.
  */
-namespace parser {
+namespace option {
 
 /**
- * \class InvalidOption
  * \brief This exception is thrown when an invalid option has been found.
  */
 class InvalidOption : public std::exception {
 private:
-	std::string message;
+    std::string message;
 
 public:
-	/**
-	 * The invalid option given.
-	 */
-	std::string argument;
+    /**
+     * The invalid option given.
+     */
+    std::string argument;
 
-	/**
-	 * Construct the exception.
-	 *
-	 * \param arg the argument missing
-	 */
-	inline InvalidOption(std::string arg)
-		: argument(std::move(arg))
-	{
-		message = std::string("invalid option: ") + argument;
-	}
+    /**
+     * Construct the exception.
+     *
+     * \param arg the argument missing
+     */
+    inline InvalidOption(std::string arg)
+        : argument(std::move(arg))
+    {
+        message = std::string("invalid option: ") + argument;
+    }
 
-	/**
-	 * Get the error message.
-	 *
-	 * \return the error message
-	 */
-	const char *what() const noexcept override
-	{
-		return message.c_str();
-	}
+    /**
+     * Get the error message.
+     *
+     * \return the error message
+     */
+    const char *what() const noexcept override
+    {
+        return message.c_str();
+    }
 };
 
 /**
- * \class MissingValue
- * \brief This exception is thrown when an option requires a value and no value has been given
+ * \brief This exception is thrown when an option requires a value and no value has been given.
  */
 class MissingValue : public std::exception {
 private:
-	std::string message;
+    std::string m_message;
+    std::string m_option;
 
 public:
-	/**
-	 * The argument that requires a value.
-	 */
-	std::string argument;
+    /**
+     * Construct the exception.
+     *
+     * \param option the option that requires a value
+     */
+    inline MissingValue(std::string option)
+        : m_option(std::move(option))
+    {
+        m_message = std::string("missing argument for: ") + m_option;
+    }
 
-	/**
-	 * Construct the exception.
-	 *
-	 * \param arg the argument that requires a value
-	 */
-	inline MissingValue(std::string arg)
-		: argument(std::move(arg))
-	{
-		message = std::string("missing argument for: ") + argument;
-	}
+    /**
+     * Get the options that requires a value.
+     *
+     * \return the option name
+     */
+    inline const std::string &option() const noexcept
+    {
+        return m_option;
+    }
 
-	/**
-	 * Get the error message.
-	 *
-	 * \return the error message
-	 */
-	const char *what() const noexcept override
-	{
-		return message.c_str();
-	}
+    /**
+     * Get the error message.
+     *
+     * \return the error message
+     */
+    const char *what() const noexcept override
+    {
+        return m_message.c_str();
+    }
 };
 
 /**
@@ -130,7 +132,7 @@
  * \throw MissingValue
  * \throw InvalidOption
  */
-IRCCD_EXPORT Result read(std::vector<std::string> &args, const Options &definition);
+Result read(std::vector<std::string> &args, const Options &definition);
 
 /**
  * Overloaded function for usage with main() arguments.
@@ -143,10 +145,10 @@
  * \throw MissingValue
  * \throw InvalidOption
  */
-IRCCD_EXPORT Result read(int &argc, char **&argv, const Options &definition);
+Result read(int &argc, char **&argv, const Options &definition);
 
-} // !parser
+} // !option
 
 } // !irccd
 
-#endif // !IRCCD_OPTION_PARSER_HPP
+#endif // !OPTIONS_HPP
--- a/lib/irccd/path.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/path.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -82,70 +82,70 @@
 
 std::string executablePath()
 {
-	std::string result;
-	std::size_t size = MAX_PATH;
+    std::string result;
+    std::size_t size = MAX_PATH;
 
-	result.resize(size);
+    result.resize(size);
 
-	if (!(size = GetModuleFileNameA(nullptr, &result[0], size)))
-		throw std::runtime_error("GetModuleFileName error");
+    if (!(size = GetModuleFileNameA(nullptr, &result[0], size)))
+        throw std::runtime_error("GetModuleFileName error");
 
-	result.resize(size);
+    result.resize(size);
 
-	return result;
+    return result;
 }
 
 #elif defined(IRCCD_SYSTEM_LINUX)
 
 std::string executablePath()
 {
-	std::string result;
+    std::string result;
 
-	result.resize(2048);
+    result.resize(2048);
 
-	auto size = readlink("/proc/self/exe", &result[0], 2048);
+    auto size = readlink("/proc/self/exe", &result[0], 2048);
 
-	if (size < 0)
-		throw std::invalid_argument(std::strerror(errno));
+    if (size < 0)
+        throw std::invalid_argument(std::strerror(errno));
 
-	result.resize(size);
+    result.resize(size);
 
-	return result;
+    return result;
 }
 
 #elif defined(IRCCD_SYSTEM_FREEBSD)
 
 std::string executablePath()
 {
-	std::array<int, 4> mib{ { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 } };
-	std::string result;
-	std::size_t size = PATH_MAX + 1;
+    std::array<int, 4> mib{ { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 } };
+    std::string result;
+    std::size_t size = PATH_MAX + 1;
 
-	result.resize(size);
+    result.resize(size);
 
-	if (sysctl(mib.data(), 4, &result[0], &size, nullptr, 0) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (sysctl(mib.data(), 4, &result[0], &size, nullptr, 0) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	result.resize(size);
+    result.resize(size);
 
-	return result;
+    return result;
 }
 
 #elif defined(IRCCD_SYSTEM_MAC)
 
 std::string executablePath()
 {
-	std::string result;
-	std::size_t size = PROC_PIDPATHINFO_MAXSIZE;
+    std::string result;
+    std::size_t size = PROC_PIDPATHINFO_MAXSIZE;
 
-	result.resize(size);
+    result.resize(size);
 
-	if ((size = proc_pidpath(getpid(), &result[0], size)) == 0)
-		throw std::runtime_error(std::strerror(errno));
+    if ((size = proc_pidpath(getpid(), &result[0], size)) == 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	result.resize(size);
+    result.resize(size);
 
-	return result;
+    return result;
 }
 
 #else
@@ -159,7 +159,7 @@
 
 std::string executablePath()
 {
-	return "";
+    return "";
 }
 
 #endif
@@ -175,30 +175,30 @@
 
 std::string systemConfig()
 {
-	assert(!base.empty());
+    assert(!base.empty());
 
-	return base + WITH_CONFDIR;
+    return base + WITH_CONFDIR;
 }
 
 std::string systemData()
 {
-	assert(!base.empty());
+    assert(!base.empty());
 
-	return base + WITH_DATADIR;
+    return base + WITH_DATADIR;
 }
 
 std::string systemCache()
 {
-	assert(!base.empty());
+    assert(!base.empty());
 
-	return base + WITH_CACHEDIR;
+    return base + WITH_CACHEDIR;
 }
 
 std::string systemPlugins()
 {
-	assert(!base.empty());
+    assert(!base.empty());
 
-	return base + WITH_PLUGINDIR;
+    return base + WITH_PLUGINDIR;
 }
 
 /*
@@ -225,34 +225,34 @@
  */
 std::string userConfig()
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	char path[MAX_PATH];
+    char path[MAX_PATH];
 
-	if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
-		oss << "";
-	else {
-		oss << path;
-		oss << "\\irccd\\config\\";
-	}
+    if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
+        oss << "";
+    else {
+        oss << path;
+        oss << "\\irccd\\config\\";
+    }
 #else
-	try {
-		Xdg xdg;
+    try {
+        Xdg xdg;
 
-		oss << xdg.configHome();
-		oss << "/irccd/";
-	} catch (const std::exception &) {
-		const char *home = getenv("HOME");
+        oss << xdg.configHome();
+        oss << "/irccd/";
+    } catch (const std::exception &) {
+        const char *home = getenv("HOME");
 
-		if (home != nullptr)
-			oss << home;
+        if (home != nullptr)
+            oss << home;
 
-		oss << "/.config/irccd/";
-	}
+        oss << "/.config/irccd/";
+    }
 #endif
 
-	return oss.str();
+    return oss.str();
 }
 
 /*
@@ -272,34 +272,34 @@
  */
 std::string userData()
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	char path[MAX_PATH];
+    char path[MAX_PATH];
 
-	if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
-		oss << "";
-	else {
-		oss << path;
-		oss << "\\irccd\\share";
-	}
+    if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
+        oss << "";
+    else {
+        oss << path;
+        oss << "\\irccd\\share";
+    }
 #else
-	try {
-		Xdg xdg;
+    try {
+        Xdg xdg;
 
-		oss << xdg.dataHome();
-		oss << "/irccd/";
-	} catch (const std::exception &) {
-		const char *home = getenv("HOME");
+        oss << xdg.dataHome();
+        oss << "/irccd/";
+    } catch (const std::exception &) {
+        const char *home = getenv("HOME");
 
-		if (home != nullptr)
-			oss << home;
+        if (home != nullptr)
+            oss << home;
 
-		oss << "/.local/share/irccd/";
-	}
+        oss << "/.local/share/irccd/";
+    }
 #endif
 
-	return oss.str();
+    return oss.str();
 }
 
 /*
@@ -319,31 +319,31 @@
  */
 std::string userCache()
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	char path[MAX_PATH + 1];
+    char path[MAX_PATH + 1];
 
-	GetTempPathA(sizeof (path), path);
+    GetTempPathA(sizeof (path), path);
 
-	oss << path << "\\irccd\\";
+    oss << path << "\\irccd\\";
 #else
-	try {
-		Xdg xdg;
+    try {
+        Xdg xdg;
 
-		oss << xdg.cacheHome();
-		oss << "/irccd/";
-	} catch (const std::exception &) {
-		const char *home = getenv("HOME");
+        oss << xdg.cacheHome();
+        oss << "/irccd/";
+    } catch (const std::exception &) {
+        const char *home = getenv("HOME");
 
-		if (home != nullptr)
-			oss << home;
+        if (home != nullptr)
+            oss << home;
 
-		oss << "/.cache/irccd/";
-	}
+        oss << "/.cache/irccd/";
+    }
 #endif
 
-	return oss.str();
+    return oss.str();
 }
 
 /*
@@ -354,7 +354,7 @@
  */
 std::string userPlugins()
 {
-	return userData() + "/plugins/";
+    return userData() + "/plugins/";
 }
 
 } // !namespace
@@ -367,161 +367,161 @@
 
 void setApplicationPath(const std::string &argv0)
 {
-	try {
-		base = executablePath();
-	} catch (const std::exception &) {
-		/*
-		 * If an exception is thrown, that means the operatin system supports a function to get the executable
-		 * path but it failed.
-		 *
-		 * TODO: show a waning
-		 */
-	}
+    try {
+        base = executablePath();
+    } catch (const std::exception &) {
+        /*
+         * If an exception is thrown, that means the operatin system supports a function to get the executable
+         * path but it failed.
+         *
+         * TODO: show a waning
+         */
+    }
 
-	/*
-	 * If we could not get the application path from the native function, check if argv[0] is an absolute path
-	 * and use that from there.
-	 *
-	 * Otherwise, search from the PATH.
-	 *
-	 * In the worst case use current working directory.
-	 */
-	if (base.empty()) {
-		if (fs::isAbsolute(argv0))
-			base = argv0;
-		else {
-			std::string name = fs::baseName(argv0);
+    /*
+     * If we could not get the application path from the native function, check if argv[0] is an absolute path
+     * and use that from there.
+     *
+     * Otherwise, search from the PATH.
+     *
+     * In the worst case use current working directory.
+     */
+    if (base.empty()) {
+        if (fs::isAbsolute(argv0))
+            base = argv0;
+        else {
+            std::string name = fs::baseName(argv0);
 
-			for (const auto &dir : util::split(sys::env("PATH"), std::string(1, Separator))) {
-				std::string path = dir + fs::separator() + name;
+            for (const auto &dir : util::split(sys::env("PATH"), std::string(1, Separator))) {
+                std::string path = dir + fs::separator() + name;
 
-				if (fs::exists(path)) {
-					base = path;
-					break;
-				}
-			}
+                if (fs::exists(path)) {
+                    base = path;
+                    break;
+                }
+            }
 
-			// Not found in PATH? add dummy value.
-			if (base.empty())
-				base = std::string(".") + fs::separator() + WITH_BINDIR + fs::separator() + "dummy";
-		}
-	}
+            // Not found in PATH? add dummy value.
+            if (base.empty())
+                base = std::string(".") + fs::separator() + WITH_BINDIR + fs::separator() + "dummy";
+        }
+    }
 
-	// Find bin/<progname>.
-	auto pos = base.rfind(std::string(WITH_BINDIR) + fs::separator() + fs::baseName(base));
+    // Find bin/<progname>.
+    auto pos = base.rfind(std::string(WITH_BINDIR) + fs::separator() + fs::baseName(base));
 
-	if (pos != std::string::npos)
-		base.erase(pos);
+    if (pos != std::string::npos)
+        base.erase(pos);
 
-	// Add trailing / or \\ for convenience.
-	base = clean(base);
+    // Add trailing / or \\ for convenience.
+    base = clean(base);
 
-	assert(!base.empty());
+    assert(!base.empty());
 }
 
 std::string clean(std::string input)
 {
-	if (input.empty())
-		return input;
+    if (input.empty())
+        return input;
 
-	// First, remove any duplicates.
-	input.erase(std::unique(input.begin(), input.end(), [&] (char c1, char c2) {
-		return c1 == c2 && (c1 == '/' || c1 == '\\');
-	}), input.end());
+    // First, remove any duplicates.
+    input.erase(std::unique(input.begin(), input.end(), [&] (char c1, char c2) {
+        return c1 == c2 && (c1 == '/' || c1 == '\\');
+    }), input.end());
 
-	// Add a trailing / or \\.
-	char c = input[input.length() - 1];
-	if (c != '/' && c != '\\')
-		input += fs::separator();
+    // Add a trailing / or \\.
+    char c = input[input.length() - 1];
+    if (c != '/' && c != '\\')
+        input += fs::separator();
 
-	// Now converts all / to \\ for Windows and the opposite for Unix.
+    // Now converts all / to \\ for Windows and the opposite for Unix.
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	std::replace(input.begin(), input.end(), '/', '\\');
+    std::replace(input.begin(), input.end(), '/', '\\');
 #else
-	std::replace(input.begin(), input.end(), '\\', '/');
+    std::replace(input.begin(), input.end(), '\\', '/');
 #endif
 
-	return input;
+    return input;
 }
 
 std::string get(Path path, Owner owner)
 {
-	assert(path >= PathConfig && path <= PathPlugins);
-	assert(owner >= OwnerSystem && owner <= OwnerUser);
+    assert(path >= PathConfig && path <= PathPlugins);
+    assert(owner >= OwnerSystem && owner <= OwnerUser);
 
-	std::string result;
+    std::string result;
 
-	switch (owner) {
-	case OwnerSystem:
-		switch (path) {
-		case PathCache:
-			result = clean(systemCache());
-			break;
-		case PathConfig:
-			result = clean(systemConfig());
-			break;
-		case PathData:
-			result = clean(systemData());
-			break;
-		case PathPlugins:
-			result = clean(systemPlugins());
-			break;
-		default:
-			break;
-		}
-	case OwnerUser:
-		switch (path) {
-		case PathCache:
-			result = clean(userCache());
-			break;
-		case PathConfig:
-			result = clean(userConfig());
-			break;
-		case PathData:
-			result = clean(userData());
-			break;
-		case PathPlugins:
-			result = clean(userPlugins());
-			break;
-		default:
-			break;
-		}
-	default:
-		break;
-	}
+    switch (owner) {
+    case OwnerSystem:
+        switch (path) {
+        case PathCache:
+            result = clean(systemCache());
+            break;
+        case PathConfig:
+            result = clean(systemConfig());
+            break;
+        case PathData:
+            result = clean(systemData());
+            break;
+        case PathPlugins:
+            result = clean(systemPlugins());
+            break;
+        default:
+            break;
+        }
+    case OwnerUser:
+        switch (path) {
+        case PathCache:
+            result = clean(userCache());
+            break;
+        case PathConfig:
+            result = clean(userConfig());
+            break;
+        case PathData:
+            result = clean(userData());
+            break;
+        case PathPlugins:
+            result = clean(userPlugins());
+            break;
+        default:
+            break;
+        }
+    default:
+        break;
+    }
 
-	return result;
+    return result;
 }
 
 std::vector<std::string> list(Path path)
 {
-	assert(path >= PathConfig && path <= PathPlugins);
+    assert(path >= PathConfig && path <= PathPlugins);
 
-	std::vector<std::string> list;
+    std::vector<std::string> list;
 
-	switch (path) {
-	case PathCache:
-		list.push_back(clean(userCache()));
-		list.push_back(clean(systemCache()));
-		break;
-	case PathConfig:
-		list.push_back(clean(userConfig()));
-		list.push_back(clean(systemConfig()));
-		break;
-	case PathData:
-		list.push_back(clean(userData()));
-		list.push_back(clean(systemData()));
-		break;
-	case PathPlugins:
-		list.push_back(clean(fs::cwd()));
-		list.push_back(clean(userPlugins()));
-		list.push_back(clean(systemPlugins()));
-		break;
-	default:
-		break;
-	}
+    switch (path) {
+    case PathCache:
+        list.push_back(clean(userCache()));
+        list.push_back(clean(systemCache()));
+        break;
+    case PathConfig:
+        list.push_back(clean(userConfig()));
+        list.push_back(clean(systemConfig()));
+        break;
+    case PathData:
+        list.push_back(clean(userData()));
+        list.push_back(clean(systemData()));
+        break;
+    case PathPlugins:
+        list.push_back(clean(fs::cwd()));
+        list.push_back(clean(userPlugins()));
+        list.push_back(clean(systemPlugins()));
+        break;
+    default:
+        break;
+    }
 
-	return list;
+    return list;
 }
 
 } // !path
--- a/lib/irccd/path.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/path.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -46,10 +46,10 @@
  * \brief Which special path to get
  */
 enum Path {
-	PathConfig,			//!< Configuration files
-	PathData,			//!< Data directory
-	PathCache,			//!< Cache files
-	PathPlugins			//!< Path to the plugins
+    PathConfig,         //!< Configuration files
+    PathData,           //!< Data directory
+    PathCache,          //!< Cache files
+    PathPlugins         //!< Path to the plugins
 };
 
 /**
@@ -57,8 +57,8 @@
  * \brief For paths, get the installation path or the user ones
  */
 enum Owner {
-	OwnerSystem,			//!< System wide
-	OwnerUser			//!< User
+    OwnerSystem,        //!< System wide
+    OwnerUser           //!< User
 };
 
 /**
--- a/lib/irccd/plugin-dynlib.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/plugin-dynlib.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -25,192 +25,192 @@
 template <typename Sym>
 inline Sym sym(Dynlib &dynlib, const std::string &name)
 {
-	try {
-		return dynlib.sym<Sym>(name);
-	} catch (...) {
-		return nullptr;
-	}
+    try {
+        return dynlib.sym<Sym>(name);
+    } catch (...) {
+        return nullptr;
+    }
 }
 
 template <typename Sym, typename... Args>
 inline void call(Sym sym, Args&&... args)
 {
-	if (sym)
-		sym(std::forward<Args>(args)...);
+    if (sym)
+        sym(std::forward<Args>(args)...);
 }
 
 } // !namespace
 
 DynlibPlugin::DynlibPlugin(std::string name, std::string path)
-	: Plugin(name, path)
-	, m_dso(std::move(path))
-	, m_onCommand(sym<OnCommand>(m_dso, "irccd_onCommand"))
-	, m_onConnect(sym<OnConnect>(m_dso, "irccd_onConnect"))
-	, m_onChannelMode(sym<OnChannelMode>(m_dso, "irccd_onChannelMode"))
-	, m_onChannelNotice(sym<OnChannelNotice>(m_dso, "irccd_onChannelNotice"))
-	, m_onInvite(sym<OnInvite>(m_dso, "irccd_onInvite"))
-	, m_onJoin(sym<OnJoin>(m_dso, "irccd_onJoin"))
-	, m_onKick(sym<OnKick>(m_dso, "irccd_onKick"))
-	, m_onLoad(sym<OnLoad>(m_dso, "irccd_onLoad"))
-	, m_onMessage(sym<OnMessage>(m_dso, "irccd_onMessage"))
-	, m_onMe(sym<OnMe>(m_dso, "irccd_onMe"))
-	, m_onMode(sym<OnMode>(m_dso, "irccd_onMode"))
-	, m_onNames(sym<OnNames>(m_dso, "irccd_onNames"))
-	, m_onNick(sym<OnNick>(m_dso, "irccd_onNick"))
-	, m_onNotice(sym<OnNotice>(m_dso, "irccd_onNotice"))
-	, m_onPart(sym<OnPart>(m_dso, "irccd_onPart"))
-	, m_onQuery(sym<OnQuery>(m_dso, "irccd_onQuery"))
-	, m_onQueryCommand(sym<OnQueryCommand>(m_dso, "irccd_onQueryCommand"))
-	, m_onReload(sym<OnReload>(m_dso, "irccd_onReload"))
-	, m_onTopic(sym<OnTopic>(m_dso, "irccd_onTopic"))
-	, m_onUnload(sym<OnUnload>(m_dso, "irccd_onUnload"))
-	, m_onWhois(sym<OnWhois>(m_dso, "irccd_onWhois"))
+    : Plugin(name, path)
+    , m_dso(std::move(path))
+    , m_onCommand(sym<OnCommand>(m_dso, "irccd_onCommand"))
+    , m_onConnect(sym<OnConnect>(m_dso, "irccd_onConnect"))
+    , m_onChannelMode(sym<OnChannelMode>(m_dso, "irccd_onChannelMode"))
+    , m_onChannelNotice(sym<OnChannelNotice>(m_dso, "irccd_onChannelNotice"))
+    , m_onInvite(sym<OnInvite>(m_dso, "irccd_onInvite"))
+    , m_onJoin(sym<OnJoin>(m_dso, "irccd_onJoin"))
+    , m_onKick(sym<OnKick>(m_dso, "irccd_onKick"))
+    , m_onLoad(sym<OnLoad>(m_dso, "irccd_onLoad"))
+    , m_onMessage(sym<OnMessage>(m_dso, "irccd_onMessage"))
+    , m_onMe(sym<OnMe>(m_dso, "irccd_onMe"))
+    , m_onMode(sym<OnMode>(m_dso, "irccd_onMode"))
+    , m_onNames(sym<OnNames>(m_dso, "irccd_onNames"))
+    , m_onNick(sym<OnNick>(m_dso, "irccd_onNick"))
+    , m_onNotice(sym<OnNotice>(m_dso, "irccd_onNotice"))
+    , m_onPart(sym<OnPart>(m_dso, "irccd_onPart"))
+    , m_onQuery(sym<OnQuery>(m_dso, "irccd_onQuery"))
+    , m_onQueryCommand(sym<OnQueryCommand>(m_dso, "irccd_onQueryCommand"))
+    , m_onReload(sym<OnReload>(m_dso, "irccd_onReload"))
+    , m_onTopic(sym<OnTopic>(m_dso, "irccd_onTopic"))
+    , m_onUnload(sym<OnUnload>(m_dso, "irccd_onUnload"))
+    , m_onWhois(sym<OnWhois>(m_dso, "irccd_onWhois"))
 {
 }
 
 void DynlibPlugin::onCommand(Irccd &irccd,
-			     const std::shared_ptr<Server> &server,
-			     const std::string &origin,
-			     const std::string &channel,
-			     const std::string &message)
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &message)
 {
-	call(m_onCommand, irccd, server, origin, channel, message);
+    call(m_onCommand, irccd, server, origin, channel, message);
 }
 
 void DynlibPlugin::onConnect(Irccd &irccd, const std::shared_ptr<Server> &server)
 {
-	call(m_onConnect, irccd, server);
+    call(m_onConnect, irccd, server);
 }
 
 void DynlibPlugin::onChannelMode(Irccd &irccd,
-				 const std::shared_ptr<Server> &server,
-				 const std::string &origin,
-				 const std::string &channel,
-				 const std::string &mode,
-				 const std::string &arg)
+                                 const std::shared_ptr<Server> &server,
+                                 const std::string &origin,
+                                 const std::string &channel,
+                                 const std::string &mode,
+                                 const std::string &arg)
 {
-	call(m_onChannelMode, irccd, server, origin, channel, mode, arg);
+    call(m_onChannelMode, irccd, server, origin, channel, mode, arg);
 }
 
 void DynlibPlugin::onChannelNotice(Irccd &irccd,
-				   const std::shared_ptr<Server> &server,
-				   const std::string &origin,
-				   const std::string &channel,
-				   const std::string &notice)
+                                   const std::shared_ptr<Server> &server,
+                                   const std::string &origin,
+                                   const std::string &channel,
+                                   const std::string &notice)
 {
-	call(m_onChannelNotice, irccd, server, origin, channel, notice);
+    call(m_onChannelNotice, irccd, server, origin, channel, notice);
 }
 
 void DynlibPlugin::onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	call(m_onInvite, irccd, server, origin, channel);
+    call(m_onInvite, irccd, server, origin, channel);
 }
 
 void DynlibPlugin::onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	call(m_onJoin, irccd, server, origin, channel);
+    call(m_onJoin, irccd, server, origin, channel);
 }
 
 void DynlibPlugin::onKick(Irccd &irccd,
-			  const std::shared_ptr<Server> &server,
-			  const std::string &origin,
-			  const std::string &channel,
-			  const std::string &target,
-			  const std::string &reason)
+                          const std::shared_ptr<Server> &server,
+                          const std::string &origin,
+                          const std::string &channel,
+                          const std::string &target,
+                          const std::string &reason)
 {
-	call(m_onKick, irccd, server, origin, channel, target, reason);
+    call(m_onKick, irccd, server, origin, channel, target, reason);
 }
 
 void DynlibPlugin::onLoad(Irccd &irccd)
 {
-	call(m_onLoad, irccd, *this);
+    call(m_onLoad, irccd, *this);
 }
 
 void DynlibPlugin::onMessage(Irccd &irccd,
-			     const std::shared_ptr<Server> &server,
-			     const std::string &origin,
-			     const std::string &channel,
-			     const std::string &message)
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &message)
 {
-	call(m_onMessage, irccd, server, origin, channel, message);
+    call(m_onMessage, irccd, server, origin, channel, message);
 }
 
 void DynlibPlugin::onMe(Irccd &irccd,
-			const std::shared_ptr<Server> &server,
-			const std::string &origin,
-			const std::string &channel,
-			const std::string &message)
+                        const std::shared_ptr<Server> &server,
+                        const std::string &origin,
+                        const std::string &channel,
+                        const std::string &message)
 {
-	call(m_onMe, irccd, server, origin, channel, message);
+    call(m_onMe, irccd, server, origin, channel, message);
 }
 
 void DynlibPlugin::onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode)
 {
-	call(m_onMode, irccd, server, origin, mode);
+    call(m_onMode, irccd, server, origin, mode);
 }
 
 void DynlibPlugin::onNames(Irccd &irccd,
-			   const std::shared_ptr<Server> &server,
-			   const std::string &channel,
-			   const std::vector<std::string> &list)
+                           const std::shared_ptr<Server> &server,
+                           const std::string &channel,
+                           const std::vector<std::string> &list)
 {
-	call(m_onNames, irccd, server, channel, list);
+    call(m_onNames, irccd, server, channel, list);
 }
 
 void DynlibPlugin::onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick)
 {
-	call(m_onNick, irccd, server, origin, nick);
+    call(m_onNick, irccd, server, origin, nick);
 }
 
 void DynlibPlugin::onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice)
 {
-	call(m_onNotice, irccd, server, origin, notice);
+    call(m_onNotice, irccd, server, origin, notice);
 }
 
 void DynlibPlugin::onPart(Irccd &irccd,
-			  const std::shared_ptr<Server> &server,
-			  const std::string &origin,
-			  const std::string &channel,
-			  const std::string &reason)
+                          const std::shared_ptr<Server> &server,
+                          const std::string &origin,
+                          const std::string &channel,
+                          const std::string &reason)
 {
-	call(m_onPart, irccd, server, origin, channel, reason);
+    call(m_onPart, irccd, server, origin, channel, reason);
 }
 
 void DynlibPlugin::onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message)
 {
-	call(m_onQuery, irccd, server, origin, message);
+    call(m_onQuery, irccd, server, origin, message);
 }
 
 void DynlibPlugin::onQueryCommand(Irccd &irccd,
-				  const std::shared_ptr<Server> &server,
-				  const std::string &origin,
-				  const std::string &message)
+                                  const std::shared_ptr<Server> &server,
+                                  const std::string &origin,
+                                  const std::string &message)
 {
-	call(m_onQueryCommand, irccd, server, origin, message);
+    call(m_onQueryCommand, irccd, server, origin, message);
 }
 
 void DynlibPlugin::onReload(Irccd &irccd)
 {
-	call(m_onReload, irccd, *this);
+    call(m_onReload, irccd, *this);
 }
 
 void DynlibPlugin::onTopic(Irccd &irccd,
-			   const std::shared_ptr<Server> &server,
-			   const std::string &origin,
-			   const std::string &channel,
-			   const std::string &topic)
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &topic)
 {
-	call(m_onTopic, irccd, server, origin, channel, topic);
+    call(m_onTopic, irccd, server, origin, channel, topic);
 }
 
 void DynlibPlugin::onUnload(Irccd &irccd)
 {
-	call(m_onUnload, irccd, *this);
+    call(m_onUnload, irccd, *this);
 }
 
 void DynlibPlugin::onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info)
 {
-	call(m_onWhois, irccd, server, info);
+    call(m_onWhois, irccd, server, info);
 }
 
 } // !irccd
--- a/lib/irccd/plugin-dynlib.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/plugin-dynlib.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -35,209 +35,209 @@
  */
 class DynlibPlugin : public Plugin {
 private:
-	using OnCommand = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnConnect = void (*)(Irccd &, const std::shared_ptr<Server> &);
-	using OnChannelMode = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &, const std::string &);
-	using OnChannelNotice = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnInvite = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnJoin = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnKick = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &, const std::string &);
-	using OnLoad = void (*)(Irccd &, DynlibPlugin &);
-	using OnMessage = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnMe = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnMode = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnNames = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::vector<std::string> &);
-	using OnNick = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnNotice = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnPart = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnQuery = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnQueryCommand = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
-	using OnReload = void (*)(Irccd &, DynlibPlugin &);
-	using OnTopic = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
-	using OnUnload = void (*)(Irccd &, DynlibPlugin &);
-	using OnWhois = void (*)(Irccd &, const std::shared_ptr<Server> &, const ServerWhois &);
+    using OnCommand = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnConnect = void (*)(Irccd &, const std::shared_ptr<Server> &);
+    using OnChannelMode = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &, const std::string &);
+    using OnChannelNotice = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnInvite = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnJoin = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnKick = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &, const std::string &);
+    using OnLoad = void (*)(Irccd &, DynlibPlugin &);
+    using OnMessage = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnMe = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnMode = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnNames = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::vector<std::string> &);
+    using OnNick = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnNotice = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnPart = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnQuery = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnQueryCommand = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &);
+    using OnReload = void (*)(Irccd &, DynlibPlugin &);
+    using OnTopic = void (*)(Irccd &, const std::shared_ptr<Server> &, const std::string &, const std::string &, const std::string &);
+    using OnUnload = void (*)(Irccd &, DynlibPlugin &);
+    using OnWhois = void (*)(Irccd &, const std::shared_ptr<Server> &, const ServerWhois &);
 
-	Dynlib m_dso;
-	OnCommand m_onCommand;
-	OnConnect m_onConnect;
-	OnChannelMode m_onChannelMode;
-	OnChannelNotice m_onChannelNotice;
-	OnInvite m_onInvite;
-	OnJoin m_onJoin;
-	OnKick m_onKick;
-	OnLoad m_onLoad;
-	OnMessage m_onMessage;
-	OnMe m_onMe;
-	OnMode m_onMode;
-	OnNames m_onNames;
-	OnNick m_onNick;
-	OnNotice m_onNotice;
-	OnPart m_onPart;
-	OnQuery m_onQuery;
-	OnQueryCommand m_onQueryCommand;
-	OnReload m_onReload;
-	OnTopic m_onTopic;
-	OnUnload m_onUnload;
-	OnWhois m_onWhois;
+    Dynlib m_dso;
+    OnCommand m_onCommand;
+    OnConnect m_onConnect;
+    OnChannelMode m_onChannelMode;
+    OnChannelNotice m_onChannelNotice;
+    OnInvite m_onInvite;
+    OnJoin m_onJoin;
+    OnKick m_onKick;
+    OnLoad m_onLoad;
+    OnMessage m_onMessage;
+    OnMe m_onMe;
+    OnMode m_onMode;
+    OnNames m_onNames;
+    OnNick m_onNick;
+    OnNotice m_onNotice;
+    OnPart m_onPart;
+    OnQuery m_onQuery;
+    OnQueryCommand m_onQueryCommand;
+    OnReload m_onReload;
+    OnTopic m_onTopic;
+    OnUnload m_onUnload;
+    OnWhois m_onWhois;
 
-	// Configuration and formats.
-	PluginConfig m_config;
-	PluginFormats m_formats;
+    // Configuration and formats.
+    PluginConfig m_config;
+    PluginFormats m_formats;
 
 public:
-	/**
-	 * Construct the plugin.
-	 *
-	 * \param name the name
-	 * \param path the fully resolved path (must be absolute)
-	 * \throw std::exception on failures
-	 */
-	DynlibPlugin(std::string name, std::string path);
+    /**
+     * Construct the plugin.
+     *
+     * \param name the name
+     * \param path the fully resolved path (must be absolute)
+     * \throw std::exception on failures
+     */
+    DynlibPlugin(std::string name, std::string path);
 
-	/**
-	 * \copydoc Plugin::onCommand
-	 */
-	IRCCD_EXPORT void onCommand(Irccd &irccd,
-				    const std::shared_ptr<Server> &server,
-				    const std::string &origin,
-				    const std::string &channel,
-				    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onCommand
+     */
+    IRCCD_EXPORT void onCommand(Irccd &irccd,
+                                const std::shared_ptr<Server> &server,
+                                const std::string &origin,
+                                const std::string &channel,
+                                const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onConnect
-	 */
-	IRCCD_EXPORT void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server) override;
+    /**
+     * \copydoc Plugin::onConnect
+     */
+    IRCCD_EXPORT void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server) override;
 
-	/**
-	 * \copydoc Plugin::onChannelMode
-	 */
-	IRCCD_EXPORT void onChannelMode(Irccd &irccd,
-					const std::shared_ptr<Server> &server,
-					const std::string &origin,
-					const std::string &channel,
-					const std::string &mode,
-					const std::string &arg) override;
+    /**
+     * \copydoc Plugin::onChannelMode
+     */
+    IRCCD_EXPORT void onChannelMode(Irccd &irccd,
+                                    const std::shared_ptr<Server> &server,
+                                    const std::string &origin,
+                                    const std::string &channel,
+                                    const std::string &mode,
+                                    const std::string &arg) override;
 
-	/**
-	 * \copydoc Plugin::onChannelNotice
-	 */
-	IRCCD_EXPORT void onChannelNotice(Irccd &irccd,
-					  const std::shared_ptr<Server> &server,
-					  const std::string &origin,
-					  const std::string &channel,
-					  const std::string &notice) override;
+    /**
+     * \copydoc Plugin::onChannelNotice
+     */
+    IRCCD_EXPORT void onChannelNotice(Irccd &irccd,
+                                      const std::shared_ptr<Server> &server,
+                                      const std::string &origin,
+                                      const std::string &channel,
+                                      const std::string &notice) override;
 
-	/**
-	 * \copydoc Plugin::onInvite
-	 */
-	IRCCD_EXPORT void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
+    /**
+     * \copydoc Plugin::onInvite
+     */
+    IRCCD_EXPORT void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
 
-	/**
-	 * \copydoc Plugin::onJoin
-	 */
-	IRCCD_EXPORT void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
+    /**
+     * \copydoc Plugin::onJoin
+     */
+    IRCCD_EXPORT void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
 
-	/**
-	 * \copydoc Plugin::onKick
-	 */
-	IRCCD_EXPORT void onKick(Irccd &irccd,
-				 const std::shared_ptr<Server> &server,
-				 const std::string &origin,
-				 const std::string &channel,
-				 const std::string &target,
-				 const std::string &reason) override;
+    /**
+     * \copydoc Plugin::onKick
+     */
+    IRCCD_EXPORT void onKick(Irccd &irccd,
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &target,
+                             const std::string &reason) override;
 
-	/**
-	 * \copydoc Plugin::onLoad
-	 */
-	IRCCD_EXPORT void onLoad(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onLoad
+     */
+    IRCCD_EXPORT void onLoad(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onMessage
-	 */
-	IRCCD_EXPORT void onMessage(Irccd &irccd,
-				    const std::shared_ptr<Server> &server,
-				    const std::string &origin,
-				    const std::string &channel,
-				    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onMessage
+     */
+    IRCCD_EXPORT void onMessage(Irccd &irccd,
+                                const std::shared_ptr<Server> &server,
+                                const std::string &origin,
+                                const std::string &channel,
+                                const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onMe
-	 */
-	IRCCD_EXPORT void onMe(Irccd &irccd,
-			       const std::shared_ptr<Server> &server,
-			       const std::string &origin,
-			       const std::string &channel,
-			       const std::string &message) override;
+    /**
+     * \copydoc Plugin::onMe
+     */
+    IRCCD_EXPORT void onMe(Irccd &irccd,
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onMode
-	 */
-	IRCCD_EXPORT void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode) override;
+    /**
+     * \copydoc Plugin::onMode
+     */
+    IRCCD_EXPORT void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode) override;
 
-	/**
-	 * \copydoc Plugin::onNames
-	 */
-	IRCCD_EXPORT void onNames(Irccd &irccd,
-				  const std::shared_ptr<Server> &server,
-				  const std::string &channel,
-				  const std::vector<std::string> &list) override;
+    /**
+     * \copydoc Plugin::onNames
+     */
+    IRCCD_EXPORT void onNames(Irccd &irccd,
+                              const std::shared_ptr<Server> &server,
+                              const std::string &channel,
+                              const std::vector<std::string> &list) override;
 
-	/**
-	 * \copydoc Plugin::onNick
-	 */
-	IRCCD_EXPORT void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick) override;
+    /**
+     * \copydoc Plugin::onNick
+     */
+    IRCCD_EXPORT void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick) override;
 
-	/**
-	 * \copydoc Plugin::onNotice
-	 */
-	IRCCD_EXPORT void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice) override;
+    /**
+     * \copydoc Plugin::onNotice
+     */
+    IRCCD_EXPORT void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice) override;
 
-	/**
-	 * \copydoc Plugin::onPart
-	 */
-	IRCCD_EXPORT void onPart(Irccd &irccd,
-				 const std::shared_ptr<Server> &server,
-				 const std::string &origin,
-				 const std::string &channel,
-				 const std::string &reason) override;
+    /**
+     * \copydoc Plugin::onPart
+     */
+    IRCCD_EXPORT void onPart(Irccd &irccd,
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &reason) override;
 
-	/**
-	 * \copydoc Plugin::onQuery
-	 */
-	IRCCD_EXPORT void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message) override;
+    /**
+     * \copydoc Plugin::onQuery
+     */
+    IRCCD_EXPORT void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onQueryCommand
-	 */
-	IRCCD_EXPORT void onQueryCommand(Irccd &irccd,
-			    const std::shared_ptr<Server> &server,
-			    const std::string &origin,
-			    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onQueryCommand
+     */
+    IRCCD_EXPORT void onQueryCommand(Irccd &irccd,
+                                     const std::shared_ptr<Server> &server,
+                                     const std::string &origin,
+                                     const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onReload
-	 */
-	IRCCD_EXPORT void onReload(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onReload
+     */
+    IRCCD_EXPORT void onReload(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onTopic
-	 */
-	IRCCD_EXPORT void onTopic(Irccd &irccd,
-				  const std::shared_ptr<Server> &server,
-				  const std::string &origin,
-				  const std::string &channel,
-				  const std::string &topic) override;
+    /**
+     * \copydoc Plugin::onTopic
+     */
+    IRCCD_EXPORT void onTopic(Irccd &irccd,
+                              const std::shared_ptr<Server> &server,
+                              const std::string &origin,
+                              const std::string &channel,
+                              const std::string &topic) override;
 
-	/**
-	 * \copydoc Plugin::onUnload
-	 */
-	IRCCD_EXPORT void onUnload(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onUnload
+     */
+    IRCCD_EXPORT void onUnload(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onWhois
-	 */
-	IRCCD_EXPORT void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info) override;
+    /**
+     * \copydoc Plugin::onWhois
+     */
+    IRCCD_EXPORT void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info) override;
 };
 
 } // !irccd
--- a/lib/irccd/plugin-js.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/plugin-js.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -44,455 +44,455 @@
 
 std::unordered_map<std::string, std::string> JsPlugin::getTable(const char *name) const
 {
-	StackAssert sa(m_context);
-	std::unordered_map<std::string, std::string> result;
+    StackAssert sa(m_context);
+    std::unordered_map<std::string, std::string> result;
 
-	duk_get_global_string(m_context, name);
-	dukx_enumerate(m_context, -1, 0, true, [&] (auto ctx) {
-		result.emplace(duk_to_string(ctx, -2), duk_to_string(ctx, -1));
-	});
-	duk_pop(m_context);
+    duk_get_global_string(m_context, name);
+    dukx_enumerate(m_context, -1, 0, true, [&] (auto ctx) {
+        result.emplace(duk_to_string(ctx, -2), duk_to_string(ctx, -1));
+    });
+    duk_pop(m_context);
 
-	return result;
+    return result;
 }
 
 void JsPlugin::putTable(const char *name, const std::unordered_map<std::string, std::string> &vars)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_get_global_string(m_context, name);
+    duk_get_global_string(m_context, name);
 
-	for (const auto &pair : vars) {
-		dukx_push_std_string(m_context, pair.second);
-		duk_put_prop_string(m_context, -2, pair.first.c_str());
-	}
+    for (const auto &pair : vars) {
+        dukx_push_std_string(m_context, pair.second);
+        duk_put_prop_string(m_context, -2, pair.first.c_str());
+    }
 
-	duk_pop(m_context);
+    duk_pop(m_context);
 }
 
 void JsPlugin::call(const std::string &name, unsigned nargs)
 {
-	duk_get_global_string(m_context, name.c_str());
+    duk_get_global_string(m_context, name.c_str());
 
-	if (duk_get_type(m_context, -1) == DUK_TYPE_UNDEFINED)
-		// Function not defined, remove the undefined value and all arguments.
-		duk_pop_n(m_context, nargs + 1);
-	else {
-		// Call the function and discard the result.
-		duk_insert(m_context, -nargs - 1);
+    if (duk_get_type(m_context, -1) == DUK_TYPE_UNDEFINED)
+        // Function not defined, remove the undefined value and all arguments.
+        duk_pop_n(m_context, nargs + 1);
+    else {
+        // Call the function and discard the result.
+        duk_insert(m_context, -nargs - 1);
 
-		if (duk_pcall(m_context, nargs) != 0)
-			throw dukx_exception(m_context, -1, true);
+        if (duk_pcall(m_context, nargs) != 0)
+            throw dukx_exception(m_context, -1, true);
 
-		duk_pop(m_context);
-	}
+        duk_pop(m_context);
+    }
 }
 
 void JsPlugin::putModules(Irccd &irccd)
 {
-	m_modules = irccd.moduleService().modules();
+    m_modules = irccd.moduleService().modules();
 
-	for (const auto &module : irccd.moduleService().modules())
-		module->load(irccd, std::static_pointer_cast<JsPlugin>(shared_from_this()));
+    for (const auto &module : irccd.moduleService().modules())
+        module->load(irccd, std::static_pointer_cast<JsPlugin>(shared_from_this()));
 }
 
 void JsPlugin::putVars()
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_pointer(m_context, this);
-	duk_put_global_string(m_context, "\xff""\xff""plugin");
-	dukx_push_std_string(m_context, name());
-	duk_put_global_string(m_context, "\xff""\xff""name");
-	dukx_push_std_string(m_context, path());
-	duk_put_global_string(m_context, "\xff""\xff""path");
+    duk_push_pointer(m_context, this);
+    duk_put_global_string(m_context, "\xff""\xff""plugin");
+    dukx_push_std_string(m_context, name());
+    duk_put_global_string(m_context, "\xff""\xff""name");
+    dukx_push_std_string(m_context, path());
+    duk_put_global_string(m_context, "\xff""\xff""path");
 }
 
 void JsPlugin::putPath(const std::string &varname, const std::string &append, path::Path type)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	bool found = true;
-	std::string foundpath;
+    bool found = true;
+    std::string foundpath;
 
-	// Use the first existing directory available.
-	for (const auto &p : path::list(type)) {
-		foundpath = path::clean(p + append);
+    // Use the first existing directory available.
+    for (const auto &p : path::list(type)) {
+        foundpath = path::clean(p + append);
 
-		if (fs::exists(foundpath)) {
-			found = true;
-			break;
-		}
-	}
+        if (fs::exists(foundpath)) {
+            found = true;
+            break;
+        }
+    }
 
-	// Use the system as default.
-	if (!found)
-		foundpath = path::clean(path::get(type, path::OwnerSystem) + append);
+    // Use the system as default.
+    if (!found)
+        foundpath = path::clean(path::get(type, path::OwnerSystem) + append);
 
-	duk_get_global_string(m_context, "Irccd");
-	duk_get_prop_string(m_context, -1, "Plugin");
-	dukx_push_std_string(m_context, foundpath);
-	duk_put_prop_string(m_context, -2, varname.c_str());
-	duk_pop_2(m_context);
+    duk_get_global_string(m_context, "Irccd");
+    duk_get_prop_string(m_context, -1, "Plugin");
+    dukx_push_std_string(m_context, foundpath);
+    duk_put_prop_string(m_context, -2, varname.c_str());
+    duk_pop_2(m_context);
 }
 
 JsPlugin::JsPlugin(std::string name, std::string path)
-	: Plugin(name, path)
+    : Plugin(name, path)
 {
-	/*
-	 * Create two special tables for configuration and formats, they are referenced later as
-	 *
-	 *   - Irccd.Plugin.config
-	 *   - Irccd.Plugin.format
-	 *
-	 * In mod-plugin.cpp.
-	 */
-	duk_push_object(m_context);
-	duk_put_global_string(m_context, ConfigGlobal);
-	duk_push_object(m_context);
-	duk_put_global_string(m_context, FormatGlobal);
+    /*
+     * Create two special tables for configuration and formats, they are referenced later as
+     *
+     *   - Irccd.Plugin.config
+     *   - Irccd.Plugin.format
+     *
+     * In mod-plugin.cpp.
+     */
+    duk_push_object(m_context);
+    duk_put_global_string(m_context, ConfigGlobal);
+    duk_push_object(m_context);
+    duk_put_global_string(m_context, FormatGlobal);
 }
 
 PluginConfig JsPlugin::config()
 {
-	return getTable(ConfigGlobal);
+    return getTable(ConfigGlobal);
 }
 
 void JsPlugin::setConfig(PluginConfig config)
 {
-	printf("%s\n", config["collaborative"].c_str());
-	putTable(ConfigGlobal, config);
+    printf("%s\n", config["collaborative"].c_str());
+    putTable(ConfigGlobal, config);
 }
 
 PluginFormats JsPlugin::formats()
 {
-	return getTable(FormatGlobal);
+    return getTable(FormatGlobal);
 }
 
 void JsPlugin::setFormats(PluginFormats formats)
 {
-	putTable(FormatGlobal, formats);
+    putTable(FormatGlobal, formats);
 }
 
 void JsPlugin::onChannelMode(Irccd &,
-			     const std::shared_ptr<Server> &server,
-			     const std::string &origin,
-			     const std::string &channel,
-			     const std::string &mode,
-			     const std::string &arg)
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &mode,
+                             const std::string &arg)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, mode);
-	dukx_push_std_string(m_context, arg);
-	call("onChannelMode", 5);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, mode);
+    dukx_push_std_string(m_context, arg);
+    call("onChannelMode", 5);
 }
 
 void JsPlugin::onChannelNotice(Irccd &,
-			       const std::shared_ptr<Server> &server,
-			       const std::string &origin,
-			       const std::string &channel,
-			       const std::string &notice)
+                               const std::shared_ptr<Server> &server,
+                               const std::string &origin,
+                               const std::string &channel,
+                               const std::string &notice)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, notice);
-	call("onChannelNotice", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, notice);
+    call("onChannelNotice", 4);
 }
 
 void JsPlugin::onCommand(Irccd &,
-			 const std::shared_ptr<Server> &server,
-			 const std::string &origin,
-			 const std::string &channel,
-			 const std::string &message)
+                         const std::shared_ptr<Server> &server,
+                         const std::string &origin,
+                         const std::string &channel,
+                         const std::string &message)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, message);
-	call("onCommand", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, message);
+    call("onCommand", 4);
 }
 
 void JsPlugin::onConnect(Irccd &, const std::shared_ptr<Server> &server)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	call("onConnect", 1);
+    duk_push_server(m_context, server);
+    call("onConnect", 1);
 }
 
 void JsPlugin::onInvite(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	call("onInvite", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    call("onInvite", 3);
 }
 
 void JsPlugin::onJoin(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	call("onJoin", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    call("onJoin", 3);
 }
 
 void JsPlugin::onKick(Irccd &,
-		      const std::shared_ptr<Server> &server,
-		      const std::string &origin,
-		      const std::string &channel,
-		      const std::string &target,
-		      const std::string &reason)
+                      const std::shared_ptr<Server> &server,
+                      const std::string &origin,
+                      const std::string &channel,
+                      const std::string &target,
+                      const std::string &reason)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, target);
-	dukx_push_std_string(m_context, reason);
-	call("onKick", 5);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, target);
+    dukx_push_std_string(m_context, reason);
+    call("onKick", 5);
 }
 
 void JsPlugin::onLoad(Irccd &irccd)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	/*
-	 * Duktape currently emit useless warnings when a file do
-	 * not exists so we do a homemade access.
-	 */
+    /*
+     * Duktape currently emit useless warnings when a file do
+     * not exists so we do a homemade access.
+     */
 #if defined(HAVE_STAT)
-	struct stat st;
+    struct stat st;
 
-	if (::stat(path().c_str(), &st) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (::stat(path().c_str(), &st) < 0)
+        throw std::runtime_error(std::strerror(errno));
 #endif
 
-	/*
-	 * dataPath: DATA + plugin/name (e.g ~/.local/share/irccd/plugins/<name>/)
-	 * configPath: CONFIG + plugin/name (e.g ~/.config/irccd/plugin/<name>/)
-	 */
-	putModules(irccd);
-	putVars();
-	putPath("dataPath", "plugin/" + name(), path::PathData);
-	putPath("configPath", "plugin/" + name(), path::PathConfig);
-	putPath("cachePath", "plugin/" + name(), path::PathCache);
+    /*
+     * dataPath: DATA + plugin/name (e.g ~/.local/share/irccd/plugins/<name>/)
+     * configPath: CONFIG + plugin/name (e.g ~/.config/irccd/plugin/<name>/)
+     */
+    putModules(irccd);
+    putVars();
+    putPath("dataPath", "plugin/" + name(), path::PathData);
+    putPath("configPath", "plugin/" + name(), path::PathConfig);
+    putPath("cachePath", "plugin/" + name(), path::PathCache);
 
-	// Try to load the file (does not call onLoad yet).
-	if (duk_peval_file(m_context, path().c_str()) != 0)
-		throw dukx_exception(m_context, -1, true);
+    // Try to load the file (does not call onLoad yet).
+    if (duk_peval_file(m_context, path().c_str()) != 0)
+        throw dukx_exception(m_context, -1, true);
 
-	duk_pop(m_context);
+    duk_pop(m_context);
 
-	/*
-	 * We put configuration and formats after loading the file and before calling onLoad to allow the plugin adding configuration
-	 * to Irccd.Plugin.(config|format) before the user.
-	 */
-	setConfig(irccd.pluginService().config(name()));
-	setFormats(irccd.pluginService().formats(name()));
+    /*
+     * We put configuration and formats after loading the file and before calling onLoad to allow the plugin adding configuration
+     * to Irccd.Plugin.(config|format) before the user.
+     */
+    setConfig(irccd.pluginService().config(name()));
+    setFormats(irccd.pluginService().formats(name()));
 
-	// Read metadata .
-	duk_get_global_string(m_context, "info");
+    // Read metadata .
+    duk_get_global_string(m_context, "info");
 
-	if (duk_get_type(m_context, -1) == DUK_TYPE_OBJECT) {
-		// 'author'
-		duk_get_prop_string(m_context, -1, "author");
-		setAuthor(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : author());
-		duk_pop(m_context);
+    if (duk_get_type(m_context, -1) == DUK_TYPE_OBJECT) {
+        // 'author'
+        duk_get_prop_string(m_context, -1, "author");
+        setAuthor(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : author());
+        duk_pop(m_context);
 
-		// 'license'
-		duk_get_prop_string(m_context, -1, "license");
-		setLicense(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : license());
-		duk_pop(m_context);
+        // 'license'
+        duk_get_prop_string(m_context, -1, "license");
+        setLicense(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : license());
+        duk_pop(m_context);
 
-		// 'summary'
-		duk_get_prop_string(m_context, -1, "summary");
-		setSummary(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : summary());
-		duk_pop(m_context);
+        // 'summary'
+        duk_get_prop_string(m_context, -1, "summary");
+        setSummary(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : summary());
+        duk_pop(m_context);
 
-		// 'version'
-		duk_get_prop_string(m_context, -1, "version");
-		setVersion(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : version());
-		duk_pop(m_context);
-	}
+        // 'version'
+        duk_get_prop_string(m_context, -1, "version");
+        setVersion(duk_is_string(m_context, -1) ? duk_get_string(m_context, -1) : version());
+        duk_pop(m_context);
+    }
 
-	duk_pop(m_context);
-	call("onLoad", 0);
+    duk_pop(m_context);
+    call("onLoad", 0);
 }
 
 void JsPlugin::onMessage(Irccd &,
-			 const std::shared_ptr<Server> &server,
-			 const std::string &origin,
-			 const std::string &channel,
-			 const std::string &message)
+                         const std::shared_ptr<Server> &server,
+                         const std::string &origin,
+                         const std::string &channel,
+                         const std::string &message)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, message);
-	call("onMessage", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, message);
+    call("onMessage", 4);
 }
 
 void JsPlugin::onMe(Irccd &,
-		    const std::shared_ptr<Server> &server,
-		    const std::string &origin,
-		    const std::string &channel,
-		    const std::string &message)
+                    const std::shared_ptr<Server> &server,
+                    const std::string &origin,
+                    const std::string &channel,
+                    const std::string &message)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, message);
-	call("onMe", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, message);
+    call("onMe", 4);
 }
 
 void JsPlugin::onMode(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, mode);
-	call("onMode", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, mode);
+    call("onMode", 3);
 }
 
 void JsPlugin::onNames(Irccd &, const std::shared_ptr<Server> &server, const std::string &channel, const std::vector<std::string> &names)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_array(m_context, names, dukx_push_std_string);
-	call("onNames", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_array(m_context, names, dukx_push_std_string);
+    call("onNames", 3);
 }
 
 void JsPlugin::onNick(Irccd &, const std::shared_ptr<Server> &server, const std::string &oldnick, const std::string &newnick)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, oldnick);
-	dukx_push_std_string(m_context, newnick);
-	call("onNick", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, oldnick);
+    dukx_push_std_string(m_context, newnick);
+    call("onNick", 3);
 }
 
 void JsPlugin::onNotice(Irccd &, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, notice);
-	call("onNotice", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, notice);
+    call("onNotice", 3);
 }
 
 void JsPlugin::onPart(Irccd &,
-		      const std::shared_ptr<Server> &server,
-		      const std::string &origin,
-		      const std::string &channel,
-		      const std::string &reason)
+                      const std::shared_ptr<Server> &server,
+                      const std::string &origin,
+                      const std::string &channel,
+                      const std::string &reason)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, reason);
-	call("onPart", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, reason);
+    call("onPart", 4);
 }
 
 void JsPlugin::onQuery(Irccd &,
-		       const std::shared_ptr<Server> &server,
-		       const std::string &origin,
-		       const std::string &message)
+                       const std::shared_ptr<Server> &server,
+                       const std::string &origin,
+                       const std::string &message)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, message);
-	call("onQuery", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, message);
+    call("onQuery", 3);
 }
 
 void JsPlugin::onQueryCommand(Irccd &,
-			      const std::shared_ptr<Server> &server,
-			      const std::string &origin,
-			      const std::string &message)
+                              const std::shared_ptr<Server> &server,
+                              const std::string &origin,
+                              const std::string &message)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, message);
-	call("onQueryCommand", 3);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, message);
+    call("onQueryCommand", 3);
 }
 
 void JsPlugin::onReload(Irccd &)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	call("onReload");
+    call("onReload");
 }
 
 void JsPlugin::onTopic(Irccd &,
-		       const std::shared_ptr<Server> &server,
-		       const std::string &origin,
-		       const std::string &channel,
-		       const std::string &topic)
+                       const std::shared_ptr<Server> &server,
+                       const std::string &origin,
+                       const std::string &channel,
+                       const std::string &topic)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	dukx_push_std_string(m_context, origin);
-	dukx_push_std_string(m_context, channel);
-	dukx_push_std_string(m_context, topic);
-	call("onTopic", 4);
+    duk_push_server(m_context, server);
+    dukx_push_std_string(m_context, origin);
+    dukx_push_std_string(m_context, channel);
+    dukx_push_std_string(m_context, topic);
+    call("onTopic", 4);
 }
 
 void JsPlugin::onUnload(Irccd &irccd)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	call("onUnload");
+    call("onUnload");
 
-	for (const auto &module : m_modules)
-		module->unload(irccd, std::static_pointer_cast<JsPlugin>(shared_from_this()));
+    for (const auto &module : m_modules)
+        module->unload(irccd, std::static_pointer_cast<JsPlugin>(shared_from_this()));
 }
 
 void JsPlugin::onWhois(Irccd &, const std::shared_ptr<Server> &server, const ServerWhois &whois)
 {
-	StackAssert sa(m_context);
+    StackAssert sa(m_context);
 
-	duk_push_server(m_context, server);
-	duk_push_object(m_context);
-	dukx_push_std_string(m_context, whois.nick);
-	duk_put_prop_string(m_context, -2, "nickname");
-	dukx_push_std_string(m_context, whois.user);
-	duk_put_prop_string(m_context, -2, "username");
-	dukx_push_std_string(m_context, whois.realname);
-	duk_put_prop_string(m_context, -2, "realname");
-	dukx_push_std_string(m_context, whois.host);
-	duk_put_prop_string(m_context, -2, "host");
-	dukx_push_array(m_context, whois.channels, dukx_push_std_string);
-	duk_put_prop_string(m_context, -2, "channels");
-	call("onWhois", 2);
+    duk_push_server(m_context, server);
+    duk_push_object(m_context);
+    dukx_push_std_string(m_context, whois.nick);
+    duk_put_prop_string(m_context, -2, "nickname");
+    dukx_push_std_string(m_context, whois.user);
+    duk_put_prop_string(m_context, -2, "username");
+    dukx_push_std_string(m_context, whois.realname);
+    duk_put_prop_string(m_context, -2, "realname");
+    dukx_push_std_string(m_context, whois.host);
+    duk_put_prop_string(m_context, -2, "host");
+    dukx_push_array(m_context, whois.channels, dukx_push_std_string);
+    duk_put_prop_string(m_context, -2, "channels");
+    call("onWhois", 2);
 }
 
 } // !irccd
--- a/lib/irccd/plugin-js.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/plugin-js.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -39,191 +39,191 @@
  */
 class JsPlugin : public Plugin {
 private:
-	// JavaScript context
-	UniqueContext m_context;
+    // JavaScript context
+    UniqueContext m_context;
 
-	// Store loaded modules.
-	std::vector<std::shared_ptr<Module>> m_modules;
+    // Store loaded modules.
+    std::vector<std::shared_ptr<Module>> m_modules;
 
-	// Private helpers.
-	std::unordered_map<std::string, std::string> getTable(const char *name) const;
-	void putTable(const char *name, const std::unordered_map<std::string, std::string> &vars);
-	void call(const std::string &name, unsigned nargs = 0);
-	void putModules(Irccd &irccd);
-	void putVars();
-	void putPath(const std::string &varname, const std::string &append, path::Path type);
+    // Private helpers.
+    std::unordered_map<std::string, std::string> getTable(const char *name) const;
+    void putTable(const char *name, const std::unordered_map<std::string, std::string> &vars);
+    void call(const std::string &name, unsigned nargs = 0);
+    void putModules(Irccd &irccd);
+    void putVars();
+    void putPath(const std::string &varname, const std::string &append, path::Path type);
 
 public:
-	/**
-	 * Constructor.
-	 *
-	 * \param name the plugin name
-	 * \param path the path to the plugin
-	 */
-	IRCCD_EXPORT JsPlugin(std::string name, std::string path);
+    /**
+     * Constructor.
+     *
+     * \param name the plugin name
+     * \param path the path to the plugin
+     */
+    IRCCD_EXPORT JsPlugin(std::string name, std::string path);
 
-	/**
-	 * Access the Duktape context.
-	 *
-	 * \return the context
-	 */
-	inline UniqueContext &context() noexcept
-	{
-		return m_context;
-	}
+    /**
+     * Access the Duktape context.
+     *
+     * \return the context
+     */
+    inline UniqueContext &context() noexcept
+    {
+        return m_context;
+    }
 
-	IRCCD_EXPORT PluginConfig config() override;
+    IRCCD_EXPORT PluginConfig config() override;
 
-	IRCCD_EXPORT void setConfig(PluginConfig) override;
+    IRCCD_EXPORT void setConfig(PluginConfig) override;
 
-	IRCCD_EXPORT PluginFormats formats() override;
+    IRCCD_EXPORT PluginFormats formats() override;
 
-	IRCCD_EXPORT void setFormats(PluginFormats formats) override;
+    IRCCD_EXPORT void setFormats(PluginFormats formats) override;
 
-	/**
-	 * \copydoc Plugin::onCommand
-	 */
-	IRCCD_EXPORT void onCommand(Irccd &irccd,
-				    const std::shared_ptr<Server> &server,
-				    const std::string &origin,
-				    const std::string &channel,
-				    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onCommand
+     */
+    IRCCD_EXPORT void onCommand(Irccd &irccd,
+                                const std::shared_ptr<Server> &server,
+                                const std::string &origin,
+                                const std::string &channel,
+                                const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onConnect
-	 */
-	IRCCD_EXPORT void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server) override;
+    /**
+     * \copydoc Plugin::onConnect
+     */
+    IRCCD_EXPORT void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server) override;
 
-	/**
-	 * \copydoc Plugin::onChannelMode
-	 */
-	IRCCD_EXPORT void onChannelMode(Irccd &irccd,
-					const std::shared_ptr<Server> &server,
-					const std::string &origin,
-					const std::string &channel,
-					const std::string &mode,
-					const std::string &arg) override;
+    /**
+     * \copydoc Plugin::onChannelMode
+     */
+    IRCCD_EXPORT void onChannelMode(Irccd &irccd,
+                                    const std::shared_ptr<Server> &server,
+                                    const std::string &origin,
+                                    const std::string &channel,
+                                    const std::string &mode,
+                                    const std::string &arg) override;
 
-	/**
-	 * \copydoc Plugin::onChannelNotice
-	 */
-	IRCCD_EXPORT void onChannelNotice(Irccd &irccd,
-					  const std::shared_ptr<Server> &server,
-					  const std::string &origin,
-					  const std::string &channel,
-					  const std::string &notice) override;
+    /**
+     * \copydoc Plugin::onChannelNotice
+     */
+    IRCCD_EXPORT void onChannelNotice(Irccd &irccd,
+                                      const std::shared_ptr<Server> &server,
+                                      const std::string &origin,
+                                      const std::string &channel,
+                                      const std::string &notice) override;
 
-	/**
-	 * \copydoc Plugin::onInvite
-	 */
-	IRCCD_EXPORT void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
+    /**
+     * \copydoc Plugin::onInvite
+     */
+    IRCCD_EXPORT void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
 
-	/**
-	 * \copydoc Plugin::onJoin
-	 */
-	IRCCD_EXPORT void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
+    /**
+     * \copydoc Plugin::onJoin
+     */
+    IRCCD_EXPORT void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel) override;
 
-	/**
-	 * \copydoc Plugin::onKick
-	 */
-	IRCCD_EXPORT void onKick(Irccd &irccd,
-				 const std::shared_ptr<Server> &server,
-				 const std::string &origin,
-				 const std::string &channel,
-				 const std::string &target,
-				 const std::string &reason) override;
+    /**
+     * \copydoc Plugin::onKick
+     */
+    IRCCD_EXPORT void onKick(Irccd &irccd,
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &target,
+                             const std::string &reason) override;
 
-	/**
-	 * \copydoc Plugin::onLoad
-	 */
-	IRCCD_EXPORT void onLoad(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onLoad
+     */
+    IRCCD_EXPORT void onLoad(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onMessage
-	 */
-	IRCCD_EXPORT void onMessage(Irccd &irccd,
-				    const std::shared_ptr<Server> &server,
-				    const std::string &origin,
-				    const std::string &channel,
-				    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onMessage
+     */
+    IRCCD_EXPORT void onMessage(Irccd &irccd,
+                                const std::shared_ptr<Server> &server,
+                                const std::string &origin,
+                                const std::string &channel,
+                                const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onMe
-	 */
-	IRCCD_EXPORT void onMe(Irccd &irccd,
-			       const std::shared_ptr<Server> &server,
-			       const std::string &origin,
-			       const std::string &channel,
-			       const std::string &message) override;
+    /**
+     * \copydoc Plugin::onMe
+     */
+    IRCCD_EXPORT void onMe(Irccd &irccd,
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onMode
-	 */
-	IRCCD_EXPORT void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode) override;
+    /**
+     * \copydoc Plugin::onMode
+     */
+    IRCCD_EXPORT void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode) override;
 
-	/**
-	 * \copydoc Plugin::onNames
-	 */
-	IRCCD_EXPORT void onNames(Irccd &irccd,
-				  const std::shared_ptr<Server> &server,
-				  const std::string &channel,
-				  const std::vector<std::string> &list) override;
+    /**
+     * \copydoc Plugin::onNames
+     */
+    IRCCD_EXPORT void onNames(Irccd &irccd,
+                              const std::shared_ptr<Server> &server,
+                              const std::string &channel,
+                              const std::vector<std::string> &list) override;
 
-	/**
-	 * \copydoc Plugin::onNick
-	 */
-	IRCCD_EXPORT void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick) override;
+    /**
+     * \copydoc Plugin::onNick
+     */
+    IRCCD_EXPORT void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick) override;
 
-	/**
-	 * \copydoc Plugin::onNotice
-	 */
-	IRCCD_EXPORT void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice) override;
+    /**
+     * \copydoc Plugin::onNotice
+     */
+    IRCCD_EXPORT void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice) override;
 
-	/**
-	 * \copydoc Plugin::onPart
-	 */
-	IRCCD_EXPORT void onPart(Irccd &irccd,
-				 const std::shared_ptr<Server> &server,
-				 const std::string &origin,
-				 const std::string &channel,
-				 const std::string &reason) override;
+    /**
+     * \copydoc Plugin::onPart
+     */
+    IRCCD_EXPORT void onPart(Irccd &irccd,
+                             const std::shared_ptr<Server> &server,
+                             const std::string &origin,
+                             const std::string &channel,
+                             const std::string &reason) override;
 
-	/**
-	 * \copydoc Plugin::onQuery
-	 */
-	IRCCD_EXPORT void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message) override;
+    /**
+     * \copydoc Plugin::onQuery
+     */
+    IRCCD_EXPORT void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onQueryCommand
-	 */
-	IRCCD_EXPORT void onQueryCommand(Irccd &irccd,
-			    const std::shared_ptr<Server> &server,
-			    const std::string &origin,
-			    const std::string &message) override;
+    /**
+     * \copydoc Plugin::onQueryCommand
+     */
+    IRCCD_EXPORT void onQueryCommand(Irccd &irccd,
+                                     const std::shared_ptr<Server> &server,
+                                     const std::string &origin,
+                                     const std::string &message) override;
 
-	/**
-	 * \copydoc Plugin::onReload
-	 */
-	IRCCD_EXPORT void onReload(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onReload
+     */
+    IRCCD_EXPORT void onReload(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onTopic
-	 */
-	IRCCD_EXPORT void onTopic(Irccd &irccd,
-				  const std::shared_ptr<Server> &server,
-				  const std::string &origin,
-				  const std::string &channel,
-				  const std::string &topic) override;
+    /**
+     * \copydoc Plugin::onTopic
+     */
+    IRCCD_EXPORT void onTopic(Irccd &irccd,
+                              const std::shared_ptr<Server> &server,
+                              const std::string &origin,
+                              const std::string &channel,
+                              const std::string &topic) override;
 
-	/**
-	 * \copydoc Plugin::onUnload
-	 */
-	IRCCD_EXPORT void onUnload(Irccd &irccd) override;
+    /**
+     * \copydoc Plugin::onUnload
+     */
+    IRCCD_EXPORT void onUnload(Irccd &irccd) override;
 
-	/**
-	 * \copydoc Plugin::onWhois
-	 */
-	IRCCD_EXPORT void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info) override;
+    /**
+     * \copydoc Plugin::onWhois
+     */
+    IRCCD_EXPORT void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info) override;
 };
 
 } // !irccd
--- a/lib/irccd/plugin.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/plugin.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -61,488 +61,488 @@
  */
 class Plugin : public std::enable_shared_from_this<Plugin> {
 private:
-	// Plugin information
-	std::string m_name;
-	std::string m_path;
+    // Plugin information
+    std::string m_name;
+    std::string m_path;
 
-	// Metadata
-	std::string m_author{"unknown"};
-	std::string m_license{"unknown"};
-	std::string m_summary{"unknown"};
-	std::string m_version{"unknown"};
+    // Metadata
+    std::string m_author{"unknown"};
+    std::string m_license{"unknown"};
+    std::string m_summary{"unknown"};
+    std::string m_version{"unknown"};
 
 public:
-	/**
-	 * Constructor.
-	 *
-	 * \param name the plugin id
-	 * \param path the fully resolved path to the plugin
-	 * \throws std::runtime_error on errors
-	 */
-	inline Plugin(std::string name, std::string path) noexcept
-		: m_name(std::move(name))
-		, m_path(std::move(path))
-	{
-	}
+    /**
+     * Constructor.
+     *
+     * \param name the plugin id
+     * \param path the fully resolved path to the plugin
+     * \throws std::runtime_error on errors
+     */
+    inline Plugin(std::string name, std::string path) noexcept
+        : m_name(std::move(name))
+        , m_path(std::move(path))
+    {
+    }
 
-	/**
-	 * Temporary, close all timers.
-	 */
-	virtual ~Plugin() = default;
+    /**
+     * Temporary, close all timers.
+     */
+    virtual ~Plugin() = default;
 
-	/**
-	 * Get the plugin name.
-	 *
-	 * \return the plugin name
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the plugin name.
+     *
+     * \return the plugin name
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Get the plugin path.
-	 *
-	 * \return the plugin path
-	 * \note some plugins may not exist on the disk
-	 */
-	inline const std::string &path() const noexcept
-	{
-		return m_path;
-	}
+    /**
+     * Get the plugin path.
+     *
+     * \return the plugin path
+     * \note some plugins may not exist on the disk
+     */
+    inline const std::string &path() const noexcept
+    {
+        return m_path;
+    }
 
-	/**
-	 * Get the author.
-	 *
-	 * \return the author
-	 */
-	inline const std::string &author() const noexcept
-	{
-		return m_author;
-	}
+    /**
+     * Get the author.
+     *
+     * \return the author
+     */
+    inline const std::string &author() const noexcept
+    {
+        return m_author;
+    }
 
-	/**
-	 * Set the author.
-	 *
-	 * \param author the author
-	 */
-	inline void setAuthor(std::string author) noexcept
-	{
-		m_author = std::move(author);
-	}
+    /**
+     * Set the author.
+     *
+     * \param author the author
+     */
+    inline void setAuthor(std::string author) noexcept
+    {
+        m_author = std::move(author);
+    }
 
-	/**
-	 * Get the license.
-	 *
-	 * \return the license
-	 */
-	inline const std::string &license() const noexcept
-	{
-		return m_license;
-	}
+    /**
+     * Get the license.
+     *
+     * \return the license
+     */
+    inline const std::string &license() const noexcept
+    {
+        return m_license;
+    }
 
-	/**
-	 * Set the license.
-	 *
-	 * \param license the license
-	 */
-	inline void setLicense(std::string license) noexcept
-	{
-		m_license = std::move(license);
-	}
+    /**
+     * Set the license.
+     *
+     * \param license the license
+     */
+    inline void setLicense(std::string license) noexcept
+    {
+        m_license = std::move(license);
+    }
 
-	/**
-	 * Get the summary.
-	 *
-	 * \return the summary
-	 */
-	inline const std::string &summary() const noexcept
-	{
-		return m_summary;
-	}
+    /**
+     * Get the summary.
+     *
+     * \return the summary
+     */
+    inline const std::string &summary() const noexcept
+    {
+        return m_summary;
+    }
 
-	/**
-	 * Set the summary.
-	 *
-	 * \param summary the summary
-	 */
-	inline void setSummary(std::string summary) noexcept
-	{
-		m_summary = std::move(summary);
-	}
+    /**
+     * Set the summary.
+     *
+     * \param summary the summary
+     */
+    inline void setSummary(std::string summary) noexcept
+    {
+        m_summary = std::move(summary);
+    }
 
-	/**
-	 * Get the version.
-	 *
-	 * \return the version
-	 */
-	inline const std::string &version() const noexcept
-	{
-		return m_version;
-	}
+    /**
+     * Get the version.
+     *
+     * \return the version
+     */
+    inline const std::string &version() const noexcept
+    {
+        return m_version;
+    }
 
-	/**
-	 * Set the version.
-	 *
-	 * \param version the version
-	 */
-	inline void setVersion(std::string version) noexcept
-	{
-		m_version = std::move(version);
-	}
+    /**
+     * Set the version.
+     *
+     * \param version the version
+     */
+    inline void setVersion(std::string version) noexcept
+    {
+        m_version = std::move(version);
+    }
 
-	/**
-	 * Access the plugin configuration.
-	 *
-	 * \return the config
-	 */
-	virtual PluginConfig config()
-	{
-		return {};
-	}
+    /**
+     * Access the plugin configuration.
+     *
+     * \return the config
+     */
+    virtual PluginConfig config()
+    {
+        return {};
+    }
 
-	/**
-	 * Set the configuration.
-	 *
-	 * \param config the configuration
-	 */
-	virtual void setConfig(PluginConfig config)
-	{
-		(void)config;
-	}
+    /**
+     * Set the configuration.
+     *
+     * \param config the configuration
+     */
+    virtual void setConfig(PluginConfig config)
+    {
+        (void)config;
+    }
 
-	/**
-	 * Access the plugin formats.
-	 *
-	 * \return the format
-	 */
-	virtual PluginFormats formats()
-	{
-		return {};
-	}
+    /**
+     * Access the plugin formats.
+     *
+     * \return the format
+     */
+    virtual PluginFormats formats()
+    {
+        return {};
+    }
 
-	/**
-	 * Set the formats.
-	 *
-	 * \param formats the formats
-	 */
-	virtual void setFormats(PluginFormats formats)
-	{
-		(void)formats;
-	}
+    /**
+     * Set the formats.
+     *
+     * \param formats the formats
+     */
+    virtual void setFormats(PluginFormats formats)
+    {
+        (void)formats;
+    }
 
-	/**
-	 * On channel message. This event will call onMessage or
-	 * onCommand if the messages starts with the command character
-	 * plus the plugin name.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the message
-	 * \param channel the channel
-	 * \param message the message or command
-	 */
-	virtual void onCommand(Irccd &irccd,
-			       const std::shared_ptr<Server> &server,
-			       const std::string &origin,
-			       const std::string &channel,
-			       const std::string &message)
-	{
-		util::unused(irccd, server, origin, channel, message);
-	}
+    /**
+     * On channel message. This event will call onMessage or
+     * onCommand if the messages starts with the command character
+     * plus the plugin name.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the message
+     * \param channel the channel
+     * \param message the message or command
+     */
+    virtual void onCommand(Irccd &irccd,
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &message)
+    {
+        util::unused(irccd, server, origin, channel, message);
+    }
 
-	/**
-	 * On successful connection.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 */
-	virtual void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server)
-	{
-		util::unused(irccd, server);
-	}
+    /**
+     * On successful connection.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     */
+    virtual void onConnect(Irccd &irccd, const std::shared_ptr<Server> &server)
+    {
+        util::unused(irccd, server);
+    }
 
-	/**
-	 * On channel mode.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the ouser who has changed the mode
-	 * \param channel the channel
-	 * \param mode the mode
-	 * \param arg the optional mode argument
-	 */
-	virtual void onChannelMode(Irccd &irccd,
-				   const std::shared_ptr<Server> &server,
-				   const std::string &origin,
-				   const std::string &channel,
-				   const std::string &mode,
-				   const std::string &arg)
-	{
-		util::unused(irccd, server, origin, channel, mode, arg);
-	}
+    /**
+     * On channel mode.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the ouser who has changed the mode
+     * \param channel the channel
+     * \param mode the mode
+     * \param arg the optional mode argument
+     */
+    virtual void onChannelMode(Irccd &irccd,
+                               const std::shared_ptr<Server> &server,
+                               const std::string &origin,
+                               const std::string &channel,
+                               const std::string &mode,
+                               const std::string &arg)
+    {
+        util::unused(irccd, server, origin, channel, mode, arg);
+    }
 
-	/**
-	 * On a channel notice.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the notice
-	 * \param channel on which channel
-	 * \param notice the message
-	 */
-	virtual void onChannelNotice(Irccd &irccd,
-				     const std::shared_ptr<Server> &server,
-				     const std::string &origin,
-				     const std::string &channel,
-				     const std::string &notice)
-	{
-		util::unused(irccd, server, origin, channel, notice);
-	}
+    /**
+     * On a channel notice.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the notice
+     * \param channel on which channel
+     * \param notice the message
+     */
+    virtual void onChannelNotice(Irccd &irccd,
+                                 const std::shared_ptr<Server> &server,
+                                 const std::string &origin,
+                                 const std::string &channel,
+                                 const std::string &notice)
+    {
+        util::unused(irccd, server, origin, channel, notice);
+    }
 
-	/**
-	 * On invitation.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who invited you
-	 * \param channel the channel
-	 */
-	virtual void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
-	{
-		util::unused(irccd, server, origin, channel);
-	}
+    /**
+     * On invitation.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who invited you
+     * \param channel the channel
+     */
+    virtual void onInvite(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
+    {
+        util::unused(irccd, server, origin, channel);
+    }
 
-	/**
-	 * On join.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who joined
-	 * \param channel the channel
-	 */
-	virtual void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
-	{
-		util::unused(irccd, server, origin, channel);
-	}
+    /**
+     * On join.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who joined
+     * \param channel the channel
+     */
+    virtual void onJoin(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &channel)
+    {
+        util::unused(irccd, server, origin, channel);
+    }
 
-	/**
-	 * On kick.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who kicked the target
-	 * \param channel the channel
-	 * \param target the kicked target
-	 * \param reason the optional reason
-	 */
-	virtual void onKick(Irccd &irccd, 
-			    const std::shared_ptr<Server> &server,
-			    const std::string &origin,
-			    const std::string &channel,
-			    const std::string &target,
-			    const std::string &reason)
-	{
-		util::unused(irccd, server, origin, channel, target, reason);
-	}
+    /**
+     * On kick.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who kicked the target
+     * \param channel the channel
+     * \param target the kicked target
+     * \param reason the optional reason
+     */
+    virtual void onKick(Irccd &irccd, 
+                        const std::shared_ptr<Server> &server,
+                        const std::string &origin,
+                        const std::string &channel,
+                        const std::string &target,
+                        const std::string &reason)
+    {
+        util::unused(irccd, server, origin, channel, target, reason);
+    }
 
-	/**
-	 * On load.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	virtual void onLoad(Irccd &irccd)
-	{
-		util::unused(irccd);
-	}
+    /**
+     * On load.
+     *
+     * \param irccd the irccd instance
+     */
+    virtual void onLoad(Irccd &irccd)
+    {
+        util::unused(irccd);
+    }
 
-	/**
-	 * On channel message.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the message
-	 * \param channel the channel
-	 * \param message the message or command
-	 */
-	virtual void onMessage(Irccd &irccd, 
-			       const std::shared_ptr<Server> &server,
-			       const std::string &origin,
-			       const std::string &channel,
-			       const std::string &message)
-	{
-		util::unused(irccd, server, origin, channel, message);
-	}
+    /**
+     * On channel message.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the message
+     * \param channel the channel
+     * \param message the message or command
+     */
+    virtual void onMessage(Irccd &irccd, 
+                           const std::shared_ptr<Server> &server,
+                           const std::string &origin,
+                           const std::string &channel,
+                           const std::string &message)
+    {
+        util::unused(irccd, server, origin, channel, message);
+    }
 
-	/**
-	 * On CTCP Action.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the message
-	 * \param channel the channel (may also be your nickname)
-	 * \param message the message
-	 */
-	virtual void onMe(Irccd &irccd, 
-			  const std::shared_ptr<Server> &server,
-			  const std::string &origin,
-			  const std::string &channel,
-			  const std::string &message)
-	{
-		util::unused(irccd, server, origin, channel, message);
-	}
+    /**
+     * On CTCP Action.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the message
+     * \param channel the channel (may also be your nickname)
+     * \param message the message
+     */
+    virtual void onMe(Irccd &irccd, 
+                      const std::shared_ptr<Server> &server,
+                      const std::string &origin,
+                      const std::string &channel,
+                      const std::string &message)
+    {
+        util::unused(irccd, server, origin, channel, message);
+    }
 
-	/**
-	 * On user mode change.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the person who changed the mode
-	 * \param mode the new mode
-	 */
-	virtual void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode)
-	{
-		util::unused(irccd, server, origin, mode);
-	}
+    /**
+     * On user mode change.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the person who changed the mode
+     * \param mode the new mode
+     */
+    virtual void onMode(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &mode)
+    {
+        util::unused(irccd, server, origin, mode);
+    }
 
-	/**
-	 * On names listing.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param channel the channel
-	 * \param list the list of nicknames
-	 */
-	virtual void onNames(Irccd &irccd,
-			     const std::shared_ptr<Server> &server,
-			     const std::string &channel,
-			     const std::vector<std::string> &list)
-	{
-		util::unused(irccd, server, channel, list);
-	}
+    /**
+     * On names listing.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param channel the channel
+     * \param list the list of nicknames
+     */
+    virtual void onNames(Irccd &irccd,
+                         const std::shared_ptr<Server> &server,
+                         const std::string &channel,
+                         const std::vector<std::string> &list)
+    {
+        util::unused(irccd, server, channel, list);
+    }
 
-	/**
-	 * On nick change.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user that changed its nickname
-	 * \param nick the new nickname
-	 */
-	virtual void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick)
-	{
-		util::unused(irccd, server, origin, nick);
-	}
+    /**
+     * On nick change.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user that changed its nickname
+     * \param nick the new nickname
+     */
+    virtual void onNick(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &nick)
+    {
+        util::unused(irccd, server, origin, nick);
+    }
 
-	/**
-	 * On user notice.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the notice
-	 * \param notice the notice
-	 */
-	virtual void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice)
-	{
-		util::unused(irccd, server, origin, notice);
-	}
+    /**
+     * On user notice.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the notice
+     * \param notice the notice
+     */
+    virtual void onNotice(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &notice)
+    {
+        util::unused(irccd, server, origin, notice);
+    }
 
-	/**
-	 * On part.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who left
-	 * \param channel the channel
-	 * \param reason the optional reason
-	 */
-	virtual void onPart(Irccd &irccd, 
-			    const std::shared_ptr<Server> &server,
-			    const std::string &origin,
-			    const std::string &channel,
-			    const std::string &reason)
-	{
-		util::unused(irccd, server, origin, channel, reason);
-	}
+    /**
+     * On part.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who left
+     * \param channel the channel
+     * \param reason the optional reason
+     */
+    virtual void onPart(Irccd &irccd, 
+                        const std::shared_ptr<Server> &server,
+                        const std::string &origin,
+                        const std::string &channel,
+                        const std::string &reason)
+    {
+        util::unused(irccd, server, origin, channel, reason);
+    }
 
-	/**
-	 * On user query.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the query
-	 * \param message the message
-	 */
-	virtual void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message)
-	{
-		util::unused(irccd, server, origin, message);
-	}
+    /**
+     * On user query.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the query
+     * \param message the message
+     */
+    virtual void onQuery(Irccd &irccd, const std::shared_ptr<Server> &server, const std::string &origin, const std::string &message)
+    {
+        util::unused(irccd, server, origin, message);
+    }
 
-	/**
-	 * On user query command.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the query
-	 * \param message the message
-	 */
-	virtual void onQueryCommand(Irccd &irccd,
-				    const std::shared_ptr<Server> &server,
-				    const std::string &origin,
-				    const std::string &message)
-	{
-		util::unused(irccd, server, origin, message);
-	}
+    /**
+     * On user query command.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the query
+     * \param message the message
+     */
+    virtual void onQueryCommand(Irccd &irccd,
+                                const std::shared_ptr<Server> &server,
+                                const std::string &origin,
+                                const std::string &message)
+    {
+        util::unused(irccd, server, origin, message);
+    }
 
-	/**
-	 * On reload.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	virtual void onReload(Irccd &irccd)
-	{
-		util::unused(irccd);
-	}
+    /**
+     * On reload.
+     *
+     * \param irccd the irccd instance
+     */
+    virtual void onReload(Irccd &irccd)
+    {
+        util::unused(irccd);
+    }
 
-	/**
-	 * On topic change.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param origin the user who sent the topic
-	 * \param channel the channel
-	 * \param topic the new topic
-	 */
-	virtual void onTopic(Irccd &irccd, 
-			     const std::shared_ptr<Server> &server,
-			     const std::string &origin,
-			     const std::string &channel,
-			     const std::string &topic)
-	{
-		util::unused(irccd, server, origin, channel, topic);
-	}
+    /**
+     * On topic change.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param origin the user who sent the topic
+     * \param channel the channel
+     * \param topic the new topic
+     */
+    virtual void onTopic(Irccd &irccd, 
+                         const std::shared_ptr<Server> &server,
+                         const std::string &origin,
+                         const std::string &channel,
+                         const std::string &topic)
+    {
+        util::unused(irccd, server, origin, channel, topic);
+    }
 
-	/**
-	 * On unload.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	virtual void onUnload(Irccd &irccd)
-	{
-		util::unused(irccd);
-	}
+    /**
+     * On unload.
+     *
+     * \param irccd the irccd instance
+     */
+    virtual void onUnload(Irccd &irccd)
+    {
+        util::unused(irccd);
+    }
 
-	/**
-	 * On whois information.
-	 *
-	 * \param irccd the irccd instance
-	 * \param server the server
-	 * \param info the info
-	 */
-	virtual void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info)
-	{
-		util::unused(irccd, server, info);
-	}
+    /**
+     * On whois information.
+     *
+     * \param irccd the irccd instance
+     * \param server the server
+     * \param info the info
+     */
+    virtual void onWhois(Irccd &irccd, const std::shared_ptr<Server> &server, const ServerWhois &info)
+    {
+        util::unused(irccd, server, info);
+    }
 };
 
 } // !irccd
--- a/lib/irccd/rule.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/rule.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -27,23 +27,23 @@
 namespace {
 
 const std::unordered_set<std::string> validEvents{
-	"onChannelMode"
-	"onChannelNotice",
-	"onCommand",
-	"onConnect",
-	"onInvite",
-	"onJoin",
-	"onKick",
-	"onMessage",
-	"onMode",
-	"onNames",
-	"onNick",
-	"onNotice",
-	"onPart",
-	"onQuery",
-	"onQueryCommand",
-	"onTopic",
-	"onWhois"
+    "onChannelMode"
+    "onChannelNotice",
+    "onCommand",
+    "onConnect",
+    "onInvite",
+    "onJoin",
+    "onKick",
+    "onMessage",
+    "onMode",
+    "onNames",
+    "onNick",
+    "onNotice",
+    "onPart",
+    "onQuery",
+    "onQueryCommand",
+    "onTopic",
+    "onWhois"
 };
 
 } // !namespace
@@ -52,63 +52,63 @@
 
 bool Rule::matchMap(const RuleSet &map, const std::string &value) const noexcept
 {
-	return value.empty() || map.empty() || map.count(value) == 1;
+    return value.empty() || map.empty() || map.count(value) == 1;
 }
 
 Rule::Rule(RuleSet servers, RuleSet channels, RuleSet origins, RuleSet plugins, RuleSet events, RuleAction action)
-	: m_servers(std::move(servers))
-	, m_channels(std::move(channels))
-	, m_origins(std::move(origins))
-	, m_plugins(std::move(plugins))
-	, m_events(std::move(events))
-	, m_action(action)
+    : m_servers(std::move(servers))
+    , m_channels(std::move(channels))
+    , m_origins(std::move(origins))
+    , m_plugins(std::move(plugins))
+    , m_events(std::move(events))
+    , m_action(action)
 {
-	for (const std::string &n : m_events)
-		if (validEvents.count(n) == 0)
-			throw std::invalid_argument(n + " is not a valid event name");
+    for (const std::string &n : m_events)
+        if (validEvents.count(n) == 0)
+            throw std::invalid_argument(n + " is not a valid event name");
 }
 
 bool Rule::match(const std::string &server,
-		 const std::string &channel,
-		 const std::string &nick,
-		 const std::string &plugin,
-		 const std::string &event) const noexcept
+                 const std::string &channel,
+                 const std::string &nick,
+                 const std::string &plugin,
+                 const std::string &event) const noexcept
 {
-	return matchMap(m_servers, server) &&
-	       matchMap(m_channels, channel) &&
-	       matchMap(m_origins, nick) &&
-	       matchMap(m_plugins, plugin) &&
-	       matchMap(m_events, event);
+    return matchMap(m_servers, server) &&
+           matchMap(m_channels, channel) &&
+           matchMap(m_origins, nick) &&
+           matchMap(m_plugins, plugin) &&
+           matchMap(m_events, event);
 }
 
 RuleAction Rule::action() const noexcept
 {
-	return m_action;
+    return m_action;
 }
 
 const RuleSet &Rule::servers() const noexcept
 {
-	return m_servers;
+    return m_servers;
 }
 
 const RuleSet &Rule::channels() const noexcept
 {
-	return m_channels;
+    return m_channels;
 }
 
 const RuleSet &Rule::origins() const noexcept
 {
-	return m_origins;
+    return m_origins;
 }
 
 const RuleSet &Rule::plugins() const noexcept
 {
-	return m_plugins;
+    return m_plugins;
 }
 
 const RuleSet &Rule::events() const noexcept
 {
-	return m_events;
+    return m_events;
 }
 
 } // !irccd
--- a/lib/irccd/rule.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/rule.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -44,8 +44,8 @@
  * \brief Rule action
  */
 enum class RuleAction {
-	Accept,			//!< The event is accepted (default)
-	Drop			//!< The event is dropped
+    Accept,         //!< The event is accepted (default)
+    Drop            //!< The event is dropped
 };
 
 /**
@@ -54,95 +54,95 @@
  */
 class Rule {
 private:
-	RuleSet m_servers;
-	RuleSet m_channels;
-	RuleSet m_origins;
-	RuleSet m_plugins;
-	RuleSet m_events;
-	RuleAction m_action{RuleAction::Accept};
+    RuleSet m_servers;
+    RuleSet m_channels;
+    RuleSet m_origins;
+    RuleSet m_plugins;
+    RuleSet m_events;
+    RuleAction m_action{RuleAction::Accept};
 
-	/*
-	 * Check if a map contains the value and return true if it is
-	 * or return true if value is empty (which means applicable).
-	 */
-	bool matchMap(const RuleSet &map, const std::string &value) const noexcept;
+    /*
+     * Check if a map contains the value and return true if it is
+     * or return true if value is empty (which means applicable).
+     */
+    bool matchMap(const RuleSet &map, const std::string &value) const noexcept;
 
 public:
-	/**
-	 * Rule constructor.
-	 *
-	 * \param servers the server list
-	 * \param channels the channels
-	 * \param nicknames the nicknames
-	 * \param plugins the plugins
-	 * \param events the events
-	 * \param action the rule action
-	 * \throw std::invalid_argument if events are invalid
-	 */
-	IRCCD_EXPORT Rule(RuleSet servers = RuleSet{},
-			  RuleSet channels = RuleSet{},
-			  RuleSet nicknames = RuleSet{},
-			  RuleSet plugins = RuleSet{},
-			  RuleSet events = RuleSet{},
-			  RuleAction action = RuleAction::Accept);
+    /**
+     * Rule constructor.
+     *
+     * \param servers the server list
+     * \param channels the channels
+     * \param nicknames the nicknames
+     * \param plugins the plugins
+     * \param events the events
+     * \param action the rule action
+     * \throw std::invalid_argument if events are invalid
+     */
+    IRCCD_EXPORT Rule(RuleSet servers = RuleSet{},
+                      RuleSet channels = RuleSet{},
+                      RuleSet nicknames = RuleSet{},
+                      RuleSet plugins = RuleSet{},
+                      RuleSet events = RuleSet{},
+                      RuleAction action = RuleAction::Accept);
 
-	/**
-	 * Check if that rule apply for the given criterias.
-	 *
-	 * \param server the server
-	 * \param channel the channel
-	 * \param nick the origin
-	 * \param plugin the plugin
-	 * \param event the event
-	 * \return true if match
-	 */
-	IRCCD_EXPORT bool match(const std::string &server,
-				const std::string &channel,
-				const std::string &nick,
-				const std::string &plugin,
-				const std::string &event) const noexcept;
+    /**
+     * Check if that rule apply for the given criterias.
+     *
+     * \param server the server
+     * \param channel the channel
+     * \param nick the origin
+     * \param plugin the plugin
+     * \param event the event
+     * \return true if match
+     */
+    IRCCD_EXPORT bool match(const std::string &server,
+                            const std::string &channel,
+                            const std::string &nick,
+                            const std::string &plugin,
+                            const std::string &event) const noexcept;
 
-	/**
-	 * Get the action.
-	 *
-	 * \return the action
-	 */
-	IRCCD_EXPORT RuleAction action() const noexcept;
+    /**
+     * Get the action.
+     *
+     * \return the action
+     */
+    IRCCD_EXPORT RuleAction action() const noexcept;
 
-	/**
-	 * Get the servers.
-	 *
-	 * \return the servers
-	 */
-	IRCCD_EXPORT const RuleSet &servers() const noexcept;
+    /**
+     * Get the servers.
+     *
+     * \return the servers
+     */
+    IRCCD_EXPORT const RuleSet &servers() const noexcept;
 
-	/**
-	 * Get the channels.
-	 *
-	 * \return the channels
-	 */
-	IRCCD_EXPORT const RuleSet &channels() const noexcept;
+    /**
+     * Get the channels.
+     *
+     * \return the channels
+     */
+    IRCCD_EXPORT const RuleSet &channels() const noexcept;
 
-	/**
-	 * Get the origins.
-	 *
-	 * \return the origins
-	 */
-	IRCCD_EXPORT const RuleSet &origins() const noexcept;
+    /**
+     * Get the origins.
+     *
+     * \return the origins
+     */
+    IRCCD_EXPORT const RuleSet &origins() const noexcept;
 
-	/**
-	 * Get the plugins.
-	 *
-	 * \return the plugins
-	 */
-	IRCCD_EXPORT const RuleSet &plugins() const noexcept;
+    /**
+     * Get the plugins.
+     *
+     * \return the plugins
+     */
+    IRCCD_EXPORT const RuleSet &plugins() const noexcept;
 
-	/**
-	 * Get the events.
-	 *
-	 * \return the events
-	 */
-	IRCCD_EXPORT const RuleSet &events() const noexcept;
+    /**
+     * Get the events.
+     *
+     * \return the events
+     */
+    IRCCD_EXPORT const RuleSet &events() const noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/server-event.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-event.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,43 +26,43 @@
 namespace irccd {
 
 ServerEvent::ServerEvent(std::string server,
-			 std::string origin,
-			 std::string target,
-			 std::function<std::string (Plugin &)> functionName,
-			 std::function<void (Plugin &)> exec)
-	: m_server(std::move(server))
-	, m_origin(std::move(origin))
-	, m_target(std::move(target))
-	, m_functionName(std::move(functionName))
-	, m_exec(std::move(exec))
+                         std::string origin,
+                         std::string target,
+                         std::function<std::string (Plugin &)> functionName,
+                         std::function<void (Plugin &)> exec)
+    : m_server(std::move(server))
+    , m_origin(std::move(origin))
+    , m_target(std::move(target))
+    , m_functionName(std::move(functionName))
+    , m_exec(std::move(exec))
 {
 }
 
 void ServerEvent::operator()(Irccd &irccd) const
 {
-	for (auto &plugin : irccd.pluginService().plugins()) {
-		auto eventname = m_functionName(*plugin);
-		auto allowed = irccd.ruleService().solve(m_server, m_target, m_origin, plugin->name(), eventname);
+    for (auto &plugin : irccd.pluginService().plugins()) {
+        auto eventname = m_functionName(*plugin);
+        auto allowed = irccd.ruleService().solve(m_server, m_target, m_origin, plugin->name(), eventname);
 
-		if (!allowed) {
-			log::debug() << "rule: event skipped on match" << std::endl;
-			continue;
-		} else
-			log::debug() << "rule: event allowed" << std::endl;
+        if (!allowed) {
+            log::debug() << "rule: event skipped on match" << std::endl;
+            continue;
+        } else
+            log::debug() << "rule: event allowed" << std::endl;
 
-		// TODO: server-event must not know which type of plugin.
-		// TODO: get generic error.
-		try {
-			m_exec(*plugin);
-		} catch (const Exception &info) {
-			log::warning() << "plugin " << plugin->name() << ": error: " << info.what() << std::endl;
+        // TODO: server-event must not know which type of plugin.
+        // TODO: get generic error.
+        try {
+            m_exec(*plugin);
+        } catch (const Exception &info) {
+            log::warning() << "plugin " << plugin->name() << ": error: " << info.what() << std::endl;
 
-			if (!info.fileName.empty())
-				log::warning() << "    " << info.fileName << ":" << info.lineNumber << std::endl;
-			if (!info.stack.empty())
-				log::warning() << "    " << info.stack << std::endl;
-		}
-	}
+            if (!info.fileName.empty())
+                log::warning() << "    " << info.fileName << ":" << info.lineNumber << std::endl;
+            if (!info.stack.empty())
+                log::warning() << "    " << info.stack << std::endl;
+        }
+    }
 }
 
 } // !irccd
--- a/lib/irccd/server-event.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-event.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -44,34 +44,34 @@
  */
 class ServerEvent {
 private:
-	std::string m_server;
-	std::string m_origin;
-	std::string m_target;
-	std::function<std::string (Plugin &)> m_functionName;
-	std::function<void (Plugin &)> m_exec;
+    std::string m_server;
+    std::string m_origin;
+    std::string m_target;
+    std::function<std::string (Plugin &)> m_functionName;
+    std::function<void (Plugin &)> m_exec;
 
 public:
-	/**
-	 * Constructor.
-	 *
-	 * \param server the server name
-	 * \param origin the origin
-	 * \param target the target (channel or nickname)
-	 * \param functionName the function to call (only for rules)
-	 * \param exec the plugin executor
-	 */
-	IRCCD_EXPORT ServerEvent(std::string server,
-				 std::string origin,
-				 std::string target,
-				 std::function<std::string (Plugin &)> functionName,
-				 std::function<void (Plugin &)> exec);
+    /**
+     * Constructor.
+     *
+     * \param server the server name
+     * \param origin the origin
+     * \param target the target (channel or nickname)
+     * \param functionName the function to call (only for rules)
+     * \param exec the plugin executor
+     */
+    IRCCD_EXPORT ServerEvent(std::string server,
+                             std::string origin,
+                             std::string target,
+                             std::function<std::string (Plugin &)> functionName,
+                             std::function<void (Plugin &)> exec);
 
-	/**
-	 * Execute the event.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	IRCCD_EXPORT void operator()(Irccd &irccd) const;
+    /**
+     * Execute the event.
+     *
+     * \param irccd the irccd instance
+     */
+    IRCCD_EXPORT void operator()(Irccd &irccd) const;
 };
 
 } // !irccd
--- a/lib/irccd/server-private.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-private.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -32,48 +32,48 @@
  */
 class Server::Session {
 public:
-	/**
-	 * libircclient handle.
-	 */
-	using Handle = std::unique_ptr<irc_session_t, void (*)(irc_session_t *)>;
+    /**
+     * libircclient handle.
+     */
+    using Handle = std::unique_ptr<irc_session_t, void (*)(irc_session_t *)>;
 
 private:
-	Handle m_handle;
+    Handle m_handle;
 
 public:
-	/**
-	 * Create a null session.
-	 */
-	inline Session()
-		: m_handle(nullptr, nullptr)
-	{
-	}
+    /**
+     * Create a null session.
+     */
+    inline Session()
+        : m_handle(nullptr, nullptr)
+    {
+    }
 
-	/**
-	 * Convert the libircclient session.
-	 */
-	inline operator const irc_session_t *() const noexcept
-	{
-		return m_handle.get();
-	}
+    /**
+     * Convert the libircclient session.
+     */
+    inline operator const irc_session_t *() const noexcept
+    {
+        return m_handle.get();
+    }
 
-	/**
-	 * Overloaded function.
-	 */
-	inline operator irc_session_t *() noexcept
-	{
-		return m_handle.get();
-	}
+    /**
+     * Overloaded function.
+     */
+    inline operator irc_session_t *() noexcept
+    {
+        return m_handle.get();
+    }
 
-	/**
-	 * Get the handle.
-	 *
-	 * \return the handle
-	 */
-	inline Handle &handle() noexcept
-	{
-		return m_handle;
-	}
+    /**
+     * Get the handle.
+     *
+     * \return the handle
+     */
+    inline Handle &handle() noexcept
+    {
+        return m_handle;
+    }
 };
 
 } // !irccd
--- a/lib/irccd/server-state-connected.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-connected.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -31,27 +31,27 @@
 
 void Connected::prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd)
 {
-	const ServerSettings &settings = server.settings();
+    const ServerSettings &settings = server.settings();
 
-	if (!irc_is_connected(server.session())) {
-		log::warning() << "server " << server.name() << ": disconnected" << std::endl;
+    if (!irc_is_connected(server.session())) {
+        log::warning() << "server " << server.name() << ": disconnected" << std::endl;
 
-		if (settings.reconnectDelay > 0)
-			log::warning("server {}: retrying in {} seconds"_format(server.name(), settings.reconnectDelay));
+        if (settings.reconnectDelay > 0)
+            log::warning("server {}: retrying in {} seconds"_format(server.name(), settings.reconnectDelay));
 
-		server.next(std::make_unique<state::Disconnected>());
-	} else if (server.cache().pingTimer.elapsed() >= settings.pingTimeout * 1000) {
-		log::warning() << "server " << server.name() << ": ping timeout after "
-			       << (server.cache().pingTimer.elapsed() / 1000) << " seconds" << std::endl;
-		server.next(std::make_unique<state::Disconnected>());
-	} else {
-		irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
-	}
+        server.next(std::make_unique<state::Disconnected>());
+    } else if (server.cache().pingTimer.elapsed() >= settings.pingTimeout * 1000) {
+        log::warning() << "server " << server.name() << ": ping timeout after "
+                   << (server.cache().pingTimer.elapsed() / 1000) << " seconds" << std::endl;
+        server.next(std::make_unique<state::Disconnected>());
+    } else {
+        irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
+    }
 }
 
 std::string Connected::ident() const
 {
-	return "Connected";
+    return "Connected";
 }
 
 } // !state
--- a/lib/irccd/server-state-connected.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-connected.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,15 +36,15 @@
  */
 class Connected : public ServerState {
 public:
-	/**
-	 * \copydoc ServerState::prepare
-	 */
-	IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
+    /**
+     * \copydoc ServerState::prepare
+     */
+    IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
 
-	/**
-	 * \copydoc ServerState::ident
-	 */
-	IRCCD_EXPORT std::string ident() const override;
+    /**
+     * \copydoc ServerState::ident
+     */
+    IRCCD_EXPORT std::string ident() const override;
 };
 
 } // !state
--- a/lib/irccd/server-state-connecting.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-connecting.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -42,95 +42,95 @@
 
 bool connect(Server &server)
 {
-	const ServerInfo &info = server.info();
-	const ServerIdentity &identity = server.identity();
-	const char *password = info.password.empty() ? nullptr : info.password.c_str();
-	std::string host = info.host;
-	int code;
+    const ServerInfo &info = server.info();
+    const ServerIdentity &identity = server.identity();
+    const char *password = info.password.empty() ? nullptr : info.password.c_str();
+    std::string host = info.host;
+    int code;
 
-	// libircclient requires # for SSL connection.
+    // libircclient requires # for SSL connection.
 #if defined(WITH_SSL)
-	if (info.flags & ServerInfo::Ssl)
-		host.insert(0, 1, '#');
-	if (!(info.flags & ServerInfo::SslVerify))
-		irc_option_set(server.session(), LIBIRC_OPTION_SSL_NO_VERIFY);
+    if (info.flags & ServerInfo::Ssl)
+        host.insert(0, 1, '#');
+    if (!(info.flags & ServerInfo::SslVerify))
+        irc_option_set(server.session(), LIBIRC_OPTION_SSL_NO_VERIFY);
 #endif
 
-	if (info.flags & ServerInfo::Ipv6) {
-		code = irc_connect6(server.session(), host.c_str(), info.port, password,
-				    identity.nickname.c_str(),
-				    identity.username.c_str(),
-				    identity.realname.c_str());
-	} else {
-		code = irc_connect(server.session(), host.c_str(), info.port, password,
-				   identity.nickname.c_str(),
-				   identity.username.c_str(),
-				   identity.realname.c_str());
-	}
+    if (info.flags & ServerInfo::Ipv6) {
+        code = irc_connect6(server.session(), host.c_str(), info.port, password,
+                    identity.nickname.c_str(),
+                    identity.username.c_str(),
+                    identity.realname.c_str());
+    } else {
+        code = irc_connect(server.session(), host.c_str(), info.port, password,
+                   identity.nickname.c_str(),
+                   identity.username.c_str(),
+                   identity.realname.c_str());
+    }
 
-	return code == 0;
+    return code == 0;
 }
 
 } // !namespace
 
 void Connecting::prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd)
 {
-	/*
-	 * The connect function will either fail if the hostname wasn't resolved or if any of the internal functions
-	 * fail.
-	 *
-	 * It returns success if the connection was successful but it does not mean that connection is established.
-	 *
-	 * Because this function will be called repeatidly, the connection was started and we're still not
-	 * connected in the specified timeout time, we mark the server as disconnected.
-	 *
-	 * Otherwise, the libircclient event_connect will change the state.
-	 */
-	const ServerInfo &info = server.info();
+    /*
+     * The connect function will either fail if the hostname wasn't resolved or if any of the internal functions
+     * fail.
+     *
+     * It returns success if the connection was successful but it does not mean that connection is established.
+     *
+     * Because this function will be called repeatidly, the connection was started and we're still not
+     * connected in the specified timeout time, we mark the server as disconnected.
+     *
+     * Otherwise, the libircclient event_connect will change the state.
+     */
+    const ServerInfo &info = server.info();
 
-	if (m_started) {
-		const ServerSettings &settings = server.settings();
+    if (m_started) {
+        const ServerSettings &settings = server.settings();
 
-		if (m_timer.elapsed() > static_cast<unsigned>(settings.reconnectDelay * 1000)) {
-			log::warning() << "server " << server.name() << ": timeout while connecting" << std::endl;
-			server.next(std::make_unique<state::Disconnected>());
-		} else if (!irc_is_connected(server.session())) {
-			log::warning() << "server " << server.name() << ": error while connecting: ";
-			log::warning() << irc_strerror(irc_errno(server.session())) << std::endl;
+        if (m_timer.elapsed() > static_cast<unsigned>(settings.reconnectDelay * 1000)) {
+            log::warning() << "server " << server.name() << ": timeout while connecting" << std::endl;
+            server.next(std::make_unique<state::Disconnected>());
+        } else if (!irc_is_connected(server.session())) {
+            log::warning() << "server " << server.name() << ": error while connecting: ";
+            log::warning() << irc_strerror(irc_errno(server.session())) << std::endl;
 
-			if (settings.reconnectTries != 0)
-				log::warning("server {}: retrying in {} seconds"_format(server.name(), settings.reconnectDelay));
+            if (settings.reconnectTries != 0)
+                log::warning("server {}: retrying in {} seconds"_format(server.name(), settings.reconnectDelay));
 
-			server.next(std::make_unique<state::Disconnected>());
-		} else
-			irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
-	} else {
-		/*
-		 * This is needed if irccd is started before DHCP or if DNS cache is outdated.
-		 *
-		 * For more information see bug #190.
-		 */
+            server.next(std::make_unique<state::Disconnected>());
+        } else
+            irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
+    } else {
+        /*
+         * This is needed if irccd is started before DHCP or if DNS cache is outdated.
+         *
+         * For more information see bug #190.
+         */
 #if !defined(IRCCD_SYSTEM_WINDOWS)
-		(void)res_init();
+        (void)res_init();
 #endif
-		log::info("server {}: trying to connect to {}, port {}"_format(server.name(), info.host, info.port));
+        log::info("server {}: trying to connect to {}, port {}"_format(server.name(), info.host, info.port));
 
-		if (!connect(server)) {
-			log::warning() << "server " << server.name() << ": disconnected while connecting: ";
-			log::warning() << irc_strerror(irc_errno(server.session())) << std::endl;
-			server.next(std::make_unique<state::Disconnected>());
-		} else {
-			m_started = true;
+        if (!connect(server)) {
+            log::warning() << "server " << server.name() << ": disconnected while connecting: ";
+            log::warning() << irc_strerror(irc_errno(server.session())) << std::endl;
+            server.next(std::make_unique<state::Disconnected>());
+        } else {
+            m_started = true;
 
-			if (irc_is_connected(server.session()))
-				irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
-		}
-	}
+            if (irc_is_connected(server.session()))
+                irc_add_select_descriptors(server.session(), &setinput, &setoutput, reinterpret_cast<int *>(&maxfd));
+        }
+    }
 }
 
 std::string Connecting::ident() const
 {
-	return "Connecting";
+    return "Connecting";
 }
 
 } // !state
--- a/lib/irccd/server-state-connecting.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-connecting.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -37,19 +37,19 @@
  */
 class Connecting : public ServerState {
 private:
-	bool m_started{false};
-	ElapsedTimer m_timer;
+    bool m_started{false};
+    ElapsedTimer m_timer;
 
 public:
-	/**
-	 * \copydoc ServerState::prepare
-	 */
-	IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
+    /**
+     * \copydoc ServerState::prepare
+     */
+    IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
 
-	/**
-	 * \copydoc ServerState::ident
-	 */
-	IRCCD_EXPORT std::string ident() const override;
+    /**
+     * \copydoc ServerState::ident
+     */
+    IRCCD_EXPORT std::string ident() const override;
 };
 
 } // !state
--- a/lib/irccd/server-state-disconnected.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-disconnected.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -27,28 +27,28 @@
 
 void Disconnected::prepare(Server &server, fd_set &, fd_set &, net::Handle &)
 {
-	ServerSettings &settings = server.settings();
-	ServerCache &cache = server.cache();
+    ServerSettings &settings = server.settings();
+    ServerCache &cache = server.cache();
 
-	if (settings.reconnectTries == 0) {
-		log::warning() << "server " << server.name() << ": reconnection disabled, skipping" << std::endl;
-		server.onDie();
-	} else if (settings.reconnectTries > 0 && cache.reconnectCurrent > settings.reconnectTries) {
-		log::warning() << "server " << server.name() << ": giving up" << std::endl;
-		server.onDie();
-	} else {
-		if (m_timer.elapsed() > static_cast<unsigned>(settings.reconnectDelay * 1000)) {
-			irc_disconnect(server.session());
+    if (settings.reconnectTries == 0) {
+        log::warning() << "server " << server.name() << ": reconnection disabled, skipping" << std::endl;
+        server.onDie();
+    } else if (settings.reconnectTries > 0 && cache.reconnectCurrent > settings.reconnectTries) {
+        log::warning() << "server " << server.name() << ": giving up" << std::endl;
+        server.onDie();
+    } else {
+        if (m_timer.elapsed() > static_cast<unsigned>(settings.reconnectDelay * 1000)) {
+            irc_disconnect(server.session());
 
-			server.cache().reconnectCurrent ++;
-			server.next(std::make_unique<state::Connecting>());
-		}
-	}
+            server.cache().reconnectCurrent ++;
+            server.next(std::make_unique<state::Connecting>());
+        }
+    }
 }
 
 std::string Disconnected::ident() const
 {
-	return "Disconnected";
+    return "Disconnected";
 }
 
 } // !state
--- a/lib/irccd/server-state-disconnected.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state-disconnected.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -37,18 +37,18 @@
  */
 class Disconnected : public ServerState {
 private:
-	ElapsedTimer m_timer;
+    ElapsedTimer m_timer;
 
 public:
-	/**
-	 * \copydoc ServerState::prepare
-	 */
-	IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
+    /**
+     * \copydoc ServerState::prepare
+     */
+    IRCCD_EXPORT void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) override;
 
-	/**
-	 * \copydoc ServerState::ident
-	 */
-	IRCCD_EXPORT std::string ident() const override;
+    /**
+     * \copydoc ServerState::ident
+     */
+    IRCCD_EXPORT std::string ident() const override;
 };
 
 } // !state
--- a/lib/irccd/server-state.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server-state.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -49,32 +49,32 @@
  */
 class ServerState {
 public:
-	/**
-	 * Default constructor.
-	 */
-	ServerState() = default;
+    /**
+     * Default constructor.
+     */
+    ServerState() = default;
 
-	/**
-	 * Virtual default destructor.
-	 */
-	virtual ~ServerState() = default;
+    /**
+     * Virtual default destructor.
+     */
+    virtual ~ServerState() = default;
 
-	/**
-	 * Prepare the state.
-	 *
-	 * \param server the server
-	 * \param setinput the read set
-	 * \param setoutput the write set
-	 * \param maxfd the maximum fd
-	 */
-	virtual void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) = 0;
+    /**
+     * Prepare the state.
+     *
+     * \param server the server
+     * \param setinput the read set
+     * \param setoutput the write set
+     * \param maxfd the maximum fd
+     */
+    virtual void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) = 0;
 
-	/**
-	 * Return the state identifier, only for information purposes.
-	 *
-	 * \return the identifier
-	 */
-	virtual std::string ident() const = 0;
+    /**
+     * Return the state identifier, only for information purposes.
+     *
+     * \return the identifier
+     */
+    virtual std::string ident() const = 0;
 };
 
 } // !irccd
--- a/lib/irccd/server.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -45,7 +45,7 @@
  */
 inline std::string strify(const char *s)
 {
-	return (s == nullptr) ? "" : std::string(s);
+    return (s == nullptr) ? "" : std::string(s);
 }
 
 /*
@@ -57,14 +57,14 @@
  */
 std::string cleanPrefix(const ServerInfo &info, std::string nickname)
 {
-	if (nickname.length() == 0)
-		return nickname;
+    if (nickname.length() == 0)
+        return nickname;
 
-	for (const auto &pair : info.modes)
-		if (nickname[0] == pair.second)
-			nickname.erase(0, 1);
+    for (const auto &pair : info.modes)
+        if (nickname[0] == pair.second)
+            nickname.erase(0, 1);
 
-	return nickname;
+    return nickname;
 }
 
 /*
@@ -75,519 +75,519 @@
  */
 std::map<ServerChanMode, char> extractPrefixes(const std::string &line)
 {
-	std::pair<char, char> table[16];
-	std::string buf = line.substr(7);
-	std::map<ServerChanMode, char> modes;
+    std::pair<char, char> table[16];
+    std::string buf = line.substr(7);
+    std::map<ServerChanMode, char> modes;
 
-	for (int i = 0; i < 16; ++i)
-		table[i] = std::make_pair(-1, -1);
+    for (int i = 0; i < 16; ++i)
+        table[i] = std::make_pair(-1, -1);
 
-	int j = 0;
-	bool readModes = true;
-	for (size_t i = 0; i < buf.size(); ++i) {
-		if (buf[i] == '(')
-			continue;
-		if (buf[i] == ')') {
-			j = 0;
-			readModes = false;
-			continue;
-		}
+    int j = 0;
+    bool readModes = true;
+    for (size_t i = 0; i < buf.size(); ++i) {
+        if (buf[i] == '(')
+            continue;
+        if (buf[i] == ')') {
+            j = 0;
+            readModes = false;
+            continue;
+        }
 
-		if (readModes)
-			table[j++].first = buf[i];
-		else
-			table[j++].second = buf[i];
-	}
+        if (readModes)
+            table[j++].first = buf[i];
+        else
+            table[j++].second = buf[i];
+    }
 
-	// Put these as a map of mode to prefix.
-	for (int i = 0; i < 16; ++i) {
-		auto key = static_cast<ServerChanMode>(table[i].first);
-		auto value = table[i].second;
+    // Put these as a map of mode to prefix.
+    for (int i = 0; i < 16; ++i) {
+        auto key = static_cast<ServerChanMode>(table[i].first);
+        auto value = table[i].second;
 
-		modes.emplace(key, value);
-	}
+        modes.emplace(key, value);
+    }
 
-	return modes;
+    return modes;
 }
 
 } // !namespace
 
 void Server::handleConnect(const char *, const char **) noexcept
 {
-	// Reset the number of tried reconnection.
-	m_cache.reconnectCurrent = 0;
+    // Reset the number of tried reconnection.
+    m_cache.reconnectCurrent = 0;
 
-	// Reset the timer.
-	m_cache.pingTimer.reset();
+    // Reset the timer.
+    m_cache.pingTimer.reset();
 
-	// Don't forget to change state and notify.
-	next(std::make_unique<state::Connected>());
-	onConnect();
+    // Don't forget to change state and notify.
+    next(std::make_unique<state::Connected>());
+    onConnect();
 
-	// Auto join listed channels.
-	for (const ServerChannel &channel : m_settings.channels) {
-		log::info() << "server " << m_name << ": auto joining " << channel.name << std::endl;
-		join(channel.name, channel.password);
-	}
+    // Auto join listed channels.
+    for (const ServerChannel &channel : m_settings.channels) {
+        log::info() << "server " << m_name << ": auto joining " << channel.name << std::endl;
+        join(channel.name, channel.password);
+    }
 }
 
 void Server::handleChannel(const char *orig, const char **params) noexcept
 {
-	onMessage(strify(orig), strify(params[0]), strify(params[1]));
+    onMessage(strify(orig), strify(params[0]), strify(params[1]));
 }
 
 void Server::handleChannelMode(const char *orig, const char **params) noexcept
 {
-	onChannelMode(strify(orig), strify(params[0]), strify(params[1]), strify(params[2]));
+    onChannelMode(strify(orig), strify(params[0]), strify(params[1]), strify(params[2]));
 }
 
 void Server::handleChannelNotice(const char *orig, const char **params) noexcept
 {
-	onChannelNotice(strify(orig), strify(params[0]), strify(params[1]));
+    onChannelNotice(strify(orig), strify(params[0]), strify(params[1]));
 }
 
 void Server::handleCtcpAction(const char *orig, const char **params) noexcept
 {
-	onMe(strify(orig), strify(params[0]), strify(params[1]));
+    onMe(strify(orig), strify(params[0]), strify(params[1]));
 }
 
 void Server::handleInvite(const char *orig, const char **params) noexcept
 {
-	// If joininvite is set, join the channel.
-	if ((m_settings.flags & ServerSettings::JoinInvite) && isSelf(strify(params[0])))
-		join(strify(params[1]));
+    // If joininvite is set, join the channel.
+    if ((m_settings.flags & ServerSettings::JoinInvite) && isSelf(strify(params[0])))
+        join(strify(params[1]));
 
-	/*
-	 * The libircclient says that invite contains the target nickname, it's quite
-	 * uncommon to need it so it is passed as the last argument to be
-	 * optional in the plugin.
-	 */
-	onInvite(strify(orig), strify(params[1]), strify(params[0]));
+    /*
+     * The libircclient says that invite contains the target nickname, it's quite
+     * uncommon to need it so it is passed as the last argument to be
+     * optional in the plugin.
+     */
+    onInvite(strify(orig), strify(params[1]), strify(params[0]));
 }
 
 void Server::handleJoin(const char *orig, const char **params) noexcept
 {
-	onJoin(strify(orig), strify(params[0]));
+    onJoin(strify(orig), strify(params[0]));
 }
 
 void Server::handleKick(const char *orig, const char **params) noexcept
 {
-	// Rejoin the channel if the option has been set and I was kicked.
-	if ((m_settings.flags & ServerSettings::AutoRejoin) && isSelf(strify(params[1])))
-		join(strify(params[0]));
+    // Rejoin the channel if the option has been set and I was kicked.
+    if ((m_settings.flags & ServerSettings::AutoRejoin) && isSelf(strify(params[1])))
+        join(strify(params[0]));
 
-	onKick(strify(orig), strify(params[0]), strify(params[1]), strify(params[2]));
+    onKick(strify(orig), strify(params[0]), strify(params[1]), strify(params[2]));
 }
 
 void Server::handleMode(const char *orig, const char **params) noexcept
 {
-	onMode(strify(orig), strify(params[1]));
+    onMode(strify(orig), strify(params[1]));
 }
 
 void Server::handleNick(const char *orig, const char **params) noexcept
 {
-	// Update our nickname.
-	if (isSelf(strify(orig)))
-		m_identity.nickname = strify(params[0]);
+    // Update our nickname.
+    if (isSelf(strify(orig)))
+        m_identity.nickname = strify(params[0]);
 
-	onNick(strify(orig), strify(params[0]));
+    onNick(strify(orig), strify(params[0]));
 }
 
 void Server::handleNotice(const char *orig, const char **params) noexcept
 {
-	// Like handleInvite, the notice provides the target nickname, we discard it.
-	onNotice(strify(orig), strify(params[1]));
+    // Like handleInvite, the notice provides the target nickname, we discard it.
+    onNotice(strify(orig), strify(params[1]));
 }
 
 void Server::handleNumeric(unsigned int event, const char **params, unsigned int c) noexcept
 {
-	if (event == LIBIRC_RFC_RPL_NAMREPLY) {
-		/*
-		 * Called multiple times to list clients on a channel.
-		 *
-		 * params[0] == originator
-		 * params[1] == '='
-		 * params[2] == channel
-		 * params[3] == list of users with their prefixes
-		 *
-		 * IDEA for the future: maybe give the appropriate mode as a second parameter in onNames.
-		 */
-		if (c < 4 || params[2] == nullptr || params[3] == nullptr)
-			return;
+    if (event == LIBIRC_RFC_RPL_NAMREPLY) {
+        /*
+         * Called multiple times to list clients on a channel.
+         *
+         * params[0] == originator
+         * params[1] == '='
+         * params[2] == channel
+         * params[3] == list of users with their prefixes
+         *
+         * IDEA for the future: maybe give the appropriate mode as a second parameter in onNames.
+         */
+        if (c < 4 || params[2] == nullptr || params[3] == nullptr)
+            return;
 
-		std::vector<std::string> users = util::split(params[3], " \t");
+        std::vector<std::string> users = util::split(params[3], " \t");
 
-		// The listing may add some prefixes, remove them if needed.
-		for (std::string u : users)
-			m_cache.namesMap[params[2]].insert(cleanPrefix(m_info, u));
-	} else if (event == LIBIRC_RFC_RPL_ENDOFNAMES) {
-		/*
-		 * Called when end of name listing has finished on a channel.
-		 *
-		 * params[0] == originator
-		 * params[1] == channel
-		 * params[2] == End of NAMES list
-		 */
-		if (c < 3 || params[1] == nullptr)
-			return;
+        // The listing may add some prefixes, remove them if needed.
+        for (std::string u : users)
+            m_cache.namesMap[params[2]].insert(cleanPrefix(m_info, u));
+    } else if (event == LIBIRC_RFC_RPL_ENDOFNAMES) {
+        /*
+         * Called when end of name listing has finished on a channel.
+         *
+         * params[0] == originator
+         * params[1] == channel
+         * params[2] == End of NAMES list
+         */
+        if (c < 3 || params[1] == nullptr)
+            return;
 
-		auto it = m_cache.namesMap.find(params[1]);
-		if (it != m_cache.namesMap.end()) {
-			onNames(params[1], it->second);
+        auto it = m_cache.namesMap.find(params[1]);
+        if (it != m_cache.namesMap.end()) {
+            onNames(params[1], it->second);
 
-			// Don't forget to remove the list.
-			m_cache.namesMap.erase(it);
-		}
-	} else if (event == LIBIRC_RFC_RPL_WHOISUSER) {
-		/*
-		 * Called when whois information has been partially received.
-		 *
-		 * params[0] == originator
-		 * params[1] == nickname
-		 * params[2] == username
-		 * params[3] == host
-		 * params[4] == * (no idea what is that)
-		 * params[5] == realname
-		 */
-		if (c < 6 || !params[1] || !params[2] || !params[3] || !params[5])
-			return;
+            // Don't forget to remove the list.
+            m_cache.namesMap.erase(it);
+        }
+    } else if (event == LIBIRC_RFC_RPL_WHOISUSER) {
+        /*
+         * Called when whois information has been partially received.
+         *
+         * params[0] == originator
+         * params[1] == nickname
+         * params[2] == username
+         * params[3] == host
+         * params[4] == * (no idea what is that)
+         * params[5] == realname
+         */
+        if (c < 6 || !params[1] || !params[2] || !params[3] || !params[5])
+            return;
 
-		ServerWhois info;
+        ServerWhois info;
 
-		info.nick = strify(params[1]);
-		info.user = strify(params[2]);
-		info.host = strify(params[3]);
-		info.realname = strify(params[5]);
+        info.nick = strify(params[1]);
+        info.user = strify(params[2]);
+        info.host = strify(params[3]);
+        info.realname = strify(params[5]);
 
-		m_cache.whoisMap.emplace(info.nick, info);
-	} else if (event == LIBIRC_RFC_RPL_WHOISCHANNELS) {
-		/*
-		 * Called when we have received channels for one user.
-		 *
-		 * params[0] == originator
-		 * params[1] == nickname
-		 * params[2] == list of channels with their prefixes
-		 */
-		if (c < 3 || !params[1] || !params[2])
-			return;
+        m_cache.whoisMap.emplace(info.nick, info);
+    } else if (event == LIBIRC_RFC_RPL_WHOISCHANNELS) {
+        /*
+         * Called when we have received channels for one user.
+         *
+         * params[0] == originator
+         * params[1] == nickname
+         * params[2] == list of channels with their prefixes
+         */
+        if (c < 3 || !params[1] || !params[2])
+            return;
 
-		auto it = m_cache.whoisMap.find(params[1]);
-		if (it != m_cache.whoisMap.end()) {
-			std::vector<std::string> channels = util::split(params[2], " \t");
+        auto it = m_cache.whoisMap.find(params[1]);
+        if (it != m_cache.whoisMap.end()) {
+            std::vector<std::string> channels = util::split(params[2], " \t");
 
-			// Clean their prefixes.
-			for (auto &s : channels)
-				s = cleanPrefix(m_info, s);
+            // Clean their prefixes.
+            for (auto &s : channels)
+                s = cleanPrefix(m_info, s);
 
-			it->second.channels = std::move(channels);
-		}
-	} else if (event == LIBIRC_RFC_RPL_ENDOFWHOIS) {
-		/*
-		 * Called when whois is finished.
-		 *
-		 * params[0] == originator
-		 * params[1] == nickname
-		 * params[2] == End of WHOIS list
-		 */
-		auto it = m_cache.whoisMap.find(params[1]);
-		if (it != m_cache.whoisMap.end()) {
-			onWhois(it->second);
+            it->second.channels = std::move(channels);
+        }
+    } else if (event == LIBIRC_RFC_RPL_ENDOFWHOIS) {
+        /*
+         * Called when whois is finished.
+         *
+         * params[0] == originator
+         * params[1] == nickname
+         * params[2] == End of WHOIS list
+         */
+        auto it = m_cache.whoisMap.find(params[1]);
+        if (it != m_cache.whoisMap.end()) {
+            onWhois(it->second);
 
-			// Don't forget to remove.
-			m_cache.whoisMap.erase(it);
-		}
-	} else if (event == /* RPL_BOUNCE */ 5) {
-		/*
-		 * The event 5 is usually RPL_BOUNCE, but we always see it as ISUPPORT.
-		 */
-		for (unsigned int i = 0; i < c; ++i) {
-			if (strncmp(params[i], "PREFIX", 6) == 0) {
-				m_info.modes = extractPrefixes(params[i]);
-				break;
-			}
-		}
-	}
+            // Don't forget to remove.
+            m_cache.whoisMap.erase(it);
+        }
+    } else if (event == /* RPL_BOUNCE */ 5) {
+        /*
+         * The event 5 is usually RPL_BOUNCE, but we always see it as ISUPPORT.
+         */
+        for (unsigned int i = 0; i < c; ++i) {
+            if (strncmp(params[i], "PREFIX", 6) == 0) {
+                m_info.modes = extractPrefixes(params[i]);
+                break;
+            }
+        }
+    }
 }
 
 void Server::handlePart(const char *orig, const char **params) noexcept
 {
-	onPart(strify(orig), strify(params[0]), strify(params[1]));
+    onPart(strify(orig), strify(params[0]), strify(params[1]));
 }
 
 void Server::handlePing(const char *, const char **params) noexcept
 {
-	// Reset the timer to detect disconnection.
-	m_cache.pingTimer.reset();
+    // Reset the timer to detect disconnection.
+    m_cache.pingTimer.reset();
 
-	// Don't forget to respond.
-	send("PONG {}"_format(params[0]));
+    // Don't forget to respond.
+    send("PONG {}"_format(params[0]));
 }
 
 void Server::handleQuery(const char *orig, const char **params) noexcept
 {
-	onQuery(strify(orig), strify(params[1]));
+    onQuery(strify(orig), strify(params[1]));
 }
 
 void Server::handleTopic(const char *orig, const char **params) noexcept
 {
-	onTopic(strify(orig), strify(params[0]), strify(params[1]));
+    onTopic(strify(orig), strify(params[0]), strify(params[1]));
 }
 
 ServerChannel Server::splitChannel(const std::string &value)
 {
-	auto pos = value.find(':');
+    auto pos = value.find(':');
 
-	if (pos != std::string::npos)
-		return ServerChannel{value.substr(0, pos), value.substr(pos + 1)};
+    if (pos != std::string::npos)
+        return ServerChannel{value.substr(0, pos), value.substr(pos + 1)};
 
-	return ServerChannel{value, ""};
+    return ServerChannel{value, ""};
 }
 
 Server::Server(std::string name, ServerInfo info, ServerIdentity identity, ServerSettings settings)
-	: m_name(std::move(name))
-	, m_info(std::move(info))
-	, m_settings(std::move(settings))
-	, m_identity(std::move(identity))
-	, m_session(std::make_unique<Session>())
-	, m_state(std::make_unique<state::Connecting>())
+    : m_name(std::move(name))
+    , m_info(std::move(info))
+    , m_settings(std::move(settings))
+    , m_identity(std::move(identity))
+    , m_session(std::make_unique<Session>())
+    , m_state(std::make_unique<state::Connecting>())
 {
-	irc_callbacks_t callbacks;
+    irc_callbacks_t callbacks;
 
-	/*
-	 * GCC 4.9.2 triggers some missing-field-initializers warnings when
-	 * using uniform initialization so use a std::memset as a workaround.
-	 */
-	std::memset(&callbacks, 0, sizeof (irc_callbacks_t));
+    /*
+     * GCC 4.9.2 triggers some missing-field-initializers warnings when
+     * using uniform initialization so use a std::memset as a workaround.
+     */
+    std::memset(&callbacks, 0, sizeof (irc_callbacks_t));
 
-	/*
-	 * Convert the raw pointer functions from libircclient to Server member
-	 * function.
-	 *
-	 * While doing this, discard useless arguments.
-	 */
-	callbacks.event_channel = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleChannel(orig, params);
-	};
-	callbacks.event_channel_notice = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleChannelNotice(orig, params);
-	};
-	callbacks.event_connect = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleConnect(orig, params);
-	};
-	callbacks.event_ctcp_action = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleCtcpAction(orig, params);
-	};
-	callbacks.event_invite = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleInvite(orig, params);
-	};
-	callbacks.event_join = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleJoin(orig, params);
-	};
-	callbacks.event_kick = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleKick(orig, params);
-	};
-	callbacks.event_mode = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleChannelMode(orig, params);
-	};
-	callbacks.event_nick = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleNick(orig, params);
-	};
-	callbacks.event_notice = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleNotice(orig, params);
-	};
-	callbacks.event_numeric = [] (irc_session_t *session, unsigned int event, const char *, const char **params, unsigned int count) {
-		static_cast<Server *>(irc_get_ctx(session))->handleNumeric(event, params, count);
-	};
-	callbacks.event_part = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handlePart(orig, params);
-	};
-	callbacks.event_ping = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handlePing(orig, params);
-	};
-	callbacks.event_privmsg = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleQuery(orig, params);
-	};
-	callbacks.event_topic = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleTopic(orig, params);
-	};
-	callbacks.event_umode = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
-		static_cast<Server *>(irc_get_ctx(session))->handleMode(orig, params);
-	};
+    /*
+     * Convert the raw pointer functions from libircclient to Server member
+     * function.
+     *
+     * While doing this, discard useless arguments.
+     */
+    callbacks.event_channel = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleChannel(orig, params);
+    };
+    callbacks.event_channel_notice = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleChannelNotice(orig, params);
+    };
+    callbacks.event_connect = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleConnect(orig, params);
+    };
+    callbacks.event_ctcp_action = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleCtcpAction(orig, params);
+    };
+    callbacks.event_invite = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleInvite(orig, params);
+    };
+    callbacks.event_join = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleJoin(orig, params);
+    };
+    callbacks.event_kick = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleKick(orig, params);
+    };
+    callbacks.event_mode = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleChannelMode(orig, params);
+    };
+    callbacks.event_nick = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleNick(orig, params);
+    };
+    callbacks.event_notice = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleNotice(orig, params);
+    };
+    callbacks.event_numeric = [] (irc_session_t *session, unsigned int event, const char *, const char **params, unsigned int count) {
+        static_cast<Server *>(irc_get_ctx(session))->handleNumeric(event, params, count);
+    };
+    callbacks.event_part = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handlePart(orig, params);
+    };
+    callbacks.event_ping = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handlePing(orig, params);
+    };
+    callbacks.event_privmsg = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleQuery(orig, params);
+    };
+    callbacks.event_topic = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleTopic(orig, params);
+    };
+    callbacks.event_umode = [] (irc_session_t *session, const char *, const char *orig, const char **params, unsigned) {
+        static_cast<Server *>(irc_get_ctx(session))->handleMode(orig, params);
+    };
 
-	m_session->handle() = Session::Handle{irc_create_session(&callbacks), irc_destroy_session};
+    m_session->handle() = Session::Handle{irc_create_session(&callbacks), irc_destroy_session};
 
-	// Save this to the session.
-	irc_set_ctx(*m_session, this);
-	irc_set_ctcp_version(*m_session, m_identity.ctcpversion.c_str());
+    // Save this to the session.
+    irc_set_ctx(*m_session, this);
+    irc_set_ctcp_version(*m_session, m_identity.ctcpversion.c_str());
 }
 
 Server::~Server()
 {
-	irc_disconnect(*m_session);
+    irc_disconnect(*m_session);
 }
 
 void Server::update() noexcept
 {
-	if (m_stateNext) {
-		log::debug("server {}: switch state {} -> {}"_format(m_name, m_state->ident(), m_stateNext->ident()));
+    if (m_stateNext) {
+        log::debug("server {}: switch state {} -> {}"_format(m_name, m_state->ident(), m_stateNext->ident()));
 
-		m_state = std::move(m_stateNext);
-		m_stateNext = nullptr;
-	}
+        m_state = std::move(m_stateNext);
+        m_stateNext = nullptr;
+    }
 }
 
 void Server::disconnect() noexcept
 {
-	using namespace std::placeholders;
+    using namespace std::placeholders;
 
-	irc_disconnect(*m_session);
-	onDie();
+    irc_disconnect(*m_session);
+    onDie();
 }
 
 void Server::reconnect() noexcept
 {
-	irc_disconnect(*m_session);
-	next(std::make_unique<state::Connecting>());
+    irc_disconnect(*m_session);
+    next(std::make_unique<state::Connecting>());
 }
 
 void Server::sync(fd_set &setinput, fd_set &setoutput)
 {
-	/*
-	 * 1. Send maximum of command possible if available for write
-	 *
-	 * Break on the first failure to avoid changing the order of the
-	 * commands if any of them fails.
-	 */
-	bool done = false;
+    /*
+     * 1. Send maximum of command possible if available for write
+     *
+     * Break on the first failure to avoid changing the order of the
+     * commands if any of them fails.
+     */
+    bool done = false;
 
-	while (!m_queue.empty() && !done) {
-		if (m_queue.front()())
-			m_queue.pop();
-		else
-			done = true;
-	}
+    while (!m_queue.empty() && !done) {
+        if (m_queue.front()())
+            m_queue.pop();
+        else
+            done = true;
+    }
 
-	// 2. Read data.
-	irc_process_select_descriptors(*m_session, &setinput, &setoutput);
+    // 2. Read data.
+    irc_process_select_descriptors(*m_session, &setinput, &setoutput);
 }
 
 bool Server::isSelf(const std::string &nick) const noexcept
 {
-	char target[32]{0};
+    char target[32]{0};
 
-	irc_target_get_nick(nick.c_str(), target, sizeof (target));
+    irc_target_get_nick(nick.c_str(), target, sizeof (target));
 
-	return m_identity.nickname == target;
+    return m_identity.nickname == target;
 }
 
 void Server::cmode(std::string channel, std::string mode)
 {
-	m_queue.push([=] () {
-		return irc_cmd_channel_mode(*m_session, channel.c_str(), mode.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_channel_mode(*m_session, channel.c_str(), mode.c_str()) == 0;
+    });
 }
 
 void Server::cnotice(std::string channel, std::string message)
 {
-	m_queue.push([=] () {
-		return irc_cmd_notice(*m_session, channel.c_str(), message.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_notice(*m_session, channel.c_str(), message.c_str()) == 0;
+    });
 }
 
 void Server::invite(std::string target, std::string channel)
 {
-	m_queue.push([=] () {
-		return irc_cmd_invite(*m_session, target.c_str(), channel.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_invite(*m_session, target.c_str(), channel.c_str()) == 0;
+    });
 }
 
 void Server::join(std::string channel, std::string password)
 {
-	m_queue.push([=] () {
-		const char *ptr = password.empty() ? nullptr : password.c_str();
+    m_queue.push([=] () {
+        const char *ptr = password.empty() ? nullptr : password.c_str();
 
-		return irc_cmd_join(*m_session, channel.c_str(), ptr) == 0;
-	});
+        return irc_cmd_join(*m_session, channel.c_str(), ptr) == 0;
+    });
 }
 
 void Server::kick(std::string target, std::string channel, std::string reason)
 {
-	m_queue.push([=] () {
-		return irc_cmd_kick(*m_session, target.c_str(), channel.c_str(), reason.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_kick(*m_session, target.c_str(), channel.c_str(), reason.c_str()) == 0;
+    });
 }
 
 void Server::me(std::string target, std::string message)
 {
-	m_queue.push([=] () {
-		return irc_cmd_me(*m_session, target.c_str(), message.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_me(*m_session, target.c_str(), message.c_str()) == 0;
+    });
 }
 
 void Server::message(std::string target, std::string message)
 {
-	m_queue.push([=] () {
-		return irc_cmd_msg(*m_session, target.c_str(), message.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_msg(*m_session, target.c_str(), message.c_str()) == 0;
+    });
 }
 
 void Server::mode(std::string mode)
 {
-	m_queue.push([=] () {
-		return irc_cmd_user_mode(*m_session, mode.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_user_mode(*m_session, mode.c_str()) == 0;
+    });
 }
 
 void Server::names(std::string channel)
 {
-	m_queue.push([=] () {
-		return irc_cmd_names(*m_session, channel.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_names(*m_session, channel.c_str()) == 0;
+    });
 }
 
 void Server::nick(std::string newnick)
 {
-	m_queue.push([=] () {
-		return irc_cmd_nick(*m_session, newnick.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_nick(*m_session, newnick.c_str()) == 0;
+    });
 }
 
 void Server::notice(std::string target, std::string message)
 {
-	m_queue.push([=] () {
-		return irc_cmd_notice(*m_session, target.c_str(), message.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_notice(*m_session, target.c_str(), message.c_str()) == 0;
+    });
 }
 
 void Server::part(std::string channel, std::string reason)
 {
-	m_queue.push([=] () -> bool {
-		if (reason.empty())
-			return irc_cmd_part(*m_session, channel.c_str()) == 0;
+    m_queue.push([=] () -> bool {
+        if (reason.empty())
+            return irc_cmd_part(*m_session, channel.c_str()) == 0;
 
-		return irc_send_raw(*m_session, "PART %s :%s", channel.c_str(), reason.c_str());
-	});
+        return irc_send_raw(*m_session, "PART %s :%s", channel.c_str(), reason.c_str());
+    });
 }
 
 void Server::send(std::string raw)
 {
-	m_queue.push([=] () {
-		return irc_send_raw(*m_session, raw.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_send_raw(*m_session, raw.c_str()) == 0;
+    });
 }
 
 void Server::topic(std::string channel, std::string topic)
 {
-	m_queue.push([=] () {
-		return irc_cmd_topic(*m_session, channel.c_str(), topic.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_topic(*m_session, channel.c_str(), topic.c_str()) == 0;
+    });
 }
 
 void Server::whois(std::string target)
 {
-	m_queue.push([=] () {
-		return irc_cmd_whois(*m_session, target.c_str()) == 0;
-	});
+    m_queue.push([=] () {
+        return irc_cmd_whois(*m_session, target.c_str()) == 0;
+    });
 }
 
 } // !irccd
--- a/lib/irccd/server.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/server.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -47,11 +47,11 @@
  */
 class ServerIdentity {
 public:
-	std::string name{"irccd"};			//!< identity name
-	std::string nickname{"irccd"};			//!< nickname to show
-	std::string username{"irccd"};			//!< username to use for connection
-	std::string realname{"IRC Client Daemon"};	//!< the full real name
-	std::string ctcpversion{"IRC Client Daemon"};	//!< the CTCP version to define
+    std::string name{"irccd"};                      //!< identity name
+    std::string nickname{"irccd"};                  //!< nickname to show
+    std::string username{"irccd"};                  //!< username to use for connection
+    std::string realname{"IRC Client Daemon"};      //!< the full real name
+    std::string ctcpversion{"IRC Client Daemon"};   //!< the CTCP version to define
 };
 
 /**
@@ -59,19 +59,19 @@
  */
 class ServerChannel {
 public:
-	std::string name;				//!< the channel to join
-	std::string password;				//!< the optional password
+    std::string name;                               //!< the channel to join
+    std::string password;                           //!< the optional password
 };
 
 /**
  * \brief Prefixes for nicknames.
  */
 enum class ServerChanMode {
-	Creator		= 'O',				//!< Channel creator
-	HalfOperator	= 'h',				//!< Half operator
-	Operator	= 'o',				//!< Channel operator
-	Protection	= 'a',				//!< Unkillable
-	Voiced		= 'v'				//!< Voice power
+    Creator         = 'O',                          //!< Channel creator
+    HalfOperator    = 'h',                          //!< Half operator
+    Operator        = 'o',                          //!< Channel operator
+    Protection      = 'a',                          //!< Unkillable
+    Voiced          = 'v'                           //!< Voice power
 };
 
 /**
@@ -79,11 +79,11 @@
  */
 class ServerWhois {
 public:
-	std::string nick;				//!< user's nickname
-	std::string user;				//!< user's user
-	std::string host;				//!< hostname
-	std::string realname;				//!< realname
-	std::vector<std::string> channels;		//!< the channels where the user is
+    std::string nick;                               //!< user's nickname
+    std::string user;                               //!< user's user
+    std::string host;                               //!< hostname
+    std::string realname;                           //!< realname
+    std::vector<std::string> channels;              //!< the channels where the user is
 };
 
 /**
@@ -93,17 +93,17 @@
  */
 class ServerInfo {
 public:
-	enum {
-		Ipv6		= (1 << 0),		//!< Connect using IPv6
-		Ssl		= (1 << 1),		//!< Use SSL
-		SslVerify	= (1 << 2)		//!< Verify SSL
-	};
+    enum {
+        Ipv6        = (1 << 0),                     //!< Connect using IPv6
+        Ssl         = (1 << 1),                     //!< Use SSL
+        SslVerify   = (1 << 2)                      //!< Verify SSL
+    };
 
-	std::string host;				//!< Hostname
-	std::string password;				//!< Optional server password
-	std::uint16_t port{6667};			//!< Server's port
-	std::uint8_t flags{0};				//!< Optional flags
-	std::map<ServerChanMode, char> modes;		//!< IRC modes (e.g. @~)
+    std::string host;                               //!< Hostname
+    std::string password;                           //!< Optional server password
+    std::uint16_t port{6667};                       //!< Server's port
+    std::uint8_t flags{0};                          //!< Optional flags
+    std::map<ServerChanMode, char> modes;           //!< IRC modes (e.g. @~)
 };
 
 /**
@@ -113,17 +113,17 @@
  */
 class ServerSettings {
 public:
-	enum {
-		AutoRejoin	= (1 << 0),		//!< Auto rejoin a channel after being kicked
-		JoinInvite	= (1 << 1)		//!< Join a channel on invitation
-	};
+    enum {
+        AutoRejoin  = (1 << 0),                     //!< Auto rejoin a channel after being kicked
+        JoinInvite  = (1 << 1)                      //!< Join a channel on invitation
+    };
 
-	std::vector<ServerChannel> channels;		//!< List of channel to join
-	std::string command{"!"};			//!< The command character to trigger plugin command
-	std::int8_t reconnectTries{-1};			//!< Number of tries to reconnect before giving up
-	std::uint16_t reconnectDelay{30};		//!< Number of seconds to wait before trying to connect
-	std::uint8_t flags{0};				//!< Optional flags
-	std::uint16_t pingTimeout{300};			//!< Time in seconds before ping timeout is announced
+    std::vector<ServerChannel> channels;            //!< List of channel to join
+    std::string command{"!"};                       //!< The command character to trigger plugin command
+    std::int8_t reconnectTries{-1};                 //!< Number of tries to reconnect before giving up
+    std::uint16_t reconnectDelay{30};               //!< Number of seconds to wait before trying to connect
+    std::uint8_t flags{0};                          //!< Optional flags
+    std::uint16_t pingTimeout{300};                 //!< Time in seconds before ping timeout is announced
 };
 
 /**
@@ -131,18 +131,18 @@
  */
 class ServerCache {
 public:
-	ElapsedTimer pingTimer;				//!< Track elapsed time for ping timeout.
-	std::int8_t reconnectCurrent{1};		//!< Number of reconnection already tested.
+    ElapsedTimer pingTimer;                         //!< Track elapsed time for ping timeout.
+    std::int8_t reconnectCurrent{1};                //!< Number of reconnection already tested.
 
-	/**
-	 * Map of names being build by channels.
-	 */
-	std::map<std::string, std::set<std::string>> namesMap;
+    /**
+     * Map of names being build by channels.
+     */
+    std::map<std::string, std::set<std::string>> namesMap;
 
-	/**
-	 * Map of whois being build by nicknames.
-	 */
-	std::map<std::string, ServerWhois> whoisMap;
+    /**
+     * Map of whois being build by nicknames.
+     */
+    std::map<std::string, ServerWhois> whoisMap;
 };
 
 /**
@@ -160,525 +160,525 @@
  */
 class Server {
 public:
-	/**
-	 * Bridge for libircclient.
-	 */
-	class Session;
+    /**
+     * Bridge for libircclient.
+     */
+    class Session;
 
-	/**
-	 * Signal: onChannelMode
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone changed the channel mode.
-	 *
-	 * Arguments:
-	 * - the origin,
-	 * - the channel,
-	 * - the mode,
-	 * - the optional mode argument.
-	 */
-	Signal<std::string, std::string, std::string, std::string> onChannelMode;
+    /**
+     * Signal: onChannelMode
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone changed the channel mode.
+     *
+     * Arguments:
+     * - the origin,
+     * - the channel,
+     * - the mode,
+     * - the optional mode argument.
+     */
+    Signal<std::string, std::string, std::string, std::string> onChannelMode;
 
-	/**
-	 * Signal: onChannelNotice
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when a notice has been sent on a channel.
-	 *
-	 * Arguments:
-	 *   - the origin (the nickname who has sent the notice),
-	 *   - the channel name,
-	 *   - the notice message.
-	 */
-	Signal<std::string, std::string, std::string> onChannelNotice;
+    /**
+     * Signal: onChannelNotice
+     * ----------------------------------------------------------
+     *
+     * Triggered when a notice has been sent on a channel.
+     *
+     * Arguments:
+     *   - the origin (the nickname who has sent the notice),
+     *   - the channel name,
+     *   - the notice message.
+     */
+    Signal<std::string, std::string, std::string> onChannelNotice;
 
-	/**
-	 * Signal: onConnect
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when the server is successfully connected.
-	 */
-	Signal<> onConnect;
+    /**
+     * Signal: onConnect
+     * ----------------------------------------------------------
+     *
+     * Triggered when the server is successfully connected.
+     */
+    Signal<> onConnect;
 
-	/**
-	 * Signal: onDie
-	 * ----------------------------------------------------------
-	 *
-	 * The server is dead.
-	 */
-	Signal<> onDie;
+    /**
+     * Signal: onDie
+     * ----------------------------------------------------------
+     *
+     * The server is dead.
+     */
+    Signal<> onDie;
 
-	/**
-	 * Signal: onInvite
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when an invite has been sent to you (the bot).
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the channel,
-	 *   - your nickname.
-	 */
-	Signal<std::string, std::string, std::string> onInvite;
+    /**
+     * Signal: onInvite
+     * ----------------------------------------------------------
+     *
+     * Triggered when an invite has been sent to you (the bot).
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the channel,
+     *   - your nickname.
+     */
+    Signal<std::string, std::string, std::string> onInvite;
 
-	/**
-	 * Signal: onJoin
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when a user has joined the channel, it also includes you.
-	 *
-	 * Arguments:
-	 *   - the origin (may be you),
-	 *   - the channel.
-	 */
-	Signal<std::string, std::string> onJoin;
+    /**
+     * Signal: onJoin
+     * ----------------------------------------------------------
+     *
+     * Triggered when a user has joined the channel, it also includes you.
+     *
+     * Arguments:
+     *   - the origin (may be you),
+     *   - the channel.
+     */
+    Signal<std::string, std::string> onJoin;
 
-	/**
-	 * Signal: onKick
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone has been kicked from a channel.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the channel,
-	 *   - the target who has been kicked,
-	 *   - the optional reason.
-	 */
-	Signal<std::string, std::string, std::string, std::string> onKick;
+    /**
+     * Signal: onKick
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone has been kicked from a channel.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the channel,
+     *   - the target who has been kicked,
+     *   - the optional reason.
+     */
+    Signal<std::string, std::string, std::string, std::string> onKick;
 
-	/**
-	 * ServerEvent: onMessage
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when a message on a channel has been sent.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the channel,
-	 *   - the message.
-	 */
-	Signal<std::string, std::string, std::string> onMessage;
+    /**
+     * ServerEvent: onMessage
+     * ----------------------------------------------------------
+     *
+     * Triggered when a message on a channel has been sent.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the channel,
+     *   - the message.
+     */
+    Signal<std::string, std::string, std::string> onMessage;
 
-	/**
-	 * Signal: onMe
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered on a CTCP Action.
-	 *
-	 * This is both used in a channel and in a private message so the target may be a channel or your nickname.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the target,
-	 *   - the message.
-	 */
-	Signal<std::string, std::string, std::string> onMe;
+    /**
+     * Signal: onMe
+     * ----------------------------------------------------------
+     *
+     * Triggered on a CTCP Action.
+     *
+     * This is both used in a channel and in a private message so the target may be a channel or your nickname.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the target,
+     *   - the message.
+     */
+    Signal<std::string, std::string, std::string> onMe;
 
-	/**
-	 * Signal: onMode
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when the server changed your user mode.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the mode (e.g +i).
-	 */
-	Signal<std::string, std::string> onMode;
+    /**
+     * Signal: onMode
+     * ----------------------------------------------------------
+     *
+     * Triggered when the server changed your user mode.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the mode (e.g +i).
+     */
+    Signal<std::string, std::string> onMode;
 
-	/**
-	 * Signal: onNames
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when names listing has finished on a channel.
-	 *
-	 * Arguments:
-	 *   - the channel,
-	 *   - the ordered list of names.
-	 */
-	Signal<std::string, std::set<std::string>> onNames;
+    /**
+     * Signal: onNames
+     * ----------------------------------------------------------
+     *
+     * Triggered when names listing has finished on a channel.
+     *
+     * Arguments:
+     *   - the channel,
+     *   - the ordered list of names.
+     */
+    Signal<std::string, std::set<std::string>> onNames;
 
-	/**
-	 * Signal: onNick
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone changed its nickname, it also includes you.
-	 *
-	 * Arguments:
-	 *   - the old nickname (may be you),
-	 *   - the new nickname.
-	 */
-	Signal<std::string, std::string> onNick;
+    /**
+     * Signal: onNick
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone changed its nickname, it also includes you.
+     *
+     * Arguments:
+     *   - the old nickname (may be you),
+     *   - the new nickname.
+     */
+    Signal<std::string, std::string> onNick;
 
-	/**
-	 * Signal: onNotice
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone has sent a notice to you.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the notice message.
-	 */
-	Signal<std::string, std::string> onNotice;
+    /**
+     * Signal: onNotice
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone has sent a notice to you.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the notice message.
+     */
+    Signal<std::string, std::string> onNotice;
 
-	/**
-	 * Signal: onPart
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone has left the channel.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the channel that the nickname has left,
-	 *   - the optional reason.
-	 */
-	Signal<std::string, std::string, std::string> onPart;
+    /**
+     * Signal: onPart
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone has left the channel.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the channel that the nickname has left,
+     *   - the optional reason.
+     */
+    Signal<std::string, std::string, std::string> onPart;
 
-	/**
-	 * Signal: onQuery
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone has sent you a private message.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the message.
-	 */
-	Signal<std::string, std::string> onQuery;
+    /**
+     * Signal: onQuery
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone has sent you a private message.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the message.
+     */
+    Signal<std::string, std::string> onQuery;
 
-	/**
-	 * Signal: onTopic
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when someone changed the channel topic.
-	 *
-	 * Arguments:
-	 *   - the origin,
-	 *   - the channel,
-	 *   - the new topic.
-	 */
-	Signal<std::string, std::string, std::string> onTopic;
+    /**
+     * Signal: onTopic
+     * ----------------------------------------------------------
+     *
+     * Triggered when someone changed the channel topic.
+     *
+     * Arguments:
+     *   - the origin,
+     *   - the channel,
+     *   - the new topic.
+     */
+    Signal<std::string, std::string, std::string> onTopic;
 
-	/**
-	 * Signal: onWhois
-	 * ----------------------------------------------------------
-	 *
-	 * Triggered when whois information has been received.
-	 *
-	 * Arguments:
-	 *   - the whois object.
-	 */
-	Signal<ServerWhois> onWhois;
+    /**
+     * Signal: onWhois
+     * ----------------------------------------------------------
+     *
+     * Triggered when whois information has been received.
+     *
+     * Arguments:
+     *   - the whois object.
+     */
+    Signal<ServerWhois> onWhois;
 
 private:
-	// Identifier.
-	std::string m_name;
+    // Identifier.
+    std::string m_name;
 
-	// Various settings.
-	ServerInfo m_info;
-	ServerSettings m_settings;
-	ServerIdentity m_identity;
-	ServerCache m_cache;
+    // Various settings.
+    ServerInfo m_info;
+    ServerSettings m_settings;
+    ServerIdentity m_identity;
+    ServerCache m_cache;
 
-	// Queue of requests to send.
-	std::queue<std::function<bool ()>> m_queue;
+    // Queue of requests to send.
+    std::queue<std::function<bool ()>> m_queue;
 
-	// libircclient session (bridge).
-	std::unique_ptr<Session> m_session;
+    // libircclient session (bridge).
+    std::unique_ptr<Session> m_session;
 
-	// States.
-	std::unique_ptr<ServerState> m_state;
-	std::unique_ptr<ServerState> m_stateNext;
+    // States.
+    std::unique_ptr<ServerState> m_state;
+    std::unique_ptr<ServerState> m_stateNext;
 
-	// Handle libircclient callbacks.
-	void handleChannel(const char *, const char **) noexcept;
-	void handleChannelMode(const char *, const char **) noexcept;
-	void handleChannelNotice(const char *, const char **) noexcept;
-	void handleConnect(const char *, const char **) noexcept;
-	void handleCtcpAction(const char *, const char **) noexcept;
-	void handleInvite(const char *, const char **) noexcept;
-	void handleJoin(const char *, const char **) noexcept;
-	void handleKick(const char *, const char **) noexcept;
-	void handleMode(const char *, const char **) noexcept;
-	void handleNick(const char *, const char **) noexcept;
-	void handleNotice(const char *, const char **) noexcept;
-	void handleNumeric(unsigned int, const char **, unsigned int) noexcept;
-	void handlePart(const char *, const char **) noexcept;
-	void handlePing(const char *, const char **) noexcept;
-	void handleQuery(const char *, const char **) noexcept;
-	void handleTopic(const char *, const char **) noexcept;
+    // Handle libircclient callbacks.
+    void handleChannel(const char *, const char **) noexcept;
+    void handleChannelMode(const char *, const char **) noexcept;
+    void handleChannelNotice(const char *, const char **) noexcept;
+    void handleConnect(const char *, const char **) noexcept;
+    void handleCtcpAction(const char *, const char **) noexcept;
+    void handleInvite(const char *, const char **) noexcept;
+    void handleJoin(const char *, const char **) noexcept;
+    void handleKick(const char *, const char **) noexcept;
+    void handleMode(const char *, const char **) noexcept;
+    void handleNick(const char *, const char **) noexcept;
+    void handleNotice(const char *, const char **) noexcept;
+    void handleNumeric(unsigned int, const char **, unsigned int) noexcept;
+    void handlePart(const char *, const char **) noexcept;
+    void handlePing(const char *, const char **) noexcept;
+    void handleQuery(const char *, const char **) noexcept;
+    void handleTopic(const char *, const char **) noexcept;
 
 public:
-	/**
-	 * Split a channel from the form channel:password into a ServerChannel object.
-	 *
-	 * \param value the value
-	 * \return a channel
-	 */
-	IRCCD_EXPORT static ServerChannel splitChannel(const std::string &value);
+    /**
+     * Split a channel from the form channel:password into a ServerChannel object.
+     *
+     * \param value the value
+     * \return a channel
+     */
+    IRCCD_EXPORT static ServerChannel splitChannel(const std::string &value);
 
-	/**
-	 * Construct a server.
-	 *
-	 * \param name the identifier
-	 * \param info the information
-	 * \param identity the identity
-	 * \param settings the settings
-	 */
-	IRCCD_EXPORT Server(std::string name, ServerInfo info, ServerIdentity identity = {}, ServerSettings settings = {});
+    /**
+     * Construct a server.
+     *
+     * \param name the identifier
+     * \param info the information
+     * \param identity the identity
+     * \param settings the settings
+     */
+    IRCCD_EXPORT Server(std::string name, ServerInfo info, ServerIdentity identity = {}, ServerSettings settings = {});
 
-	/**
-	 * Destructor. Close the connection if needed.
-	 */
-	IRCCD_EXPORT virtual ~Server();
+    /**
+     * Destructor. Close the connection if needed.
+     */
+    IRCCD_EXPORT virtual ~Server();
 
-	/**
-	 * Get the server identifier.
-	 *
-	 * \return the id
-	 */
-	inline const std::string &name() const noexcept
-	{
-		return m_name;
-	}
+    /**
+     * Get the server identifier.
+     *
+     * \return the id
+     */
+    inline const std::string &name() const noexcept
+    {
+        return m_name;
+    }
 
-	/**
-	 * Get the server information.
-	 *
-	 * \return the server information
-	 */
-	inline const ServerInfo &info() const noexcept
-	{
-		return m_info;
-	}
+    /**
+     * Get the server information.
+     *
+     * \return the server information
+     */
+    inline const ServerInfo &info() const noexcept
+    {
+        return m_info;
+    }
 
-	/**
-	 * Get the server settings.
-	 *
-	 * \note some settings will be used only after the next reconnection
-	 * \return the settings
-	 */
-	inline ServerSettings &settings() noexcept
-	{
-		return m_settings;
-	}
+    /**
+     * Get the server settings.
+     *
+     * \note some settings will be used only after the next reconnection
+     * \return the settings
+     */
+    inline ServerSettings &settings() noexcept
+    {
+        return m_settings;
+    }
 
-	/**
-	 * Get the server settings.
-	 *
-	 * \return the settings
-	 */
-	inline const ServerSettings &settings() const noexcept
-	{
-		return m_settings;
-	}
+    /**
+     * Get the server settings.
+     *
+     * \return the settings
+     */
+    inline const ServerSettings &settings() const noexcept
+    {
+        return m_settings;
+    }
 
-	/**
-	 * Access the identity.
-	 *
-	 * \return the identity
-	 */
-	inline const ServerIdentity &identity() const noexcept
-	{
-		return m_identity;
-	}
+    /**
+     * Access the identity.
+     *
+     * \return the identity
+     */
+    inline const ServerIdentity &identity() const noexcept
+    {
+        return m_identity;
+    }
 
-	/**
-	 * Access the cache.
-	 *
-	 * \return the cache
-	 * \warning use with care
-	 */
-	inline ServerCache &cache() noexcept
-	{
-		return m_cache;
-	}
+    /**
+     * Access the cache.
+     *
+     * \return the cache
+     * \warning use with care
+     */
+    inline ServerCache &cache() noexcept
+    {
+        return m_cache;
+    }
 
-	/**
-	 * Get the private session.
-	 *
-	 * \return the session
-	 */
-	inline Session &session() noexcept
-	{
-		return *m_session;
-	}
+    /**
+     * Get the private session.
+     *
+     * \return the session
+     */
+    inline Session &session() noexcept
+    {
+        return *m_session;
+    }
 
-	/**
-	 * Set the next state, it is not changed immediately but on next iteration.
-	 *
-	 * \param state the new state
-	 */
-	inline void next(std::unique_ptr<ServerState> state) noexcept
-	{
-		m_stateNext = std::move(state);
-	}
+    /**
+     * Set the next state, it is not changed immediately but on next iteration.
+     *
+     * \param state the new state
+     */
+    inline void next(std::unique_ptr<ServerState> state) noexcept
+    {
+        m_stateNext = std::move(state);
+    }
 
-	/**
-	 * Switch to next state if it has.
-	 */
-	IRCCD_EXPORT void update() noexcept;
+    /**
+     * Switch to next state if it has.
+     */
+    IRCCD_EXPORT void update() noexcept;
 
-	/**
-	 * Force disconnection.
-	 */
-	IRCCD_EXPORT void disconnect() noexcept;
+    /**
+     * Force disconnection.
+     */
+    IRCCD_EXPORT void disconnect() noexcept;
 
-	/**
-	 * Asks for a reconnection.
-	 */
-	IRCCD_EXPORT void reconnect() noexcept;
+    /**
+     * Asks for a reconnection.
+     */
+    IRCCD_EXPORT void reconnect() noexcept;
 
-	/**
-	 * Prepare the IRC session.
-	 *
-	 * \warning Not thread-safe
-	 */
-	inline void prepare(fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) noexcept
-	{
-		m_state->prepare(*this, setinput, setoutput, maxfd);
-	}
+    /**
+     * Prepare the IRC session.
+     *
+     * \warning Not thread-safe
+     */
+    inline void prepare(fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) noexcept
+    {
+        m_state->prepare(*this, setinput, setoutput, maxfd);
+    }
 
-	/**
-	 * Process incoming/outgoing data after selection.
-	 *
-	 * \param setinput
-	 * \param setoutput
-	 * \throw any exception that have been throw from user functions
-	 */
-	IRCCD_EXPORT void sync(fd_set &setinput, fd_set &setoutput);
+    /**
+     * Process incoming/outgoing data after selection.
+     *
+     * \param setinput
+     * \param setoutput
+     * \throw any exception that have been throw from user functions
+     */
+    IRCCD_EXPORT void sync(fd_set &setinput, fd_set &setoutput);
 
-	/**
-	 * Determine if the nickname is the bot itself.
-	 *
-	 * \param nick the nickname to check
-	 * \return true if it is the bot
-	 */
-	IRCCD_EXPORT bool isSelf(const std::string &nick) const noexcept;
+    /**
+     * Determine if the nickname is the bot itself.
+     *
+     * \param nick the nickname to check
+     * \return true if it is the bot
+     */
+    IRCCD_EXPORT bool isSelf(const std::string &nick) const noexcept;
 
-	/**
-	 * Change the channel mode.
-	 *
-	 * \param channel the channel
-	 * \param mode the new mode
-	 */
-	IRCCD_EXPORT virtual void cmode(std::string channel, std::string mode);
+    /**
+     * Change the channel mode.
+     *
+     * \param channel the channel
+     * \param mode the new mode
+     */
+    IRCCD_EXPORT virtual void cmode(std::string channel, std::string mode);
 
-	/**
-	 * Send a channel notice.
-	 *
-	 * \param channel the channel
-	 * \param message message notice
-	 */
-	IRCCD_EXPORT virtual void cnotice(std::string channel, std::string message);
+    /**
+     * Send a channel notice.
+     *
+     * \param channel the channel
+     * \param message message notice
+     */
+    IRCCD_EXPORT virtual void cnotice(std::string channel, std::string message);
 
-	/**
-	 * Invite a user to a channel.
-	 *
-	 * \param target the target nickname
-	 * \param channel the channel
-	 */
-	IRCCD_EXPORT virtual void invite(std::string target, std::string channel);
+    /**
+     * Invite a user to a channel.
+     *
+     * \param target the target nickname
+     * \param channel the channel
+     */
+    IRCCD_EXPORT virtual void invite(std::string target, std::string channel);
 
-	/**
-	 * Join a channel, the password is optional and can be kept empty.
-	 *
-	 * \param channel the channel to join
-	 * \param password the optional password
-	 */
-	IRCCD_EXPORT virtual void join(std::string channel, std::string password = "");
+    /**
+     * Join a channel, the password is optional and can be kept empty.
+     *
+     * \param channel the channel to join
+     * \param password the optional password
+     */
+    IRCCD_EXPORT virtual void join(std::string channel, std::string password = "");
 
-	/**
-	 * Kick someone from the channel. Please be sure to have the rights
-	 * on that channel because errors won't be reported.
-	 *
-	 * \param target the target to kick
-	 * \param channel from which channel
-	 * \param reason the optional reason
-	 */
-	IRCCD_EXPORT virtual void kick(std::string target, std::string channel, std::string reason = "");
+    /**
+     * Kick someone from the channel. Please be sure to have the rights
+     * on that channel because errors won't be reported.
+     *
+     * \param target the target to kick
+     * \param channel from which channel
+     * \param reason the optional reason
+     */
+    IRCCD_EXPORT virtual void kick(std::string target, std::string channel, std::string reason = "");
 
-	/**
-	 * Send a CTCP Action as known as /me. The target may be either a
-	 * channel or a nickname.
-	 *
-	 * \param target the nickname or the channel
-	 * \param message the message
-	 */
-	IRCCD_EXPORT virtual void me(std::string target, std::string message);
+    /**
+     * Send a CTCP Action as known as /me. The target may be either a
+     * channel or a nickname.
+     *
+     * \param target the nickname or the channel
+     * \param message the message
+     */
+    IRCCD_EXPORT virtual void me(std::string target, std::string message);
 
-	/**
-	 * Send a message to the specified target or channel.
-	 *
-	 * \param target the target
-	 * \param message the message
-	 */
-	IRCCD_EXPORT virtual void message(std::string target, std::string message);
+    /**
+     * Send a message to the specified target or channel.
+     *
+     * \param target the target
+     * \param message the message
+     */
+    IRCCD_EXPORT virtual void message(std::string target, std::string message);
 
-	/**
-	 * Change your user mode.
-	 *
-	 * \param mode the mode
-	 */
-	IRCCD_EXPORT virtual void mode(std::string mode);
+    /**
+     * Change your user mode.
+     *
+     * \param mode the mode
+     */
+    IRCCD_EXPORT virtual void mode(std::string mode);
 
-	/**
-	 * Request the list of names.
-	 *
-	 * \param channel the channel
-	 */
-	IRCCD_EXPORT virtual void names(std::string channel);
+    /**
+     * Request the list of names.
+     *
+     * \param channel the channel
+     */
+    IRCCD_EXPORT virtual void names(std::string channel);
 
-	/**
-	 * Change your nickname.
-	 *
-	 * \param newnick the new nickname to use
-	 */
-	IRCCD_EXPORT virtual void nick(std::string newnick);
+    /**
+     * Change your nickname.
+     *
+     * \param newnick the new nickname to use
+     */
+    IRCCD_EXPORT virtual void nick(std::string newnick);
 
-	/**
-	 * Send a private notice.
-	 *
-	 * \param target the target
-	 * \param message the notice message
-	 */
-	IRCCD_EXPORT virtual void notice(std::string target, std::string message);
+    /**
+     * Send a private notice.
+     *
+     * \param target the target
+     * \param message the notice message
+     */
+    IRCCD_EXPORT virtual void notice(std::string target, std::string message);
 
-	/**
-	 * Part from a channel.
-	 *
-	 * Please note that the reason is not supported on all servers so if you want portability, don't provide it.
-	 *
-	 * \param channel the channel to leave
-	 * \param reason the optional reason
-	 */
-	IRCCD_EXPORT virtual void part(std::string channel, std::string reason = "");
+    /**
+     * Part from a channel.
+     *
+     * Please note that the reason is not supported on all servers so if you want portability, don't provide it.
+     *
+     * \param channel the channel to leave
+     * \param reason the optional reason
+     */
+    IRCCD_EXPORT virtual void part(std::string channel, std::string reason = "");
 
-	/**
-	 * Send a raw message to the IRC server. You don't need to add
-	 * message terminators.
-	 *
-	 * \warning Use this function with care
-	 * \param raw the raw message (without `\r\n\r\n`)
-	 */
-	IRCCD_EXPORT virtual void send(std::string raw);
+    /**
+     * Send a raw message to the IRC server. You don't need to add
+     * message terminators.
+     *
+     * \warning Use this function with care
+     * \param raw the raw message (without `\r\n\r\n`)
+     */
+    IRCCD_EXPORT virtual void send(std::string raw);
 
-	/**
-	 * Change the channel topic.
-	 *
-	 * \param channel the channel
-	 * \param topic the desired topic
-	 */
-	IRCCD_EXPORT virtual void topic(std::string channel, std::string topic);
+    /**
+     * Change the channel topic.
+     *
+     * \param channel the channel
+     * \param topic the desired topic
+     */
+    IRCCD_EXPORT virtual void topic(std::string channel, std::string topic);
 
-	/**
-	 * Request for whois information.
-	 *
-	 * \param target the target nickname
-	 */
-	IRCCD_EXPORT virtual void whois(std::string target);
+    /**
+     * Request for whois information.
+     *
+     * \param target the target nickname
+     */
+    IRCCD_EXPORT virtual void whois(std::string target);
 };
 
 } // !irccd
--- a/lib/irccd/service-command.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-command.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -48,48 +48,48 @@
 namespace irccd {
 
 CommandService::CommandService()
-	: m_commands{
-		std::make_shared<command::Help>(),
-		std::make_shared<command::PluginConfig>(),
-		std::make_shared<command::PluginInfo>(),
-		std::make_shared<command::PluginList>(),
-		std::make_shared<command::PluginLoad>(),
-		std::make_shared<command::PluginReload>(),
-		std::make_shared<command::PluginUnload>(),
-		std::make_shared<command::ServerChannelMode>(),
-		std::make_shared<command::ServerChannelNotice>(),
-		std::make_shared<command::ServerConnect>(),
-		std::make_shared<command::ServerDisconnect>(),
-		std::make_shared<command::ServerInfo>(),
-		std::make_shared<command::ServerInvite>(),
-		std::make_shared<command::ServerJoin>(),
-		std::make_shared<command::ServerKick>(),
-		std::make_shared<command::ServerList>(),
-		std::make_shared<command::ServerMe>(),
-		std::make_shared<command::ServerMessage>(),
-		std::make_shared<command::ServerMode>(),
-		std::make_shared<command::ServerNick>(),
-		std::make_shared<command::ServerNotice>(),
-		std::make_shared<command::ServerPart>(),
-		std::make_shared<command::ServerReconnect>(),
-		std::make_shared<command::ServerTopic>(),
-		std::make_shared<command::Watch>(),
-	}
+    : m_commands{
+        std::make_shared<command::Help>(),
+        std::make_shared<command::PluginConfig>(),
+        std::make_shared<command::PluginInfo>(),
+        std::make_shared<command::PluginList>(),
+        std::make_shared<command::PluginLoad>(),
+        std::make_shared<command::PluginReload>(),
+        std::make_shared<command::PluginUnload>(),
+        std::make_shared<command::ServerChannelMode>(),
+        std::make_shared<command::ServerChannelNotice>(),
+        std::make_shared<command::ServerConnect>(),
+        std::make_shared<command::ServerDisconnect>(),
+        std::make_shared<command::ServerInfo>(),
+        std::make_shared<command::ServerInvite>(),
+        std::make_shared<command::ServerJoin>(),
+        std::make_shared<command::ServerKick>(),
+        std::make_shared<command::ServerList>(),
+        std::make_shared<command::ServerMe>(),
+        std::make_shared<command::ServerMessage>(),
+        std::make_shared<command::ServerMode>(),
+        std::make_shared<command::ServerNick>(),
+        std::make_shared<command::ServerNotice>(),
+        std::make_shared<command::ServerPart>(),
+        std::make_shared<command::ServerReconnect>(),
+        std::make_shared<command::ServerTopic>(),
+        std::make_shared<command::Watch>(),
+    }
 {
 }
 
 bool CommandService::contains(const std::string &name) const noexcept
 {
-	return find(name) != nullptr;
+    return find(name) != nullptr;
 }
 
 std::shared_ptr<Command> CommandService::find(const std::string &name) const noexcept
 {
-	auto it = std::find_if(m_commands.begin(), m_commands.end(), [&] (const auto &cmd) {
-		return cmd->name() == name;
-	});
+    auto it = std::find_if(m_commands.begin(), m_commands.end(), [&] (const auto &cmd) {
+        return cmd->name() == name;
+    });
 
-	return it == m_commands.end() ? nullptr : *it;
+    return it == m_commands.end() ? nullptr : *it;
 }
 
 } // !irccd
--- a/lib/irccd/service-command.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-command.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -39,31 +39,31 @@
  */
 class CommandService {
 private:
-	std::vector<std::shared_ptr<Command>> m_commands;
+    std::vector<std::shared_ptr<Command>> m_commands;
 
 public:
-	/**
-	 * Default constructor.
-	 *
-	 * Populate the commands with predefined ones.
-	 */
-	IRCCD_EXPORT CommandService();
+    /**
+     * Default constructor.
+     *
+     * Populate the commands with predefined ones.
+     */
+    IRCCD_EXPORT CommandService();
 
-	/**
-	 * Tells if a command exists.
-	 *
-	 * \param name the command name
-	 * \return true if the command exists
-	 */
-	IRCCD_EXPORT bool contains(const std::string &name) const noexcept;
+    /**
+     * Tells if a command exists.
+     *
+     * \param name the command name
+     * \return true if the command exists
+     */
+    IRCCD_EXPORT bool contains(const std::string &name) const noexcept;
 
-	/**
-	 * Find a command by name.
-	 *
-	 * \param name the command name
-	 * \return the command or empty one if not found
-	 */
-	IRCCD_EXPORT std::shared_ptr<Command> find(const std::string &name) const noexcept;
+    /**
+     * Find a command by name.
+     *
+     * \param name the command name
+     * \return the command or empty one if not found
+     */
+    IRCCD_EXPORT std::shared_ptr<Command> find(const std::string &name) const noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/service-interrupt.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-interrupt.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -23,45 +23,45 @@
 
 InterruptService::InterruptService()
 {
-	// Bind a socket to any port.
-	m_in.set(net::option::SockReuseAddress(true));
-	m_in.bind(net::address::Ipv4("*", 0));
-	m_in.listen(1);
+    // Bind a socket to any port.
+    m_in.set(net::option::SockReuseAddress(true));
+    m_in.bind(net::address::Ipv4("*", 0));
+    m_in.listen(1);
 
-	// Do the socket pair.
-	m_out.connect(net::address::Ipv4("127.0.0.1", m_in.getsockname().port()));
-	m_in = m_in.accept();
-	m_out.set(net::option::SockBlockMode(false));
+    // Do the socket pair.
+    m_out.connect(net::address::Ipv4("127.0.0.1", m_in.getsockname().port()));
+    m_in = m_in.accept();
+    m_out.set(net::option::SockBlockMode(false));
 }
 
 void InterruptService::prepare(fd_set &in, fd_set &, net::Handle &max)
 {
-	FD_SET(m_in.handle(), &in);
+    FD_SET(m_in.handle(), &in);
 
-	if (m_in.handle() > max)
-		max = m_in.handle();
+    if (m_in.handle() > max)
+        max = m_in.handle();
 }
 
 void InterruptService::sync(fd_set &in, fd_set &)
 {
-	if (FD_ISSET(m_in.handle(), &in)) {
-		try {
-			log::debug("irccd: interrupt service recv");
-			m_in.recv(32);
-		} catch (const std::exception &ex) {
-			log::warning() << "irccd: interrupt service error: " << ex.what() << std::endl;
-		}
-	}
+    if (FD_ISSET(m_in.handle(), &in)) {
+        try {
+            log::debug("irccd: interrupt service recv");
+            m_in.recv(32);
+        } catch (const std::exception &ex) {
+            log::warning() << "irccd: interrupt service error: " << ex.what() << std::endl;
+        }
+    }
 }
 
 void InterruptService::interrupt() noexcept
 {
-	try {
-		log::debug("irccd: interrupt service send");
-		m_out.send(" ");
-	} catch (const std::exception &ex) {
-		log::warning() << "irccd: interrupt service error: " << ex.what() << std::endl;
-	}
+    try {
+        log::debug("irccd: interrupt service send");
+        m_out.send(" ");
+    } catch (const std::exception &ex) {
+        log::warning() << "irccd: interrupt service error: " << ex.what() << std::endl;
+    }
 }
 
 } // !irccd
--- a/lib/irccd/service-interrupt.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-interrupt.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,31 +34,31 @@
  */
 class InterruptService : public Service {
 private:
-	net::SocketTcpIpv4 m_in;
-	net::SocketTcpIpv4 m_out;
+    net::SocketTcpIpv4 m_in;
+    net::SocketTcpIpv4 m_out;
 
 public:
-	/**
-	 * Prepare the socket pair.
-	 *
-	 * \throw std::runtime_error on errors
-	 */
-	IRCCD_EXPORT InterruptService();
+    /**
+     * Prepare the socket pair.
+     *
+     * \throw std::runtime_error on errors
+     */
+    IRCCD_EXPORT InterruptService();
 
-	/**
-	 * \copydoc Service::prepare
-	 */
-	IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
+    /**
+     * \copydoc Service::prepare
+     */
+    IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
 
-	/**
-	 * \copydoc Service::sync
-	 */
-	IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
+    /**
+     * \copydoc Service::sync
+     */
+    IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
 
-	/**
-	 * Request interruption.
-	 */
-	IRCCD_EXPORT void interrupt() noexcept;
+    /**
+     * Request interruption.
+     */
+    IRCCD_EXPORT void interrupt() noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/service-module.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-module.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -37,51 +37,51 @@
 
 auto find(const std::vector<std::shared_ptr<Module>> &modules, const std::string &name) noexcept
 {
-	return std::find_if(modules.begin(), modules.end(), [&] (const auto &module) {
-		return module->name() == name;
-	});
+    return std::find_if(modules.begin(), modules.end(), [&] (const auto &module) {
+        return module->name() == name;
+    });
 }
 
 } // !namespace
 
 ModuleService::ModuleService()
 {
-	// Load Irccd global first.
-	m_modules.push_back(std::make_shared<IrccdModule>());
+    // Load Irccd global first.
+    m_modules.push_back(std::make_shared<IrccdModule>());
 
-	// Additional modules.
-	m_modules.push_back(std::make_shared<ElapsedTimerModule>());
-	m_modules.push_back(std::make_shared<DirectoryModule>());
-	m_modules.push_back(std::make_shared<FileModule>());
-	m_modules.push_back(std::make_shared<LoggerModule>());
-	m_modules.push_back(std::make_shared<PluginModule>());
-	m_modules.push_back(std::make_shared<ServerModule>());
-	m_modules.push_back(std::make_shared<SystemModule>());
-	m_modules.push_back(std::make_shared<TimerModule>());
-	m_modules.push_back(std::make_shared<UnicodeModule>());
-	m_modules.push_back(std::make_shared<UtilModule>());
+    // Additional modules.
+    m_modules.push_back(std::make_shared<ElapsedTimerModule>());
+    m_modules.push_back(std::make_shared<DirectoryModule>());
+    m_modules.push_back(std::make_shared<FileModule>());
+    m_modules.push_back(std::make_shared<LoggerModule>());
+    m_modules.push_back(std::make_shared<PluginModule>());
+    m_modules.push_back(std::make_shared<ServerModule>());
+    m_modules.push_back(std::make_shared<SystemModule>());
+    m_modules.push_back(std::make_shared<TimerModule>());
+    m_modules.push_back(std::make_shared<UnicodeModule>());
+    m_modules.push_back(std::make_shared<UtilModule>());
 }
 
 std::shared_ptr<Module> ModuleService::get(const std::string &name) const noexcept
 {
-	auto it = find(m_modules, name);
+    auto it = find(m_modules, name);
 
-	if (it == m_modules.end())
-		return nullptr;
+    if (it == m_modules.end())
+        return nullptr;
 
-	return *it;
+    return *it;
 }
 
 bool ModuleService::contains(const std::string &name) const
 {
-	return find(m_modules, name) != m_modules.end();
+    return find(m_modules, name) != m_modules.end();
 }
 
 void ModuleService::add(std::shared_ptr<Module> module)
 {
-	assert(!contains(module->name()));
+    assert(!contains(module->name()));
 
-	m_modules.push_back(std::move(module));
+    m_modules.push_back(std::move(module));
 }
 
 } // !irccd
--- a/lib/irccd/service-module.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-module.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -39,47 +39,47 @@
  */
 class ModuleService {
 private:
-	std::vector<std::shared_ptr<Module>> m_modules;
+    std::vector<std::shared_ptr<Module>> m_modules;
 
 public:
-	/**
-	 * Construct the service and predefined irccd API.
-	 */
-	IRCCD_EXPORT ModuleService();
+    /**
+     * Construct the service and predefined irccd API.
+     */
+    IRCCD_EXPORT ModuleService();
 
-	/**
-	 * Get all modules.
-	 *
-	 * \return the modules
-	 */
-	inline const std::vector<std::shared_ptr<Module>> &modules() const noexcept
-	{
-		return m_modules;
-	}
+    /**
+     * Get all modules.
+     *
+     * \return the modules
+     */
+    inline const std::vector<std::shared_ptr<Module>> &modules() const noexcept
+    {
+        return m_modules;
+    }
 
-	/**
-	 * Get a module.
-	 *
-	 * \param name the module name
-	 * \return the module or empty if not found
-	 */
-	IRCCD_EXPORT std::shared_ptr<Module> get(const std::string &name) const noexcept;
+    /**
+     * Get a module.
+     *
+     * \param name the module name
+     * \return the module or empty if not found
+     */
+    IRCCD_EXPORT std::shared_ptr<Module> get(const std::string &name) const noexcept;
 
-	/**
-	 * Tells if a module exist.
-	 *
-	 * \param name the name
-	 */
-	IRCCD_EXPORT bool contains(const std::string &name) const;
+    /**
+     * Tells if a module exist.
+     *
+     * \param name the name
+     */
+    IRCCD_EXPORT bool contains(const std::string &name) const;
 
-	/**
-	 * Add a JavaScript API module.
-	 *
-	 * \pre module != nullptr
-	 * \pre !contains(module)
-	 * \param module the module
-	 */
-	IRCCD_EXPORT void add(std::shared_ptr<Module> module);
+    /**
+     * Add a JavaScript API module.
+     *
+     * \pre module != nullptr
+     * \pre !contains(module)
+     * \param module the module
+     */
+    IRCCD_EXPORT void add(std::shared_ptr<Module> module);
 };
 
 } // !irccd
--- a/lib/irccd/service-plugin.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-plugin.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -38,157 +38,157 @@
 
 std::shared_ptr<Plugin> find(std::string name)
 {
-	for (const auto &path : path::list(path::PathPlugins)) {
-		std::string jspath = path + name + ".js";
-		std::string dynlibpath = path + name + DYNLIB_SUFFIX;
+    for (const auto &path : path::list(path::PathPlugins)) {
+        std::string jspath = path + name + ".js";
+        std::string dynlibpath = path + name + DYNLIB_SUFFIX;
 
-		if (fs::isReadable(jspath))
-			return std::make_shared<JsPlugin>(std::move(name), std::move(jspath));
-		if (fs::isReadable(dynlibpath))
-			return std::make_shared<DynlibPlugin>(std::move(name), std::move(dynlibpath));
-	}
+        if (fs::isReadable(jspath))
+            return std::make_shared<JsPlugin>(std::move(name), std::move(jspath));
+        if (fs::isReadable(dynlibpath))
+            return std::make_shared<DynlibPlugin>(std::move(name), std::move(dynlibpath));
+    }
 
-	throw std::runtime_error("no suitable plugin found");
+    throw std::runtime_error("no suitable plugin found");
 }
 
 std::shared_ptr<Plugin> open(std::string name, std::string path)
 {
-	std::regex regex(".*(\\..*)$");
-	std::smatch match;
-	std::shared_ptr<Plugin> plugin;
+    std::regex regex(".*(\\..*)$");
+    std::smatch match;
+    std::shared_ptr<Plugin> plugin;
 
-	if (std::regex_match(path, match, regex)) {
-		if (match[1] == DYNLIB_SUFFIX)
-			plugin = std::make_shared<DynlibPlugin>(name, path);
-		else
-			plugin = std::make_shared<JsPlugin>(name, path);
-	} else
-		throw std::runtime_error("could not deduce plugin type from {}"_format(path));
+    if (std::regex_match(path, match, regex)) {
+        if (match[1] == DYNLIB_SUFFIX)
+            plugin = std::make_shared<DynlibPlugin>(name, path);
+        else
+            plugin = std::make_shared<JsPlugin>(name, path);
+    } else
+        throw std::runtime_error("could not deduce plugin type from {}"_format(path));
 
-	return plugin;
+    return plugin;
 }
 
 } // !namespace
 
 PluginService::PluginService(Irccd &irccd) noexcept
-	: m_irccd(irccd)
+    : m_irccd(irccd)
 {
 }
 
 PluginService::~PluginService()
 {
-	for (const auto &plugin : m_plugins)
-		plugin->onUnload(m_irccd);
+    for (const auto &plugin : m_plugins)
+        plugin->onUnload(m_irccd);
 }
 
 bool PluginService::has(const std::string &name) const noexcept
 {
-	return std::count_if(m_plugins.cbegin(), m_plugins.cend(), [&] (const auto &plugin) {
-		return plugin->name() == name;
-	}) > 0;
+    return std::count_if(m_plugins.cbegin(), m_plugins.cend(), [&] (const auto &plugin) {
+        return plugin->name() == name;
+    }) > 0;
 }
 
 std::shared_ptr<Plugin> PluginService::get(const std::string &name) const noexcept
 {
-	auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
-		return plugin->name() == name;
-	});
+    auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
+        return plugin->name() == name;
+    });
 
-	if (it == m_plugins.end())
-		return nullptr;
+    if (it == m_plugins.end())
+        return nullptr;
 
-	return *it;
+    return *it;
 }
 
 std::shared_ptr<Plugin> PluginService::require(const std::string &name) const
 {
-	auto plugin = get(name);
+    auto plugin = get(name);
 
-	if (!plugin)
-		throw std::invalid_argument("plugin {} not found"_format(name));
+    if (!plugin)
+        throw std::invalid_argument("plugin {} not found"_format(name));
 
-	return plugin;
+    return plugin;
 }
 
 void PluginService::add(std::shared_ptr<Plugin> plugin)
 {
-	m_plugins.push_back(std::move(plugin));
+    m_plugins.push_back(std::move(plugin));
 }
 
 void PluginService::setConfig(const std::string &name, PluginConfig config)
 {
-	m_config.emplace(name, std::move(config));
+    m_config.emplace(name, std::move(config));
 }
 
 PluginConfig PluginService::config(const std::string &name) const
 {
-	auto it = m_config.find(name);
+    auto it = m_config.find(name);
 
-	if (it != m_config.end())
-		return it->second;
+    if (it != m_config.end())
+        return it->second;
 
-	return PluginConfig();
+    return PluginConfig();
 }
 
 void PluginService::setFormats(const std::string &name, PluginFormats formats)
 {
-	m_formats.emplace(name, std::move(formats));
+    m_formats.emplace(name, std::move(formats));
 }
 
 PluginFormats PluginService::formats(const std::string &name) const
 {
-	auto it = m_formats.find(name);
+    auto it = m_formats.find(name);
 
-	if (it != m_formats.end())
-		return it->second;
+    if (it != m_formats.end())
+        return it->second;
 
-	return PluginFormats();
+    return PluginFormats();
 }
 
 void PluginService::load(std::string name, std::string path)
 {
-	auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
-		return plugin->name() == name;
-	});
+    auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
+        return plugin->name() == name;
+    });
 
-	if (it != m_plugins.end())
-		return;
+    if (it != m_plugins.end())
+        return;
 
-	try {
-		std::shared_ptr<Plugin> plugin;
+    try {
+        std::shared_ptr<Plugin> plugin;
 
-		if (path.empty())
-			plugin = find(name);
-		else
-			plugin = open(name, std::move(path));
+        if (path.empty())
+            plugin = find(name);
+        else
+            plugin = open(name, std::move(path));
 
-		plugin->setConfig(m_config[name]);
-		plugin->setFormats(m_formats[name]);
-		plugin->onLoad(m_irccd);
-		add(std::move(plugin));
-	} catch (const std::exception &ex) {
-		log::warning("plugin {}: {}"_format(name, ex.what()));
-	}
+        plugin->setConfig(m_config[name]);
+        plugin->setFormats(m_formats[name]);
+        plugin->onLoad(m_irccd);
+        add(std::move(plugin));
+    } catch (const std::exception &ex) {
+        log::warning("plugin {}: {}"_format(name, ex.what()));
+    }
 }
 
 void PluginService::reload(const std::string &name)
 {
-	auto plugin = get(name);
+    auto plugin = get(name);
 
-	if (plugin)
-		plugin->onReload(m_irccd);
+    if (plugin)
+        plugin->onReload(m_irccd);
 }
 
 void PluginService::unload(const std::string &name)
 {
-	auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
-		return plugin->name() == name;
-	});
+    auto it = std::find_if(m_plugins.begin(), m_plugins.end(), [&] (const auto &plugin) {
+        return plugin->name() == name;
+    });
 
-	if (it != m_plugins.end()) {
-		(*it)->onUnload(m_irccd);
-		m_plugins.erase(it);
-	}
+    if (it != m_plugins.end()) {
+        (*it)->onUnload(m_irccd);
+        m_plugins.erase(it);
+    }
 }
 
 } // !irccd
--- a/lib/irccd/service-plugin.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-plugin.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -40,126 +40,126 @@
  */
 class PluginService {
 private:
-	Irccd &m_irccd;
-	std::vector<std::shared_ptr<Plugin>> m_plugins;
-	std::unordered_map<std::string, PluginConfig> m_config;
-	std::unordered_map<std::string, PluginFormats> m_formats;
+    Irccd &m_irccd;
+    std::vector<std::shared_ptr<Plugin>> m_plugins;
+    std::unordered_map<std::string, PluginConfig> m_config;
+    std::unordered_map<std::string, PluginFormats> m_formats;
 
 public:
-	/**
-	 * Create the plugin service.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	IRCCD_EXPORT PluginService(Irccd &irccd) noexcept;
+    /**
+     * Create the plugin service.
+     *
+     * \param irccd the irccd instance
+     */
+    IRCCD_EXPORT PluginService(Irccd &irccd) noexcept;
 
-	/**
-	 * Destroy plugins.
-	 */
-	IRCCD_EXPORT ~PluginService();
+    /**
+     * Destroy plugins.
+     */
+    IRCCD_EXPORT ~PluginService();
 
-	/**
-	 * Get the list of plugins.
-	 *
-	 * \return the list of plugins
-	 */
-	inline const std::vector<std::shared_ptr<Plugin>> &plugins() const noexcept
-	{
-		return m_plugins;
-	}
+    /**
+     * Get the list of plugins.
+     *
+     * \return the list of plugins
+     */
+    inline const std::vector<std::shared_ptr<Plugin>> &plugins() const noexcept
+    {
+        return m_plugins;
+    }
 
-	/**
-	 * Check if a plugin is loaded.
-	 *
-	 * \param name the plugin id
-	 * \return true if has plugin
-	 */
-	IRCCD_EXPORT bool has(const std::string &name) const noexcept;
+    /**
+     * Check if a plugin is loaded.
+     *
+     * \param name the plugin id
+     * \return true if has plugin
+     */
+    IRCCD_EXPORT bool has(const std::string &name) const noexcept;
 
-	/**
-	 * Get a loaded plugin or null if not found.
-	 *
-	 * \param name the plugin id
-	 * \return the plugin or empty one if not found
-	 */
-	IRCCD_EXPORT std::shared_ptr<Plugin> get(const std::string &name) const noexcept;
+    /**
+     * Get a loaded plugin or null if not found.
+     *
+     * \param name the plugin id
+     * \return the plugin or empty one if not found
+     */
+    IRCCD_EXPORT std::shared_ptr<Plugin> get(const std::string &name) const noexcept;
 
-	/**
-	 * Find a loaded plugin.
-	 *
-	 * \param name the plugin id
-	 * \return the plugin
-	 * \throws std::out_of_range if not found
-	 */
-	IRCCD_EXPORT std::shared_ptr<Plugin> require(const std::string &name) const;
+    /**
+     * Find a loaded plugin.
+     *
+     * \param name the plugin id
+     * \return the plugin
+     * \throws std::out_of_range if not found
+     */
+    IRCCD_EXPORT std::shared_ptr<Plugin> require(const std::string &name) const;
 
-	/**
-	 * Add the specified plugin to the registry.
-	 *
-	 * \pre plugin != nullptr
-	 * \param plugin the plugin
-	 * \note the plugin is only added to the list, no action is performed on it
-	 */
-	IRCCD_EXPORT void add(std::shared_ptr<Plugin> plugin);
+    /**
+     * Add the specified plugin to the registry.
+     *
+     * \pre plugin != nullptr
+     * \param plugin the plugin
+     * \note the plugin is only added to the list, no action is performed on it
+     */
+    IRCCD_EXPORT void add(std::shared_ptr<Plugin> plugin);
 
-	/**
-	 * Configure a plugin.
-	 *
-	 * If the plugin is already loaded, its configuration is updated.
-	 *
-	 * \param name the plugin name
-	 * \param config the new configuration
-	 */
-	IRCCD_EXPORT void setConfig(const std::string &name, PluginConfig config);
+    /**
+     * Configure a plugin.
+     *
+     * If the plugin is already loaded, its configuration is updated.
+     *
+     * \param name the plugin name
+     * \param config the new configuration
+     */
+    IRCCD_EXPORT void setConfig(const std::string &name, PluginConfig config);
 
-	/**
-	 * Get a configuration for a plugin.
-	 *
-	 * \param name the plugin name
-	 * \return the configuration or default one if not found
-	 */
-	IRCCD_EXPORT PluginConfig config(const std::string &name) const;
+    /**
+     * Get a configuration for a plugin.
+     *
+     * \param name the plugin name
+     * \return the configuration or default one if not found
+     */
+    IRCCD_EXPORT PluginConfig config(const std::string &name) const;
 
-	/**
-	 * Add formatting for a plugin.
-	 *
-	 * \param name the plugin name
-	 * \param formats the formats
-	 */
-	IRCCD_EXPORT void setFormats(const std::string &name, PluginFormats formats);
+    /**
+     * Add formatting for a plugin.
+     *
+     * \param name the plugin name
+     * \param formats the formats
+     */
+    IRCCD_EXPORT void setFormats(const std::string &name, PluginFormats formats);
 
-	/**
-	 * Get formats for a plugin.
-	 *
-	 * \param name the plugin name
-	 * \return the formats
-	 */
-	IRCCD_EXPORT PluginFormats formats(const std::string &name) const;
+    /**
+     * Get formats for a plugin.
+     *
+     * \param name the plugin name
+     * \return the formats
+     */
+    IRCCD_EXPORT PluginFormats formats(const std::string &name) const;
 
-	/**
-	 * Convenient wrapper that loads a plugin, call onLoad and add it to the registry.
-	 *
-	 * Any errors are printed using logger.
-	 *
-	 * \param name the name
-	 * \param path the optional path (searched if empty)
-	 */
-	IRCCD_EXPORT void load(std::string name, std::string path = "");
+    /**
+     * Convenient wrapper that loads a plugin, call onLoad and add it to the registry.
+     *
+     * Any errors are printed using logger.
+     *
+     * \param name the name
+     * \param path the optional path (searched if empty)
+     */
+    IRCCD_EXPORT void load(std::string name, std::string path = "");
 
-	/**
-	 * Unload a plugin and remove it.
-	 *
-	 * \param name the plugin id
-	 */
-	IRCCD_EXPORT void unload(const std::string &name);
+    /**
+     * Unload a plugin and remove it.
+     *
+     * \param name the plugin id
+     */
+    IRCCD_EXPORT void unload(const std::string &name);
 
-	/**
-	 * Reload a plugin by calling onReload.
-	 *
-	 * \param name the plugin name
-	 * \throw std::exception on failures
-	 */
-	IRCCD_EXPORT void reload(const std::string &name);
+    /**
+     * Reload a plugin by calling onReload.
+     *
+     * \param name the plugin name
+     * \throw std::exception on failures
+     */
+    IRCCD_EXPORT void reload(const std::string &name);
 };
 
 } // !irccd
--- a/lib/irccd/service-rule.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-rule.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,49 +30,49 @@
 
 void RuleService::add(Rule rule)
 {
-	m_rules.push_back(std::move(rule));
+    m_rules.push_back(std::move(rule));
 }
 
 void RuleService::insert(Rule rule, unsigned position)
 {
-	assert(position <= m_rules.size());
+    assert(position <= m_rules.size());
 
-	m_rules.insert(m_rules.begin() + position, std::move(rule));
+    m_rules.insert(m_rules.begin() + position, std::move(rule));
 }
 
 void RuleService::remove(unsigned position)
 {
-	assert(position < m_rules.size());
+    assert(position < m_rules.size());
 
-	m_rules.erase(m_rules.begin() + position);
+    m_rules.erase(m_rules.begin() + position);
 }
 
 bool RuleService::solve(const std::string &server,
-			const std::string &channel,
-			const std::string &origin,
-			const std::string &plugin,
-			const std::string &event) noexcept
+                        const std::string &channel,
+                        const std::string &origin,
+                        const std::string &plugin,
+                        const std::string &event) noexcept
 {
-	bool result = true;
+    bool result = true;
 
-	log::debug("rule: solving for server={}, channel={}, origin={}, plugin={}, event={}"_format(server, channel,
-		   origin, plugin, event));
+    log::debug("rule: solving for server={}, channel={}, origin={}, plugin={}, event={}"_format(server, channel,
+           origin, plugin, event));
 
-	int i = 0;
-	for (const Rule &rule : m_rules) {
-		log::debug() << "  candidate " << i++ << ":\n"
-			     << "    servers: " << util::join(rule.servers().begin(), rule.servers().end()) << "\n"
-			     << "    channels: " << util::join(rule.channels().begin(), rule.channels().end()) << "\n"
-			     << "    origins: " << util::join(rule.origins().begin(), rule.origins().end()) << "\n"
-			     << "    plugins: " << util::join(rule.plugins().begin(), rule.plugins().end()) << "\n"
-			     << "    events: " << util::join(rule.events().begin(), rule.events().end()) << "\n"
-			     << "    action: " << ((rule.action() == RuleAction::Accept) ? "accept" : "drop") << std::endl;
+    int i = 0;
+    for (const Rule &rule : m_rules) {
+        log::debug() << "  candidate " << i++ << ":\n"
+                 << "    servers: " << util::join(rule.servers().begin(), rule.servers().end()) << "\n"
+                 << "    channels: " << util::join(rule.channels().begin(), rule.channels().end()) << "\n"
+                 << "    origins: " << util::join(rule.origins().begin(), rule.origins().end()) << "\n"
+                 << "    plugins: " << util::join(rule.plugins().begin(), rule.plugins().end()) << "\n"
+                 << "    events: " << util::join(rule.events().begin(), rule.events().end()) << "\n"
+                 << "    action: " << ((rule.action() == RuleAction::Accept) ? "accept" : "drop") << std::endl;
 
-		if (rule.match(server, channel, origin, plugin, event))
-			result = rule.action() == RuleAction::Accept;
-	}
+        if (rule.match(server, channel, origin, plugin, event))
+            result = rule.action() == RuleAction::Accept;
+    }
 
-	return result;
+    return result;
 }
 
 } // !irccd
--- a/lib/irccd/service-rule.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-rule.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,67 +36,67 @@
  */
 class RuleService {
 private:
-	std::vector<Rule> m_rules;
+    std::vector<Rule> m_rules;
 
 public:
-	/**
-	 * Get the list of rules.
-	 *
-	 * \return the list of rules
-	 */
-	inline const std::vector<Rule> &rules() const noexcept
-	{
-		return m_rules;
-	}
+    /**
+     * Get the list of rules.
+     *
+     * \return the list of rules
+     */
+    inline const std::vector<Rule> &rules() const noexcept
+    {
+        return m_rules;
+    }
 
-	/**
-	 * Get the number of rules.
-	 *
-	 * \return the number of rules
-	 */
-	inline std::size_t length() const noexcept
-	{
-		return m_rules.size();
-	}
+    /**
+     * Get the number of rules.
+     *
+     * \return the number of rules
+     */
+    inline std::size_t length() const noexcept
+    {
+        return m_rules.size();
+    }
 
-	/**
-	 * Append a rule.
-	 *
-	 * \param rule the rule to append
-	 */
-	IRCCD_EXPORT void add(Rule rule);
+    /**
+     * Append a rule.
+     *
+     * \param rule the rule to append
+     */
+    IRCCD_EXPORT void add(Rule rule);
 
-	/**
-	 * Insert a new rule at the specified position.
-	 *
-	 * \param rule the rule
-	 * \param position the position
-	 */
-	IRCCD_EXPORT void insert(Rule rule, unsigned position);
+    /**
+     * Insert a new rule at the specified position.
+     *
+     * \param rule the rule
+     * \param position the position
+     */
+    IRCCD_EXPORT void insert(Rule rule, unsigned position);
 
-	/**
-	 * Remove a new rule from the specified position.
-	 *
-	 * \pre position must be valid
-	 * \param position the position
-	 */
-	IRCCD_EXPORT void remove(unsigned position);
+    /**
+     * Remove a new rule from the specified position.
+     *
+     * \pre position must be valid
+     * \param position the position
+     */
+    IRCCD_EXPORT void remove(unsigned position);
 
-	/**
-	 * Resolve the action to execute with the specified list of rules.
-	 *
-	 * \param server the server name
-	 * \param channel the channel name
-	 * \param origin the origin
-	 * \param plugin the plugin name
-	 * \param event the event name (e.g onKick)
-	 * \return true if the plugin must be called
-	 */
-	IRCCD_EXPORT bool solve(const std::string &server,
-				const std::string &channel,
-				const std::string &origin,
-				const std::string &plugin,
-				const std::string &event) noexcept;
+    /**
+     * Resolve the action to execute with the specified list of rules.
+     *
+     * \param server the server name
+     * \param channel the channel name
+     * \param origin the origin
+     * \param plugin the plugin name
+     * \param event the event name (e.g onKick)
+     * \return true if the plugin must be called
+     */
+    IRCCD_EXPORT bool solve(const std::string &server,
+                            const std::string &channel,
+                            const std::string &origin,
+                            const std::string &plugin,
+                            const std::string &event) noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/service-server.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-server.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -36,588 +36,588 @@
 
 void ServerService::handleChannelMode(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string mode, std::string arg)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onChannelMode:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  mode: " << mode << "\n";
-	log::debug() << "  argument: " << arg << std::endl;
+    log::debug() << "server " << server->name() << ": event onChannelMode:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  mode: " << mode << "\n";
+    log::debug() << "  argument: " << arg << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onChannelMode"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "mode",	mode			},
-		{ "argument",	arg			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onChannelMode"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "mode",    mode            },
+        { "argument",    arg            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onChannelMode";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onChannelMode(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(mode),
-					     std::move(arg));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onChannelMode";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onChannelMode(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(mode),
+                         std::move(arg));
+        }
+    ));
 }
 
 void ServerService::handleChannelNotice(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string message)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onChannelNotice:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  message: " << message << std::endl;
+    log::debug() << "server " << server->name() << ": event onChannelNotice:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  message: " << message << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onChannelNotice"	},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "message",	message			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onChannelNotice"    },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "message",    message            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onChannelNotice";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onChannelNotice(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(message));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onChannelNotice";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onChannelNotice(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(message));
+        }
+    ));
 }
 
 void ServerService::handleConnect(std::weak_ptr<Server> ptr)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onConnect" << std::endl;
+    log::debug() << "server " << server->name() << ": event onConnect" << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onConnect"		},
-		{ "server",	server->name()		}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onConnect"        },
+        { "server",    server->name()        }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), /* origin */ "", /* channel */ "",
-		[=] (Plugin &) -> std::string {
-			return "onConnect";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onConnect(m_irccd, std::move(server));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), /* origin */ "", /* channel */ "",
+        [=] (Plugin &) -> std::string {
+            return "onConnect";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onConnect(m_irccd, std::move(server));
+        }
+    ));
 }
 
 void ServerService::handleInvite(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string target)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onInvite:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  target: " << target << std::endl;
+    log::debug() << "server " << server->name() << ": event onInvite:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  target: " << target << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onInvite"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onInvite"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onInvite";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onInvite(m_irccd, std::move(server), std::move(origin), std::move(channel));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onInvite";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onInvite(m_irccd, std::move(server), std::move(origin), std::move(channel));
+        }
+    ));
 }
 
 void ServerService::handleJoin(std::weak_ptr<Server> ptr, std::string origin, std::string channel)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onJoin:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << std::endl;
+    log::debug() << "server " << server->name() << ": event onJoin:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onJoin"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onJoin"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onJoin";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onJoin(m_irccd, std::move(server), std::move(origin), std::move(channel));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onJoin";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onJoin(m_irccd, std::move(server), std::move(origin), std::move(channel));
+        }
+    ));
 }
 
 void ServerService::handleKick(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string target, std::string reason)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onKick:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  target: " << target << "\n";
-	log::debug() << "  reason: " << reason << std::endl;
+    log::debug() << "server " << server->name() << ": event onKick:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  target: " << target << "\n";
+    log::debug() << "  reason: " << reason << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onKick"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "target",	target			},
-		{ "reason",	reason			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onKick"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "target",    target            },
+        { "reason",    reason            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onKick";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onKick(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(target), std::move(reason));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onKick";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onKick(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(target), std::move(reason));
+        }
+    ));
 }
 
 void ServerService::handleMessage(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string message)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onMessage:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  message: " << message << std::endl;
+    log::debug() << "server " << server->name() << ": event onMessage:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  message: " << message << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onMessage"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "message",	message			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onMessage"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "message",    message            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &plugin) -> std::string {
-			return util::parseMessage(message, server->settings().command, plugin.name()).second == util::MessageType::Command ? "onCommand" : "onMessage";
-		},
-		[=] (Plugin &plugin) {
-			util::MessagePair pack = util::parseMessage(message, server->settings().command, plugin.name());
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &plugin) -> std::string {
+            return util::parseMessage(message, server->settings().command, plugin.name()).second == util::MessageType::Command ? "onCommand" : "onMessage";
+        },
+        [=] (Plugin &plugin) {
+            util::MessagePair pack = util::parseMessage(message, server->settings().command, plugin.name());
 
-			if (pack.second == util::MessageType::Command)
-				plugin.onCommand(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(pack.first));
-			else
-				plugin.onMessage(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(pack.first));
-		}
-	));
+            if (pack.second == util::MessageType::Command)
+                plugin.onCommand(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(pack.first));
+            else
+                plugin.onMessage(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(pack.first));
+        }
+    ));
 }
 
 void ServerService::handleMe(std::weak_ptr<Server> ptr, std::string origin, std::string target, std::string message)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onMe:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  target: " << target << "\n";
-	log::debug() << "  message: " << message << std::endl;
+    log::debug() << "server " << server->name() << ": event onMe:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  target: " << target << "\n";
+    log::debug() << "  message: " << message << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onMe"			},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "target",	target			},
-		{ "message",	message			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onMe"            },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "target",    target            },
+        { "message",    message            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, target,
-		[=] (Plugin &) -> std::string {
-			return "onMe";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onMe(m_irccd, std::move(server), std::move(origin), std::move(target), std::move(message));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, target,
+        [=] (Plugin &) -> std::string {
+            return "onMe";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onMe(m_irccd, std::move(server), std::move(origin), std::move(target), std::move(message));
+        }
+    ));
 }
 
 void ServerService::handleMode(std::weak_ptr<Server> ptr, std::string origin, std::string mode)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onMode\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  mode: " << mode << std::endl;
+    log::debug() << "server " << server->name() << ": event onMode\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  mode: " << mode << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onMode"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "mode",	mode			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onMode"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "mode",    mode            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
-		[=] (Plugin &) -> std::string {
-			return "onMode";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onMode(m_irccd, std::move(server), std::move(origin), std::move(mode));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
+        [=] (Plugin &) -> std::string {
+            return "onMode";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onMode(m_irccd, std::move(server), std::move(origin), std::move(mode));
+        }
+    ));
 }
 
 void ServerService::handleNames(std::weak_ptr<Server> ptr, std::string channel, std::set<std::string> nicknames)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onNames:\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  names: " << util::join(nicknames.begin(), nicknames.end(), ", ") << std::endl;
+    log::debug() << "server " << server->name() << ": event onNames:\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  names: " << util::join(nicknames.begin(), nicknames.end(), ", ") << std::endl;
 
-	json::Value names(std::vector<json::Value>(nicknames.begin(), nicknames.end()));
+    json::Value names(std::vector<json::Value>(nicknames.begin(), nicknames.end()));
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onNames"		},
-		{ "server",	server->name()		},
-		{ "channel",	channel			},
-		{ "names",	std::move(names)	}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onNames"        },
+        { "server",    server->name()        },
+        { "channel",    channel            },
+        { "names",    std::move(names)    }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), /* origin */ "", channel,
-		[=] (Plugin &) -> std::string {
-			return "onNames";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onNames(m_irccd, std::move(server), std::move(channel), std::vector<std::string>(nicknames.begin(), nicknames.end()));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), /* origin */ "", channel,
+        [=] (Plugin &) -> std::string {
+            return "onNames";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onNames(m_irccd, std::move(server), std::move(channel), std::vector<std::string>(nicknames.begin(), nicknames.end()));
+        }
+    ));
 }
 
 void ServerService::handleNick(std::weak_ptr<Server> ptr, std::string origin, std::string nickname)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onNick:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  nickname: " << nickname << std::endl;
+    log::debug() << "server " << server->name() << ": event onNick:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  nickname: " << nickname << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onNick"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "nickname",	nickname		}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onNick"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "nickname",    nickname        }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
-		[=] (Plugin &) -> std::string {
-			return "onNick";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onNick(m_irccd, std::move(server), std::move(origin), std::move(nickname));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
+        [=] (Plugin &) -> std::string {
+            return "onNick";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onNick(m_irccd, std::move(server), std::move(origin), std::move(nickname));
+        }
+    ));
 }
 
 void ServerService::handleNotice(std::weak_ptr<Server> ptr, std::string origin, std::string message)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onNotice:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  message: " << message << std::endl;
+    log::debug() << "server " << server->name() << ": event onNotice:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  message: " << message << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onNotice"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "message",	message			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onNotice"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "message",    message            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
-		[=] (Plugin &) -> std::string {
-			return "onNotice";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onNotice(m_irccd, std::move(server), std::move(origin), std::move(message));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
+        [=] (Plugin &) -> std::string {
+            return "onNotice";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onNotice(m_irccd, std::move(server), std::move(origin), std::move(message));
+        }
+    ));
 }
 
 void ServerService::handlePart(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string reason)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onPart:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  reason: " << reason << std::endl;
+    log::debug() << "server " << server->name() << ": event onPart:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  reason: " << reason << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onPart"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "reason",	reason			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onPart"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "reason",    reason            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onPart";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onPart(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(reason));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onPart";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onPart(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(reason));
+        }
+    ));
 }
 
 void ServerService::handleQuery(std::weak_ptr<Server> ptr, std::string origin, std::string message)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onQuery:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  message: " << message << std::endl;
+    log::debug() << "server " << server->name() << ": event onQuery:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  message: " << message << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onQuery"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "message",	message			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onQuery"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "message",    message            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
-		[=] (Plugin &plugin) -> std::string {
-			return util::parseMessage(message, server->settings().command, plugin.name()).second == util::MessageType::Command ? "onQueryCommand" : "onQuery";
-		},
-		[=] (Plugin &plugin) {
-			util::MessagePair pack = util::parseMessage(message, server->settings().command, plugin.name());
+    m_irccd.post(ServerEvent(server->name(), origin, /* channel */ "",
+        [=] (Plugin &plugin) -> std::string {
+            return util::parseMessage(message, server->settings().command, plugin.name()).second == util::MessageType::Command ? "onQueryCommand" : "onQuery";
+        },
+        [=] (Plugin &plugin) {
+            util::MessagePair pack = util::parseMessage(message, server->settings().command, plugin.name());
 
-			if (pack.second == util::MessageType::Command)
-				plugin.onQueryCommand(m_irccd, std::move(server), std::move(origin), std::move(pack.first));
-			else
-				plugin.onQuery(m_irccd, std::move(server), std::move(origin), std::move(pack.first));
-		}
-	));
+            if (pack.second == util::MessageType::Command)
+                plugin.onQueryCommand(m_irccd, std::move(server), std::move(origin), std::move(pack.first));
+            else
+                plugin.onQuery(m_irccd, std::move(server), std::move(origin), std::move(pack.first));
+        }
+    ));
 }
 
 void ServerService::handleTopic(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string topic)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onTopic:\n";
-	log::debug() << "  origin: " << origin << "\n";
-	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  topic: " << topic << std::endl;
+    log::debug() << "server " << server->name() << ": event onTopic:\n";
+    log::debug() << "  origin: " << origin << "\n";
+    log::debug() << "  channel: " << channel << "\n";
+    log::debug() << "  topic: " << topic << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "event",	"onTopic"		},
-		{ "server",	server->name()		},
-		{ "origin",	origin			},
-		{ "channel",	channel			},
-		{ "topic",	topic			}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "event",    "onTopic"        },
+        { "server",    server->name()        },
+        { "origin",    origin            },
+        { "channel",    channel            },
+        { "topic",    topic            }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), origin, channel,
-		[=] (Plugin &) -> std::string {
-			return "onTopic";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onTopic(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(topic));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), origin, channel,
+        [=] (Plugin &) -> std::string {
+            return "onTopic";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onTopic(m_irccd, std::move(server), std::move(origin), std::move(channel), std::move(topic));
+        }
+    ));
 }
 
 void ServerService::handleWhois(std::weak_ptr<Server> ptr, ServerWhois whois)
 {
-	std::shared_ptr<Server> server = ptr.lock();
+    std::shared_ptr<Server> server = ptr.lock();
 
-	if (!server)
-		return;
+    if (!server)
+        return;
 
-	log::debug() << "server " << server->name() << ": event onWhois\n";
-	log::debug() << "  nickname: " << whois.nick << "\n";
-	log::debug() << "  username: " << whois.user << "\n";
-	log::debug() << "  host: " << whois.host << "\n";
-	log::debug() << "  realname: " << whois.realname << "\n";
-	log::debug() << "  channels: " << util::join(whois.channels.begin(), whois.channels.end()) << std::endl;
+    log::debug() << "server " << server->name() << ": event onWhois\n";
+    log::debug() << "  nickname: " << whois.nick << "\n";
+    log::debug() << "  username: " << whois.user << "\n";
+    log::debug() << "  host: " << whois.host << "\n";
+    log::debug() << "  realname: " << whois.realname << "\n";
+    log::debug() << "  channels: " << util::join(whois.channels.begin(), whois.channels.end()) << std::endl;
 
-	m_irccd.transportService().broadcast(json::object({
-		{ "server",	server->name()		},
-		{ "nickname",	whois.nick		},
-		{ "username",	whois.user		},
-		{ "host",	whois.host		},
-		{ "realname",	whois.realname		}
-	}).toJson(0));
+    m_irccd.transportService().broadcast(json::object({
+        { "server",    server->name()        },
+        { "nickname",    whois.nick        },
+        { "username",    whois.user        },
+        { "host",    whois.host        },
+        { "realname",    whois.realname        }
+    }).toJson(0));
 
-	m_irccd.post(ServerEvent(server->name(), /* origin */ "", /* channel */ "",
-		[=] (Plugin &) -> std::string {
-			return "onWhois";
-		},
-		[=] (Plugin &plugin) {
-			plugin.onWhois(m_irccd, std::move(server), std::move(whois));
-		}
-	));
+    m_irccd.post(ServerEvent(server->name(), /* origin */ "", /* channel */ "",
+        [=] (Plugin &) -> std::string {
+            return "onWhois";
+        },
+        [=] (Plugin &plugin) {
+            plugin.onWhois(m_irccd, std::move(server), std::move(whois));
+        }
+    ));
 }
 
 ServerService::ServerService(Irccd &irccd)
-	: m_irccd(irccd)
+    : m_irccd(irccd)
 {
 }
 
 void ServerService::prepare(fd_set &in, fd_set &out, net::Handle &max)
 {
-	for (auto &server : m_servers) {
-		server->update();
-		server->prepare(in, out, max);
-	}
+    for (auto &server : m_servers) {
+        server->update();
+        server->prepare(in, out, max);
+    }
 }
 
 void ServerService::sync(fd_set &in, fd_set &out)
 {
-	for (auto &server : m_servers)
-		server->sync(in, out);
+    for (auto &server : m_servers)
+        server->sync(in, out);
 }
 
 bool ServerService::has(const std::string &name) const noexcept
 {
-	return std::count_if(m_servers.cbegin(), m_servers.end(), [&] (const auto &server) {
-		return server->name() == name;
-	}) > 0;
+    return std::count_if(m_servers.cbegin(), m_servers.end(), [&] (const auto &server) {
+        return server->name() == name;
+    }) > 0;
 }
 
 void ServerService::add(std::shared_ptr<Server> server)
 {
-	assert(!has(server->name()));
+    assert(!has(server->name()));
 
-	using namespace std::placeholders;
+    using namespace std::placeholders;
 
-	std::weak_ptr<Server> ptr(server);
+    std::weak_ptr<Server> ptr(server);
 
-	server->onChannelMode.connect(std::bind(&ServerService::handleChannelMode, this, ptr, _1, _2, _3, _4));
-	server->onChannelNotice.connect(std::bind(&ServerService::handleChannelNotice, this, ptr, _1, _2, _3));
-	server->onConnect.connect(std::bind(&ServerService::handleConnect, this, ptr));
-	server->onInvite.connect(std::bind(&ServerService::handleInvite, this, ptr, _1, _2, _3));
-	server->onJoin.connect(std::bind(&ServerService::handleJoin, this, ptr, _1, _2));
-	server->onKick.connect(std::bind(&ServerService::handleKick, this, ptr, _1, _2, _3, _4));
-	server->onMessage.connect(std::bind(&ServerService::handleMessage, this, ptr, _1, _2, _3));
-	server->onMe.connect(std::bind(&ServerService::handleMe, this, ptr, _1, _2, _3));
-	server->onMode.connect(std::bind(&ServerService::handleMode, this, ptr, _1, _2));
-	server->onNames.connect(std::bind(&ServerService::handleNames, this, ptr, _1, _2));
-	server->onNick.connect(std::bind(&ServerService::handleNick, this, ptr, _1, _2));
-	server->onNotice.connect(std::bind(&ServerService::handleNotice, this, ptr, _1, _2));
-	server->onPart.connect(std::bind(&ServerService::handlePart, this, ptr, _1, _2, _3));
-	server->onQuery.connect(std::bind(&ServerService::handleQuery, this, ptr, _1, _2));
-	server->onTopic.connect(std::bind(&ServerService::handleTopic, this, ptr, _1, _2, _3));
-	server->onWhois.connect(std::bind(&ServerService::handleWhois, this, ptr, _1));
-	server->onDie.connect([this, ptr] () {
-		m_irccd.post([=] (Irccd &) {
-			auto server = ptr.lock();
+    server->onChannelMode.connect(std::bind(&ServerService::handleChannelMode, this, ptr, _1, _2, _3, _4));
+    server->onChannelNotice.connect(std::bind(&ServerService::handleChannelNotice, this, ptr, _1, _2, _3));
+    server->onConnect.connect(std::bind(&ServerService::handleConnect, this, ptr));
+    server->onInvite.connect(std::bind(&ServerService::handleInvite, this, ptr, _1, _2, _3));
+    server->onJoin.connect(std::bind(&ServerService::handleJoin, this, ptr, _1, _2));
+    server->onKick.connect(std::bind(&ServerService::handleKick, this, ptr, _1, _2, _3, _4));
+    server->onMessage.connect(std::bind(&ServerService::handleMessage, this, ptr, _1, _2, _3));
+    server->onMe.connect(std::bind(&ServerService::handleMe, this, ptr, _1, _2, _3));
+    server->onMode.connect(std::bind(&ServerService::handleMode, this, ptr, _1, _2));
+    server->onNames.connect(std::bind(&ServerService::handleNames, this, ptr, _1, _2));
+    server->onNick.connect(std::bind(&ServerService::handleNick, this, ptr, _1, _2));
+    server->onNotice.connect(std::bind(&ServerService::handleNotice, this, ptr, _1, _2));
+    server->onPart.connect(std::bind(&ServerService::handlePart, this, ptr, _1, _2, _3));
+    server->onQuery.connect(std::bind(&ServerService::handleQuery, this, ptr, _1, _2));
+    server->onTopic.connect(std::bind(&ServerService::handleTopic, this, ptr, _1, _2, _3));
+    server->onWhois.connect(std::bind(&ServerService::handleWhois, this, ptr, _1));
+    server->onDie.connect([this, ptr] () {
+        m_irccd.post([=] (Irccd &) {
+            auto server = ptr.lock();
 
-			if (server) {
-				log::info("server {}: removed"_format(server->name()));
-				m_servers.erase(std::find(m_servers.begin(), m_servers.end(), server));
-			}
-		});
-	});
+            if (server) {
+                log::info("server {}: removed"_format(server->name()));
+                m_servers.erase(std::find(m_servers.begin(), m_servers.end(), server));
+            }
+        });
+    });
 
-	m_servers.push_back(std::move(server));
+    m_servers.push_back(std::move(server));
 }
 
 std::shared_ptr<Server> ServerService::get(const std::string &name) const noexcept
 {
-	auto it = std::find_if(m_servers.begin(), m_servers.end(), [&] (const auto &server) {
-		return server->name() == name;
-	});
+    auto it = std::find_if(m_servers.begin(), m_servers.end(), [&] (const auto &server) {
+        return server->name() == name;
+    });
 
-	if (it == m_servers.end())
-		return nullptr;
+    if (it == m_servers.end())
+        return nullptr;
 
-	return *it;
+    return *it;
 }
 
 std::shared_ptr<Server> ServerService::require(const std::string &name) const
 {
-	auto server = get(name);
+    auto server = get(name);
 
-	if (!server)
-		throw std::invalid_argument("server {} not found"_format(name));
+    if (!server)
+        throw std::invalid_argument("server {} not found"_format(name));
 
-	return server;
+    return server;
 }
 
 void ServerService::remove(const std::string &name)
 {
-	auto it = std::find_if(m_servers.begin(), m_servers.end(), [&] (const auto &server) {
-		return server->name() == name;
-	});
+    auto it = std::find_if(m_servers.begin(), m_servers.end(), [&] (const auto &server) {
+        return server->name() == name;
+    });
 
-	if (it != m_servers.end()) {
-		(*it)->disconnect();
-		m_servers.erase(it);
-	}
+    if (it != m_servers.end()) {
+        (*it)->disconnect();
+        m_servers.erase(it);
+    }
 }
 
 void ServerService::clear() noexcept
 {
-	for (auto &server : m_servers)
-		server->disconnect();
+    for (auto &server : m_servers)
+        server->disconnect();
 
-	m_servers.clear();
+    m_servers.clear();
 }
 
 } // !irccd
--- a/lib/irccd/service-server.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-server.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -42,100 +42,100 @@
  */
 class ServerService : public Service {
 private:
-	Irccd &m_irccd;
-	std::vector<std::shared_ptr<Server>> m_servers;
+    Irccd &m_irccd;
+    std::vector<std::shared_ptr<Server>> m_servers;
 
-	void handleChannelMode(std::weak_ptr<Server>, std::string, std::string, std::string, std::string);
-	void handleChannelNotice(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleConnect(std::weak_ptr<Server>);
-	void handleInvite(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleJoin(std::weak_ptr<Server>, std::string, std::string);
-	void handleKick(std::weak_ptr<Server>, std::string, std::string, std::string, std::string);
-	void handleMessage(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleMe(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleMode(std::weak_ptr<Server>, std::string, std::string);
-	void handleNames(std::weak_ptr<Server>, std::string, std::set<std::string>);
-	void handleNick(std::weak_ptr<Server>, std::string, std::string);
-	void handleNotice(std::weak_ptr<Server>, std::string, std::string);
-	void handlePart(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleQuery(std::weak_ptr<Server>, std::string, std::string);
-	void handleTopic(std::weak_ptr<Server>, std::string, std::string, std::string);
-	void handleWhois(std::weak_ptr<Server>, ServerWhois);
+    void handleChannelMode(std::weak_ptr<Server>, std::string, std::string, std::string, std::string);
+    void handleChannelNotice(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleConnect(std::weak_ptr<Server>);
+    void handleInvite(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleJoin(std::weak_ptr<Server>, std::string, std::string);
+    void handleKick(std::weak_ptr<Server>, std::string, std::string, std::string, std::string);
+    void handleMessage(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleMe(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleMode(std::weak_ptr<Server>, std::string, std::string);
+    void handleNames(std::weak_ptr<Server>, std::string, std::set<std::string>);
+    void handleNick(std::weak_ptr<Server>, std::string, std::string);
+    void handleNotice(std::weak_ptr<Server>, std::string, std::string);
+    void handlePart(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleQuery(std::weak_ptr<Server>, std::string, std::string);
+    void handleTopic(std::weak_ptr<Server>, std::string, std::string, std::string);
+    void handleWhois(std::weak_ptr<Server>, ServerWhois);
 
 public:
-	/**
-	 * Create the server service.
-	 */
-	IRCCD_EXPORT ServerService(Irccd &instance);
+    /**
+     * Create the server service.
+     */
+    IRCCD_EXPORT ServerService(Irccd &instance);
 
-	/**
-	 * \copydoc Service::prepare
-	 */
-	IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
+    /**
+     * \copydoc Service::prepare
+     */
+    IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
 
-	/**
-	 * \copydoc Service::sync
-	 */
-	IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
+    /**
+     * \copydoc Service::sync
+     */
+    IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
 
-	/**
-	 * Get the list of servers
-	 *
-	 * \return the servers
-	 */
-	inline const std::vector<std::shared_ptr<Server>> &servers() const noexcept
-	{
-		return m_servers;
-	}
+    /**
+     * Get the list of servers
+     *
+     * \return the servers
+     */
+    inline const std::vector<std::shared_ptr<Server>> &servers() const noexcept
+    {
+        return m_servers;
+    }
 
-	/**
-	 * Check if a server exists.
-	 *
-	 * \param name the name
-	 * \return true if exists
-	 */
-	IRCCD_EXPORT bool has(const std::string &name) const noexcept;
+    /**
+     * Check if a server exists.
+     *
+     * \param name the name
+     * \return true if exists
+     */
+    IRCCD_EXPORT bool has(const std::string &name) const noexcept;
 
-	/**
-	 * Add a new server to the application.
-	 *
-	 * \pre hasServer must return false
-	 * \param sv the server
-	 */
-	IRCCD_EXPORT void add(std::shared_ptr<Server> sv);
+    /**
+     * Add a new server to the application.
+     *
+     * \pre hasServer must return false
+     * \param sv the server
+     */
+    IRCCD_EXPORT void add(std::shared_ptr<Server> sv);
 
-	/**
-	 * Get a server or empty one if not found
-	 *
-	 * \param name the server name
-	 * \return the server or empty one if not found
-	 */
-	IRCCD_EXPORT std::shared_ptr<Server> get(const std::string &name) const noexcept;
+    /**
+     * Get a server or empty one if not found
+     *
+     * \param name the server name
+     * \return the server or empty one if not found
+     */
+    IRCCD_EXPORT std::shared_ptr<Server> get(const std::string &name) const noexcept;
 
-	/**
-	 * Find a server by name.
-	 *
-	 * \param name the server name
-	 * \return the server
-	 * \throw std::out_of_range if the server does not exist
-	 */
-	IRCCD_EXPORT std::shared_ptr<Server> require(const std::string &name) const;
+    /**
+     * Find a server by name.
+     *
+     * \param name the server name
+     * \return the server
+     * \throw std::out_of_range if the server does not exist
+     */
+    IRCCD_EXPORT std::shared_ptr<Server> require(const std::string &name) const;
 
-	/**
-	 * Remove a server from the irccd instance.
-	 *
-	 * The server if any, will be disconnected.
-	 *
-	 * \param name the server name
-	 */
-	IRCCD_EXPORT void remove(const std::string &name);
+    /**
+     * Remove a server from the irccd instance.
+     *
+     * The server if any, will be disconnected.
+     *
+     * \param name the server name
+     */
+    IRCCD_EXPORT void remove(const std::string &name);
 
-	/**
-	 * Remove all servers.
-	 *
-	 * All servers will be disconnected.
-	 */
-	IRCCD_EXPORT void clear() noexcept;
+    /**
+     * Remove all servers.
+     *
+     * All servers will be disconnected.
+     */
+    IRCCD_EXPORT void clear() noexcept;
 };
 
 } // !irccd
--- a/lib/irccd/service-transport.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-transport.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -29,148 +29,148 @@
 
 void TransportService::handleCommand(std::weak_ptr<TransportClient> ptr, const json::Value &object)
 {
-	assert(object.isObject());
+    assert(object.isObject());
 
-	m_irccd.post([=] (Irccd &) {
-		// 0. Be sure the object still exists.
-		auto tc = ptr.lock();
+    m_irccd.post([=] (Irccd &) {
+        // 0. Be sure the object still exists.
+        auto tc = ptr.lock();
 
-		if (!tc)
-			return;
+        if (!tc)
+            return;
 
-		// 1. Check if the Json object is valid.
-		auto name = object.find("command");
-		if (name == object.end() || name->typeOf() != json::Type::String) {
-			// TODO: send error.
-			log::warning("invalid command object");
-			return;
-		}
+        // 1. Check if the Json object is valid.
+        auto name = object.find("command");
+        if (name == object.end() || name->typeOf() != json::Type::String) {
+            // TODO: send error.
+            log::warning("invalid command object");
+            return;
+        }
 
-		// 2. Search for a command
-		auto cmd = m_irccd.commandService().find(name->toString());
+        // 2. Search for a command
+        auto cmd = m_irccd.commandService().find(name->toString());
 
-		if (!cmd) {
-			// TODO: send error again.
-			log::warning("command does not exists");
-			return;
-		}
+        if (!cmd) {
+            // TODO: send error again.
+            log::warning("command does not exists");
+            return;
+        }
 
-		// 3. Try to execute it.
-		json::Value response = json::object({});
+        // 3. Try to execute it.
+        json::Value response = json::object({});
 
-		try {
-			response = cmd->exec(m_irccd, object);
+        try {
+            response = cmd->exec(m_irccd, object);
 
-			// Adjust if command has returned something else.
-			if (!response.isObject())
-				response = json::object({});
+            // Adjust if command has returned something else.
+            if (!response.isObject())
+                response = json::object({});
 
-			response.insert("status", true);
-		} catch (const std::exception &ex) {
-			response.insert("status", false);
-			response.insert("error", ex.what());
-		}
+            response.insert("status", true);
+        } catch (const std::exception &ex) {
+            response.insert("status", false);
+            response.insert("error", ex.what());
+        }
 
-		// 4. Store the command name result.
-		response.insert("response", name->toString());
+        // 4. Store the command name result.
+        response.insert("response", name->toString());
 
-		// 5. Send the result.
-		tc->send(response.toJson(0));
-	});
+        // 5. Send the result.
+        tc->send(response.toJson(0));
+    });
 }
 
 void TransportService::handleDie(std::weak_ptr<TransportClient> ptr)
 {
-	m_irccd.post([=] (Irccd &) {
-		log::info("transport: client disconnected");
+    m_irccd.post([=] (Irccd &) {
+        log::info("transport: client disconnected");
 
-		auto tc = ptr.lock();
+        auto tc = ptr.lock();
 
-		if (tc)
-			m_clients.erase(std::find(m_clients.begin(), m_clients.end(), tc));
-	});
+        if (tc)
+            m_clients.erase(std::find(m_clients.begin(), m_clients.end(), tc));
+    });
 }
 
 TransportService::TransportService(Irccd &irccd) noexcept
-	: m_irccd(irccd)
+    : m_irccd(irccd)
 {
 }
 
 void TransportService::prepare(fd_set &in, fd_set &out, net::Handle &max)
 {
-	// Add transport servers.
-	for (const auto &transport : m_servers) {
-		FD_SET(transport->handle(), &in);
+    // Add transport servers.
+    for (const auto &transport : m_servers) {
+        FD_SET(transport->handle(), &in);
 
-		if (transport->handle() > max)
-			max = transport->handle();
-	}
+        if (transport->handle() > max)
+            max = transport->handle();
+    }
 
-	// Transport clients.
-	for (const auto &client : m_clients) {
-		FD_SET(client->handle(), &in);
+    // Transport clients.
+    for (const auto &client : m_clients) {
+        FD_SET(client->handle(), &in);
 
-		if (client->hasOutput())
-			FD_SET(client->handle(), &out);
-		if (client->handle() > max)
-			max = client->handle();
-	}
+        if (client->hasOutput())
+            FD_SET(client->handle(), &out);
+        if (client->handle() > max)
+            max = client->handle();
+    }
 }
 
 void TransportService::sync(fd_set &in, fd_set &out)
 {
-	using namespace std::placeholders;
+    using namespace std::placeholders;
 
-	// Transport servers.
-	for (const auto &transport : m_servers) {
-		if (!FD_ISSET(transport->handle(), &in))
-			continue;
+    // Transport servers.
+    for (const auto &transport : m_servers) {
+        if (!FD_ISSET(transport->handle(), &in))
+            continue;
 
-		log::debug("transport: new client connected");
+        log::debug("transport: new client connected");
 
-		std::shared_ptr<TransportClient> client = transport->accept();
-		std::weak_ptr<TransportClient> ptr(client);
+        std::shared_ptr<TransportClient> client = transport->accept();
+        std::weak_ptr<TransportClient> ptr(client);
 
-		// Send some information.
-		json::Value object = json::object({
-			{ "program",	"irccd"			},
-			{ "major",	IRCCD_VERSION_MAJOR	},
-			{ "minor",	IRCCD_VERSION_MINOR	},
-			{ "patch",	IRCCD_VERSION_PATCH	}
-		});
+        // Send some information.
+        json::Value object = json::object({
+            { "program",    "irccd"                 },
+            { "major",      IRCCD_VERSION_MAJOR     },
+            { "minor",      IRCCD_VERSION_MINOR     },
+            { "patch",      IRCCD_VERSION_PATCH     }
+        });
 
 #if defined(WITH_JS)
-		object.insert("javascript", true);
+        object.insert("javascript", true);
 #endif
 #if defined(WITH_SSL)
-		object.insert("ssl", true);
+        object.insert("ssl", true);
 #endif
 
-		client->send(object.toJson(0));
+        client->send(object.toJson(0));
 
-		// Connect signals.
-		client->onCommand.connect(std::bind(&TransportService::handleCommand, this, ptr, _1));
-		client->onDie.connect(std::bind(&TransportService::handleDie, this, ptr));
+        // Connect signals.
+        client->onCommand.connect(std::bind(&TransportService::handleCommand, this, ptr, _1));
+        client->onDie.connect(std::bind(&TransportService::handleDie, this, ptr));
 
-		// Register it.
-		m_clients.push_back(std::move(client));
-	}
+        // Register it.
+        m_clients.push_back(std::move(client));
+    }
 
-	// Transport clients.
-	for (const auto &client : m_clients)
-		client->sync(in, out);
+    // Transport clients.
+    for (const auto &client : m_clients)
+        client->sync(in, out);
 }
 
 void TransportService::add(std::shared_ptr<TransportServer> ts)
 {
-	m_servers.push_back(std::move(ts));
+    m_servers.push_back(std::move(ts));
 }
 
 void TransportService::broadcast(std::string data)
 {
-	// Asynchronous send.
-	for (const auto &client : m_clients)
-		client->send(data);
+    // Asynchronous send.
+    for (const auto &client : m_clients)
+        client->send(data);
 }
 
 } // !irccd
--- a/lib/irccd/service-transport.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service-transport.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -43,45 +43,45 @@
  */
 class TransportService : public Service {
 private:
-	Irccd &m_irccd;
+    Irccd &m_irccd;
 
-	std::vector<std::shared_ptr<TransportServer>> m_servers;
-	std::vector<std::shared_ptr<TransportClient>> m_clients;
+    std::vector<std::shared_ptr<TransportServer>> m_servers;
+    std::vector<std::shared_ptr<TransportClient>> m_clients;
 
-	void handleCommand(std::weak_ptr<TransportClient>, const json::Value &);
-	void handleDie(std::weak_ptr<TransportClient>);
+    void handleCommand(std::weak_ptr<TransportClient>, const json::Value &);
+    void handleDie(std::weak_ptr<TransportClient>);
 
 public:
-	/**
-	 * Create the transport service.
-	 *
-	 * \param irccd the irccd instance
-	 */
-	IRCCD_EXPORT TransportService(Irccd &irccd) noexcept;
+    /**
+     * Create the transport service.
+     *
+     * \param irccd the irccd instance
+     */
+    IRCCD_EXPORT TransportService(Irccd &irccd) noexcept;
 
-	/**
-	 * \copydoc Service::prepare
-	 */
-	IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
+    /**
+     * \copydoc Service::prepare
+     */
+    IRCCD_EXPORT void prepare(fd_set &in, fd_set &out, net::Handle &max) override;
 
-	/**
-	 * \copydoc Service::sync
-	 */
-	IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
+    /**
+     * \copydoc Service::sync
+     */
+    IRCCD_EXPORT void sync(fd_set &in, fd_set &out) override;
 
-	/**
-	 * Add a transport server.
-	 *
-	 * \param ts the transport server
-	 */
-	IRCCD_EXPORT void add(std::shared_ptr<TransportServer> ts);
+    /**
+     * Add a transport server.
+     *
+     * \param ts the transport server
+     */
+    IRCCD_EXPORT void add(std::shared_ptr<TransportServer> ts);
 
-	/**
-	 * Send data to all clients.
-	 *
-	 * \param data the data
-	 */
-	IRCCD_EXPORT void broadcast(std::string data);
+    /**
+     * Send data to all clients.
+     *
+     * \param data the data
+     */
+    IRCCD_EXPORT void broadcast(std::string data);
 };
 
 } // !irccd
--- a/lib/irccd/service.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/service.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -46,38 +46,38 @@
  */
 class Service {
 public:
-	/**
-	 * Default constructor.
-	 */
-	Service() noexcept = default;
+    /**
+     * Default constructor.
+     */
+    Service() noexcept = default;
 
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~Service() noexcept = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~Service() noexcept = default;
 
-	/**
-	 * Prepare the input and output set.
-	 *
-	 * \param in the input set
-	 * \param out the output set
-	 * \param max the handle to update
-	 */
-	virtual void prepare(fd_set &in, fd_set &out, net::Handle &max)
-	{
-		util::unused(in, out, max);
-	}
+    /**
+     * Prepare the input and output set.
+     *
+     * \param in the input set
+     * \param out the output set
+     * \param max the handle to update
+     */
+    virtual void prepare(fd_set &in, fd_set &out, net::Handle &max)
+    {
+        util::unused(in, out, max);
+    }
 
-	/**
-	 * Synchronize with result sets.
-	 *
-	 * \param in the input set
-	 * \param out the output set
-	 */
-	virtual void sync(fd_set &in, fd_set &out)
-	{
-		util::unused(in, out);
-	}
+    /**
+     * Synchronize with result sets.
+     *
+     * \param in the input set
+     * \param out the output set
+     */
+    virtual void sync(fd_set &in, fd_set &out)
+    {
+        util::unused(in, out);
+    }
 };
 
 } // !irccd
--- a/lib/irccd/signals.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/signals.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -40,28 +40,28 @@
  */
 class SignalConnection {
 private:
-	unsigned m_id;
+    unsigned m_id;
 
 public:
-	/**
-	 * Create a signal connection.
-	 *
-	 * \param id the id
-	 */
-	inline SignalConnection(unsigned id) noexcept
-		: m_id(id)
-	{
-	}
+    /**
+     * Create a signal connection.
+     *
+     * \param id the id
+     */
+    inline SignalConnection(unsigned id) noexcept
+        : m_id(id)
+    {
+    }
 
-	/**
-	 * Get the reference object.
-	 *
-	 * \return the id
-	 */
-	inline unsigned id() const noexcept
-	{
-		return m_id;
-	}
+    /**
+     * Get the reference object.
+     *
+     * \return the id
+     */
+    inline unsigned id() const noexcept
+    {
+        return m_id;
+    }
 };
 
 /**
@@ -81,90 +81,90 @@
 template <typename... Args>
 class Signal {
 private:
-	using Function = std::function<void (Args...)>;
-	using FunctionMap = std::unordered_map<unsigned, Function>;
-	using Stack = std::stack<unsigned>;
+    using Function = std::function<void (Args...)>;
+    using FunctionMap = std::unordered_map<unsigned, Function>;
+    using Stack = std::stack<unsigned>;
 
-	FunctionMap m_functions;
-	Stack m_stack;
-	unsigned m_max{0};
+    FunctionMap m_functions;
+    Stack m_stack;
+    unsigned m_max{0};
 
 public:
-	/**
-	 * Register a new function to the signal.
-	 *
-	 * \param function the function
-	 * \return the connection in case you want to remove it
-	 */
-	inline SignalConnection connect(Function function) noexcept
-	{
-		unsigned id;
+    /**
+     * Register a new function to the signal.
+     *
+     * \param function the function
+     * \return the connection in case you want to remove it
+     */
+    inline SignalConnection connect(Function function) noexcept
+    {
+        unsigned id;
 
-		if (!m_stack.empty()) {
-			id = m_stack.top();
-			m_stack.pop();
-		} else
-			id = m_max ++;
+        if (!m_stack.empty()) {
+            id = m_stack.top();
+            m_stack.pop();
+        } else
+            id = m_max ++;
 
-		m_functions.emplace(id, std::move(function));
+        m_functions.emplace(id, std::move(function));
 
-		return SignalConnection{id};
-	}
+        return SignalConnection{id};
+    }
 
-	/**
-	 * Disconnect a connection.
-	 *
-	 * \param connection the connection
-	 * \warning Be sure that the connection belongs to that signal
-	 */
-	inline void disconnect(const SignalConnection &connection) noexcept
-	{
-		auto value = m_functions.find(connection.id());
+    /**
+     * Disconnect a connection.
+     *
+     * \param connection the connection
+     * \warning Be sure that the connection belongs to that signal
+     */
+    inline void disconnect(const SignalConnection &connection) noexcept
+    {
+        auto value = m_functions.find(connection.id());
 
-		if (value != m_functions.end()) {
-			m_functions.erase(connection.id());
-			m_stack.push(connection.id());
-		}
-	}
+        if (value != m_functions.end()) {
+            m_functions.erase(connection.id());
+            m_stack.push(connection.id());
+        }
+    }
 
-	/**
-	 * Remove all registered functions.
-	 */
-	inline void clear()
-	{
-		m_functions.clear();
-		m_max = 0;
+    /**
+     * Remove all registered functions.
+     */
+    inline void clear()
+    {
+        m_functions.clear();
+        m_max = 0;
 
-		while (!m_stack.empty())
-			m_stack.pop();
-	}
+        while (!m_stack.empty())
+            m_stack.pop();
+    }
 
-	/**
-	 * Call every functions.
-	 *
-	 * \param args the arguments to pass to the signal
-	 */
-	void operator()(Args... args) const
-	{
-		/*
-		 * Make a copy of the ids before iterating because the callbacks may eventually remove or modify the list.
-		 */
-		std::vector<unsigned> ids;
+    /**
+     * Call every functions.
+     *
+     * \param args the arguments to pass to the signal
+     */
+    void operator()(Args... args) const
+    {
+        /*
+         * Make a copy of the ids before iterating because the callbacks may eventually remove or modify the list.
+         */
+        std::vector<unsigned> ids;
 
-		for (auto &pair : m_functions)
-			ids.push_back(pair.first);
+        for (auto &pair : m_functions)
+            ids.push_back(pair.first);
 
-		/*
-		 * Now iterate while checking if the next id is still available, however if any new signals were added while iterating, they
-		 * will not be called immediately.
-		 */
-		for (unsigned i : ids) {
-			auto it = m_functions.find(i);
+        /*
+         * Now iterate while checking if the next id is still available, however if any new signals were added while iterating, they
+         * will not be called immediately.
+         */
+        for (unsigned i : ids) {
+            auto it = m_functions.find(i);
 
-			if (it != m_functions.end())
-				it->second(args...);
-		}
-	}
+            if (it != m_functions.end())
+                it->second(args...);
+        }
+    }
 };
 
 } // !irccd
--- a/lib/irccd/system.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/system.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -98,26 +98,26 @@
 template <typename IntType, typename LookupFunc, typename SetterFunc, typename FieldGetter>
 void setHelper(const std::string &typeName, const std::string &value, LookupFunc lookup, SetterFunc setter, FieldGetter getter)
 {
-	IntType id;
+    IntType id;
 
-	if (util::isNumber(value))
-		id = std::stoi(value);
-	else {
-		auto info = lookup(value.c_str());
+    if (util::isNumber(value))
+        id = std::stoi(value);
+    else {
+        auto info = lookup(value.c_str());
 
-		if (info == nullptr) {
-			log::warning() << "irccd: invalid " << typeName << ": " << std::strerror(errno) << std::endl;
-			return;
-		} else {
-			id = getter(info);
-			log::debug() << "irccd: " << typeName << " " << value << " resolved to: " << id << std::endl;
-		}
-	}
+        if (info == nullptr) {
+            log::warning() << "irccd: invalid " << typeName << ": " << std::strerror(errno) << std::endl;
+            return;
+        } else {
+            id = getter(info);
+            log::debug() << "irccd: " << typeName << " " << value << " resolved to: " << id << std::endl;
+        }
+    }
 
-	if (setter(id) < 0)
-		log::warning() << "irccd: could not set " << typeName << ": " << std::strerror(errno) << std::endl;
-	else
-		log::info() << "irccd: setting " << typeName << " to " << value << std::endl;
+    if (setter(id) < 0)
+        log::warning() << "irccd: could not set " << typeName << ": " << std::strerror(errno) << std::endl;
+    else
+        log::info() << "irccd: setting " << typeName << " to " << value << std::endl;
 }
 
 /*
@@ -131,135 +131,135 @@
 
 void setProgramName(std::string name) noexcept
 {
-	programNameCopy = std::move(name);
+    programNameCopy = std::move(name);
 
 #if defined(HAVE_SETPROGNAME)
-	setprogname(programNameCopy.c_str());
+    setprogname(programNameCopy.c_str());
 #endif
 }
 
 const std::string &programName() noexcept
 {
-	return programNameCopy;
+    return programNameCopy;
 }
 
 std::string name()
 {
 #if defined(IRCCD_SYSTEM_LINUX)
-	return "Linux";
+    return "Linux";
 #elif defined(IRCCD_SYSTEM_WINDOWS)
-	return "Windows";
+    return "Windows";
 #elif defined(IRCCD_SYSTEM_FREEBSD)
-	return "FreeBSD";
+    return "FreeBSD";
 #elif defined(IRCCD_SYSTEM_OPENBSD)
-	return "OpenBSD";
+    return "OpenBSD";
 #elif defined(IRCCD_SYSTEM_NETBSD)
-	return "NetBSD";
+    return "NetBSD";
 #elif defined(IRCCD_SYSTEM_MAC)
-	return "Mac";
+    return "Mac";
 #else
-	return "Unknown";
+    return "Unknown";
 #endif
 }
 
 std::string version()
 {
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	auto version = GetVersion();
-	auto major = (DWORD)(LOBYTE(LOWORD(version)));
-	auto minor = (DWORD)(HIBYTE(LOWORD(version)));
+    auto version = GetVersion();
+    auto major = (DWORD)(LOBYTE(LOWORD(version)));
+    auto minor = (DWORD)(HIBYTE(LOWORD(version)));
 
-	return std::to_string(major) + "." + std::to_string(minor);
+    return std::to_string(major) + "." + std::to_string(minor);
 #else
-	struct utsname uts;
+    struct utsname uts;
 
-	if (uname(&uts) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (uname(&uts) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	return std::string(uts.release);
+    return std::string(uts.release);
 #endif
 }
 
 uint64_t uptime()
 {
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	return ::GetTickCount64() / 1000;
+    return ::GetTickCount64() / 1000;
 #elif defined(IRCCD_SYSTEM_LINUX)
-	struct sysinfo info;
+    struct sysinfo info;
 
-	if (sysinfo(&info) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (sysinfo(&info) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	return info.uptime;
+    return info.uptime;
 #elif defined(IRCCD_SYSTEM_MAC)
-	struct timeval boottime;
-	size_t length = sizeof (boottime);
-	int mib[2] = { CTL_KERN, KERN_BOOTTIME };
+    struct timeval boottime;
+    size_t length = sizeof (boottime);
+    int mib[2] = { CTL_KERN, KERN_BOOTTIME };
 
-	if (sysctl(mib, 2, &boottime, &length, nullptr, 0) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (sysctl(mib, 2, &boottime, &length, nullptr, 0) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	time_t bsec = boottime.tv_sec, csec = time(nullptr);
+    time_t bsec = boottime.tv_sec, csec = time(nullptr);
 
-	return difftime(csec, bsec);
+    return difftime(csec, bsec);
 #else
-	struct timespec ts;
+    struct timespec ts;
 
-	if (clock_gettime(CLOCK_UPTIME, &ts) < 0)
-		throw std::runtime_error(std::strerror(errno));
+    if (clock_gettime(CLOCK_UPTIME, &ts) < 0)
+        throw std::runtime_error(std::strerror(errno));
 
-	return ts.tv_sec;
+    return ts.tv_sec;
 #endif
 }
 
 uint64_t ticks()
 {
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	_timeb tp;
+    _timeb tp;
 
-	_ftime(&tp);
+    _ftime(&tp);
 
-	return tp.time * 1000LL + tp.millitm;
+    return tp.time * 1000LL + tp.millitm;
 #else
-	struct timeval tp;
+    struct timeval tp;
 
-	gettimeofday(&tp, NULL);
+    gettimeofday(&tp, NULL);
 
-	return tp.tv_sec * 1000LL + tp.tv_usec / 1000;
+    return tp.tv_sec * 1000LL + tp.tv_usec / 1000;
 #endif
 }
 
 std::string home()
 {
 #if defined(IRCCD_SYSTEM_WINDOWS)
-	char path[MAX_PATH];
+    char path[MAX_PATH];
 
-	if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
-		return "";
+    if (SHGetFolderPathA(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, path) != S_OK)
+        return "";
 
-	return std::string(path);
+    return std::string(path);
 #else
-	return env("HOME");
+    return env("HOME");
 #endif
 }
 
 std::string env(const std::string &var)
 {
-	auto value = std::getenv(var.c_str());
+    auto value = std::getenv(var.c_str());
 
-	if (value == nullptr)
-		return "";
+    if (value == nullptr)
+        return "";
 
-	return value;
+    return value;
 }
 
 #if defined(HAVE_SETUID)
 
 void setUid(const std::string &value)
 {
-	setHelper<uid_t>("uid", value, &getpwnam, &setuid, [] (const struct passwd *pw) {
-		return pw->pw_uid;
-	});
+    setHelper<uid_t>("uid", value, &getpwnam, &setuid, [] (const struct passwd *pw) {
+        return pw->pw_uid;
+    });
 }
 
 #endif
@@ -268,9 +268,9 @@
 
 void setGid(const std::string &value)
 {
-	setHelper<gid_t>("gid", value, &getgrnam, &setgid, [] (const struct group *gr) {
-		return gr->gr_gid;
-	});
+    setHelper<gid_t>("gid", value, &getgrnam, &setgid, [] (const struct group *gr) {
+        return gr->gr_gid;
+    });
 }
 
 #endif
--- a/lib/irccd/timer.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/timer.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -25,65 +25,65 @@
 
 void Timer::run()
 {
-	while (m_state != Stopped) {
-		std::unique_lock<std::mutex> lock(m_mutex);
+    while (m_state != Stopped) {
+        std::unique_lock<std::mutex> lock(m_mutex);
 
-		// Wait in case the timer is paused.
-		m_condition.wait(lock, [&] () {
-			return m_state != Paused;
-		});
+        // Wait in case the timer is paused.
+        m_condition.wait(lock, [&] () {
+            return m_state != Paused;
+        });
 
-		if (m_state != Running)
-			continue;
+        if (m_state != Running)
+            continue;
 
-		// Wait the timer delay or the interrupt.
-		m_condition.wait_for(lock, std::chrono::milliseconds(m_delay), [&] () {
-			return m_state != Running;
-		});
+        // Wait the timer delay or the interrupt.
+        m_condition.wait_for(lock, std::chrono::milliseconds(m_delay), [&] () {
+            return m_state != Running;
+        });
 
-		if (m_state == Running) {
-			// Signal process.
-			onSignal();
+        if (m_state == Running) {
+            // Signal process.
+            onSignal();
 
-			if (m_type == TimerType::Single)
-				m_state = Stopped;
-		}
-	}
+            if (m_type == TimerType::Single)
+                m_state = Stopped;
+        }
+    }
 
-	onEnd();
+    onEnd();
 }
 
 Timer::Timer(TimerType type, unsigned delay) noexcept
-	: m_type(type)
-	, m_delay(delay)
-	, m_thread(std::bind(&Timer::run, this))
+    : m_type(type)
+    , m_delay(delay)
+    , m_thread(std::bind(&Timer::run, this))
 {
 }
 
 Timer::~Timer()
 {
-	assert(m_state != Running);
+    assert(m_state != Running);
 
-	try {
-		m_state = Stopped;
-		m_condition.notify_one();
-		m_thread.join();
-	} catch (...) {
-	}
+    try {
+        m_state = Stopped;
+        m_condition.notify_one();
+        m_thread.join();
+    } catch (...) {
+    }
 }
 
 void Timer::start()
 {
-	assert(m_state != Running);
+    assert(m_state != Running);
 
-	m_state = Running;
-	m_condition.notify_one();
+    m_state = Running;
+    m_condition.notify_one();
 }
 
 void Timer::stop()
 {
-	m_state = Paused;
-	m_condition.notify_one();
+    m_state = Paused;
+    m_condition.notify_one();
 }
 
 } // !irccd
--- a/lib/irccd/timer.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/timer.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -40,8 +40,8 @@
  * \brief Type of timer
  */
 enum class TimerType {
-	Single,			//!< The timer ends after execution
-	Repeat			//!< The timer loops
+    Single,             //!< The timer ends after execution
+    Repeat              //!< The timer loops
 };
 
 /**
@@ -59,96 +59,96 @@
  */
 class Timer {
 public:
-	/**
-	 * Signal: onSignal
-	 * ----------------------------------------------------------
-	 *
-	 * Called when the timeout expires.
-	 */
-	Signal<> onSignal;
+    /**
+     * Signal: onSignal
+     * ----------------------------------------------------------
+     *
+     * Called when the timeout expires.
+     */
+    Signal<> onSignal;
 
-	/**
-	 * Signal: onEnd
-	 * ----------------------------------------------------------
-	 *
-	 * Called when the timeout ends.
-	 */
-	Signal<> onEnd;
+    /**
+     * Signal: onEnd
+     * ----------------------------------------------------------
+     *
+     * Called when the timeout ends.
+     */
+    Signal<> onEnd;
 
 private:
-	enum {
-		Paused,
-		Running,
-		Stopped
-	};
+    enum {
+        Paused,
+        Running,
+        Stopped
+    };
 
-	TimerType m_type;
-	unsigned m_delay;
+    TimerType m_type;
+    unsigned m_delay;
 
-	// Thread management.
-	std::atomic<int> m_state{Paused};
-	std::mutex m_mutex;
-	std::condition_variable m_condition;
-	std::thread m_thread;
+    // Thread management.
+    std::atomic<int> m_state{Paused};
+    std::mutex m_mutex;
+    std::condition_variable m_condition;
+    std::thread m_thread;
 
-	void run();
+    void run();
 
 public:
-	/**
-	 * Timer constructor.
-	 *
-	 * The timer is not started, use start().
-	 *
-	 * \param type the timer type
-	 * \param delay the delay in milliseconds
-	 * \post isRunning() returns false
-	 */
-	IRCCD_EXPORT Timer(TimerType type, unsigned delay) noexcept;
+    /**
+     * Timer constructor.
+     *
+     * The timer is not started, use start().
+     *
+     * \param type the timer type
+     * \param delay the delay in milliseconds
+     * \post isRunning() returns false
+     */
+    IRCCD_EXPORT Timer(TimerType type, unsigned delay) noexcept;
 
-	/**
-	 * Destructor, closes the thread.
-	 *
-	 * \pre stop() must have been called.
-	 */
-	IRCCD_EXPORT virtual ~Timer();
+    /**
+     * Destructor, closes the thread.
+     *
+     * \pre stop() must have been called.
+     */
+    IRCCD_EXPORT virtual ~Timer();
 
-	/**
-	 * Start the thread.
-	 *
-	 * \pre isRunning() must return false
-	 * \pre onSignal() must have been called
-	 * \pre onEnd() must have been called
-	 * \note Thread-safe
-	 */
-	IRCCD_EXPORT void start();
+    /**
+     * Start the thread.
+     *
+     * \pre isRunning() must return false
+     * \pre onSignal() must have been called
+     * \pre onEnd() must have been called
+     * \note Thread-safe
+     */
+    IRCCD_EXPORT void start();
 
-	/**
-	 * Stop the timer, may be used by the user to stop it.
-	 *
-	 * \note Thread-safe
-	 */
-	IRCCD_EXPORT void stop();
+    /**
+     * Stop the timer, may be used by the user to stop it.
+     *
+     * \note Thread-safe
+     */
+    IRCCD_EXPORT void stop();
 
-	/**
-	 * Get the type of timer.
-	 *
-	 * \return the type.
-	 */
-	inline TimerType type() const noexcept
-	{
-		return m_type;
-	}
+    /**
+     * Get the type of timer.
+     *
+     * \return the type.
+     */
+    inline TimerType type() const noexcept
+    {
+        return m_type;
+    }
 
-	/**
-	 * Tells if the timer has still a running thread.
-	 *
-	 * \return true if still alive
-	 * \note Thread-safe
-	 */
-	inline bool isRunning() const noexcept
-	{
-		return m_state == Running;
-	}
+    /**
+     * Tells if the timer has still a running thread.
+     *
+     * \return true if still alive
+     * \note Thread-safe
+     */
+    inline bool isRunning() const noexcept
+    {
+        return m_state == Running;
+    }
 };
 
 } // !irccd
--- a/lib/irccd/transport-client.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/transport-client.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -24,30 +24,30 @@
 
 void TransportClient::parse(const std::string &message)
 {
-	json::Value document = json::fromString(message);
+    json::Value document = json::fromString(message);
 
-	if (!document.isObject())
-		throw std::invalid_argument("the message is not a valid JSON object");
+    if (!document.isObject())
+        throw std::invalid_argument("the message is not a valid JSON object");
 
-	onCommand(document);
+    onCommand(document);
 }
 
 void TransportClient::sync(fd_set &setinput, fd_set &setoutput)
 {
-	if (FD_ISSET(handle(), &setinput)) {
-		log::debug() << "transport: receiving to input buffer" << std::endl;
-		receive();
-	}
-	if (FD_ISSET(handle(), &setoutput)) {
-		log::debug() << "transport: sending outgoing buffer" << std::endl;
-		send();
-	}
+    if (FD_ISSET(handle(), &setinput)) {
+        log::debug() << "transport: receiving to input buffer" << std::endl;
+        receive();
+    }
+    if (FD_ISSET(handle(), &setoutput)) {
+        log::debug() << "transport: sending outgoing buffer" << std::endl;
+        send();
+    }
 }
 
 void TransportClient::send(std::string message)
 {
-	m_output += message;
-	m_output += "\r\n\r\n";
+    m_output += message;
+    m_output += "\r\n\r\n";
 }
 
 } // !irccd
--- a/lib/irccd/transport-client.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/transport-client.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -50,84 +50,84 @@
  */
 class TransportClient {
 public:
-	/**
-	 * Signal: onCommand
-	 * ----------------------------------------------------------
-	 *
-	 * Arguments:
-	 *   - the command
-	 */
-	Signal<const json::Value &> onCommand;
+    /**
+     * Signal: onCommand
+     * ----------------------------------------------------------
+     *
+     * Arguments:
+     *   - the command
+     */
+    Signal<const json::Value &> onCommand;
 
-	/**
-	 * Signal: onDie
-	 * ----------------------------------------------------------
-	 *
-	 * The client has disconnected.
-	 */
-	Signal<> onDie;
+    /**
+     * Signal: onDie
+     * ----------------------------------------------------------
+     *
+     * The client has disconnected.
+     */
+    Signal<> onDie;
 
 protected:
-	std::string m_input;	//!< input buffer
-	std::string m_output;	//!< output buffer
+    std::string m_input;    //!< input buffer
+    std::string m_output;    //!< output buffer
 
-	/**
-	 * Parse input buffer.
-	 *
-	 * \param buffer the buffer.
-	 */
-	void parse(const std::string &buffer);
+    /**
+     * Parse input buffer.
+     *
+     * \param buffer the buffer.
+     */
+    void parse(const std::string &buffer);
 
-	/**
-	 * Start receiving data.
-	 */
-	virtual void receive() = 0;
+    /**
+     * Start receiving data.
+     */
+    virtual void receive() = 0;
 
-	/**
-	 * Start sending data.
-	 */
-	virtual void send() = 0;
+    /**
+     * Start sending data.
+     */
+    virtual void send() = 0;
 
 public:
-	/**
-	 * Virtual destructor defaulted.
-	 */
-	virtual ~TransportClient() = default;
+    /**
+     * Virtual destructor defaulted.
+     */
+    virtual ~TransportClient() = default;
 
-	/**
-	 * Send or receive data, called after a select.
-	 *
-	 * \param setinput the input fd_set
-	 * \param setoutput the output fd_set
-	 */
-	IRCCD_EXPORT void sync(fd_set &setinput, fd_set &setoutput);
+    /**
+     * Send or receive data, called after a select.
+     *
+     * \param setinput the input fd_set
+     * \param setoutput the output fd_set
+     */
+    IRCCD_EXPORT void sync(fd_set &setinput, fd_set &setoutput);
 
-	/**
-	 * Send some data, it will be pushed to the outgoing buffer.
-	 *
-	 * This function appends "\r\n\r\n" after the message so you don't have
-	 * to do it manually.
-	 *
-	 * \param message the message
-	 */
-	IRCCD_EXPORT void send(std::string message);
+    /**
+     * Send some data, it will be pushed to the outgoing buffer.
+     *
+     * This function appends "\r\n\r\n" after the message so you don't have
+     * to do it manually.
+     *
+     * \param message the message
+     */
+    IRCCD_EXPORT void send(std::string message);
 
-	/**
-	 * Tell if the client has data pending for output.
-	 *
-	 * \return true if has pending data to write
-	 */
-	inline bool hasOutput() const noexcept
-	{
-		return !m_output.empty();
-	}
+    /**
+     * Tell if the client has data pending for output.
+     *
+     * \return true if has pending data to write
+     */
+    inline bool hasOutput() const noexcept
+    {
+        return !m_output.empty();
+    }
 
-	/**
-	 * Get the underlying socket handle.
-	 *
-	 * \return the socket
-	 */
-	virtual net::Handle handle() noexcept = 0;
+    /**
+     * Get the underlying socket handle.
+     *
+     * \return the socket
+     */
+    virtual net::Handle handle() noexcept = 0;
 };
 
 /**
@@ -136,64 +136,64 @@
 template <typename Address>
 class TransportClientBase : public TransportClient {
 private:
-	net::SocketTcp<Address> m_socket;
+    net::SocketTcp<Address> m_socket;
 
 protected:
-	void send() override;
-	void receive() override;
+    void send() override;
+    void receive() override;
 
 public:
-	/**
-	 * Create a client.
-	 *
-	 * \param socket the socket
-	 */
-	inline TransportClientBase(net::SocketTcp<Address> socket)
-		: m_socket(std::move(socket))
-	{
-	}
+    /**
+     * Create a client.
+     *
+     * \param socket the socket
+     */
+    inline TransportClientBase(net::SocketTcp<Address> socket)
+        : m_socket(std::move(socket))
+    {
+    }
 
-	/**
-	 * \copydoc TransportClient::handle
-	 */
-	net::Handle handle() noexcept override
-	{
-		return m_socket.handle();
-	}
+    /**
+     * \copydoc TransportClient::handle
+     */
+    net::Handle handle() noexcept override
+    {
+        return m_socket.handle();
+    }
 };
 
 template <typename Address>
 void TransportClientBase<Address>::receive()
 {
-	try {
-		auto message = m_socket.recv(512);
+    try {
+        auto message = m_socket.recv(512);
 
-		if (message.empty())
-			onDie();
+        if (message.empty())
+            onDie();
 
-		m_input += message;
-	} catch (const std::exception &) {
-		onDie();
-	}
+        m_input += message;
+    } catch (const std::exception &) {
+        onDie();
+    }
 
-	std::string::size_type pos;
-	while ((pos = m_input.find("\r\n\r\n")) != std::string::npos) {
-		/*
-		 * Make a copy and erase it in case that onComplete function
-		 * throws.
-		 */
-		auto message = m_input.substr(0, pos);
+    std::string::size_type pos;
+    while ((pos = m_input.find("\r\n\r\n")) != std::string::npos) {
+        /*
+         * Make a copy and erase it in case that onComplete function
+         * throws.
+         */
+        auto message = m_input.substr(0, pos);
 
-		m_input.erase(m_input.begin(), m_input.begin() + pos + 4);
+        m_input.erase(m_input.begin(), m_input.begin() + pos + 4);
 
-		parse(message);
-	}
+        parse(message);
+    }
 }
 
 template <typename Address>
 void TransportClientBase<Address>::send()
 {
-	m_output.erase(0, m_socket.send(m_output));
+    m_output.erase(0, m_socket.send(m_output));
 }
 
 } // !irccd
--- a/lib/irccd/transport-server.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/transport-server.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -35,28 +35,28 @@
  */
 
 TransportServerIp::TransportServerIp(int domain, const std::string &address, int port, bool ipv6only)
-	: m_socket(domain, SOCK_STREAM, 0)
+    : m_socket(domain, SOCK_STREAM, 0)
 {
-	m_socket.set(net::option::SockReuseAddress(true));
+    m_socket.set(net::option::SockReuseAddress(true));
 
-	// Disable or enable IPv4 when using IPv6.
-	if (domain == AF_INET6)
-		m_socket.set(net::option::Ipv6Only(ipv6only));
+    // Disable or enable IPv4 when using IPv6.
+    if (domain == AF_INET6)
+        m_socket.set(net::option::Ipv6Only(ipv6only));
 
-	m_socket.bind(net::address::Ip(address, port, domain));
-	m_socket.listen();
+    m_socket.bind(net::address::Ip(address, port, domain));
+    m_socket.listen();
 
-	log::info() << "transport: listening on " << address << ", port " << port << std::endl;
+    log::info() << "transport: listening on " << address << ", port " << port << std::endl;
 }
 
 net::Handle TransportServerIp::handle() noexcept
 {
-	return m_socket.handle();
+    return m_socket.handle();
 }
 
 std::shared_ptr<TransportClient> TransportServerIp::accept()
 {
-	return std::make_shared<TransportClientBase<net::address::Ip>>(m_socket.accept());
+    return std::make_shared<TransportClientBase<net::address::Ip>>(m_socket.accept());
 }
 
 /*
@@ -67,27 +67,27 @@
 #if !defined(IRCCD_SYSTEM_WINDOWS)
 
 TransportServerUnix::TransportServerUnix(std::string path)
-	: m_path(std::move(path))
+    : m_path(std::move(path))
 {
-	m_socket.bind(net::address::Local{m_path, true});
-	m_socket.listen();
+    m_socket.bind(net::address::Local{m_path, true});
+    m_socket.listen();
 
-	log::info() << "transport: listening on " << m_path << std::endl;
+    log::info() << "transport: listening on " << m_path << std::endl;
 }
 
 TransportServerUnix::~TransportServerUnix()
 {
-	::remove(m_path.c_str());
+    ::remove(m_path.c_str());
 }
 
 net::Handle TransportServerUnix::handle() noexcept
 {
-	return m_socket.handle();
+    return m_socket.handle();
 }
 
 std::shared_ptr<TransportClient> TransportServerUnix::accept()
 {
-	return std::make_shared<TransportClientBase<net::address::Local>>(m_socket.accept());
+    return std::make_shared<TransportClientBase<net::address::Local>>(m_socket.accept());
 }
 
 #endif
--- a/lib/irccd/transport-server.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/transport-server.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -50,36 +50,36 @@
  */
 class TransportServer {
 private:
-	TransportServer(const TransportServer &) = delete;
-	TransportServer(TransportServer &&) = delete;
+    TransportServer(const TransportServer &) = delete;
+    TransportServer(TransportServer &&) = delete;
 
-	TransportServer &operator=(const TransportServer &) = delete;
-	TransportServer &operator=(TransportServer &&) = delete;
+    TransportServer &operator=(const TransportServer &) = delete;
+    TransportServer &operator=(TransportServer &&) = delete;
 
 public:
-	/**
-	 * Default constructor.
-	 */
-	TransportServer() = default;
+    /**
+     * Default constructor.
+     */
+    TransportServer() = default;
 
-	/**
-	 * Destructor defaulted.
-	 */
-	virtual ~TransportServer() = default;
+    /**
+     * Destructor defaulted.
+     */
+    virtual ~TransportServer() = default;
 
-	/**
-	 * Retrieve the underlying socket handle.
-	 *
-	 * \return the socket
-	 */
-	virtual net::Handle handle() noexcept = 0;
+    /**
+     * Retrieve the underlying socket handle.
+     *
+     * \return the socket
+     */
+    virtual net::Handle handle() noexcept = 0;
 
-	/**
-	 * Accept a new client depending on the domain.
-	 *
-	 * \return the new client
-	 */
-	virtual std::shared_ptr<TransportClient> accept() = 0;
+    /**
+     * Accept a new client depending on the domain.
+     *
+     * \return the new client
+     */
+    virtual std::shared_ptr<TransportClient> accept() = 0;
 };
 
 /**
@@ -88,32 +88,32 @@
  */
 class TransportServerIp : public TransportServer {
 protected:
-	/**
-	 * The TCP/IP socket.
-	 */
-	net::SocketTcp<net::address::Ip> m_socket;
+    /**
+     * The TCP/IP socket.
+     */
+    net::SocketTcp<net::address::Ip> m_socket;
 
 public:
-	/**
-	 * Create a IP transport, use IPv6 or IPv4 address.
-	 *
-	 * \param domain AF_INET or AF_INET6
-	 * \param address the address or "*" for any
-	 * \param port the port number
-	 * \param ipv6only set to true to disable IPv4
-	 * \throw net::Error on failures
-	 */
-	IRCCD_EXPORT TransportServerIp(int domain, const std::string &address, int port, bool ipv6only = true);
+    /**
+     * Create a IP transport, use IPv6 or IPv4 address.
+     *
+     * \param domain AF_INET or AF_INET6
+     * \param address the address or "*" for any
+     * \param port the port number
+     * \param ipv6only set to true to disable IPv4
+     * \throw net::Error on failures
+     */
+    IRCCD_EXPORT TransportServerIp(int domain, const std::string &address, int port, bool ipv6only = true);
 
-	/**
-	 * \copydoc TransportServer::handle
-	 */
-	IRCCD_EXPORT net::Handle handle() noexcept override;
+    /**
+     * \copydoc TransportServer::handle
+     */
+    IRCCD_EXPORT net::Handle handle() noexcept override;
 
-	/**
-	 * \copydoc TransportServer::accept
-	 */
-	IRCCD_EXPORT std::shared_ptr<TransportClient> accept() override;
+    /**
+     * \copydoc TransportServer::accept
+     */
+    IRCCD_EXPORT std::shared_ptr<TransportClient> accept() override;
 };
 
 #if !defined(IRCCD_SYSTEM_WINDOWS)
@@ -124,31 +124,31 @@
  */
 class TransportServerUnix : public TransportServer {
 private:
-	net::SocketTcp<net::address::Local> m_socket;
-	std::string m_path;
+    net::SocketTcp<net::address::Local> m_socket;
+    std::string m_path;
 
 public:
-	/**
-	 * Create a Unix transport.
-	 *
-	 * \param path the path
-	 */
-	IRCCD_EXPORT TransportServerUnix(std::string path);
+    /**
+     * Create a Unix transport.
+     *
+     * \param path the path
+     */
+    IRCCD_EXPORT TransportServerUnix(std::string path);
 
-	/**
-	 * Destroy the transport and remove the file.
-	 */
-	IRCCD_EXPORT ~TransportServerUnix();
+    /**
+     * Destroy the transport and remove the file.
+     */
+    IRCCD_EXPORT ~TransportServerUnix();
 
-	/**
-	 * \copydoc TransportServer::handle
-	 */
-	IRCCD_EXPORT net::Handle handle() noexcept override;
+    /**
+     * \copydoc TransportServer::handle
+     */
+    IRCCD_EXPORT net::Handle handle() noexcept override;
 
-	/**
-	 * \copydoc TransportServer::accept
-	 */
-	IRCCD_EXPORT std::shared_ptr<TransportClient> accept() override;
+    /**
+     * \copydoc TransportServer::accept
+     */
+    IRCCD_EXPORT std::shared_ptr<TransportClient> accept() override;
 };
 
 #endif // !_WIN32
--- a/lib/irccd/unicode.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/unicode.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -33,24 +33,24 @@
 
 const char32_t *rbsearch(char32_t c, const char32_t *t, int n, int ne) noexcept
 {
-	const char32_t *p;
-	int m;
+   const char32_t *p;
+   int m;
 
-	while (n > 1) {
-		m = n >> 1;
-		p = t + m * ne;
+   while (n > 1) {
+       m = n >> 1;
+       p = t + m * ne;
 
-		if (c >= p[0]) {
-			t = p;
-			n = n - m;
-		} else
-			n = m;
-	}
+       if (c >= p[0]) {
+           t = p;
+           n = n - m;
+       } else
+           n = m;
+   }
 
-	if (n && c >= t[0])
-		return t;
+   if (n && c >= t[0])
+       return t;
 
-	return nullptr;
+   return nullptr;
 }
 
 } // !namespace
@@ -58,533 +58,533 @@
 namespace {
 
 const char32_t isspacer[] = {
-	0x0009, 0x000d,
-	0x0020, 0x0020,
-	0x0085, 0x0085,
-	0x00a0, 0x00a0,
-	0x1680, 0x1680,
-	0x2000, 0x200a,
-	0x2028, 0x2029,
-	0x202f, 0x202f,
-	0x205f, 0x205f,
-	0x3000, 0x3000,
-	0xfeff, 0xfeff,
+    0x0009, 0x000d,
+    0x0020, 0x0020,
+    0x0085, 0x0085,
+    0x00a0, 0x00a0,
+    0x1680, 0x1680,
+    0x2000, 0x200a,
+    0x2028, 0x2029,
+    0x202f, 0x202f,
+    0x205f, 0x205f,
+    0x3000, 0x3000,
+    0xfeff, 0xfeff,
 };
 
 } // !namespace
 
 bool isspace(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, isspacer, nelem (isspacer)/2, 2);
+   p = rbsearch(c, isspacer, nelem (isspacer)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	return false;
+   return false;
 }
 
 namespace {
 
 const char32_t isdigitr[] = {
-	0x0030, 0x0039,
-	0x0660, 0x0669,
-	0x06f0, 0x06f9,
-	0x07c0, 0x07c9,
-	0x0966, 0x096f,
-	0x09e6, 0x09ef,
-	0x0a66, 0x0a6f,
-	0x0ae6, 0x0aef,
-	0x0b66, 0x0b6f,
-	0x0be6, 0x0bef,
-	0x0c66, 0x0c6f,
-	0x0ce6, 0x0cef,
-	0x0d66, 0x0d6f,
-	0x0de6, 0x0def,
-	0x0e50, 0x0e59,
-	0x0ed0, 0x0ed9,
-	0x0f20, 0x0f29,
-	0x1040, 0x1049,
-	0x1090, 0x1099,
-	0x17e0, 0x17e9,
-	0x1810, 0x1819,
-	0x1946, 0x194f,
-	0x19d0, 0x19d9,
-	0x1a80, 0x1a89,
-	0x1a90, 0x1a99,
-	0x1b50, 0x1b59,
-	0x1bb0, 0x1bb9,
-	0x1c40, 0x1c49,
-	0x1c50, 0x1c59,
-	0xa620, 0xa629,
-	0xa8d0, 0xa8d9,
-	0xa900, 0xa909,
-	0xa9d0, 0xa9d9,
-	0xa9f0, 0xa9f9,
-	0xaa50, 0xaa59,
-	0xabf0, 0xabf9,
-	0xff10, 0xff19,
-	0x104a0, 0x104a9,
-	0x11066, 0x1106f,
-	0x110f0, 0x110f9,
-	0x11136, 0x1113f,
-	0x111d0, 0x111d9,
-	0x112f0, 0x112f9,
-	0x114d0, 0x114d9,
-	0x11650, 0x11659,
-	0x116c0, 0x116c9,
-	0x118e0, 0x118e9,
-	0x16a60, 0x16a69,
-	0x16b50, 0x16b59,
-	0x1d7ce, 0x1d7ff,
+    0x0030, 0x0039,
+    0x0660, 0x0669,
+    0x06f0, 0x06f9,
+    0x07c0, 0x07c9,
+    0x0966, 0x096f,
+    0x09e6, 0x09ef,
+    0x0a66, 0x0a6f,
+    0x0ae6, 0x0aef,
+    0x0b66, 0x0b6f,
+    0x0be6, 0x0bef,
+    0x0c66, 0x0c6f,
+    0x0ce6, 0x0cef,
+    0x0d66, 0x0d6f,
+    0x0de6, 0x0def,
+    0x0e50, 0x0e59,
+    0x0ed0, 0x0ed9,
+    0x0f20, 0x0f29,
+    0x1040, 0x1049,
+    0x1090, 0x1099,
+    0x17e0, 0x17e9,
+    0x1810, 0x1819,
+    0x1946, 0x194f,
+    0x19d0, 0x19d9,
+    0x1a80, 0x1a89,
+    0x1a90, 0x1a99,
+    0x1b50, 0x1b59,
+    0x1bb0, 0x1bb9,
+    0x1c40, 0x1c49,
+    0x1c50, 0x1c59,
+    0xa620, 0xa629,
+    0xa8d0, 0xa8d9,
+    0xa900, 0xa909,
+    0xa9d0, 0xa9d9,
+    0xa9f0, 0xa9f9,
+    0xaa50, 0xaa59,
+    0xabf0, 0xabf9,
+    0xff10, 0xff19,
+    0x104a0, 0x104a9,
+    0x11066, 0x1106f,
+    0x110f0, 0x110f9,
+    0x11136, 0x1113f,
+    0x111d0, 0x111d9,
+    0x112f0, 0x112f9,
+    0x114d0, 0x114d9,
+    0x11650, 0x11659,
+    0x116c0, 0x116c9,
+    0x118e0, 0x118e9,
+    0x16a60, 0x16a69,
+    0x16b50, 0x16b59,
+    0x1d7ce, 0x1d7ff,
 };
 
 } // !namespace
 
 bool isdigit(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, isdigitr, nelem (isdigitr)/2, 2);
+   p = rbsearch(c, isdigitr, nelem (isdigitr)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	return false;
+   return false;
 }
 
 namespace {
 
 const char32_t isalphar[] = {
-	0x0041, 0x005a,
-	0x0061, 0x007a,
-	0x00c0, 0x00d6,
-	0x00d8, 0x00f6,
-	0x00f8, 0x02c1,
-	0x02c6, 0x02d1,
-	0x02e0, 0x02e4,
-	0x0370, 0x0374,
-	0x0376, 0x0377,
-	0x037a, 0x037d,
-	0x0388, 0x038a,
-	0x038e, 0x03a1,
-	0x03a3, 0x03f5,
-	0x03f7, 0x0481,
-	0x048a, 0x052f,
-	0x0531, 0x0556,
-	0x0561, 0x0587,
-	0x05d0, 0x05ea,
-	0x05f0, 0x05f2,
-	0x0620, 0x064a,
-	0x066e, 0x066f,
-	0x0671, 0x06d3,
-	0x06e5, 0x06e6,
-	0x06ee, 0x06ef,
-	0x06fa, 0x06fc,
-	0x0712, 0x072f,
-	0x074d, 0x07a5,
-	0x07ca, 0x07ea,
-	0x07f4, 0x07f5,
-	0x0800, 0x0815,
-	0x0840, 0x0858,
-	0x08a0, 0x08b2,
-	0x0904, 0x0939,
-	0x0958, 0x0961,
-	0x0971, 0x0980,
-	0x0985, 0x098c,
-	0x098f, 0x0990,
-	0x0993, 0x09a8,
-	0x09aa, 0x09b0,
-	0x09b6, 0x09b9,
-	0x09dc, 0x09dd,
-	0x09df, 0x09e1,
-	0x09f0, 0x09f1,
-	0x0a05, 0x0a0a,
-	0x0a0f, 0x0a10,
-	0x0a13, 0x0a28,
-	0x0a2a, 0x0a30,
-	0x0a32, 0x0a33,
-	0x0a35, 0x0a36,
-	0x0a38, 0x0a39,
-	0x0a59, 0x0a5c,
-	0x0a72, 0x0a74,
-	0x0a85, 0x0a8d,
-	0x0a8f, 0x0a91,
-	0x0a93, 0x0aa8,
-	0x0aaa, 0x0ab0,
-	0x0ab2, 0x0ab3,
-	0x0ab5, 0x0ab9,
-	0x0ae0, 0x0ae1,
-	0x0b05, 0x0b0c,
-	0x0b0f, 0x0b10,
-	0x0b13, 0x0b28,
-	0x0b2a, 0x0b30,
-	0x0b32, 0x0b33,
-	0x0b35, 0x0b39,
-	0x0b5c, 0x0b5d,
-	0x0b5f, 0x0b61,
-	0x0b85, 0x0b8a,
-	0x0b8e, 0x0b90,
-	0x0b92, 0x0b95,
-	0x0b99, 0x0b9a,
-	0x0b9e, 0x0b9f,
-	0x0ba3, 0x0ba4,
-	0x0ba8, 0x0baa,
-	0x0bae, 0x0bb9,
-	0x0c05, 0x0c0c,
-	0x0c0e, 0x0c10,
-	0x0c12, 0x0c28,
-	0x0c2a, 0x0c39,
-	0x0c58, 0x0c59,
-	0x0c60, 0x0c61,
-	0x0c85, 0x0c8c,
-	0x0c8e, 0x0c90,
-	0x0c92, 0x0ca8,
-	0x0caa, 0x0cb3,
-	0x0cb5, 0x0cb9,
-	0x0ce0, 0x0ce1,
-	0x0cf1, 0x0cf2,
-	0x0d05, 0x0d0c,
-	0x0d0e, 0x0d10,
-	0x0d12, 0x0d3a,
-	0x0d60, 0x0d61,
-	0x0d7a, 0x0d7f,
-	0x0d85, 0x0d96,
-	0x0d9a, 0x0db1,
-	0x0db3, 0x0dbb,
-	0x0dc0, 0x0dc6,
-	0x0e01, 0x0e30,
-	0x0e32, 0x0e33,
-	0x0e40, 0x0e46,
-	0x0e81, 0x0e82,
-	0x0e87, 0x0e88,
-	0x0e94, 0x0e97,
-	0x0e99, 0x0e9f,
-	0x0ea1, 0x0ea3,
-	0x0eaa, 0x0eab,
-	0x0ead, 0x0eb0,
-	0x0eb2, 0x0eb3,
-	0x0ec0, 0x0ec4,
-	0x0edc, 0x0edf,
-	0x0f40, 0x0f47,
-	0x0f49, 0x0f6c,
-	0x0f88, 0x0f8c,
-	0x1000, 0x102a,
-	0x1050, 0x1055,
-	0x105a, 0x105d,
-	0x1065, 0x1066,
-	0x106e, 0x1070,
-	0x1075, 0x1081,
-	0x10a0, 0x10c5,
-	0x10d0, 0x10fa,
-	0x10fc, 0x1248,
-	0x124a, 0x124d,
-	0x1250, 0x1256,
-	0x125a, 0x125d,
-	0x1260, 0x1288,
-	0x128a, 0x128d,
-	0x1290, 0x12b0,
-	0x12b2, 0x12b5,
-	0x12b8, 0x12be,
-	0x12c2, 0x12c5,
-	0x12c8, 0x12d6,
-	0x12d8, 0x1310,
-	0x1312, 0x1315,
-	0x1318, 0x135a,
-	0x1380, 0x138f,
-	0x13a0, 0x13f4,
-	0x1401, 0x166c,
-	0x166f, 0x167f,
-	0x1681, 0x169a,
-	0x16a0, 0x16ea,
-	0x16f1, 0x16f8,
-	0x1700, 0x170c,
-	0x170e, 0x1711,
-	0x1720, 0x1731,
-	0x1740, 0x1751,
-	0x1760, 0x176c,
-	0x176e, 0x1770,
-	0x1780, 0x17b3,
-	0x1820, 0x1877,
-	0x1880, 0x18a8,
-	0x18b0, 0x18f5,
-	0x1900, 0x191e,
-	0x1950, 0x196d,
-	0x1970, 0x1974,
-	0x1980, 0x19ab,
-	0x19c1, 0x19c7,
-	0x1a00, 0x1a16,
-	0x1a20, 0x1a54,
-	0x1b05, 0x1b33,
-	0x1b45, 0x1b4b,
-	0x1b83, 0x1ba0,
-	0x1bae, 0x1baf,
-	0x1bba, 0x1be5,
-	0x1c00, 0x1c23,
-	0x1c4d, 0x1c4f,
-	0x1c5a, 0x1c7d,
-	0x1ce9, 0x1cec,
-	0x1cee, 0x1cf1,
-	0x1cf5, 0x1cf6,
-	0x1d00, 0x1dbf,
-	0x1e00, 0x1f15,
-	0x1f18, 0x1f1d,
-	0x1f20, 0x1f45,
-	0x1f48, 0x1f4d,
-	0x1f50, 0x1f57,
-	0x1f5f, 0x1f7d,
-	0x1f80, 0x1fb4,
-	0x1fb6, 0x1fbc,
-	0x1fc2, 0x1fc4,
-	0x1fc6, 0x1fcc,
-	0x1fd0, 0x1fd3,
-	0x1fd6, 0x1fdb,
-	0x1fe0, 0x1fec,
-	0x1ff2, 0x1ff4,
-	0x1ff6, 0x1ffc,
-	0x2090, 0x209c,
-	0x210a, 0x2113,
-	0x2119, 0x211d,
-	0x212a, 0x212d,
-	0x212f, 0x2139,
-	0x213c, 0x213f,
-	0x2145, 0x2149,
-	0x2183, 0x2184,
-	0x2c00, 0x2c2e,
-	0x2c30, 0x2c5e,
-	0x2c60, 0x2ce4,
-	0x2ceb, 0x2cee,
-	0x2cf2, 0x2cf3,
-	0x2d00, 0x2d25,
-	0x2d30, 0x2d67,
-	0x2d80, 0x2d96,
-	0x2da0, 0x2da6,
-	0x2da8, 0x2dae,
-	0x2db0, 0x2db6,
-	0x2db8, 0x2dbe,
-	0x2dc0, 0x2dc6,
-	0x2dc8, 0x2dce,
-	0x2dd0, 0x2dd6,
-	0x2dd8, 0x2dde,
-	0x3005, 0x3006,
-	0x3031, 0x3035,
-	0x303b, 0x303c,
-	0x3041, 0x3096,
-	0x309d, 0x309f,
-	0x30a1, 0x30fa,
-	0x30fc, 0x30ff,
-	0x3105, 0x312d,
-	0x3131, 0x318e,
-	0x31a0, 0x31ba,
-	0x31f0, 0x31ff,
-	0x3400, 0x4db5,
-	0x4e00, 0x9fcc,
-	0xa000, 0xa48c,
-	0xa4d0, 0xa4fd,
-	0xa500, 0xa60c,
-	0xa610, 0xa61f,
-	0xa62a, 0xa62b,
-	0xa640, 0xa66e,
-	0xa67f, 0xa69d,
-	0xa6a0, 0xa6e5,
-	0xa717, 0xa71f,
-	0xa722, 0xa788,
-	0xa78b, 0xa78e,
-	0xa790, 0xa7ad,
-	0xa7b0, 0xa7b1,
-	0xa7f7, 0xa801,
-	0xa803, 0xa805,
-	0xa807, 0xa80a,
-	0xa80c, 0xa822,
-	0xa840, 0xa873,
-	0xa882, 0xa8b3,
-	0xa8f2, 0xa8f7,
-	0xa90a, 0xa925,
-	0xa930, 0xa946,
-	0xa960, 0xa97c,
-	0xa984, 0xa9b2,
-	0xa9e0, 0xa9e4,
-	0xa9e6, 0xa9ef,
-	0xa9fa, 0xa9fe,
-	0xaa00, 0xaa28,
-	0xaa40, 0xaa42,
-	0xaa44, 0xaa4b,
-	0xaa60, 0xaa76,
-	0xaa7e, 0xaaaf,
-	0xaab5, 0xaab6,
-	0xaab9, 0xaabd,
-	0xaadb, 0xaadd,
-	0xaae0, 0xaaea,
-	0xaaf2, 0xaaf4,
-	0xab01, 0xab06,
-	0xab09, 0xab0e,
-	0xab11, 0xab16,
-	0xab20, 0xab26,
-	0xab28, 0xab2e,
-	0xab30, 0xab5a,
-	0xab5c, 0xab5f,
-	0xab64, 0xab65,
-	0xabc0, 0xabe2,
-	0xac00, 0xd7a3,
-	0xd7b0, 0xd7c6,
-	0xd7cb, 0xd7fb,
-	0xf900, 0xfa6d,
-	0xfa70, 0xfad9,
-	0xfb00, 0xfb06,
-	0xfb13, 0xfb17,
-	0xfb1f, 0xfb28,
-	0xfb2a, 0xfb36,
-	0xfb38, 0xfb3c,
-	0xfb40, 0xfb41,
-	0xfb43, 0xfb44,
-	0xfb46, 0xfbb1,
-	0xfbd3, 0xfd3d,
-	0xfd50, 0xfd8f,
-	0xfd92, 0xfdc7,
-	0xfdf0, 0xfdfb,
-	0xfe70, 0xfe74,
-	0xfe76, 0xfefc,
-	0xff21, 0xff3a,
-	0xff41, 0xff5a,
-	0xff66, 0xffbe,
-	0xffc2, 0xffc7,
-	0xffca, 0xffcf,
-	0xffd2, 0xffd7,
-	0xffda, 0xffdc,
-	0x10000, 0x1000b,
-	0x1000d, 0x10026,
-	0x10028, 0x1003a,
-	0x1003c, 0x1003d,
-	0x1003f, 0x1004d,
-	0x10050, 0x1005d,
-	0x10080, 0x100fa,
-	0x10280, 0x1029c,
-	0x102a0, 0x102d0,
-	0x10300, 0x1031f,
-	0x10330, 0x10340,
-	0x10342, 0x10349,
-	0x10350, 0x10375,
-	0x10380, 0x1039d,
-	0x103a0, 0x103c3,
-	0x103c8, 0x103cf,
-	0x10400, 0x1049d,
-	0x10500, 0x10527,
-	0x10530, 0x10563,
-	0x10600, 0x10736,
-	0x10740, 0x10755,
-	0x10760, 0x10767,
-	0x10800, 0x10805,
-	0x1080a, 0x10835,
-	0x10837, 0x10838,
-	0x1083f, 0x10855,
-	0x10860, 0x10876,
-	0x10880, 0x1089e,
-	0x10900, 0x10915,
-	0x10920, 0x10939,
-	0x10980, 0x109b7,
-	0x109be, 0x109bf,
-	0x10a10, 0x10a13,
-	0x10a15, 0x10a17,
-	0x10a19, 0x10a33,
-	0x10a60, 0x10a7c,
-	0x10a80, 0x10a9c,
-	0x10ac0, 0x10ac7,
-	0x10ac9, 0x10ae4,
-	0x10b00, 0x10b35,
-	0x10b40, 0x10b55,
-	0x10b60, 0x10b72,
-	0x10b80, 0x10b91,
-	0x10c00, 0x10c48,
-	0x11003, 0x11037,
-	0x11083, 0x110af,
-	0x110d0, 0x110e8,
-	0x11103, 0x11126,
-	0x11150, 0x11172,
-	0x11183, 0x111b2,
-	0x111c1, 0x111c4,
-	0x11200, 0x11211,
-	0x11213, 0x1122b,
-	0x112b0, 0x112de,
-	0x11305, 0x1130c,
-	0x1130f, 0x11310,
-	0x11313, 0x11328,
-	0x1132a, 0x11330,
-	0x11332, 0x11333,
-	0x11335, 0x11339,
-	0x1135d, 0x11361,
-	0x11480, 0x114af,
-	0x114c4, 0x114c5,
-	0x11580, 0x115ae,
-	0x11600, 0x1162f,
-	0x11680, 0x116aa,
-	0x118a0, 0x118df,
-	0x11ac0, 0x11af8,
-	0x12000, 0x12398,
-	0x13000, 0x1342e,
-	0x16800, 0x16a38,
-	0x16a40, 0x16a5e,
-	0x16ad0, 0x16aed,
-	0x16b00, 0x16b2f,
-	0x16b40, 0x16b43,
-	0x16b63, 0x16b77,
-	0x16b7d, 0x16b8f,
-	0x16f00, 0x16f44,
-	0x16f93, 0x16f9f,
-	0x1b000, 0x1b001,
-	0x1bc00, 0x1bc6a,
-	0x1bc70, 0x1bc7c,
-	0x1bc80, 0x1bc88,
-	0x1bc90, 0x1bc99,
-	0x1d400, 0x1d454,
-	0x1d456, 0x1d49c,
-	0x1d49e, 0x1d49f,
-	0x1d4a5, 0x1d4a6,
-	0x1d4a9, 0x1d4ac,
-	0x1d4ae, 0x1d4b9,
-	0x1d4bd, 0x1d4c3,
-	0x1d4c5, 0x1d505,
-	0x1d507, 0x1d50a,
-	0x1d50d, 0x1d514,
-	0x1d516, 0x1d51c,
-	0x1d51e, 0x1d539,
-	0x1d53b, 0x1d53e,
-	0x1d540, 0x1d544,
-	0x1d54a, 0x1d550,
-	0x1d552, 0x1d6a5,
-	0x1d6a8, 0x1d6c0,
-	0x1d6c2, 0x1d6da,
-	0x1d6dc, 0x1d6fa,
-	0x1d6fc, 0x1d714,
-	0x1d716, 0x1d734,
-	0x1d736, 0x1d74e,
-	0x1d750, 0x1d76e,
-	0x1d770, 0x1d788,
-	0x1d78a, 0x1d7a8,
-	0x1d7aa, 0x1d7c2,
-	0x1d7c4, 0x1d7cb,
-	0x1e800, 0x1e8c4,
-	0x1ee00, 0x1ee03,
-	0x1ee05, 0x1ee1f,
-	0x1ee21, 0x1ee22,
-	0x1ee29, 0x1ee32,
-	0x1ee34, 0x1ee37,
-	0x1ee4d, 0x1ee4f,
-	0x1ee51, 0x1ee52,
-	0x1ee61, 0x1ee62,
-	0x1ee67, 0x1ee6a,
-	0x1ee6c, 0x1ee72,
-	0x1ee74, 0x1ee77,
-	0x1ee79, 0x1ee7c,
-	0x1ee80, 0x1ee89,
-	0x1ee8b, 0x1ee9b,
-	0x1eea1, 0x1eea3,
-	0x1eea5, 0x1eea9,
-	0x1eeab, 0x1eebb,
-	0x20000, 0x2a6d6,
-	0x2a700, 0x2b734,
-	0x2b740, 0x2b81d,
-	0x2f800, 0x2fa1d,
+    0x0041, 0x005a,
+    0x0061, 0x007a,
+    0x00c0, 0x00d6,
+    0x00d8, 0x00f6,
+    0x00f8, 0x02c1,
+    0x02c6, 0x02d1,
+    0x02e0, 0x02e4,
+    0x0370, 0x0374,
+    0x0376, 0x0377,
+    0x037a, 0x037d,
+    0x0388, 0x038a,
+    0x038e, 0x03a1,
+    0x03a3, 0x03f5,
+    0x03f7, 0x0481,
+    0x048a, 0x052f,
+    0x0531, 0x0556,
+    0x0561, 0x0587,
+    0x05d0, 0x05ea,
+    0x05f0, 0x05f2,
+    0x0620, 0x064a,
+    0x066e, 0x066f,
+    0x0671, 0x06d3,
+    0x06e5, 0x06e6,
+    0x06ee, 0x06ef,
+    0x06fa, 0x06fc,
+    0x0712, 0x072f,
+    0x074d, 0x07a5,
+    0x07ca, 0x07ea,
+    0x07f4, 0x07f5,
+    0x0800, 0x0815,
+    0x0840, 0x0858,
+    0x08a0, 0x08b2,
+    0x0904, 0x0939,
+    0x0958, 0x0961,
+    0x0971, 0x0980,
+    0x0985, 0x098c,
+    0x098f, 0x0990,
+    0x0993, 0x09a8,
+    0x09aa, 0x09b0,
+    0x09b6, 0x09b9,
+    0x09dc, 0x09dd,
+    0x09df, 0x09e1,
+    0x09f0, 0x09f1,
+    0x0a05, 0x0a0a,
+    0x0a0f, 0x0a10,
+    0x0a13, 0x0a28,
+    0x0a2a, 0x0a30,
+    0x0a32, 0x0a33,
+    0x0a35, 0x0a36,
+    0x0a38, 0x0a39,
+    0x0a59, 0x0a5c,
+    0x0a72, 0x0a74,
+    0x0a85, 0x0a8d,
+    0x0a8f, 0x0a91,
+    0x0a93, 0x0aa8,
+    0x0aaa, 0x0ab0,
+    0x0ab2, 0x0ab3,
+    0x0ab5, 0x0ab9,
+    0x0ae0, 0x0ae1,
+    0x0b05, 0x0b0c,
+    0x0b0f, 0x0b10,
+    0x0b13, 0x0b28,
+    0x0b2a, 0x0b30,
+    0x0b32, 0x0b33,
+    0x0b35, 0x0b39,
+    0x0b5c, 0x0b5d,
+    0x0b5f, 0x0b61,
+    0x0b85, 0x0b8a,
+    0x0b8e, 0x0b90,
+    0x0b92, 0x0b95,
+    0x0b99, 0x0b9a,
+    0x0b9e, 0x0b9f,
+    0x0ba3, 0x0ba4,
+    0x0ba8, 0x0baa,
+    0x0bae, 0x0bb9,
+    0x0c05, 0x0c0c,
+    0x0c0e, 0x0c10,
+    0x0c12, 0x0c28,
+    0x0c2a, 0x0c39,
+    0x0c58, 0x0c59,
+    0x0c60, 0x0c61,
+    0x0c85, 0x0c8c,
+    0x0c8e, 0x0c90,
+    0x0c92, 0x0ca8,
+    0x0caa, 0x0cb3,
+    0x0cb5, 0x0cb9,
+    0x0ce0, 0x0ce1,
+    0x0cf1, 0x0cf2,
+    0x0d05, 0x0d0c,
+    0x0d0e, 0x0d10,
+    0x0d12, 0x0d3a,
+    0x0d60, 0x0d61,
+    0x0d7a, 0x0d7f,
+    0x0d85, 0x0d96,
+    0x0d9a, 0x0db1,
+    0x0db3, 0x0dbb,
+    0x0dc0, 0x0dc6,
+    0x0e01, 0x0e30,
+    0x0e32, 0x0e33,
+    0x0e40, 0x0e46,
+    0x0e81, 0x0e82,
+    0x0e87, 0x0e88,
+    0x0e94, 0x0e97,
+    0x0e99, 0x0e9f,
+    0x0ea1, 0x0ea3,
+    0x0eaa, 0x0eab,
+    0x0ead, 0x0eb0,
+    0x0eb2, 0x0eb3,
+    0x0ec0, 0x0ec4,
+    0x0edc, 0x0edf,
+    0x0f40, 0x0f47,
+    0x0f49, 0x0f6c,
+    0x0f88, 0x0f8c,
+    0x1000, 0x102a,
+    0x1050, 0x1055,
+    0x105a, 0x105d,
+    0x1065, 0x1066,
+    0x106e, 0x1070,
+    0x1075, 0x1081,
+    0x10a0, 0x10c5,
+    0x10d0, 0x10fa,
+    0x10fc, 0x1248,
+    0x124a, 0x124d,
+    0x1250, 0x1256,
+    0x125a, 0x125d,
+    0x1260, 0x1288,
+    0x128a, 0x128d,
+    0x1290, 0x12b0,
+    0x12b2, 0x12b5,
+    0x12b8, 0x12be,
+    0x12c2, 0x12c5,
+    0x12c8, 0x12d6,
+    0x12d8, 0x1310,
+    0x1312, 0x1315,
+    0x1318, 0x135a,
+    0x1380, 0x138f,
+    0x13a0, 0x13f4,
+    0x1401, 0x166c,
+    0x166f, 0x167f,
+    0x1681, 0x169a,
+    0x16a0, 0x16ea,
+    0x16f1, 0x16f8,
+    0x1700, 0x170c,
+    0x170e, 0x1711,
+    0x1720, 0x1731,
+    0x1740, 0x1751,
+    0x1760, 0x176c,
+    0x176e, 0x1770,
+    0x1780, 0x17b3,
+    0x1820, 0x1877,
+    0x1880, 0x18a8,
+    0x18b0, 0x18f5,
+    0x1900, 0x191e,
+    0x1950, 0x196d,
+    0x1970, 0x1974,
+    0x1980, 0x19ab,
+    0x19c1, 0x19c7,
+    0x1a00, 0x1a16,
+    0x1a20, 0x1a54,
+    0x1b05, 0x1b33,
+    0x1b45, 0x1b4b,
+    0x1b83, 0x1ba0,
+    0x1bae, 0x1baf,
+    0x1bba, 0x1be5,
+    0x1c00, 0x1c23,
+    0x1c4d, 0x1c4f,
+    0x1c5a, 0x1c7d,
+    0x1ce9, 0x1cec,
+    0x1cee, 0x1cf1,
+    0x1cf5, 0x1cf6,
+    0x1d00, 0x1dbf,
+    0x1e00, 0x1f15,
+    0x1f18, 0x1f1d,
+    0x1f20, 0x1f45,
+    0x1f48, 0x1f4d,
+    0x1f50, 0x1f57,
+    0x1f5f, 0x1f7d,
+    0x1f80, 0x1fb4,
+    0x1fb6, 0x1fbc,
+    0x1fc2, 0x1fc4,
+    0x1fc6, 0x1fcc,
+    0x1fd0, 0x1fd3,
+    0x1fd6, 0x1fdb,
+    0x1fe0, 0x1fec,
+    0x1ff2, 0x1ff4,
+    0x1ff6, 0x1ffc,
+    0x2090, 0x209c,
+    0x210a, 0x2113,
+    0x2119, 0x211d,
+    0x212a, 0x212d,
+    0x212f, 0x2139,
+    0x213c, 0x213f,
+    0x2145, 0x2149,
+    0x2183, 0x2184,
+    0x2c00, 0x2c2e,
+    0x2c30, 0x2c5e,
+    0x2c60, 0x2ce4,
+    0x2ceb, 0x2cee,
+    0x2cf2, 0x2cf3,
+    0x2d00, 0x2d25,
+    0x2d30, 0x2d67,
+    0x2d80, 0x2d96,
+    0x2da0, 0x2da6,
+    0x2da8, 0x2dae,
+    0x2db0, 0x2db6,
+    0x2db8, 0x2dbe,
+    0x2dc0, 0x2dc6,
+    0x2dc8, 0x2dce,
+    0x2dd0, 0x2dd6,
+    0x2dd8, 0x2dde,
+    0x3005, 0x3006,
+    0x3031, 0x3035,
+    0x303b, 0x303c,
+    0x3041, 0x3096,
+    0x309d, 0x309f,
+    0x30a1, 0x30fa,
+    0x30fc, 0x30ff,
+    0x3105, 0x312d,
+    0x3131, 0x318e,
+    0x31a0, 0x31ba,
+    0x31f0, 0x31ff,
+    0x3400, 0x4db5,
+    0x4e00, 0x9fcc,
+    0xa000, 0xa48c,
+    0xa4d0, 0xa4fd,
+    0xa500, 0xa60c,
+    0xa610, 0xa61f,
+    0xa62a, 0xa62b,
+    0xa640, 0xa66e,
+    0xa67f, 0xa69d,
+    0xa6a0, 0xa6e5,
+    0xa717, 0xa71f,
+    0xa722, 0xa788,
+    0xa78b, 0xa78e,
+    0xa790, 0xa7ad,
+    0xa7b0, 0xa7b1,
+    0xa7f7, 0xa801,
+    0xa803, 0xa805,
+    0xa807, 0xa80a,
+    0xa80c, 0xa822,
+    0xa840, 0xa873,
+    0xa882, 0xa8b3,
+    0xa8f2, 0xa8f7,
+    0xa90a, 0xa925,
+    0xa930, 0xa946,
+    0xa960, 0xa97c,
+    0xa984, 0xa9b2,
+    0xa9e0, 0xa9e4,
+    0xa9e6, 0xa9ef,
+    0xa9fa, 0xa9fe,
+    0xaa00, 0xaa28,
+    0xaa40, 0xaa42,
+    0xaa44, 0xaa4b,
+    0xaa60, 0xaa76,
+    0xaa7e, 0xaaaf,
+    0xaab5, 0xaab6,
+    0xaab9, 0xaabd,
+    0xaadb, 0xaadd,
+    0xaae0, 0xaaea,
+    0xaaf2, 0xaaf4,
+    0xab01, 0xab06,
+    0xab09, 0xab0e,
+    0xab11, 0xab16,
+    0xab20, 0xab26,
+    0xab28, 0xab2e,
+    0xab30, 0xab5a,
+    0xab5c, 0xab5f,
+    0xab64, 0xab65,
+    0xabc0, 0xabe2,
+    0xac00, 0xd7a3,
+    0xd7b0, 0xd7c6,
+    0xd7cb, 0xd7fb,
+    0xf900, 0xfa6d,
+    0xfa70, 0xfad9,
+    0xfb00, 0xfb06,
+    0xfb13, 0xfb17,
+    0xfb1f, 0xfb28,
+    0xfb2a, 0xfb36,
+    0xfb38, 0xfb3c,
+    0xfb40, 0xfb41,
+    0xfb43, 0xfb44,
+    0xfb46, 0xfbb1,
+    0xfbd3, 0xfd3d,
+    0xfd50, 0xfd8f,
+    0xfd92, 0xfdc7,
+    0xfdf0, 0xfdfb,
+    0xfe70, 0xfe74,
+    0xfe76, 0xfefc,
+    0xff21, 0xff3a,
+    0xff41, 0xff5a,
+    0xff66, 0xffbe,
+    0xffc2, 0xffc7,
+    0xffca, 0xffcf,
+    0xffd2, 0xffd7,
+    0xffda, 0xffdc,
+    0x10000, 0x1000b,
+    0x1000d, 0x10026,
+    0x10028, 0x1003a,
+    0x1003c, 0x1003d,
+    0x1003f, 0x1004d,
+    0x10050, 0x1005d,
+    0x10080, 0x100fa,
+    0x10280, 0x1029c,
+    0x102a0, 0x102d0,
+    0x10300, 0x1031f,
+    0x10330, 0x10340,
+    0x10342, 0x10349,
+    0x10350, 0x10375,
+    0x10380, 0x1039d,
+    0x103a0, 0x103c3,
+    0x103c8, 0x103cf,
+    0x10400, 0x1049d,
+    0x10500, 0x10527,
+    0x10530, 0x10563,
+    0x10600, 0x10736,
+    0x10740, 0x10755,
+    0x10760, 0x10767,
+    0x10800, 0x10805,
+    0x1080a, 0x10835,
+    0x10837, 0x10838,
+    0x1083f, 0x10855,
+    0x10860, 0x10876,
+    0x10880, 0x1089e,
+    0x10900, 0x10915,
+    0x10920, 0x10939,
+    0x10980, 0x109b7,
+    0x109be, 0x109bf,
+    0x10a10, 0x10a13,
+    0x10a15, 0x10a17,
+    0x10a19, 0x10a33,
+    0x10a60, 0x10a7c,
+    0x10a80, 0x10a9c,
+    0x10ac0, 0x10ac7,
+    0x10ac9, 0x10ae4,
+    0x10b00, 0x10b35,
+    0x10b40, 0x10b55,
+    0x10b60, 0x10b72,
+    0x10b80, 0x10b91,
+    0x10c00, 0x10c48,
+    0x11003, 0x11037,
+    0x11083, 0x110af,
+    0x110d0, 0x110e8,
+    0x11103, 0x11126,
+    0x11150, 0x11172,
+    0x11183, 0x111b2,
+    0x111c1, 0x111c4,
+    0x11200, 0x11211,
+    0x11213, 0x1122b,
+    0x112b0, 0x112de,
+    0x11305, 0x1130c,
+    0x1130f, 0x11310,
+    0x11313, 0x11328,
+    0x1132a, 0x11330,
+    0x11332, 0x11333,
+    0x11335, 0x11339,
+    0x1135d, 0x11361,
+    0x11480, 0x114af,
+    0x114c4, 0x114c5,
+    0x11580, 0x115ae,
+    0x11600, 0x1162f,
+    0x11680, 0x116aa,
+    0x118a0, 0x118df,
+    0x11ac0, 0x11af8,
+    0x12000, 0x12398,
+    0x13000, 0x1342e,
+    0x16800, 0x16a38,
+    0x16a40, 0x16a5e,
+    0x16ad0, 0x16aed,
+    0x16b00, 0x16b2f,
+    0x16b40, 0x16b43,
+    0x16b63, 0x16b77,
+    0x16b7d, 0x16b8f,
+    0x16f00, 0x16f44,
+    0x16f93, 0x16f9f,
+    0x1b000, 0x1b001,
+    0x1bc00, 0x1bc6a,
+    0x1bc70, 0x1bc7c,
+    0x1bc80, 0x1bc88,
+    0x1bc90, 0x1bc99,
+    0x1d400, 0x1d454,
+    0x1d456, 0x1d49c,
+    0x1d49e, 0x1d49f,
+    0x1d4a5, 0x1d4a6,
+    0x1d4a9, 0x1d4ac,
+    0x1d4ae, 0x1d4b9,
+    0x1d4bd, 0x1d4c3,
+    0x1d4c5, 0x1d505,
+    0x1d507, 0x1d50a,
+    0x1d50d, 0x1d514,
+    0x1d516, 0x1d51c,
+    0x1d51e, 0x1d539,
+    0x1d53b, 0x1d53e,
+    0x1d540, 0x1d544,
+    0x1d54a, 0x1d550,
+    0x1d552, 0x1d6a5,
+    0x1d6a8, 0x1d6c0,
+    0x1d6c2, 0x1d6da,
+    0x1d6dc, 0x1d6fa,
+    0x1d6fc, 0x1d714,
+    0x1d716, 0x1d734,
+    0x1d736, 0x1d74e,
+    0x1d750, 0x1d76e,
+    0x1d770, 0x1d788,
+    0x1d78a, 0x1d7a8,
+    0x1d7aa, 0x1d7c2,
+    0x1d7c4, 0x1d7cb,
+    0x1e800, 0x1e8c4,
+    0x1ee00, 0x1ee03,
+    0x1ee05, 0x1ee1f,
+    0x1ee21, 0x1ee22,
+    0x1ee29, 0x1ee32,
+    0x1ee34, 0x1ee37,
+    0x1ee4d, 0x1ee4f,
+    0x1ee51, 0x1ee52,
+    0x1ee61, 0x1ee62,
+    0x1ee67, 0x1ee6a,
+    0x1ee6c, 0x1ee72,
+    0x1ee74, 0x1ee77,
+    0x1ee79, 0x1ee7c,
+    0x1ee80, 0x1ee89,
+    0x1ee8b, 0x1ee9b,
+    0x1eea1, 0x1eea3,
+    0x1eea5, 0x1eea9,
+    0x1eeab, 0x1eebb,
+    0x20000, 0x2a6d6,
+    0x2a700, 0x2b734,
+    0x2b740, 0x2b81d,
+    0x2f800, 0x2fa1d,
 };
 
 } // !namespace
@@ -592,228 +592,228 @@
 namespace {
 
 const char32_t isalphas[] = {
-	0x00aa,
-	0x00b5,
-	0x00ba,
-	0x02ec,
-	0x02ee,
-	0x037f,
-	0x0386,
-	0x038c,
-	0x0559,
-	0x06d5,
-	0x06ff,
-	0x0710,
-	0x07b1,
-	0x07fa,
-	0x081a,
-	0x0824,
-	0x0828,
-	0x093d,
-	0x0950,
-	0x09b2,
-	0x09bd,
-	0x09ce,
-	0x0a5e,
-	0x0abd,
-	0x0ad0,
-	0x0b3d,
-	0x0b71,
-	0x0b83,
-	0x0b9c,
-	0x0bd0,
-	0x0c3d,
-	0x0cbd,
-	0x0cde,
-	0x0d3d,
-	0x0d4e,
-	0x0dbd,
-	0x0e84,
-	0x0e8a,
-	0x0e8d,
-	0x0ea5,
-	0x0ea7,
-	0x0ebd,
-	0x0ec6,
-	0x0f00,
-	0x103f,
-	0x1061,
-	0x108e,
-	0x10c7,
-	0x10cd,
-	0x1258,
-	0x12c0,
-	0x17d7,
-	0x17dc,
-	0x18aa,
-	0x1aa7,
-	0x1f59,
-	0x1f5b,
-	0x1f5d,
-	0x1fbe,
-	0x2071,
-	0x207f,
-	0x2102,
-	0x2107,
-	0x2115,
-	0x2124,
-	0x2126,
-	0x2128,
-	0x214e,
-	0x2d27,
-	0x2d2d,
-	0x2d6f,
-	0x2e2f,
-	0xa8fb,
-	0xa9cf,
-	0xaa7a,
-	0xaab1,
-	0xaac0,
-	0xaac2,
-	0xfb1d,
-	0xfb3e,
-	0x10808,
-	0x1083c,
-	0x10a00,
-	0x11176,
-	0x111da,
-	0x1133d,
-	0x114c7,
-	0x11644,
-	0x118ff,
-	0x16f50,
-	0x1d4a2,
-	0x1d4bb,
-	0x1d546,
-	0x1ee24,
-	0x1ee27,
-	0x1ee39,
-	0x1ee3b,
-	0x1ee42,
-	0x1ee47,
-	0x1ee49,
-	0x1ee4b,
-	0x1ee54,
-	0x1ee57,
-	0x1ee59,
-	0x1ee5b,
-	0x1ee5d,
-	0x1ee5f,
-	0x1ee64,
-	0x1ee7e,
+    0x00aa,
+    0x00b5,
+    0x00ba,
+    0x02ec,
+    0x02ee,
+    0x037f,
+    0x0386,
+    0x038c,
+    0x0559,
+    0x06d5,
+    0x06ff,
+    0x0710,
+    0x07b1,
+    0x07fa,
+    0x081a,
+    0x0824,
+    0x0828,
+    0x093d,
+    0x0950,
+    0x09b2,
+    0x09bd,
+    0x09ce,
+    0x0a5e,
+    0x0abd,
+    0x0ad0,
+    0x0b3d,
+    0x0b71,
+    0x0b83,
+    0x0b9c,
+    0x0bd0,
+    0x0c3d,
+    0x0cbd,
+    0x0cde,
+    0x0d3d,
+    0x0d4e,
+    0x0dbd,
+    0x0e84,
+    0x0e8a,
+    0x0e8d,
+    0x0ea5,
+    0x0ea7,
+    0x0ebd,
+    0x0ec6,
+    0x0f00,
+    0x103f,
+    0x1061,
+    0x108e,
+    0x10c7,
+    0x10cd,
+    0x1258,
+    0x12c0,
+    0x17d7,
+    0x17dc,
+    0x18aa,
+    0x1aa7,
+    0x1f59,
+    0x1f5b,
+    0x1f5d,
+    0x1fbe,
+    0x2071,
+    0x207f,
+    0x2102,
+    0x2107,
+    0x2115,
+    0x2124,
+    0x2126,
+    0x2128,
+    0x214e,
+    0x2d27,
+    0x2d2d,
+    0x2d6f,
+    0x2e2f,
+    0xa8fb,
+    0xa9cf,
+    0xaa7a,
+    0xaab1,
+    0xaac0,
+    0xaac2,
+    0xfb1d,
+    0xfb3e,
+    0x10808,
+    0x1083c,
+    0x10a00,
+    0x11176,
+    0x111da,
+    0x1133d,
+    0x114c7,
+    0x11644,
+    0x118ff,
+    0x16f50,
+    0x1d4a2,
+    0x1d4bb,
+    0x1d546,
+    0x1ee24,
+    0x1ee27,
+    0x1ee39,
+    0x1ee3b,
+    0x1ee42,
+    0x1ee47,
+    0x1ee49,
+    0x1ee4b,
+    0x1ee54,
+    0x1ee57,
+    0x1ee59,
+    0x1ee5b,
+    0x1ee5d,
+    0x1ee5f,
+    0x1ee64,
+    0x1ee7e,
 };
 
 } // !namespace
 
 bool isalpha(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, isalphar, nelem (isalphar)/2, 2);
+   p = rbsearch(c, isalphar, nelem (isalphar)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	p = rbsearch(c, isalphas, nelem (isalphas), 1);
+ p = rbsearch(c, isalphas, nelem (isalphas), 1);
 
-	if (p && c == p[0])
-		return true;
+   if (p && c == p[0])
+       return true;
 
-	return false;
+ return false;
 }
 
 namespace {
 
 const char32_t isupperr[] = {
-	0x0041, 0x005a,
-	0x00c0, 0x00d6,
-	0x00d8, 0x00de,
-	0x0178, 0x0179,
-	0x0181, 0x0182,
-	0x0186, 0x0187,
-	0x0189, 0x018b,
-	0x018e, 0x0191,
-	0x0193, 0x0194,
-	0x0196, 0x0198,
-	0x019c, 0x019d,
-	0x019f, 0x01a0,
-	0x01a6, 0x01a7,
-	0x01ae, 0x01af,
-	0x01b1, 0x01b3,
-	0x01b7, 0x01b8,
-	0x01f6, 0x01f8,
-	0x023a, 0x023b,
-	0x023d, 0x023e,
-	0x0243, 0x0246,
-	0x0388, 0x038a,
-	0x038e, 0x038f,
-	0x0391, 0x03a1,
-	0x03a3, 0x03ab,
-	0x03d2, 0x03d4,
-	0x03f9, 0x03fa,
-	0x03fd, 0x042f,
-	0x04c0, 0x04c1,
-	0x0531, 0x0556,
-	0x10a0, 0x10c5,
-	0x1f08, 0x1f0f,
-	0x1f18, 0x1f1d,
-	0x1f28, 0x1f2f,
-	0x1f38, 0x1f3f,
-	0x1f48, 0x1f4d,
-	0x1f68, 0x1f6f,
-	0x1f88, 0x1f8f,
-	0x1f98, 0x1f9f,
-	0x1fa8, 0x1faf,
-	0x1fb8, 0x1fbc,
-	0x1fc8, 0x1fcc,
-	0x1fd8, 0x1fdb,
-	0x1fe8, 0x1fec,
-	0x1ff8, 0x1ffc,
-	0x210b, 0x210d,
-	0x2110, 0x2112,
-	0x2119, 0x211d,
-	0x212a, 0x212d,
-	0x2130, 0x2133,
-	0x213e, 0x213f,
-	0x2160, 0x216f,
-	0x24b6, 0x24cf,
-	0x2c00, 0x2c2e,
-	0x2c62, 0x2c64,
-	0x2c6d, 0x2c70,
-	0x2c7e, 0x2c80,
-	0xa77d, 0xa77e,
-	0xa7aa, 0xa7ad,
-	0xa7b0, 0xa7b1,
-	0xff21, 0xff3a,
-	0x10400, 0x10427,
-	0x118a0, 0x118bf,
-	0x1d400, 0x1d419,
-	0x1d434, 0x1d44d,
-	0x1d468, 0x1d481,
-	0x1d49e, 0x1d49f,
-	0x1d4a5, 0x1d4a6,
-	0x1d4a9, 0x1d4ac,
-	0x1d4ae, 0x1d4b5,
-	0x1d4d0, 0x1d4e9,
-	0x1d504, 0x1d505,
-	0x1d507, 0x1d50a,
-	0x1d50d, 0x1d514,
-	0x1d516, 0x1d51c,
-	0x1d538, 0x1d539,
-	0x1d53b, 0x1d53e,
-	0x1d540, 0x1d544,
-	0x1d54a, 0x1d550,
-	0x1d56c, 0x1d585,
-	0x1d5a0, 0x1d5b9,
-	0x1d5d4, 0x1d5ed,
-	0x1d608, 0x1d621,
-	0x1d63c, 0x1d655,
-	0x1d670, 0x1d689,
-	0x1d6a8, 0x1d6c0,
-	0x1d6e2, 0x1d6fa,
-	0x1d71c, 0x1d734,
-	0x1d756, 0x1d76e,
-	0x1d790, 0x1d7a8,
+    0x0041, 0x005a,
+    0x00c0, 0x00d6,
+    0x00d8, 0x00de,
+    0x0178, 0x0179,
+    0x0181, 0x0182,
+    0x0186, 0x0187,
+    0x0189, 0x018b,
+    0x018e, 0x0191,
+    0x0193, 0x0194,
+    0x0196, 0x0198,
+    0x019c, 0x019d,
+    0x019f, 0x01a0,
+    0x01a6, 0x01a7,
+    0x01ae, 0x01af,
+    0x01b1, 0x01b3,
+    0x01b7, 0x01b8,
+    0x01f6, 0x01f8,
+    0x023a, 0x023b,
+    0x023d, 0x023e,
+    0x0243, 0x0246,
+    0x0388, 0x038a,
+    0x038e, 0x038f,
+    0x0391, 0x03a1,
+    0x03a3, 0x03ab,
+    0x03d2, 0x03d4,
+    0x03f9, 0x03fa,
+    0x03fd, 0x042f,
+    0x04c0, 0x04c1,
+    0x0531, 0x0556,
+    0x10a0, 0x10c5,
+    0x1f08, 0x1f0f,
+    0x1f18, 0x1f1d,
+    0x1f28, 0x1f2f,
+    0x1f38, 0x1f3f,
+    0x1f48, 0x1f4d,
+    0x1f68, 0x1f6f,
+    0x1f88, 0x1f8f,
+    0x1f98, 0x1f9f,
+    0x1fa8, 0x1faf,
+    0x1fb8, 0x1fbc,
+    0x1fc8, 0x1fcc,
+    0x1fd8, 0x1fdb,
+    0x1fe8, 0x1fec,
+    0x1ff8, 0x1ffc,
+    0x210b, 0x210d,
+    0x2110, 0x2112,
+    0x2119, 0x211d,
+    0x212a, 0x212d,
+    0x2130, 0x2133,
+    0x213e, 0x213f,
+    0x2160, 0x216f,
+    0x24b6, 0x24cf,
+    0x2c00, 0x2c2e,
+    0x2c62, 0x2c64,
+    0x2c6d, 0x2c70,
+    0x2c7e, 0x2c80,
+    0xa77d, 0xa77e,
+    0xa7aa, 0xa7ad,
+    0xa7b0, 0xa7b1,
+    0xff21, 0xff3a,
+    0x10400, 0x10427,
+    0x118a0, 0x118bf,
+    0x1d400, 0x1d419,
+    0x1d434, 0x1d44d,
+    0x1d468, 0x1d481,
+    0x1d49e, 0x1d49f,
+    0x1d4a5, 0x1d4a6,
+    0x1d4a9, 0x1d4ac,
+    0x1d4ae, 0x1d4b5,
+    0x1d4d0, 0x1d4e9,
+    0x1d504, 0x1d505,
+    0x1d507, 0x1d50a,
+    0x1d50d, 0x1d514,
+    0x1d516, 0x1d51c,
+    0x1d538, 0x1d539,
+    0x1d53b, 0x1d53e,
+    0x1d540, 0x1d544,
+    0x1d54a, 0x1d550,
+    0x1d56c, 0x1d585,
+    0x1d5a0, 0x1d5b9,
+    0x1d5d4, 0x1d5ed,
+    0x1d608, 0x1d621,
+    0x1d63c, 0x1d655,
+    0x1d670, 0x1d689,
+    0x1d6a8, 0x1d6c0,
+    0x1d6e2, 0x1d6fa,
+    0x1d71c, 0x1d734,
+    0x1d756, 0x1d76e,
+    0x1d790, 0x1d7a8,
 };
 
 } // !namespace
@@ -821,665 +821,665 @@
 namespace {
 
 const char32_t isuppers[] = {
-	0x0100,
-	0x0102,
-	0x0104,
-	0x0106,
-	0x0108,
-	0x010a,
-	0x010c,
-	0x010e,
-	0x0110,
-	0x0112,
-	0x0114,
-	0x0116,
-	0x0118,
-	0x011a,
-	0x011c,
-	0x011e,
-	0x0120,
-	0x0122,
-	0x0124,
-	0x0126,
-	0x0128,
-	0x012a,
-	0x012c,
-	0x012e,
-	0x0130,
-	0x0132,
-	0x0134,
-	0x0136,
-	0x0139,
-	0x013b,
-	0x013d,
-	0x013f,
-	0x0141,
-	0x0143,
-	0x0145,
-	0x0147,
-	0x014a,
-	0x014c,
-	0x014e,
-	0x0150,
-	0x0152,
-	0x0154,
-	0x0156,
-	0x0158,
-	0x015a,
-	0x015c,
-	0x015e,
-	0x0160,
-	0x0162,
-	0x0164,
-	0x0166,
-	0x0168,
-	0x016a,
-	0x016c,
-	0x016e,
-	0x0170,
-	0x0172,
-	0x0174,
-	0x0176,
-	0x017b,
-	0x017d,
-	0x0184,
-	0x01a2,
-	0x01a4,
-	0x01a9,
-	0x01ac,
-	0x01b5,
-	0x01bc,
-	0x01c4,
-	0x01c7,
-	0x01ca,
-	0x01cd,
-	0x01cf,
-	0x01d1,
-	0x01d3,
-	0x01d5,
-	0x01d7,
-	0x01d9,
-	0x01db,
-	0x01de,
-	0x01e0,
-	0x01e2,
-	0x01e4,
-	0x01e6,
-	0x01e8,
-	0x01ea,
-	0x01ec,
-	0x01ee,
-	0x01f1,
-	0x01f4,
-	0x01fa,
-	0x01fc,
-	0x01fe,
-	0x0200,
-	0x0202,
-	0x0204,
-	0x0206,
-	0x0208,
-	0x020a,
-	0x020c,
-	0x020e,
-	0x0210,
-	0x0212,
-	0x0214,
-	0x0216,
-	0x0218,
-	0x021a,
-	0x021c,
-	0x021e,
-	0x0220,
-	0x0222,
-	0x0224,
-	0x0226,
-	0x0228,
-	0x022a,
-	0x022c,
-	0x022e,
-	0x0230,
-	0x0232,
-	0x0241,
-	0x0248,
-	0x024a,
-	0x024c,
-	0x024e,
-	0x0370,
-	0x0372,
-	0x0376,
-	0x037f,
-	0x0386,
-	0x038c,
-	0x03cf,
-	0x03d8,
-	0x03da,
-	0x03dc,
-	0x03de,
-	0x03e0,
-	0x03e2,
-	0x03e4,
-	0x03e6,
-	0x03e8,
-	0x03ea,
-	0x03ec,
-	0x03ee,
-	0x03f4,
-	0x03f7,
-	0x0460,
-	0x0462,
-	0x0464,
-	0x0466,
-	0x0468,
-	0x046a,
-	0x046c,
-	0x046e,
-	0x0470,
-	0x0472,
-	0x0474,
-	0x0476,
-	0x0478,
-	0x047a,
-	0x047c,
-	0x047e,
-	0x0480,
-	0x048a,
-	0x048c,
-	0x048e,
-	0x0490,
-	0x0492,
-	0x0494,
-	0x0496,
-	0x0498,
-	0x049a,
-	0x049c,
-	0x049e,
-	0x04a0,
-	0x04a2,
-	0x04a4,
-	0x04a6,
-	0x04a8,
-	0x04aa,
-	0x04ac,
-	0x04ae,
-	0x04b0,
-	0x04b2,
-	0x04b4,
-	0x04b6,
-	0x04b8,
-	0x04ba,
-	0x04bc,
-	0x04be,
-	0x04c3,
-	0x04c5,
-	0x04c7,
-	0x04c9,
-	0x04cb,
-	0x04cd,
-	0x04d0,
-	0x04d2,
-	0x04d4,
-	0x04d6,
-	0x04d8,
-	0x04da,
-	0x04dc,
-	0x04de,
-	0x04e0,
-	0x04e2,
-	0x04e4,
-	0x04e6,
-	0x04e8,
-	0x04ea,
-	0x04ec,
-	0x04ee,
-	0x04f0,
-	0x04f2,
-	0x04f4,
-	0x04f6,
-	0x04f8,
-	0x04fa,
-	0x04fc,
-	0x04fe,
-	0x0500,
-	0x0502,
-	0x0504,
-	0x0506,
-	0x0508,
-	0x050a,
-	0x050c,
-	0x050e,
-	0x0510,
-	0x0512,
-	0x0514,
-	0x0516,
-	0x0518,
-	0x051a,
-	0x051c,
-	0x051e,
-	0x0520,
-	0x0522,
-	0x0524,
-	0x0526,
-	0x0528,
-	0x052a,
-	0x052c,
-	0x052e,
-	0x10c7,
-	0x10cd,
-	0x1e00,
-	0x1e02,
-	0x1e04,
-	0x1e06,
-	0x1e08,
-	0x1e0a,
-	0x1e0c,
-	0x1e0e,
-	0x1e10,
-	0x1e12,
-	0x1e14,
-	0x1e16,
-	0x1e18,
-	0x1e1a,
-	0x1e1c,
-	0x1e1e,
-	0x1e20,
-	0x1e22,
-	0x1e24,
-	0x1e26,
-	0x1e28,
-	0x1e2a,
-	0x1e2c,
-	0x1e2e,
-	0x1e30,
-	0x1e32,
-	0x1e34,
-	0x1e36,
-	0x1e38,
-	0x1e3a,
-	0x1e3c,
-	0x1e3e,
-	0x1e40,
-	0x1e42,
-	0x1e44,
-	0x1e46,
-	0x1e48,
-	0x1e4a,
-	0x1e4c,
-	0x1e4e,
-	0x1e50,
-	0x1e52,
-	0x1e54,
-	0x1e56,
-	0x1e58,
-	0x1e5a,
-	0x1e5c,
-	0x1e5e,
-	0x1e60,
-	0x1e62,
-	0x1e64,
-	0x1e66,
-	0x1e68,
-	0x1e6a,
-	0x1e6c,
-	0x1e6e,
-	0x1e70,
-	0x1e72,
-	0x1e74,
-	0x1e76,
-	0x1e78,
-	0x1e7a,
-	0x1e7c,
-	0x1e7e,
-	0x1e80,
-	0x1e82,
-	0x1e84,
-	0x1e86,
-	0x1e88,
-	0x1e8a,
-	0x1e8c,
-	0x1e8e,
-	0x1e90,
-	0x1e92,
-	0x1e94,
-	0x1e9e,
-	0x1ea0,
-	0x1ea2,
-	0x1ea4,
-	0x1ea6,
-	0x1ea8,
-	0x1eaa,
-	0x1eac,
-	0x1eae,
-	0x1eb0,
-	0x1eb2,
-	0x1eb4,
-	0x1eb6,
-	0x1eb8,
-	0x1eba,
-	0x1ebc,
-	0x1ebe,
-	0x1ec0,
-	0x1ec2,
-	0x1ec4,
-	0x1ec6,
-	0x1ec8,
-	0x1eca,
-	0x1ecc,
-	0x1ece,
-	0x1ed0,
-	0x1ed2,
-	0x1ed4,
-	0x1ed6,
-	0x1ed8,
-	0x1eda,
-	0x1edc,
-	0x1ede,
-	0x1ee0,
-	0x1ee2,
-	0x1ee4,
-	0x1ee6,
-	0x1ee8,
-	0x1eea,
-	0x1eec,
-	0x1eee,
-	0x1ef0,
-	0x1ef2,
-	0x1ef4,
-	0x1ef6,
-	0x1ef8,
-	0x1efa,
-	0x1efc,
-	0x1efe,
-	0x1f59,
-	0x1f5b,
-	0x1f5d,
-	0x1f5f,
-	0x2102,
-	0x2107,
-	0x2115,
-	0x2124,
-	0x2126,
-	0x2128,
-	0x2145,
-	0x2183,
-	0x2c60,
-	0x2c67,
-	0x2c69,
-	0x2c6b,
-	0x2c72,
-	0x2c75,
-	0x2c82,
-	0x2c84,
-	0x2c86,
-	0x2c88,
-	0x2c8a,
-	0x2c8c,
-	0x2c8e,
-	0x2c90,
-	0x2c92,
-	0x2c94,
-	0x2c96,
-	0x2c98,
-	0x2c9a,
-	0x2c9c,
-	0x2c9e,
-	0x2ca0,
-	0x2ca2,
-	0x2ca4,
-	0x2ca6,
-	0x2ca8,
-	0x2caa,
-	0x2cac,
-	0x2cae,
-	0x2cb0,
-	0x2cb2,
-	0x2cb4,
-	0x2cb6,
-	0x2cb8,
-	0x2cba,
-	0x2cbc,
-	0x2cbe,
-	0x2cc0,
-	0x2cc2,
-	0x2cc4,
-	0x2cc6,
-	0x2cc8,
-	0x2cca,
-	0x2ccc,
-	0x2cce,
-	0x2cd0,
-	0x2cd2,
-	0x2cd4,
-	0x2cd6,
-	0x2cd8,
-	0x2cda,
-	0x2cdc,
-	0x2cde,
-	0x2ce0,
-	0x2ce2,
-	0x2ceb,
-	0x2ced,
-	0x2cf2,
-	0xa640,
-	0xa642,
-	0xa644,
-	0xa646,
-	0xa648,
-	0xa64a,
-	0xa64c,
-	0xa64e,
-	0xa650,
-	0xa652,
-	0xa654,
-	0xa656,
-	0xa658,
-	0xa65a,
-	0xa65c,
-	0xa65e,
-	0xa660,
-	0xa662,
-	0xa664,
-	0xa666,
-	0xa668,
-	0xa66a,
-	0xa66c,
-	0xa680,
-	0xa682,
-	0xa684,
-	0xa686,
-	0xa688,
-	0xa68a,
-	0xa68c,
-	0xa68e,
-	0xa690,
-	0xa692,
-	0xa694,
-	0xa696,
-	0xa698,
-	0xa69a,
-	0xa722,
-	0xa724,
-	0xa726,
-	0xa728,
-	0xa72a,
-	0xa72c,
-	0xa72e,
-	0xa732,
-	0xa734,
-	0xa736,
-	0xa738,
-	0xa73a,
-	0xa73c,
-	0xa73e,
-	0xa740,
-	0xa742,
-	0xa744,
-	0xa746,
-	0xa748,
-	0xa74a,
-	0xa74c,
-	0xa74e,
-	0xa750,
-	0xa752,
-	0xa754,
-	0xa756,
-	0xa758,
-	0xa75a,
-	0xa75c,
-	0xa75e,
-	0xa760,
-	0xa762,
-	0xa764,
-	0xa766,
-	0xa768,
-	0xa76a,
-	0xa76c,
-	0xa76e,
-	0xa779,
-	0xa77b,
-	0xa780,
-	0xa782,
-	0xa784,
-	0xa786,
-	0xa78b,
-	0xa78d,
-	0xa790,
-	0xa792,
-	0xa796,
-	0xa798,
-	0xa79a,
-	0xa79c,
-	0xa79e,
-	0xa7a0,
-	0xa7a2,
-	0xa7a4,
-	0xa7a6,
-	0xa7a8,
-	0x1d49c,
-	0x1d4a2,
-	0x1d546,
-	0x1d7ca,
+    0x0100,
+    0x0102,
+    0x0104,
+    0x0106,
+    0x0108,
+    0x010a,
+    0x010c,
+    0x010e,
+    0x0110,
+    0x0112,
+    0x0114,
+    0x0116,
+    0x0118,
+    0x011a,
+    0x011c,
+    0x011e,
+    0x0120,
+    0x0122,
+    0x0124,
+    0x0126,
+    0x0128,
+    0x012a,
+    0x012c,
+    0x012e,
+    0x0130,
+    0x0132,
+    0x0134,
+    0x0136,
+    0x0139,
+    0x013b,
+    0x013d,
+    0x013f,
+    0x0141,
+    0x0143,
+    0x0145,
+    0x0147,
+    0x014a,
+    0x014c,
+    0x014e,
+    0x0150,
+    0x0152,
+    0x0154,
+    0x0156,
+    0x0158,
+    0x015a,
+    0x015c,
+    0x015e,
+    0x0160,
+    0x0162,
+    0x0164,
+    0x0166,
+    0x0168,
+    0x016a,
+    0x016c,
+    0x016e,
+    0x0170,
+    0x0172,
+    0x0174,
+    0x0176,
+    0x017b,
+    0x017d,
+    0x0184,
+    0x01a2,
+    0x01a4,
+    0x01a9,
+    0x01ac,
+    0x01b5,
+    0x01bc,
+    0x01c4,
+    0x01c7,
+    0x01ca,
+    0x01cd,
+    0x01cf,
+    0x01d1,
+    0x01d3,
+    0x01d5,
+    0x01d7,
+    0x01d9,
+    0x01db,
+    0x01de,
+    0x01e0,
+    0x01e2,
+    0x01e4,
+    0x01e6,
+    0x01e8,
+    0x01ea,
+    0x01ec,
+    0x01ee,
+    0x01f1,
+    0x01f4,
+    0x01fa,
+    0x01fc,
+    0x01fe,
+    0x0200,
+    0x0202,
+    0x0204,
+    0x0206,
+    0x0208,
+    0x020a,
+    0x020c,
+    0x020e,
+    0x0210,
+    0x0212,
+    0x0214,
+    0x0216,
+    0x0218,
+    0x021a,
+    0x021c,
+    0x021e,
+    0x0220,
+    0x0222,
+    0x0224,
+    0x0226,
+    0x0228,
+    0x022a,
+    0x022c,
+    0x022e,
+    0x0230,
+    0x0232,
+    0x0241,
+    0x0248,
+    0x024a,
+    0x024c,
+    0x024e,
+    0x0370,
+    0x0372,
+    0x0376,
+    0x037f,
+    0x0386,
+    0x038c,
+    0x03cf,
+    0x03d8,
+    0x03da,
+    0x03dc,
+    0x03de,
+    0x03e0,
+    0x03e2,
+    0x03e4,
+    0x03e6,
+    0x03e8,
+    0x03ea,
+    0x03ec,
+    0x03ee,
+    0x03f4,
+    0x03f7,
+    0x0460,
+    0x0462,
+    0x0464,
+    0x0466,
+    0x0468,
+    0x046a,
+    0x046c,
+    0x046e,
+    0x0470,
+    0x0472,
+    0x0474,
+    0x0476,
+    0x0478,
+    0x047a,
+    0x047c,
+    0x047e,
+    0x0480,
+    0x048a,
+    0x048c,
+    0x048e,
+    0x0490,
+    0x0492,
+    0x0494,
+    0x0496,
+    0x0498,
+    0x049a,
+    0x049c,
+    0x049e,
+    0x04a0,
+    0x04a2,
+    0x04a4,
+    0x04a6,
+    0x04a8,
+    0x04aa,
+    0x04ac,
+    0x04ae,
+    0x04b0,
+    0x04b2,
+    0x04b4,
+    0x04b6,
+    0x04b8,
+    0x04ba,
+    0x04bc,
+    0x04be,
+    0x04c3,
+    0x04c5,
+    0x04c7,
+    0x04c9,
+    0x04cb,
+    0x04cd,
+    0x04d0,
+    0x04d2,
+    0x04d4,
+    0x04d6,
+    0x04d8,
+    0x04da,
+    0x04dc,
+    0x04de,
+    0x04e0,
+    0x04e2,
+    0x04e4,
+    0x04e6,
+    0x04e8,
+    0x04ea,
+    0x04ec,
+    0x04ee,
+    0x04f0,
+    0x04f2,
+    0x04f4,
+    0x04f6,
+    0x04f8,
+    0x04fa,
+    0x04fc,
+    0x04fe,
+    0x0500,
+    0x0502,
+    0x0504,
+    0x0506,
+    0x0508,
+    0x050a,
+    0x050c,
+    0x050e,
+    0x0510,
+    0x0512,
+    0x0514,
+    0x0516,
+    0x0518,
+    0x051a,
+    0x051c,
+    0x051e,
+    0x0520,
+    0x0522,
+    0x0524,
+    0x0526,
+    0x0528,
+    0x052a,
+    0x052c,
+    0x052e,
+    0x10c7,
+    0x10cd,
+    0x1e00,
+    0x1e02,
+    0x1e04,
+    0x1e06,
+    0x1e08,
+    0x1e0a,
+    0x1e0c,
+    0x1e0e,
+    0x1e10,
+    0x1e12,
+    0x1e14,
+    0x1e16,
+    0x1e18,
+    0x1e1a,
+    0x1e1c,
+    0x1e1e,
+    0x1e20,
+    0x1e22,
+    0x1e24,
+    0x1e26,
+    0x1e28,
+    0x1e2a,
+    0x1e2c,
+    0x1e2e,
+    0x1e30,
+    0x1e32,
+    0x1e34,
+    0x1e36,
+    0x1e38,
+    0x1e3a,
+    0x1e3c,
+    0x1e3e,
+    0x1e40,
+    0x1e42,
+    0x1e44,
+    0x1e46,
+    0x1e48,
+    0x1e4a,
+    0x1e4c,
+    0x1e4e,
+    0x1e50,
+    0x1e52,
+    0x1e54,
+    0x1e56,
+    0x1e58,
+    0x1e5a,
+    0x1e5c,
+    0x1e5e,
+    0x1e60,
+    0x1e62,
+    0x1e64,
+    0x1e66,
+    0x1e68,
+    0x1e6a,
+    0x1e6c,
+    0x1e6e,
+    0x1e70,
+    0x1e72,
+    0x1e74,
+    0x1e76,
+    0x1e78,
+    0x1e7a,
+    0x1e7c,
+    0x1e7e,
+    0x1e80,
+    0x1e82,
+    0x1e84,
+    0x1e86,
+    0x1e88,
+    0x1e8a,
+    0x1e8c,
+    0x1e8e,
+    0x1e90,
+    0x1e92,
+    0x1e94,
+    0x1e9e,
+    0x1ea0,
+    0x1ea2,
+    0x1ea4,
+    0x1ea6,
+    0x1ea8,
+    0x1eaa,
+    0x1eac,
+    0x1eae,
+    0x1eb0,
+    0x1eb2,
+    0x1eb4,
+    0x1eb6,
+    0x1eb8,
+    0x1eba,
+    0x1ebc,
+    0x1ebe,
+    0x1ec0,
+    0x1ec2,
+    0x1ec4,
+    0x1ec6,
+    0x1ec8,
+    0x1eca,
+    0x1ecc,
+    0x1ece,
+    0x1ed0,
+    0x1ed2,
+    0x1ed4,
+    0x1ed6,
+    0x1ed8,
+    0x1eda,
+    0x1edc,
+    0x1ede,
+    0x1ee0,
+    0x1ee2,
+    0x1ee4,
+    0x1ee6,
+    0x1ee8,
+    0x1eea,
+    0x1eec,
+    0x1eee,
+    0x1ef0,
+    0x1ef2,
+    0x1ef4,
+    0x1ef6,
+    0x1ef8,
+    0x1efa,
+    0x1efc,
+    0x1efe,
+    0x1f59,
+    0x1f5b,
+    0x1f5d,
+    0x1f5f,
+    0x2102,
+    0x2107,
+    0x2115,
+    0x2124,
+    0x2126,
+    0x2128,
+    0x2145,
+    0x2183,
+    0x2c60,
+    0x2c67,
+    0x2c69,
+    0x2c6b,
+    0x2c72,
+    0x2c75,
+    0x2c82,
+    0x2c84,
+    0x2c86,
+    0x2c88,
+    0x2c8a,
+    0x2c8c,
+    0x2c8e,
+    0x2c90,
+    0x2c92,
+    0x2c94,
+    0x2c96,
+    0x2c98,
+    0x2c9a,
+    0x2c9c,
+    0x2c9e,
+    0x2ca0,
+    0x2ca2,
+    0x2ca4,
+    0x2ca6,
+    0x2ca8,
+    0x2caa,
+    0x2cac,
+    0x2cae,
+    0x2cb0,
+    0x2cb2,
+    0x2cb4,
+    0x2cb6,
+    0x2cb8,
+    0x2cba,
+    0x2cbc,
+    0x2cbe,
+    0x2cc0,
+    0x2cc2,
+    0x2cc4,
+    0x2cc6,
+    0x2cc8,
+    0x2cca,
+    0x2ccc,
+    0x2cce,
+    0x2cd0,
+    0x2cd2,
+    0x2cd4,
+    0x2cd6,
+    0x2cd8,
+    0x2cda,
+    0x2cdc,
+    0x2cde,
+    0x2ce0,
+    0x2ce2,
+    0x2ceb,
+    0x2ced,
+    0x2cf2,
+    0xa640,
+    0xa642,
+    0xa644,
+    0xa646,
+    0xa648,
+    0xa64a,
+    0xa64c,
+    0xa64e,
+    0xa650,
+    0xa652,
+    0xa654,
+    0xa656,
+    0xa658,
+    0xa65a,
+    0xa65c,
+    0xa65e,
+    0xa660,
+    0xa662,
+    0xa664,
+    0xa666,
+    0xa668,
+    0xa66a,
+    0xa66c,
+    0xa680,
+    0xa682,
+    0xa684,
+    0xa686,
+    0xa688,
+    0xa68a,
+    0xa68c,
+    0xa68e,
+    0xa690,
+    0xa692,
+    0xa694,
+    0xa696,
+    0xa698,
+    0xa69a,
+    0xa722,
+    0xa724,
+    0xa726,
+    0xa728,
+    0xa72a,
+    0xa72c,
+    0xa72e,
+    0xa732,
+    0xa734,
+    0xa736,
+    0xa738,
+    0xa73a,
+    0xa73c,
+    0xa73e,
+    0xa740,
+    0xa742,
+    0xa744,
+    0xa746,
+    0xa748,
+    0xa74a,
+    0xa74c,
+    0xa74e,
+    0xa750,
+    0xa752,
+    0xa754,
+    0xa756,
+    0xa758,
+    0xa75a,
+    0xa75c,
+    0xa75e,
+    0xa760,
+    0xa762,
+    0xa764,
+    0xa766,
+    0xa768,
+    0xa76a,
+    0xa76c,
+    0xa76e,
+    0xa779,
+    0xa77b,
+    0xa780,
+    0xa782,
+    0xa784,
+    0xa786,
+    0xa78b,
+    0xa78d,
+    0xa790,
+    0xa792,
+    0xa796,
+    0xa798,
+    0xa79a,
+    0xa79c,
+    0xa79e,
+    0xa7a0,
+    0xa7a2,
+    0xa7a4,
+    0xa7a6,
+    0xa7a8,
+    0x1d49c,
+    0x1d4a2,
+    0x1d546,
+    0x1d7ca,
 };
 
 } // !namespace
 
 bool isupper(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, isupperr, nelem (isupperr)/2, 2);
+   p = rbsearch(c, isupperr, nelem (isupperr)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	p = rbsearch(c, isuppers, nelem (isuppers), 1);
+ p = rbsearch(c, isuppers, nelem (isuppers), 1);
 
-	if (p && c == p[0])
-		return true;
+   if (p && c == p[0])
+       return true;
 
-	return false;
+ return false;
 }
 
 namespace {
 
 const char32_t islowerr[] = {
-	0x0061, 0x007a,
-	0x00df, 0x00f6,
-	0x00f8, 0x00ff,
-	0x0137, 0x0138,
-	0x0148, 0x0149,
-	0x017e, 0x0180,
-	0x018c, 0x018d,
-	0x0199, 0x019b,
-	0x01aa, 0x01ab,
-	0x01b9, 0x01ba,
-	0x01bd, 0x01bf,
-	0x01dc, 0x01dd,
-	0x01ef, 0x01f0,
-	0x0233, 0x0239,
-	0x023f, 0x0240,
-	0x024f, 0x0293,
-	0x0295, 0x02af,
-	0x037b, 0x037d,
-	0x03ac, 0x03ce,
-	0x03d0, 0x03d1,
-	0x03d5, 0x03d7,
-	0x03ef, 0x03f3,
-	0x03fb, 0x03fc,
-	0x0430, 0x045f,
-	0x04ce, 0x04cf,
-	0x0561, 0x0587,
-	0x1d00, 0x1d2b,
-	0x1d6b, 0x1d77,
-	0x1d79, 0x1d9a,
-	0x1e95, 0x1e9d,
-	0x1eff, 0x1f07,
-	0x1f10, 0x1f15,
-	0x1f20, 0x1f27,
-	0x1f30, 0x1f37,
-	0x1f40, 0x1f45,
-	0x1f50, 0x1f57,
-	0x1f60, 0x1f67,
-	0x1f70, 0x1f7d,
-	0x1f80, 0x1f87,
-	0x1f90, 0x1f97,
-	0x1fa0, 0x1fa7,
-	0x1fb0, 0x1fb4,
-	0x1fb6, 0x1fb7,
-	0x1fc2, 0x1fc4,
-	0x1fc6, 0x1fc7,
-	0x1fd0, 0x1fd3,
-	0x1fd6, 0x1fd7,
-	0x1fe0, 0x1fe7,
-	0x1ff2, 0x1ff4,
-	0x1ff6, 0x1ff7,
-	0x210e, 0x210f,
-	0x213c, 0x213d,
-	0x2146, 0x2149,
-	0x2170, 0x217f,
-	0x24d0, 0x24e9,
-	0x2c30, 0x2c5e,
-	0x2c65, 0x2c66,
-	0x2c73, 0x2c74,
-	0x2c76, 0x2c7b,
-	0x2ce3, 0x2ce4,
-	0x2d00, 0x2d25,
-	0xa72f, 0xa731,
-	0xa771, 0xa778,
-	0xa793, 0xa795,
-	0xab30, 0xab5a,
-	0xab64, 0xab65,
-	0xfb00, 0xfb06,
-	0xfb13, 0xfb17,
-	0xff41, 0xff5a,
-	0x10428, 0x1044f,
-	0x118c0, 0x118df,
-	0x1d41a, 0x1d433,
-	0x1d44e, 0x1d454,
-	0x1d456, 0x1d467,
-	0x1d482, 0x1d49b,
-	0x1d4b6, 0x1d4b9,
-	0x1d4bd, 0x1d4c3,
-	0x1d4c5, 0x1d4cf,
-	0x1d4ea, 0x1d503,
-	0x1d51e, 0x1d537,
-	0x1d552, 0x1d56b,
-	0x1d586, 0x1d59f,
-	0x1d5ba, 0x1d5d3,
-	0x1d5ee, 0x1d607,
-	0x1d622, 0x1d63b,
-	0x1d656, 0x1d66f,
-	0x1d68a, 0x1d6a5,
-	0x1d6c2, 0x1d6da,
-	0x1d6dc, 0x1d6e1,
-	0x1d6fc, 0x1d714,
-	0x1d716, 0x1d71b,
-	0x1d736, 0x1d74e,
-	0x1d750, 0x1d755,
-	0x1d770, 0x1d788,
-	0x1d78a, 0x1d78f,
-	0x1d7aa, 0x1d7c2,
-	0x1d7c4, 0x1d7c9,
+    0x0061, 0x007a,
+    0x00df, 0x00f6,
+    0x00f8, 0x00ff,
+    0x0137, 0x0138,
+    0x0148, 0x0149,
+    0x017e, 0x0180,
+    0x018c, 0x018d,
+    0x0199, 0x019b,
+    0x01aa, 0x01ab,
+    0x01b9, 0x01ba,
+    0x01bd, 0x01bf,
+    0x01dc, 0x01dd,
+    0x01ef, 0x01f0,
+    0x0233, 0x0239,
+    0x023f, 0x0240,
+    0x024f, 0x0293,
+    0x0295, 0x02af,
+    0x037b, 0x037d,
+    0x03ac, 0x03ce,
+    0x03d0, 0x03d1,
+    0x03d5, 0x03d7,
+    0x03ef, 0x03f3,
+    0x03fb, 0x03fc,
+    0x0430, 0x045f,
+    0x04ce, 0x04cf,
+    0x0561, 0x0587,
+    0x1d00, 0x1d2b,
+    0x1d6b, 0x1d77,
+    0x1d79, 0x1d9a,
+    0x1e95, 0x1e9d,
+    0x1eff, 0x1f07,
+    0x1f10, 0x1f15,
+    0x1f20, 0x1f27,
+    0x1f30, 0x1f37,
+    0x1f40, 0x1f45,
+    0x1f50, 0x1f57,
+    0x1f60, 0x1f67,
+    0x1f70, 0x1f7d,
+    0x1f80, 0x1f87,
+    0x1f90, 0x1f97,
+    0x1fa0, 0x1fa7,
+    0x1fb0, 0x1fb4,
+    0x1fb6, 0x1fb7,
+    0x1fc2, 0x1fc4,
+    0x1fc6, 0x1fc7,
+    0x1fd0, 0x1fd3,
+    0x1fd6, 0x1fd7,
+    0x1fe0, 0x1fe7,
+    0x1ff2, 0x1ff4,
+    0x1ff6, 0x1ff7,
+    0x210e, 0x210f,
+    0x213c, 0x213d,
+    0x2146, 0x2149,
+    0x2170, 0x217f,
+    0x24d0, 0x24e9,
+    0x2c30, 0x2c5e,
+    0x2c65, 0x2c66,
+    0x2c73, 0x2c74,
+    0x2c76, 0x2c7b,
+    0x2ce3, 0x2ce4,
+    0x2d00, 0x2d25,
+    0xa72f, 0xa731,
+    0xa771, 0xa778,
+    0xa793, 0xa795,
+    0xab30, 0xab5a,
+    0xab64, 0xab65,
+    0xfb00, 0xfb06,
+    0xfb13, 0xfb17,
+    0xff41, 0xff5a,
+    0x10428, 0x1044f,
+    0x118c0, 0x118df,
+    0x1d41a, 0x1d433,
+    0x1d44e, 0x1d454,
+    0x1d456, 0x1d467,
+    0x1d482, 0x1d49b,
+    0x1d4b6, 0x1d4b9,
+    0x1d4bd, 0x1d4c3,
+    0x1d4c5, 0x1d4cf,
+    0x1d4ea, 0x1d503,
+    0x1d51e, 0x1d537,
+    0x1d552, 0x1d56b,
+    0x1d586, 0x1d59f,
+    0x1d5ba, 0x1d5d3,
+    0x1d5ee, 0x1d607,
+    0x1d622, 0x1d63b,
+    0x1d656, 0x1d66f,
+    0x1d68a, 0x1d6a5,
+    0x1d6c2, 0x1d6da,
+    0x1d6dc, 0x1d6e1,
+    0x1d6fc, 0x1d714,
+    0x1d716, 0x1d71b,
+    0x1d736, 0x1d74e,
+    0x1d750, 0x1d755,
+    0x1d770, 0x1d788,
+    0x1d78a, 0x1d78f,
+    0x1d7aa, 0x1d7c2,
+    0x1d7c4, 0x1d7c9,
 };
 
 } // !namespace
@@ -1487,615 +1487,615 @@
 namespace {
 
 const char32_t islowers[] = {
-	0x00b5,
-	0x0101,
-	0x0103,
-	0x0105,
-	0x0107,
-	0x0109,
-	0x010b,
-	0x010d,
-	0x010f,
-	0x0111,
-	0x0113,
-	0x0115,
-	0x0117,
-	0x0119,
-	0x011b,
-	0x011d,
-	0x011f,
-	0x0121,
-	0x0123,
-	0x0125,
-	0x0127,
-	0x0129,
-	0x012b,
-	0x012d,
-	0x012f,
-	0x0131,
-	0x0133,
-	0x0135,
-	0x013a,
-	0x013c,
-	0x013e,
-	0x0140,
-	0x0142,
-	0x0144,
-	0x0146,
-	0x014b,
-	0x014d,
-	0x014f,
-	0x0151,
-	0x0153,
-	0x0155,
-	0x0157,
-	0x0159,
-	0x015b,
-	0x015d,
-	0x015f,
-	0x0161,
-	0x0163,
-	0x0165,
-	0x0167,
-	0x0169,
-	0x016b,
-	0x016d,
-	0x016f,
-	0x0171,
-	0x0173,
-	0x0175,
-	0x0177,
-	0x017a,
-	0x017c,
-	0x0183,
-	0x0185,
-	0x0188,
-	0x0192,
-	0x0195,
-	0x019e,
-	0x01a1,
-	0x01a3,
-	0x01a5,
-	0x01a8,
-	0x01ad,
-	0x01b0,
-	0x01b4,
-	0x01b6,
-	0x01c6,
-	0x01c9,
-	0x01cc,
-	0x01ce,
-	0x01d0,
-	0x01d2,
-	0x01d4,
-	0x01d6,
-	0x01d8,
-	0x01da,
-	0x01df,
-	0x01e1,
-	0x01e3,
-	0x01e5,
-	0x01e7,
-	0x01e9,
-	0x01eb,
-	0x01ed,
-	0x01f3,
-	0x01f5,
-	0x01f9,
-	0x01fb,
-	0x01fd,
-	0x01ff,
-	0x0201,
-	0x0203,
-	0x0205,
-	0x0207,
-	0x0209,
-	0x020b,
-	0x020d,
-	0x020f,
-	0x0211,
-	0x0213,
-	0x0215,
-	0x0217,
-	0x0219,
-	0x021b,
-	0x021d,
-	0x021f,
-	0x0221,
-	0x0223,
-	0x0225,
-	0x0227,
-	0x0229,
-	0x022b,
-	0x022d,
-	0x022f,
-	0x0231,
-	0x023c,
-	0x0242,
-	0x0247,
-	0x0249,
-	0x024b,
-	0x024d,
-	0x0371,
-	0x0373,
-	0x0377,
-	0x0390,
-	0x03d9,
-	0x03db,
-	0x03dd,
-	0x03df,
-	0x03e1,
-	0x03e3,
-	0x03e5,
-	0x03e7,
-	0x03e9,
-	0x03eb,
-	0x03ed,
-	0x03f5,
-	0x03f8,
-	0x0461,
-	0x0463,
-	0x0465,
-	0x0467,
-	0x0469,
-	0x046b,
-	0x046d,
-	0x046f,
-	0x0471,
-	0x0473,
-	0x0475,
-	0x0477,
-	0x0479,
-	0x047b,
-	0x047d,
-	0x047f,
-	0x0481,
-	0x048b,
-	0x048d,
-	0x048f,
-	0x0491,
-	0x0493,
-	0x0495,
-	0x0497,
-	0x0499,
-	0x049b,
-	0x049d,
-	0x049f,
-	0x04a1,
-	0x04a3,
-	0x04a5,
-	0x04a7,
-	0x04a9,
-	0x04ab,
-	0x04ad,
-	0x04af,
-	0x04b1,
-	0x04b3,
-	0x04b5,
-	0x04b7,
-	0x04b9,
-	0x04bb,
-	0x04bd,
-	0x04bf,
-	0x04c2,
-	0x04c4,
-	0x04c6,
-	0x04c8,
-	0x04ca,
-	0x04cc,
-	0x04d1,
-	0x04d3,
-	0x04d5,
-	0x04d7,
-	0x04d9,
-	0x04db,
-	0x04dd,
-	0x04df,
-	0x04e1,
-	0x04e3,
-	0x04e5,
-	0x04e7,
-	0x04e9,
-	0x04eb,
-	0x04ed,
-	0x04ef,
-	0x04f1,
-	0x04f3,
-	0x04f5,
-	0x04f7,
-	0x04f9,
-	0x04fb,
-	0x04fd,
-	0x04ff,
-	0x0501,
-	0x0503,
-	0x0505,
-	0x0507,
-	0x0509,
-	0x050b,
-	0x050d,
-	0x050f,
-	0x0511,
-	0x0513,
-	0x0515,
-	0x0517,
-	0x0519,
-	0x051b,
-	0x051d,
-	0x051f,
-	0x0521,
-	0x0523,
-	0x0525,
-	0x0527,
-	0x0529,
-	0x052b,
-	0x052d,
-	0x052f,
-	0x1e01,
-	0x1e03,
-	0x1e05,
-	0x1e07,
-	0x1e09,
-	0x1e0b,
-	0x1e0d,
-	0x1e0f,
-	0x1e11,
-	0x1e13,
-	0x1e15,
-	0x1e17,
-	0x1e19,
-	0x1e1b,
-	0x1e1d,
-	0x1e1f,
-	0x1e21,
-	0x1e23,
-	0x1e25,
-	0x1e27,
-	0x1e29,
-	0x1e2b,
-	0x1e2d,
-	0x1e2f,
-	0x1e31,
-	0x1e33,
-	0x1e35,
-	0x1e37,
-	0x1e39,
-	0x1e3b,
-	0x1e3d,
-	0x1e3f,
-	0x1e41,
-	0x1e43,
-	0x1e45,
-	0x1e47,
-	0x1e49,
-	0x1e4b,
-	0x1e4d,
-	0x1e4f,
-	0x1e51,
-	0x1e53,
-	0x1e55,
-	0x1e57,
-	0x1e59,
-	0x1e5b,
-	0x1e5d,
-	0x1e5f,
-	0x1e61,
-	0x1e63,
-	0x1e65,
-	0x1e67,
-	0x1e69,
-	0x1e6b,
-	0x1e6d,
-	0x1e6f,
-	0x1e71,
-	0x1e73,
-	0x1e75,
-	0x1e77,
-	0x1e79,
-	0x1e7b,
-	0x1e7d,
-	0x1e7f,
-	0x1e81,
-	0x1e83,
-	0x1e85,
-	0x1e87,
-	0x1e89,
-	0x1e8b,
-	0x1e8d,
-	0x1e8f,
-	0x1e91,
-	0x1e93,
-	0x1e9f,
-	0x1ea1,
-	0x1ea3,
-	0x1ea5,
-	0x1ea7,
-	0x1ea9,
-	0x1eab,
-	0x1ead,
-	0x1eaf,
-	0x1eb1,
-	0x1eb3,
-	0x1eb5,
-	0x1eb7,
-	0x1eb9,
-	0x1ebb,
-	0x1ebd,
-	0x1ebf,
-	0x1ec1,
-	0x1ec3,
-	0x1ec5,
-	0x1ec7,
-	0x1ec9,
-	0x1ecb,
-	0x1ecd,
-	0x1ecf,
-	0x1ed1,
-	0x1ed3,
-	0x1ed5,
-	0x1ed7,
-	0x1ed9,
-	0x1edb,
-	0x1edd,
-	0x1edf,
-	0x1ee1,
-	0x1ee3,
-	0x1ee5,
-	0x1ee7,
-	0x1ee9,
-	0x1eeb,
-	0x1eed,
-	0x1eef,
-	0x1ef1,
-	0x1ef3,
-	0x1ef5,
-	0x1ef7,
-	0x1ef9,
-	0x1efb,
-	0x1efd,
-	0x1fbe,
-	0x210a,
-	0x2113,
-	0x212f,
-	0x2134,
-	0x2139,
-	0x214e,
-	0x2184,
-	0x2c61,
-	0x2c68,
-	0x2c6a,
-	0x2c6c,
-	0x2c71,
-	0x2c81,
-	0x2c83,
-	0x2c85,
-	0x2c87,
-	0x2c89,
-	0x2c8b,
-	0x2c8d,
-	0x2c8f,
-	0x2c91,
-	0x2c93,
-	0x2c95,
-	0x2c97,
-	0x2c99,
-	0x2c9b,
-	0x2c9d,
-	0x2c9f,
-	0x2ca1,
-	0x2ca3,
-	0x2ca5,
-	0x2ca7,
-	0x2ca9,
-	0x2cab,
-	0x2cad,
-	0x2caf,
-	0x2cb1,
-	0x2cb3,
-	0x2cb5,
-	0x2cb7,
-	0x2cb9,
-	0x2cbb,
-	0x2cbd,
-	0x2cbf,
-	0x2cc1,
-	0x2cc3,
-	0x2cc5,
-	0x2cc7,
-	0x2cc9,
-	0x2ccb,
-	0x2ccd,
-	0x2ccf,
-	0x2cd1,
-	0x2cd3,
-	0x2cd5,
-	0x2cd7,
-	0x2cd9,
-	0x2cdb,
-	0x2cdd,
-	0x2cdf,
-	0x2ce1,
-	0x2cec,
-	0x2cee,
-	0x2cf3,
-	0x2d27,
-	0x2d2d,
-	0xa641,
-	0xa643,
-	0xa645,
-	0xa647,
-	0xa649,
-	0xa64b,
-	0xa64d,
-	0xa64f,
-	0xa651,
-	0xa653,
-	0xa655,
-	0xa657,
-	0xa659,
-	0xa65b,
-	0xa65d,
-	0xa65f,
-	0xa661,
-	0xa663,
-	0xa665,
-	0xa667,
-	0xa669,
-	0xa66b,
-	0xa66d,
-	0xa681,
-	0xa683,
-	0xa685,
-	0xa687,
-	0xa689,
-	0xa68b,
-	0xa68d,
-	0xa68f,
-	0xa691,
-	0xa693,
-	0xa695,
-	0xa697,
-	0xa699,
-	0xa69b,
-	0xa723,
-	0xa725,
-	0xa727,
-	0xa729,
-	0xa72b,
-	0xa72d,
-	0xa733,
-	0xa735,
-	0xa737,
-	0xa739,
-	0xa73b,
-	0xa73d,
-	0xa73f,
-	0xa741,
-	0xa743,
-	0xa745,
-	0xa747,
-	0xa749,
-	0xa74b,
-	0xa74d,
-	0xa74f,
-	0xa751,
-	0xa753,
-	0xa755,
-	0xa757,
-	0xa759,
-	0xa75b,
-	0xa75d,
-	0xa75f,
-	0xa761,
-	0xa763,
-	0xa765,
-	0xa767,
-	0xa769,
-	0xa76b,
-	0xa76d,
-	0xa76f,
-	0xa77a,
-	0xa77c,
-	0xa77f,
-	0xa781,
-	0xa783,
-	0xa785,
-	0xa787,
-	0xa78c,
-	0xa78e,
-	0xa791,
-	0xa797,
-	0xa799,
-	0xa79b,
-	0xa79d,
-	0xa79f,
-	0xa7a1,
-	0xa7a3,
-	0xa7a5,
-	0xa7a7,
-	0xa7a9,
-	0xa7fa,
-	0x1d4bb,
-	0x1d7cb,
+    0x00b5,
+    0x0101,
+    0x0103,
+    0x0105,
+    0x0107,
+    0x0109,
+    0x010b,
+    0x010d,
+    0x010f,
+    0x0111,
+    0x0113,
+    0x0115,
+    0x0117,
+    0x0119,
+    0x011b,
+    0x011d,
+    0x011f,
+    0x0121,
+    0x0123,
+    0x0125,
+    0x0127,
+    0x0129,
+    0x012b,
+    0x012d,
+    0x012f,
+    0x0131,
+    0x0133,
+    0x0135,
+    0x013a,
+    0x013c,
+    0x013e,
+    0x0140,
+    0x0142,
+    0x0144,
+    0x0146,
+    0x014b,
+    0x014d,
+    0x014f,
+    0x0151,
+    0x0153,
+    0x0155,
+    0x0157,
+    0x0159,
+    0x015b,
+    0x015d,
+    0x015f,
+    0x0161,
+    0x0163,
+    0x0165,
+    0x0167,
+    0x0169,
+    0x016b,
+    0x016d,
+    0x016f,
+    0x0171,
+    0x0173,
+    0x0175,
+    0x0177,
+    0x017a,
+    0x017c,
+    0x0183,
+    0x0185,
+    0x0188,
+    0x0192,
+    0x0195,
+    0x019e,
+    0x01a1,
+    0x01a3,
+    0x01a5,
+    0x01a8,
+    0x01ad,
+    0x01b0,
+    0x01b4,
+    0x01b6,
+    0x01c6,
+    0x01c9,
+    0x01cc,
+    0x01ce,
+    0x01d0,
+    0x01d2,
+    0x01d4,
+    0x01d6,
+    0x01d8,
+    0x01da,
+    0x01df,
+    0x01e1,
+    0x01e3,
+    0x01e5,
+    0x01e7,
+    0x01e9,
+    0x01eb,
+    0x01ed,
+    0x01f3,
+    0x01f5,
+    0x01f9,
+    0x01fb,
+    0x01fd,
+    0x01ff,
+    0x0201,
+    0x0203,
+    0x0205,
+    0x0207,
+    0x0209,
+    0x020b,
+    0x020d,
+    0x020f,
+    0x0211,
+    0x0213,
+    0x0215,
+    0x0217,
+    0x0219,
+    0x021b,
+    0x021d,
+    0x021f,
+    0x0221,
+    0x0223,
+    0x0225,
+    0x0227,
+    0x0229,
+    0x022b,
+    0x022d,
+    0x022f,
+    0x0231,
+    0x023c,
+    0x0242,
+    0x0247,
+    0x0249,
+    0x024b,
+    0x024d,
+    0x0371,
+    0x0373,
+    0x0377,
+    0x0390,
+    0x03d9,
+    0x03db,
+    0x03dd,
+    0x03df,
+    0x03e1,
+    0x03e3,
+    0x03e5,
+    0x03e7,
+    0x03e9,
+    0x03eb,
+    0x03ed,
+    0x03f5,
+    0x03f8,
+    0x0461,
+    0x0463,
+    0x0465,
+    0x0467,
+    0x0469,
+    0x046b,
+    0x046d,
+    0x046f,
+    0x0471,
+    0x0473,
+    0x0475,
+    0x0477,
+    0x0479,
+    0x047b,
+    0x047d,
+    0x047f,
+    0x0481,
+    0x048b,
+    0x048d,
+    0x048f,
+    0x0491,
+    0x0493,
+    0x0495,
+    0x0497,
+    0x0499,
+    0x049b,
+    0x049d,
+    0x049f,
+    0x04a1,
+    0x04a3,
+    0x04a5,
+    0x04a7,
+    0x04a9,
+    0x04ab,
+    0x04ad,
+    0x04af,
+    0x04b1,
+    0x04b3,
+    0x04b5,
+    0x04b7,
+    0x04b9,
+    0x04bb,
+    0x04bd,
+    0x04bf,
+    0x04c2,
+    0x04c4,
+    0x04c6,
+    0x04c8,
+    0x04ca,
+    0x04cc,
+    0x04d1,
+    0x04d3,
+    0x04d5,
+    0x04d7,
+    0x04d9,
+    0x04db,
+    0x04dd,
+    0x04df,
+    0x04e1,
+    0x04e3,
+    0x04e5,
+    0x04e7,
+    0x04e9,
+    0x04eb,
+    0x04ed,
+    0x04ef,
+    0x04f1,
+    0x04f3,
+    0x04f5,
+    0x04f7,
+    0x04f9,
+    0x04fb,
+    0x04fd,
+    0x04ff,
+    0x0501,
+    0x0503,
+    0x0505,
+    0x0507,
+    0x0509,
+    0x050b,
+    0x050d,
+    0x050f,
+    0x0511,
+    0x0513,
+    0x0515,
+    0x0517,
+    0x0519,
+    0x051b,
+    0x051d,
+    0x051f,
+    0x0521,
+    0x0523,
+    0x0525,
+    0x0527,
+    0x0529,
+    0x052b,
+    0x052d,
+    0x052f,
+    0x1e01,
+    0x1e03,
+    0x1e05,
+    0x1e07,
+    0x1e09,
+    0x1e0b,
+    0x1e0d,
+    0x1e0f,
+    0x1e11,
+    0x1e13,
+    0x1e15,
+    0x1e17,
+    0x1e19,
+    0x1e1b,
+    0x1e1d,
+    0x1e1f,
+    0x1e21,
+    0x1e23,
+    0x1e25,
+    0x1e27,
+    0x1e29,
+    0x1e2b,
+    0x1e2d,
+    0x1e2f,
+    0x1e31,
+    0x1e33,
+    0x1e35,
+    0x1e37,
+    0x1e39,
+    0x1e3b,
+    0x1e3d,
+    0x1e3f,
+    0x1e41,
+    0x1e43,
+    0x1e45,
+    0x1e47,
+    0x1e49,
+    0x1e4b,
+    0x1e4d,
+    0x1e4f,
+    0x1e51,
+    0x1e53,
+    0x1e55,
+    0x1e57,
+    0x1e59,
+    0x1e5b,
+    0x1e5d,
+    0x1e5f,
+    0x1e61,
+    0x1e63,
+    0x1e65,
+    0x1e67,
+    0x1e69,
+    0x1e6b,
+    0x1e6d,
+    0x1e6f,
+    0x1e71,
+    0x1e73,
+    0x1e75,
+    0x1e77,
+    0x1e79,
+    0x1e7b,
+    0x1e7d,
+    0x1e7f,
+    0x1e81,
+    0x1e83,
+    0x1e85,
+    0x1e87,
+    0x1e89,
+    0x1e8b,
+    0x1e8d,
+    0x1e8f,
+    0x1e91,
+    0x1e93,
+    0x1e9f,
+    0x1ea1,
+    0x1ea3,
+    0x1ea5,
+    0x1ea7,
+    0x1ea9,
+    0x1eab,
+    0x1ead,
+    0x1eaf,
+    0x1eb1,
+    0x1eb3,
+    0x1eb5,
+    0x1eb7,
+    0x1eb9,
+    0x1ebb,
+    0x1ebd,
+    0x1ebf,
+    0x1ec1,
+    0x1ec3,
+    0x1ec5,
+    0x1ec7,
+    0x1ec9,
+    0x1ecb,
+    0x1ecd,
+    0x1ecf,
+    0x1ed1,
+    0x1ed3,
+    0x1ed5,
+    0x1ed7,
+    0x1ed9,
+    0x1edb,
+    0x1edd,
+    0x1edf,
+    0x1ee1,
+    0x1ee3,
+    0x1ee5,
+    0x1ee7,
+    0x1ee9,
+    0x1eeb,
+    0x1eed,
+    0x1eef,
+    0x1ef1,
+    0x1ef3,
+    0x1ef5,
+    0x1ef7,
+    0x1ef9,
+    0x1efb,
+    0x1efd,
+    0x1fbe,
+    0x210a,
+    0x2113,
+    0x212f,
+    0x2134,
+    0x2139,
+    0x214e,
+    0x2184,
+    0x2c61,
+    0x2c68,
+    0x2c6a,
+    0x2c6c,
+    0x2c71,
+    0x2c81,
+    0x2c83,
+    0x2c85,
+    0x2c87,
+    0x2c89,
+    0x2c8b,
+    0x2c8d,
+    0x2c8f,
+    0x2c91,
+    0x2c93,
+    0x2c95,
+    0x2c97,
+    0x2c99,
+    0x2c9b,
+    0x2c9d,
+    0x2c9f,
+    0x2ca1,
+    0x2ca3,
+    0x2ca5,
+    0x2ca7,
+    0x2ca9,
+    0x2cab,
+    0x2cad,
+    0x2caf,
+    0x2cb1,
+    0x2cb3,
+    0x2cb5,
+    0x2cb7,
+    0x2cb9,
+    0x2cbb,
+    0x2cbd,
+    0x2cbf,
+    0x2cc1,
+    0x2cc3,
+    0x2cc5,
+    0x2cc7,
+    0x2cc9,
+    0x2ccb,
+    0x2ccd,
+    0x2ccf,
+    0x2cd1,
+    0x2cd3,
+    0x2cd5,
+    0x2cd7,
+    0x2cd9,
+    0x2cdb,
+    0x2cdd,
+    0x2cdf,
+    0x2ce1,
+    0x2cec,
+    0x2cee,
+    0x2cf3,
+    0x2d27,
+    0x2d2d,
+    0xa641,
+    0xa643,
+    0xa645,
+    0xa647,
+    0xa649,
+    0xa64b,
+    0xa64d,
+    0xa64f,
+    0xa651,
+    0xa653,
+    0xa655,
+    0xa657,
+    0xa659,
+    0xa65b,
+    0xa65d,
+    0xa65f,
+    0xa661,
+    0xa663,
+    0xa665,
+    0xa667,
+    0xa669,
+    0xa66b,
+    0xa66d,
+    0xa681,
+    0xa683,
+    0xa685,
+    0xa687,
+    0xa689,
+    0xa68b,
+    0xa68d,
+    0xa68f,
+    0xa691,
+    0xa693,
+    0xa695,
+    0xa697,
+    0xa699,
+    0xa69b,
+    0xa723,
+    0xa725,
+    0xa727,
+    0xa729,
+    0xa72b,
+    0xa72d,
+    0xa733,
+    0xa735,
+    0xa737,
+    0xa739,
+    0xa73b,
+    0xa73d,
+    0xa73f,
+    0xa741,
+    0xa743,
+    0xa745,
+    0xa747,
+    0xa749,
+    0xa74b,
+    0xa74d,
+    0xa74f,
+    0xa751,
+    0xa753,
+    0xa755,
+    0xa757,
+    0xa759,
+    0xa75b,
+    0xa75d,
+    0xa75f,
+    0xa761,
+    0xa763,
+    0xa765,
+    0xa767,
+    0xa769,
+    0xa76b,
+    0xa76d,
+    0xa76f,
+    0xa77a,
+    0xa77c,
+    0xa77f,
+    0xa781,
+    0xa783,
+    0xa785,
+    0xa787,
+    0xa78c,
+    0xa78e,
+    0xa791,
+    0xa797,
+    0xa799,
+    0xa79b,
+    0xa79d,
+    0xa79f,
+    0xa7a1,
+    0xa7a3,
+    0xa7a5,
+    0xa7a7,
+    0xa7a9,
+    0xa7fa,
+    0x1d4bb,
+    0x1d7cb,
 };
 
 } // !namespace
 
 bool islower(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, islowerr, nelem (islowerr)/2, 2);
+   p = rbsearch(c, islowerr, nelem (islowerr)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	p = rbsearch(c, islowers, nelem (islowers), 1);
+ p = rbsearch(c, islowers, nelem (islowers), 1);
 
-	if (p && c == p[0])
-		return true;
+   if (p && c == p[0])
+       return true;
 
-	return false;
+ return false;
 }
 
 namespace {
 
 const char32_t istitler[] = {
-	0x0041, 0x005a,
-	0x00c0, 0x00d6,
-	0x00d8, 0x00de,
-	0x0178, 0x0179,
-	0x0181, 0x0182,
-	0x0186, 0x0187,
-	0x0189, 0x018b,
-	0x018e, 0x0191,
-	0x0193, 0x0194,
-	0x0196, 0x0198,
-	0x019c, 0x019d,
-	0x019f, 0x01a0,
-	0x01a6, 0x01a7,
-	0x01ae, 0x01af,
-	0x01b1, 0x01b3,
-	0x01b7, 0x01b8,
-	0x01f6, 0x01f8,
-	0x023a, 0x023b,
-	0x023d, 0x023e,
-	0x0243, 0x0246,
-	0x0388, 0x038a,
-	0x038e, 0x038f,
-	0x0391, 0x03a1,
-	0x03a3, 0x03ab,
-	0x03f9, 0x03fa,
-	0x03fd, 0x042f,
-	0x04c0, 0x04c1,
-	0x0531, 0x0556,
-	0x10a0, 0x10c5,
-	0x1f08, 0x1f0f,
-	0x1f18, 0x1f1d,
-	0x1f28, 0x1f2f,
-	0x1f38, 0x1f3f,
-	0x1f48, 0x1f4d,
-	0x1f68, 0x1f6f,
-	0x1f88, 0x1f8f,
-	0x1f98, 0x1f9f,
-	0x1fa8, 0x1faf,
-	0x1fb8, 0x1fbc,
-	0x1fc8, 0x1fcc,
-	0x1fd8, 0x1fdb,
-	0x1fe8, 0x1fec,
-	0x1ff8, 0x1ffc,
-	0x2160, 0x216f,
-	0x24b6, 0x24cf,
-	0x2c00, 0x2c2e,
-	0x2c62, 0x2c64,
-	0x2c6d, 0x2c70,
-	0x2c7e, 0x2c80,
-	0xa77d, 0xa77e,
-	0xa7aa, 0xa7ad,
-	0xa7b0, 0xa7b1,
-	0xff21, 0xff3a,
-	0x10400, 0x10427,
-	0x118a0, 0x118bf,
+    0x0041, 0x005a,
+    0x00c0, 0x00d6,
+    0x00d8, 0x00de,
+    0x0178, 0x0179,
+    0x0181, 0x0182,
+    0x0186, 0x0187,
+    0x0189, 0x018b,
+    0x018e, 0x0191,
+    0x0193, 0x0194,
+    0x0196, 0x0198,
+    0x019c, 0x019d,
+    0x019f, 0x01a0,
+    0x01a6, 0x01a7,
+    0x01ae, 0x01af,
+    0x01b1, 0x01b3,
+    0x01b7, 0x01b8,
+    0x01f6, 0x01f8,
+    0x023a, 0x023b,
+    0x023d, 0x023e,
+    0x0243, 0x0246,
+    0x0388, 0x038a,
+    0x038e, 0x038f,
+    0x0391, 0x03a1,
+    0x03a3, 0x03ab,
+    0x03f9, 0x03fa,
+    0x03fd, 0x042f,
+    0x04c0, 0x04c1,
+    0x0531, 0x0556,
+    0x10a0, 0x10c5,
+    0x1f08, 0x1f0f,
+    0x1f18, 0x1f1d,
+    0x1f28, 0x1f2f,
+    0x1f38, 0x1f3f,
+    0x1f48, 0x1f4d,
+    0x1f68, 0x1f6f,
+    0x1f88, 0x1f8f,
+    0x1f98, 0x1f9f,
+    0x1fa8, 0x1faf,
+    0x1fb8, 0x1fbc,
+    0x1fc8, 0x1fcc,
+    0x1fd8, 0x1fdb,
+    0x1fe8, 0x1fec,
+    0x1ff8, 0x1ffc,
+    0x2160, 0x216f,
+    0x24b6, 0x24cf,
+    0x2c00, 0x2c2e,
+    0x2c62, 0x2c64,
+    0x2c6d, 0x2c70,
+    0x2c7e, 0x2c80,
+    0xa77d, 0xa77e,
+    0xa7aa, 0xa7ad,
+    0xa7b0, 0xa7b1,
+    0xff21, 0xff3a,
+    0x10400, 0x10427,
+    0x118a0, 0x118bf,
 };
 
 } // !namespace
@@ -2103,594 +2103,594 @@
 namespace {
 
 const char32_t istitles[] = {
-	0x0100,
-	0x0102,
-	0x0104,
-	0x0106,
-	0x0108,
-	0x010a,
-	0x010c,
-	0x010e,
-	0x0110,
-	0x0112,
-	0x0114,
-	0x0116,
-	0x0118,
-	0x011a,
-	0x011c,
-	0x011e,
-	0x0120,
-	0x0122,
-	0x0124,
-	0x0126,
-	0x0128,
-	0x012a,
-	0x012c,
-	0x012e,
-	0x0132,
-	0x0134,
-	0x0136,
-	0x0139,
-	0x013b,
-	0x013d,
-	0x013f,
-	0x0141,
-	0x0143,
-	0x0145,
-	0x0147,
-	0x014a,
-	0x014c,
-	0x014e,
-	0x0150,
-	0x0152,
-	0x0154,
-	0x0156,
-	0x0158,
-	0x015a,
-	0x015c,
-	0x015e,
-	0x0160,
-	0x0162,
-	0x0164,
-	0x0166,
-	0x0168,
-	0x016a,
-	0x016c,
-	0x016e,
-	0x0170,
-	0x0172,
-	0x0174,
-	0x0176,
-	0x017b,
-	0x017d,
-	0x0184,
-	0x01a2,
-	0x01a4,
-	0x01a9,
-	0x01ac,
-	0x01b5,
-	0x01bc,
-	0x01c5,
-	0x01c8,
-	0x01cb,
-	0x01cd,
-	0x01cf,
-	0x01d1,
-	0x01d3,
-	0x01d5,
-	0x01d7,
-	0x01d9,
-	0x01db,
-	0x01de,
-	0x01e0,
-	0x01e2,
-	0x01e4,
-	0x01e6,
-	0x01e8,
-	0x01ea,
-	0x01ec,
-	0x01ee,
-	0x01f2,
-	0x01f4,
-	0x01fa,
-	0x01fc,
-	0x01fe,
-	0x0200,
-	0x0202,
-	0x0204,
-	0x0206,
-	0x0208,
-	0x020a,
-	0x020c,
-	0x020e,
-	0x0210,
-	0x0212,
-	0x0214,
-	0x0216,
-	0x0218,
-	0x021a,
-	0x021c,
-	0x021e,
-	0x0220,
-	0x0222,
-	0x0224,
-	0x0226,
-	0x0228,
-	0x022a,
-	0x022c,
-	0x022e,
-	0x0230,
-	0x0232,
-	0x0241,
-	0x0248,
-	0x024a,
-	0x024c,
-	0x024e,
-	0x0370,
-	0x0372,
-	0x0376,
-	0x037f,
-	0x0386,
-	0x038c,
-	0x03cf,
-	0x03d8,
-	0x03da,
-	0x03dc,
-	0x03de,
-	0x03e0,
-	0x03e2,
-	0x03e4,
-	0x03e6,
-	0x03e8,
-	0x03ea,
-	0x03ec,
-	0x03ee,
-	0x03f7,
-	0x0460,
-	0x0462,
-	0x0464,
-	0x0466,
-	0x0468,
-	0x046a,
-	0x046c,
-	0x046e,
-	0x0470,
-	0x0472,
-	0x0474,
-	0x0476,
-	0x0478,
-	0x047a,
-	0x047c,
-	0x047e,
-	0x0480,
-	0x048a,
-	0x048c,
-	0x048e,
-	0x0490,
-	0x0492,
-	0x0494,
-	0x0496,
-	0x0498,
-	0x049a,
-	0x049c,
-	0x049e,
-	0x04a0,
-	0x04a2,
-	0x04a4,
-	0x04a6,
-	0x04a8,
-	0x04aa,
-	0x04ac,
-	0x04ae,
-	0x04b0,
-	0x04b2,
-	0x04b4,
-	0x04b6,
-	0x04b8,
-	0x04ba,
-	0x04bc,
-	0x04be,
-	0x04c3,
-	0x04c5,
-	0x04c7,
-	0x04c9,
-	0x04cb,
-	0x04cd,
-	0x04d0,
-	0x04d2,
-	0x04d4,
-	0x04d6,
-	0x04d8,
-	0x04da,
-	0x04dc,
-	0x04de,
-	0x04e0,
-	0x04e2,
-	0x04e4,
-	0x04e6,
-	0x04e8,
-	0x04ea,
-	0x04ec,
-	0x04ee,
-	0x04f0,
-	0x04f2,
-	0x04f4,
-	0x04f6,
-	0x04f8,
-	0x04fa,
-	0x04fc,
-	0x04fe,
-	0x0500,
-	0x0502,
-	0x0504,
-	0x0506,
-	0x0508,
-	0x050a,
-	0x050c,
-	0x050e,
-	0x0510,
-	0x0512,
-	0x0514,
-	0x0516,
-	0x0518,
-	0x051a,
-	0x051c,
-	0x051e,
-	0x0520,
-	0x0522,
-	0x0524,
-	0x0526,
-	0x0528,
-	0x052a,
-	0x052c,
-	0x052e,
-	0x10c7,
-	0x10cd,
-	0x1e00,
-	0x1e02,
-	0x1e04,
-	0x1e06,
-	0x1e08,
-	0x1e0a,
-	0x1e0c,
-	0x1e0e,
-	0x1e10,
-	0x1e12,
-	0x1e14,
-	0x1e16,
-	0x1e18,
-	0x1e1a,
-	0x1e1c,
-	0x1e1e,
-	0x1e20,
-	0x1e22,
-	0x1e24,
-	0x1e26,
-	0x1e28,
-	0x1e2a,
-	0x1e2c,
-	0x1e2e,
-	0x1e30,
-	0x1e32,
-	0x1e34,
-	0x1e36,
-	0x1e38,
-	0x1e3a,
-	0x1e3c,
-	0x1e3e,
-	0x1e40,
-	0x1e42,
-	0x1e44,
-	0x1e46,
-	0x1e48,
-	0x1e4a,
-	0x1e4c,
-	0x1e4e,
-	0x1e50,
-	0x1e52,
-	0x1e54,
-	0x1e56,
-	0x1e58,
-	0x1e5a,
-	0x1e5c,
-	0x1e5e,
-	0x1e60,
-	0x1e62,
-	0x1e64,
-	0x1e66,
-	0x1e68,
-	0x1e6a,
-	0x1e6c,
-	0x1e6e,
-	0x1e70,
-	0x1e72,
-	0x1e74,
-	0x1e76,
-	0x1e78,
-	0x1e7a,
-	0x1e7c,
-	0x1e7e,
-	0x1e80,
-	0x1e82,
-	0x1e84,
-	0x1e86,
-	0x1e88,
-	0x1e8a,
-	0x1e8c,
-	0x1e8e,
-	0x1e90,
-	0x1e92,
-	0x1e94,
-	0x1ea0,
-	0x1ea2,
-	0x1ea4,
-	0x1ea6,
-	0x1ea8,
-	0x1eaa,
-	0x1eac,
-	0x1eae,
-	0x1eb0,
-	0x1eb2,
-	0x1eb4,
-	0x1eb6,
-	0x1eb8,
-	0x1eba,
-	0x1ebc,
-	0x1ebe,
-	0x1ec0,
-	0x1ec2,
-	0x1ec4,
-	0x1ec6,
-	0x1ec8,
-	0x1eca,
-	0x1ecc,
-	0x1ece,
-	0x1ed0,
-	0x1ed2,
-	0x1ed4,
-	0x1ed6,
-	0x1ed8,
-	0x1eda,
-	0x1edc,
-	0x1ede,
-	0x1ee0,
-	0x1ee2,
-	0x1ee4,
-	0x1ee6,
-	0x1ee8,
-	0x1eea,
-	0x1eec,
-	0x1eee,
-	0x1ef0,
-	0x1ef2,
-	0x1ef4,
-	0x1ef6,
-	0x1ef8,
-	0x1efa,
-	0x1efc,
-	0x1efe,
-	0x1f59,
-	0x1f5b,
-	0x1f5d,
-	0x1f5f,
-	0x2132,
-	0x2183,
-	0x2c60,
-	0x2c67,
-	0x2c69,
-	0x2c6b,
-	0x2c72,
-	0x2c75,
-	0x2c82,
-	0x2c84,
-	0x2c86,
-	0x2c88,
-	0x2c8a,
-	0x2c8c,
-	0x2c8e,
-	0x2c90,
-	0x2c92,
-	0x2c94,
-	0x2c96,
-	0x2c98,
-	0x2c9a,
-	0x2c9c,
-	0x2c9e,
-	0x2ca0,
-	0x2ca2,
-	0x2ca4,
-	0x2ca6,
-	0x2ca8,
-	0x2caa,
-	0x2cac,
-	0x2cae,
-	0x2cb0,
-	0x2cb2,
-	0x2cb4,
-	0x2cb6,
-	0x2cb8,
-	0x2cba,
-	0x2cbc,
-	0x2cbe,
-	0x2cc0,
-	0x2cc2,
-	0x2cc4,
-	0x2cc6,
-	0x2cc8,
-	0x2cca,
-	0x2ccc,
-	0x2cce,
-	0x2cd0,
-	0x2cd2,
-	0x2cd4,
-	0x2cd6,
-	0x2cd8,
-	0x2cda,
-	0x2cdc,
-	0x2cde,
-	0x2ce0,
-	0x2ce2,
-	0x2ceb,
-	0x2ced,
-	0x2cf2,
-	0xa640,
-	0xa642,
-	0xa644,
-	0xa646,
-	0xa648,
-	0xa64a,
-	0xa64c,
-	0xa64e,
-	0xa650,
-	0xa652,
-	0xa654,
-	0xa656,
-	0xa658,
-	0xa65a,
-	0xa65c,
-	0xa65e,
-	0xa660,
-	0xa662,
-	0xa664,
-	0xa666,
-	0xa668,
-	0xa66a,
-	0xa66c,
-	0xa680,
-	0xa682,
-	0xa684,
-	0xa686,
-	0xa688,
-	0xa68a,
-	0xa68c,
-	0xa68e,
-	0xa690,
-	0xa692,
-	0xa694,
-	0xa696,
-	0xa698,
-	0xa69a,
-	0xa722,
-	0xa724,
-	0xa726,
-	0xa728,
-	0xa72a,
-	0xa72c,
-	0xa72e,
-	0xa732,
-	0xa734,
-	0xa736,
-	0xa738,
-	0xa73a,
-	0xa73c,
-	0xa73e,
-	0xa740,
-	0xa742,
-	0xa744,
-	0xa746,
-	0xa748,
-	0xa74a,
-	0xa74c,
-	0xa74e,
-	0xa750,
-	0xa752,
-	0xa754,
-	0xa756,
-	0xa758,
-	0xa75a,
-	0xa75c,
-	0xa75e,
-	0xa760,
-	0xa762,
-	0xa764,
-	0xa766,
-	0xa768,
-	0xa76a,
-	0xa76c,
-	0xa76e,
-	0xa779,
-	0xa77b,
-	0xa780,
-	0xa782,
-	0xa784,
-	0xa786,
-	0xa78b,
-	0xa78d,
-	0xa790,
-	0xa792,
-	0xa796,
-	0xa798,
-	0xa79a,
-	0xa79c,
-	0xa79e,
-	0xa7a0,
-	0xa7a2,
-	0xa7a4,
-	0xa7a6,
-	0xa7a8,
+    0x0100,
+    0x0102,
+    0x0104,
+    0x0106,
+    0x0108,
+    0x010a,
+    0x010c,
+    0x010e,
+    0x0110,
+    0x0112,
+    0x0114,
+    0x0116,
+    0x0118,
+    0x011a,
+    0x011c,
+    0x011e,
+    0x0120,
+    0x0122,
+    0x0124,
+    0x0126,
+    0x0128,
+    0x012a,
+    0x012c,
+    0x012e,
+    0x0132,
+    0x0134,
+    0x0136,
+    0x0139,
+    0x013b,
+    0x013d,
+    0x013f,
+    0x0141,
+    0x0143,
+    0x0145,
+    0x0147,
+    0x014a,
+    0x014c,
+    0x014e,
+    0x0150,
+    0x0152,
+    0x0154,
+    0x0156,
+    0x0158,
+    0x015a,
+    0x015c,
+    0x015e,
+    0x0160,
+    0x0162,
+    0x0164,
+    0x0166,
+    0x0168,
+    0x016a,
+    0x016c,
+    0x016e,
+    0x0170,
+    0x0172,
+    0x0174,
+    0x0176,
+    0x017b,
+    0x017d,
+    0x0184,
+    0x01a2,
+    0x01a4,
+    0x01a9,
+    0x01ac,
+    0x01b5,
+    0x01bc,
+    0x01c5,
+    0x01c8,
+    0x01cb,
+    0x01cd,
+    0x01cf,
+    0x01d1,
+    0x01d3,
+    0x01d5,
+    0x01d7,
+    0x01d9,
+    0x01db,
+    0x01de,
+    0x01e0,
+    0x01e2,
+    0x01e4,
+    0x01e6,
+    0x01e8,
+    0x01ea,
+    0x01ec,
+    0x01ee,
+    0x01f2,
+    0x01f4,
+    0x01fa,
+    0x01fc,
+    0x01fe,
+    0x0200,
+    0x0202,
+    0x0204,
+    0x0206,
+    0x0208,
+    0x020a,
+    0x020c,
+    0x020e,
+    0x0210,
+    0x0212,
+    0x0214,
+    0x0216,
+    0x0218,
+    0x021a,
+    0x021c,
+    0x021e,
+    0x0220,
+    0x0222,
+    0x0224,
+    0x0226,
+    0x0228,
+    0x022a,
+    0x022c,
+    0x022e,
+    0x0230,
+    0x0232,
+    0x0241,
+    0x0248,
+    0x024a,
+    0x024c,
+    0x024e,
+    0x0370,
+    0x0372,
+    0x0376,
+    0x037f,
+    0x0386,
+    0x038c,
+    0x03cf,
+    0x03d8,
+    0x03da,
+    0x03dc,
+    0x03de,
+    0x03e0,
+    0x03e2,
+    0x03e4,
+    0x03e6,
+    0x03e8,
+    0x03ea,
+    0x03ec,
+    0x03ee,
+    0x03f7,
+    0x0460,
+    0x0462,
+    0x0464,
+    0x0466,
+    0x0468,
+    0x046a,
+    0x046c,
+    0x046e,
+    0x0470,
+    0x0472,
+    0x0474,
+    0x0476,
+    0x0478,
+    0x047a,
+    0x047c,
+    0x047e,
+    0x0480,
+    0x048a,
+    0x048c,
+    0x048e,
+    0x0490,
+    0x0492,
+    0x0494,
+    0x0496,
+    0x0498,
+    0x049a,
+    0x049c,
+    0x049e,
+    0x04a0,
+    0x04a2,
+    0x04a4,
+    0x04a6,
+    0x04a8,
+    0x04aa,
+    0x04ac,
+    0x04ae,
+    0x04b0,
+    0x04b2,
+    0x04b4,
+    0x04b6,
+    0x04b8,
+    0x04ba,
+    0x04bc,
+    0x04be,
+    0x04c3,
+    0x04c5,
+    0x04c7,
+    0x04c9,
+    0x04cb,
+    0x04cd,
+    0x04d0,
+    0x04d2,
+    0x04d4,
+    0x04d6,
+    0x04d8,
+    0x04da,
+    0x04dc,
+    0x04de,
+    0x04e0,
+    0x04e2,
+    0x04e4,
+    0x04e6,
+    0x04e8,
+    0x04ea,
+    0x04ec,
+    0x04ee,
+    0x04f0,
+    0x04f2,
+    0x04f4,
+    0x04f6,
+    0x04f8,
+    0x04fa,
+    0x04fc,
+    0x04fe,
+    0x0500,
+    0x0502,
+    0x0504,
+    0x0506,
+    0x0508,
+    0x050a,
+    0x050c,
+    0x050e,
+    0x0510,
+    0x0512,
+    0x0514,
+    0x0516,
+    0x0518,
+    0x051a,
+    0x051c,
+    0x051e,
+    0x0520,
+    0x0522,
+    0x0524,
+    0x0526,
+    0x0528,
+    0x052a,
+    0x052c,
+    0x052e,
+    0x10c7,
+    0x10cd,
+    0x1e00,
+    0x1e02,
+    0x1e04,
+    0x1e06,
+    0x1e08,
+    0x1e0a,
+    0x1e0c,
+    0x1e0e,
+    0x1e10,
+    0x1e12,
+    0x1e14,
+    0x1e16,
+    0x1e18,
+    0x1e1a,
+    0x1e1c,
+    0x1e1e,
+    0x1e20,
+    0x1e22,
+    0x1e24,
+    0x1e26,
+    0x1e28,
+    0x1e2a,
+    0x1e2c,
+    0x1e2e,
+    0x1e30,
+    0x1e32,
+    0x1e34,
+    0x1e36,
+    0x1e38,
+    0x1e3a,
+    0x1e3c,
+    0x1e3e,
+    0x1e40,
+    0x1e42,
+    0x1e44,
+    0x1e46,
+    0x1e48,
+    0x1e4a,
+    0x1e4c,
+    0x1e4e,
+    0x1e50,
+    0x1e52,
+    0x1e54,
+    0x1e56,
+    0x1e58,
+    0x1e5a,
+    0x1e5c,
+    0x1e5e,
+    0x1e60,
+    0x1e62,
+    0x1e64,
+    0x1e66,
+    0x1e68,
+    0x1e6a,
+    0x1e6c,
+    0x1e6e,
+    0x1e70,
+    0x1e72,
+    0x1e74,
+    0x1e76,
+    0x1e78,
+    0x1e7a,
+    0x1e7c,
+    0x1e7e,
+    0x1e80,
+    0x1e82,
+    0x1e84,
+    0x1e86,
+    0x1e88,
+    0x1e8a,
+    0x1e8c,
+    0x1e8e,
+    0x1e90,
+    0x1e92,
+    0x1e94,
+    0x1ea0,
+    0x1ea2,
+    0x1ea4,
+    0x1ea6,
+    0x1ea8,
+    0x1eaa,
+    0x1eac,
+    0x1eae,
+    0x1eb0,
+    0x1eb2,
+    0x1eb4,
+    0x1eb6,
+    0x1eb8,
+    0x1eba,
+    0x1ebc,
+    0x1ebe,
+    0x1ec0,
+    0x1ec2,
+    0x1ec4,
+    0x1ec6,
+    0x1ec8,
+    0x1eca,
+    0x1ecc,
+    0x1ece,
+    0x1ed0,
+    0x1ed2,
+    0x1ed4,
+    0x1ed6,
+    0x1ed8,
+    0x1eda,
+    0x1edc,
+    0x1ede,
+    0x1ee0,
+    0x1ee2,
+    0x1ee4,
+    0x1ee6,
+    0x1ee8,
+    0x1eea,
+    0x1eec,
+    0x1eee,
+    0x1ef0,
+    0x1ef2,
+    0x1ef4,
+    0x1ef6,
+    0x1ef8,
+    0x1efa,
+    0x1efc,
+    0x1efe,
+    0x1f59,
+    0x1f5b,
+    0x1f5d,
+    0x1f5f,
+    0x2132,
+    0x2183,
+    0x2c60,
+    0x2c67,
+    0x2c69,
+    0x2c6b,
+    0x2c72,
+    0x2c75,
+    0x2c82,
+    0x2c84,
+    0x2c86,
+    0x2c88,
+    0x2c8a,
+    0x2c8c,
+    0x2c8e,
+    0x2c90,
+    0x2c92,
+    0x2c94,
+    0x2c96,
+    0x2c98,
+    0x2c9a,
+    0x2c9c,
+    0x2c9e,
+    0x2ca0,
+    0x2ca2,
+    0x2ca4,
+    0x2ca6,
+    0x2ca8,
+    0x2caa,
+    0x2cac,
+    0x2cae,
+    0x2cb0,
+    0x2cb2,
+    0x2cb4,
+    0x2cb6,
+    0x2cb8,
+    0x2cba,
+    0x2cbc,
+    0x2cbe,
+    0x2cc0,
+    0x2cc2,
+    0x2cc4,
+    0x2cc6,
+    0x2cc8,
+    0x2cca,
+    0x2ccc,
+    0x2cce,
+    0x2cd0,
+    0x2cd2,
+    0x2cd4,
+    0x2cd6,
+    0x2cd8,
+    0x2cda,
+    0x2cdc,
+    0x2cde,
+    0x2ce0,
+    0x2ce2,
+    0x2ceb,
+    0x2ced,
+    0x2cf2,
+    0xa640,
+    0xa642,
+    0xa644,
+    0xa646,
+    0xa648,
+    0xa64a,
+    0xa64c,
+    0xa64e,
+    0xa650,
+    0xa652,
+    0xa654,
+    0xa656,
+    0xa658,
+    0xa65a,
+    0xa65c,
+    0xa65e,
+    0xa660,
+    0xa662,
+    0xa664,
+    0xa666,
+    0xa668,
+    0xa66a,
+    0xa66c,
+    0xa680,
+    0xa682,
+    0xa684,
+    0xa686,
+    0xa688,
+    0xa68a,
+    0xa68c,
+    0xa68e,
+    0xa690,
+    0xa692,
+    0xa694,
+    0xa696,
+    0xa698,
+    0xa69a,
+    0xa722,
+    0xa724,
+    0xa726,
+    0xa728,
+    0xa72a,
+    0xa72c,
+    0xa72e,
+    0xa732,
+    0xa734,
+    0xa736,
+    0xa738,
+    0xa73a,
+    0xa73c,
+    0xa73e,
+    0xa740,
+    0xa742,
+    0xa744,
+    0xa746,
+    0xa748,
+    0xa74a,
+    0xa74c,
+    0xa74e,
+    0xa750,
+    0xa752,
+    0xa754,
+    0xa756,
+    0xa758,
+    0xa75a,
+    0xa75c,
+    0xa75e,
+    0xa760,
+    0xa762,
+    0xa764,
+    0xa766,
+    0xa768,
+    0xa76a,
+    0xa76c,
+    0xa76e,
+    0xa779,
+    0xa77b,
+    0xa780,
+    0xa782,
+    0xa784,
+    0xa786,
+    0xa78b,
+    0xa78d,
+    0xa790,
+    0xa792,
+    0xa796,
+    0xa798,
+    0xa79a,
+    0xa79c,
+    0xa79e,
+    0xa7a0,
+    0xa7a2,
+    0xa7a4,
+    0xa7a6,
+    0xa7a8,
 };
 
 } // !namespace
 
 bool istitle(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, istitler, nelem (istitler)/2, 2);
+   p = rbsearch(c, istitler, nelem (istitler)/2, 2);
 
-	if (p && c >= p[0] && c <= p[1])
-		return true;
+   if (p && c >= p[0] && c <= p[1])
+       return true;
 
-	p = rbsearch(c, istitles, nelem (istitles), 1);
+ p = rbsearch(c, istitles, nelem (istitles), 1);
 
-	if (p && c == p[0])
-		return true;
+   if (p && c == p[0])
+       return true;
 
-	return false;
+ return false;
 }
 
 namespace {
 
 const char32_t toupperr[] = {
-	0x0061, 0x007a, 1048544,
-	0x00e0, 0x00f6, 1048544,
-	0x00f8, 0x00fe, 1048544,
-	0x023f, 0x0240, 1059391,
-	0x0256, 0x0257, 1048371,
-	0x028a, 0x028b, 1048359,
-	0x037b, 0x037d, 1048706,
-	0x03ad, 0x03af, 1048539,
-	0x03b1, 0x03c1, 1048544,
-	0x03c3, 0x03cb, 1048544,
-	0x03cd, 0x03ce, 1048513,
-	0x0430, 0x044f, 1048544,
-	0x0450, 0x045f, 1048496,
-	0x0561, 0x0586, 1048528,
-	0x1f00, 0x1f07, 1048584,
-	0x1f10, 0x1f15, 1048584,
-	0x1f20, 0x1f27, 1048584,
-	0x1f30, 0x1f37, 1048584,
-	0x1f40, 0x1f45, 1048584,
-	0x1f60, 0x1f67, 1048584,
-	0x1f70, 0x1f71, 1048650,
-	0x1f72, 0x1f75, 1048662,
-	0x1f76, 0x1f77, 1048676,
-	0x1f78, 0x1f79, 1048704,
-	0x1f7a, 0x1f7b, 1048688,
-	0x1f7c, 0x1f7d, 1048702,
-	0x1f80, 0x1f87, 1048584,
-	0x1f90, 0x1f97, 1048584,
-	0x1fa0, 0x1fa7, 1048584,
-	0x1fb0, 0x1fb1, 1048584,
-	0x1fd0, 0x1fd1, 1048584,
-	0x1fe0, 0x1fe1, 1048584,
-	0x2170, 0x217f, 1048560,
-	0x24d0, 0x24e9, 1048550,
-	0x2c30, 0x2c5e, 1048528,
-	0x2d00, 0x2d25, 1041312,
-	0xff41, 0xff5a, 1048544,
-	0x10428, 0x1044f, 1048536,
-	0x118c0, 0x118df, 1048544,
+    0x0061, 0x007a, 1048544,
+    0x00e0, 0x00f6, 1048544,
+    0x00f8, 0x00fe, 1048544,
+    0x023f, 0x0240, 1059391,
+    0x0256, 0x0257, 1048371,
+    0x028a, 0x028b, 1048359,
+    0x037b, 0x037d, 1048706,
+    0x03ad, 0x03af, 1048539,
+    0x03b1, 0x03c1, 1048544,
+    0x03c3, 0x03cb, 1048544,
+    0x03cd, 0x03ce, 1048513,
+    0x0430, 0x044f, 1048544,
+    0x0450, 0x045f, 1048496,
+    0x0561, 0x0586, 1048528,
+    0x1f00, 0x1f07, 1048584,
+    0x1f10, 0x1f15, 1048584,
+    0x1f20, 0x1f27, 1048584,
+    0x1f30, 0x1f37, 1048584,
+    0x1f40, 0x1f45, 1048584,
+    0x1f60, 0x1f67, 1048584,
+    0x1f70, 0x1f71, 1048650,
+    0x1f72, 0x1f75, 1048662,
+    0x1f76, 0x1f77, 1048676,
+    0x1f78, 0x1f79, 1048704,
+    0x1f7a, 0x1f7b, 1048688,
+    0x1f7c, 0x1f7d, 1048702,
+    0x1f80, 0x1f87, 1048584,
+    0x1f90, 0x1f97, 1048584,
+    0x1fa0, 0x1fa7, 1048584,
+    0x1fb0, 0x1fb1, 1048584,
+    0x1fd0, 0x1fd1, 1048584,
+    0x1fe0, 0x1fe1, 1048584,
+    0x2170, 0x217f, 1048560,
+    0x24d0, 0x24e9, 1048550,
+    0x2c30, 0x2c5e, 1048528,
+    0x2d00, 0x2d25, 1041312,
+    0xff41, 0xff5a, 1048544,
+    0x10428, 0x1044f, 1048536,
+    0x118c0, 0x118df, 1048544,
 };
 
 } // !namespace
@@ -2698,674 +2698,674 @@
 namespace {
 
 const char32_t touppers[] = {
-	0x00b5, 1049319,
-	0x00ff, 1048697,
-	0x0101, 1048575,
-	0x0103, 1048575,
-	0x0105, 1048575,
-	0x0107, 1048575,
-	0x0109, 1048575,
-	0x010b, 1048575,
-	0x010d, 1048575,
-	0x010f, 1048575,
-	0x0111, 1048575,
-	0x0113, 1048575,
-	0x0115, 1048575,
-	0x0117, 1048575,
-	0x0119, 1048575,
-	0x011b, 1048575,
-	0x011d, 1048575,
-	0x011f, 1048575,
-	0x0121, 1048575,
-	0x0123, 1048575,
-	0x0125, 1048575,
-	0x0127, 1048575,
-	0x0129, 1048575,
-	0x012b, 1048575,
-	0x012d, 1048575,
-	0x012f, 1048575,
-	0x0131, 1048344,
-	0x0133, 1048575,
-	0x0135, 1048575,
-	0x0137, 1048575,
-	0x013a, 1048575,
-	0x013c, 1048575,
-	0x013e, 1048575,
-	0x0140, 1048575,
-	0x0142, 1048575,
-	0x0144, 1048575,
-	0x0146, 1048575,
-	0x0148, 1048575,
-	0x014b, 1048575,
-	0x014d, 1048575,
-	0x014f, 1048575,
-	0x0151, 1048575,
-	0x0153, 1048575,
-	0x0155, 1048575,
-	0x0157, 1048575,
-	0x0159, 1048575,
-	0x015b, 1048575,
-	0x015d, 1048575,
-	0x015f, 1048575,
-	0x0161, 1048575,
-	0x0163, 1048575,
-	0x0165, 1048575,
-	0x0167, 1048575,
-	0x0169, 1048575,
-	0x016b, 1048575,
-	0x016d, 1048575,
-	0x016f, 1048575,
-	0x0171, 1048575,
-	0x0173, 1048575,
-	0x0175, 1048575,
-	0x0177, 1048575,
-	0x017a, 1048575,
-	0x017c, 1048575,
-	0x017e, 1048575,
-	0x017f, 1048276,
-	0x0180, 1048771,
-	0x0183, 1048575,
-	0x0185, 1048575,
-	0x0188, 1048575,
-	0x018c, 1048575,
-	0x0192, 1048575,
-	0x0195, 1048673,
-	0x0199, 1048575,
-	0x019a, 1048739,
-	0x019e, 1048706,
-	0x01a1, 1048575,
-	0x01a3, 1048575,
-	0x01a5, 1048575,
-	0x01a8, 1048575,
-	0x01ad, 1048575,
-	0x01b0, 1048575,
-	0x01b4, 1048575,
-	0x01b6, 1048575,
-	0x01b9, 1048575,
-	0x01bd, 1048575,
-	0x01bf, 1048632,
-	0x01c5, 1048575,
-	0x01c6, 1048574,
-	0x01c8, 1048575,
-	0x01c9, 1048574,
-	0x01cb, 1048575,
-	0x01cc, 1048574,
-	0x01ce, 1048575,
-	0x01d0, 1048575,
-	0x01d2, 1048575,
-	0x01d4, 1048575,
-	0x01d6, 1048575,
-	0x01d8, 1048575,
-	0x01da, 1048575,
-	0x01dc, 1048575,
-	0x01dd, 1048497,
-	0x01df, 1048575,
-	0x01e1, 1048575,
-	0x01e3, 1048575,
-	0x01e5, 1048575,
-	0x01e7, 1048575,
-	0x01e9, 1048575,
-	0x01eb, 1048575,
-	0x01ed, 1048575,
-	0x01ef, 1048575,
-	0x01f2, 1048575,
-	0x01f3, 1048574,
-	0x01f5, 1048575,
-	0x01f9, 1048575,
-	0x01fb, 1048575,
-	0x01fd, 1048575,
-	0x01ff, 1048575,
-	0x0201, 1048575,
-	0x0203, 1048575,
-	0x0205, 1048575,
-	0x0207, 1048575,
-	0x0209, 1048575,
-	0x020b, 1048575,
-	0x020d, 1048575,
-	0x020f, 1048575,
-	0x0211, 1048575,
-	0x0213, 1048575,
-	0x0215, 1048575,
-	0x0217, 1048575,
-	0x0219, 1048575,
-	0x021b, 1048575,
-	0x021d, 1048575,
-	0x021f, 1048575,
-	0x0223, 1048575,
-	0x0225, 1048575,
-	0x0227, 1048575,
-	0x0229, 1048575,
-	0x022b, 1048575,
-	0x022d, 1048575,
-	0x022f, 1048575,
-	0x0231, 1048575,
-	0x0233, 1048575,
-	0x023c, 1048575,
-	0x0242, 1048575,
-	0x0247, 1048575,
-	0x0249, 1048575,
-	0x024b, 1048575,
-	0x024d, 1048575,
-	0x024f, 1048575,
-	0x0250, 1059359,
-	0x0251, 1059356,
-	0x0252, 1059358,
-	0x0253, 1048366,
-	0x0254, 1048370,
-	0x0259, 1048374,
-	0x025b, 1048373,
-	0x025c, 1090895,
-	0x0260, 1048371,
-	0x0261, 1090891,
-	0x0263, 1048369,
-	0x0265, 1090856,
-	0x0266, 1090884,
-	0x0268, 1048367,
-	0x0269, 1048365,
-	0x026b, 1059319,
-	0x026c, 1090881,
-	0x026f, 1048365,
-	0x0271, 1059325,
-	0x0272, 1048363,
-	0x0275, 1048362,
-	0x027d, 1059303,
-	0x0280, 1048358,
-	0x0283, 1048358,
-	0x0287, 1090858,
-	0x0288, 1048358,
-	0x0289, 1048507,
-	0x028c, 1048505,
-	0x0292, 1048357,
-	0x029e, 1090834,
-	0x0345, 1048660,
-	0x0371, 1048575,
-	0x0373, 1048575,
-	0x0377, 1048575,
-	0x03ac, 1048538,
-	0x03c2, 1048545,
-	0x03cc, 1048512,
-	0x03d0, 1048514,
-	0x03d1, 1048519,
-	0x03d5, 1048529,
-	0x03d6, 1048522,
-	0x03d7, 1048568,
-	0x03d9, 1048575,
-	0x03db, 1048575,
-	0x03dd, 1048575,
-	0x03df, 1048575,
-	0x03e1, 1048575,
-	0x03e3, 1048575,
-	0x03e5, 1048575,
-	0x03e7, 1048575,
-	0x03e9, 1048575,
-	0x03eb, 1048575,
-	0x03ed, 1048575,
-	0x03ef, 1048575,
-	0x03f0, 1048490,
-	0x03f1, 1048496,
-	0x03f2, 1048583,
-	0x03f3, 1048460,
-	0x03f5, 1048480,
-	0x03f8, 1048575,
-	0x03fb, 1048575,
-	0x0461, 1048575,
-	0x0463, 1048575,
-	0x0465, 1048575,
-	0x0467, 1048575,
-	0x0469, 1048575,
-	0x046b, 1048575,
-	0x046d, 1048575,
-	0x046f, 1048575,
-	0x0471, 1048575,
-	0x0473, 1048575,
-	0x0475, 1048575,
-	0x0477, 1048575,
-	0x0479, 1048575,
-	0x047b, 1048575,
-	0x047d, 1048575,
-	0x047f, 1048575,
-	0x0481, 1048575,
-	0x048b, 1048575,
-	0x048d, 1048575,
-	0x048f, 1048575,
-	0x0491, 1048575,
-	0x0493, 1048575,
-	0x0495, 1048575,
-	0x0497, 1048575,
-	0x0499, 1048575,
-	0x049b, 1048575,
-	0x049d, 1048575,
-	0x049f, 1048575,
-	0x04a1, 1048575,
-	0x04a3, 1048575,
-	0x04a5, 1048575,
-	0x04a7, 1048575,
-	0x04a9, 1048575,
-	0x04ab, 1048575,
-	0x04ad, 1048575,
-	0x04af, 1048575,
-	0x04b1, 1048575,
-	0x04b3, 1048575,
-	0x04b5, 1048575,
-	0x04b7, 1048575,
-	0x04b9, 1048575,
-	0x04bb, 1048575,
-	0x04bd, 1048575,
-	0x04bf, 1048575,
-	0x04c2, 1048575,
-	0x04c4, 1048575,
-	0x04c6, 1048575,
-	0x04c8, 1048575,
-	0x04ca, 1048575,
-	0x04cc, 1048575,
-	0x04ce, 1048575,
-	0x04cf, 1048561,
-	0x04d1, 1048575,
-	0x04d3, 1048575,
-	0x04d5, 1048575,
-	0x04d7, 1048575,
-	0x04d9, 1048575,
-	0x04db, 1048575,
-	0x04dd, 1048575,
-	0x04df, 1048575,
-	0x04e1, 1048575,
-	0x04e3, 1048575,
-	0x04e5, 1048575,
-	0x04e7, 1048575,
-	0x04e9, 1048575,
-	0x04eb, 1048575,
-	0x04ed, 1048575,
-	0x04ef, 1048575,
-	0x04f1, 1048575,
-	0x04f3, 1048575,
-	0x04f5, 1048575,
-	0x04f7, 1048575,
-	0x04f9, 1048575,
-	0x04fb, 1048575,
-	0x04fd, 1048575,
-	0x04ff, 1048575,
-	0x0501, 1048575,
-	0x0503, 1048575,
-	0x0505, 1048575,
-	0x0507, 1048575,
-	0x0509, 1048575,
-	0x050b, 1048575,
-	0x050d, 1048575,
-	0x050f, 1048575,
-	0x0511, 1048575,
-	0x0513, 1048575,
-	0x0515, 1048575,
-	0x0517, 1048575,
-	0x0519, 1048575,
-	0x051b, 1048575,
-	0x051d, 1048575,
-	0x051f, 1048575,
-	0x0521, 1048575,
-	0x0523, 1048575,
-	0x0525, 1048575,
-	0x0527, 1048575,
-	0x0529, 1048575,
-	0x052b, 1048575,
-	0x052d, 1048575,
-	0x052f, 1048575,
-	0x1d79, 1083908,
-	0x1d7d, 1052390,
-	0x1e01, 1048575,
-	0x1e03, 1048575,
-	0x1e05, 1048575,
-	0x1e07, 1048575,
-	0x1e09, 1048575,
-	0x1e0b, 1048575,
-	0x1e0d, 1048575,
-	0x1e0f, 1048575,
-	0x1e11, 1048575,
-	0x1e13, 1048575,
-	0x1e15, 1048575,
-	0x1e17, 1048575,
-	0x1e19, 1048575,
-	0x1e1b, 1048575,
-	0x1e1d, 1048575,
-	0x1e1f, 1048575,
-	0x1e21, 1048575,
-	0x1e23, 1048575,
-	0x1e25, 1048575,
-	0x1e27, 1048575,
-	0x1e29, 1048575,
-	0x1e2b, 1048575,
-	0x1e2d, 1048575,
-	0x1e2f, 1048575,
-	0x1e31, 1048575,
-	0x1e33, 1048575,
-	0x1e35, 1048575,
-	0x1e37, 1048575,
-	0x1e39, 1048575,
-	0x1e3b, 1048575,
-	0x1e3d, 1048575,
-	0x1e3f, 1048575,
-	0x1e41, 1048575,
-	0x1e43, 1048575,
-	0x1e45, 1048575,
-	0x1e47, 1048575,
-	0x1e49, 1048575,
-	0x1e4b, 1048575,
-	0x1e4d, 1048575,
-	0x1e4f, 1048575,
-	0x1e51, 1048575,
-	0x1e53, 1048575,
-	0x1e55, 1048575,
-	0x1e57, 1048575,
-	0x1e59, 1048575,
-	0x1e5b, 1048575,
-	0x1e5d, 1048575,
-	0x1e5f, 1048575,
-	0x1e61, 1048575,
-	0x1e63, 1048575,
-	0x1e65, 1048575,
-	0x1e67, 1048575,
-	0x1e69, 1048575,
-	0x1e6b, 1048575,
-	0x1e6d, 1048575,
-	0x1e6f, 1048575,
-	0x1e71, 1048575,
-	0x1e73, 1048575,
-	0x1e75, 1048575,
-	0x1e77, 1048575,
-	0x1e79, 1048575,
-	0x1e7b, 1048575,
-	0x1e7d, 1048575,
-	0x1e7f, 1048575,
-	0x1e81, 1048575,
-	0x1e83, 1048575,
-	0x1e85, 1048575,
-	0x1e87, 1048575,
-	0x1e89, 1048575,
-	0x1e8b, 1048575,
-	0x1e8d, 1048575,
-	0x1e8f, 1048575,
-	0x1e91, 1048575,
-	0x1e93, 1048575,
-	0x1e95, 1048575,
-	0x1e9b, 1048517,
-	0x1ea1, 1048575,
-	0x1ea3, 1048575,
-	0x1ea5, 1048575,
-	0x1ea7, 1048575,
-	0x1ea9, 1048575,
-	0x1eab, 1048575,
-	0x1ead, 1048575,
-	0x1eaf, 1048575,
-	0x1eb1, 1048575,
-	0x1eb3, 1048575,
-	0x1eb5, 1048575,
-	0x1eb7, 1048575,
-	0x1eb9, 1048575,
-	0x1ebb, 1048575,
-	0x1ebd, 1048575,
-	0x1ebf, 1048575,
-	0x1ec1, 1048575,
-	0x1ec3, 1048575,
-	0x1ec5, 1048575,
-	0x1ec7, 1048575,
-	0x1ec9, 1048575,
-	0x1ecb, 1048575,
-	0x1ecd, 1048575,
-	0x1ecf, 1048575,
-	0x1ed1, 1048575,
-	0x1ed3, 1048575,
-	0x1ed5, 1048575,
-	0x1ed7, 1048575,
-	0x1ed9, 1048575,
-	0x1edb, 1048575,
-	0x1edd, 1048575,
-	0x1edf, 1048575,
-	0x1ee1, 1048575,
-	0x1ee3, 1048575,
-	0x1ee5, 1048575,
-	0x1ee7, 1048575,
-	0x1ee9, 1048575,
-	0x1eeb, 1048575,
-	0x1eed, 1048575,
-	0x1eef, 1048575,
-	0x1ef1, 1048575,
-	0x1ef3, 1048575,
-	0x1ef5, 1048575,
-	0x1ef7, 1048575,
-	0x1ef9, 1048575,
-	0x1efb, 1048575,
-	0x1efd, 1048575,
-	0x1eff, 1048575,
-	0x1f51, 1048584,
-	0x1f53, 1048584,
-	0x1f55, 1048584,
-	0x1f57, 1048584,
-	0x1fb3, 1048585,
-	0x1fbe, 1041371,
-	0x1fc3, 1048585,
-	0x1fe5, 1048583,
-	0x1ff3, 1048585,
-	0x214e, 1048548,
-	0x2184, 1048575,
-	0x2c61, 1048575,
-	0x2c65, 1037781,
-	0x2c66, 1037784,
-	0x2c68, 1048575,
-	0x2c6a, 1048575,
-	0x2c6c, 1048575,
-	0x2c73, 1048575,
-	0x2c76, 1048575,
-	0x2c81, 1048575,
-	0x2c83, 1048575,
-	0x2c85, 1048575,
-	0x2c87, 1048575,
-	0x2c89, 1048575,
-	0x2c8b, 1048575,
-	0x2c8d, 1048575,
-	0x2c8f, 1048575,
-	0x2c91, 1048575,
-	0x2c93, 1048575,
-	0x2c95, 1048575,
-	0x2c97, 1048575,
-	0x2c99, 1048575,
-	0x2c9b, 1048575,
-	0x2c9d, 1048575,
-	0x2c9f, 1048575,
-	0x2ca1, 1048575,
-	0x2ca3, 1048575,
-	0x2ca5, 1048575,
-	0x2ca7, 1048575,
-	0x2ca9, 1048575,
-	0x2cab, 1048575,
-	0x2cad, 1048575,
-	0x2caf, 1048575,
-	0x2cb1, 1048575,
-	0x2cb3, 1048575,
-	0x2cb5, 1048575,
-	0x2cb7, 1048575,
-	0x2cb9, 1048575,
-	0x2cbb, 1048575,
-	0x2cbd, 1048575,
-	0x2cbf, 1048575,
-	0x2cc1, 1048575,
-	0x2cc3, 1048575,
-	0x2cc5, 1048575,
-	0x2cc7, 1048575,
-	0x2cc9, 1048575,
-	0x2ccb, 1048575,
-	0x2ccd, 1048575,
-	0x2ccf, 1048575,
-	0x2cd1, 1048575,
-	0x2cd3, 1048575,
-	0x2cd5, 1048575,
-	0x2cd7, 1048575,
-	0x2cd9, 1048575,
-	0x2cdb, 1048575,
-	0x2cdd, 1048575,
-	0x2cdf, 1048575,
-	0x2ce1, 1048575,
-	0x2ce3, 1048575,
-	0x2cec, 1048575,
-	0x2cee, 1048575,
-	0x2cf3, 1048575,
-	0x2d27, 1041312,
-	0x2d2d, 1041312,
-	0xa641, 1048575,
-	0xa643, 1048575,
-	0xa645, 1048575,
-	0xa647, 1048575,
-	0xa649, 1048575,
-	0xa64b, 1048575,
-	0xa64d, 1048575,
-	0xa64f, 1048575,
-	0xa651, 1048575,
-	0xa653, 1048575,
-	0xa655, 1048575,
-	0xa657, 1048575,
-	0xa659, 1048575,
-	0xa65b, 1048575,
-	0xa65d, 1048575,
-	0xa65f, 1048575,
-	0xa661, 1048575,
-	0xa663, 1048575,
-	0xa665, 1048575,
-	0xa667, 1048575,
-	0xa669, 1048575,
-	0xa66b, 1048575,
-	0xa66d, 1048575,
-	0xa681, 1048575,
-	0xa683, 1048575,
-	0xa685, 1048575,
-	0xa687, 1048575,
-	0xa689, 1048575,
-	0xa68b, 1048575,
-	0xa68d, 1048575,
-	0xa68f, 1048575,
-	0xa691, 1048575,
-	0xa693, 1048575,
-	0xa695, 1048575,
-	0xa697, 1048575,
-	0xa699, 1048575,
-	0xa69b, 1048575,
-	0xa723, 1048575,
-	0xa725, 1048575,
-	0xa727, 1048575,
-	0xa729, 1048575,
-	0xa72b, 1048575,
-	0xa72d, 1048575,
-	0xa72f, 1048575,
-	0xa733, 1048575,
-	0xa735, 1048575,
-	0xa737, 1048575,
-	0xa739, 1048575,
-	0xa73b, 1048575,
-	0xa73d, 1048575,
-	0xa73f, 1048575,
-	0xa741, 1048575,
-	0xa743, 1048575,
-	0xa745, 1048575,
-	0xa747, 1048575,
-	0xa749, 1048575,
-	0xa74b, 1048575,
-	0xa74d, 1048575,
-	0xa74f, 1048575,
-	0xa751, 1048575,
-	0xa753, 1048575,
-	0xa755, 1048575,
-	0xa757, 1048575,
-	0xa759, 1048575,
-	0xa75b, 1048575,
-	0xa75d, 1048575,
-	0xa75f, 1048575,
-	0xa761, 1048575,
-	0xa763, 1048575,
-	0xa765, 1048575,
-	0xa767, 1048575,
-	0xa769, 1048575,
-	0xa76b, 1048575,
-	0xa76d, 1048575,
-	0xa76f, 1048575,
-	0xa77a, 1048575,
-	0xa77c, 1048575,
-	0xa77f, 1048575,
-	0xa781, 1048575,
-	0xa783, 1048575,
-	0xa785, 1048575,
-	0xa787, 1048575,
-	0xa78c, 1048575,
-	0xa791, 1048575,
-	0xa793, 1048575,
-	0xa797, 1048575,
-	0xa799, 1048575,
-	0xa79b, 1048575,
-	0xa79d, 1048575,
-	0xa79f, 1048575,
-	0xa7a1, 1048575,
-	0xa7a3, 1048575,
-	0xa7a5, 1048575,
-	0xa7a7, 1048575,
-	0xa7a9, 1048575,
+    0x00b5, 1049319,
+    0x00ff, 1048697,
+    0x0101, 1048575,
+    0x0103, 1048575,
+    0x0105, 1048575,
+    0x0107, 1048575,
+    0x0109, 1048575,
+    0x010b, 1048575,
+    0x010d, 1048575,
+    0x010f, 1048575,
+    0x0111, 1048575,
+    0x0113, 1048575,
+    0x0115, 1048575,
+    0x0117, 1048575,
+    0x0119, 1048575,
+    0x011b, 1048575,
+    0x011d, 1048575,
+    0x011f, 1048575,
+    0x0121, 1048575,
+    0x0123, 1048575,
+    0x0125, 1048575,
+    0x0127, 1048575,
+    0x0129, 1048575,
+    0x012b, 1048575,
+    0x012d, 1048575,
+    0x012f, 1048575,
+    0x0131, 1048344,
+    0x0133, 1048575,
+    0x0135, 1048575,
+    0x0137, 1048575,
+    0x013a, 1048575,
+    0x013c, 1048575,
+    0x013e, 1048575,
+    0x0140, 1048575,
+    0x0142, 1048575,
+    0x0144, 1048575,
+    0x0146, 1048575,
+    0x0148, 1048575,
+    0x014b, 1048575,
+    0x014d, 1048575,
+    0x014f, 1048575,
+    0x0151, 1048575,
+    0x0153, 1048575,
+    0x0155, 1048575,
+    0x0157, 1048575,
+    0x0159, 1048575,
+    0x015b, 1048575,
+    0x015d, 1048575,
+    0x015f, 1048575,
+    0x0161, 1048575,
+    0x0163, 1048575,
+    0x0165, 1048575,
+    0x0167, 1048575,
+    0x0169, 1048575,
+    0x016b, 1048575,
+    0x016d, 1048575,
+    0x016f, 1048575,
+    0x0171, 1048575,
+    0x0173, 1048575,
+    0x0175, 1048575,
+    0x0177, 1048575,
+    0x017a, 1048575,
+    0x017c, 1048575,
+    0x017e, 1048575,
+    0x017f, 1048276,
+    0x0180, 1048771,
+    0x0183, 1048575,
+    0x0185, 1048575,
+    0x0188, 1048575,
+    0x018c, 1048575,
+    0x0192, 1048575,
+    0x0195, 1048673,
+    0x0199, 1048575,
+    0x019a, 1048739,
+    0x019e, 1048706,
+    0x01a1, 1048575,
+    0x01a3, 1048575,
+    0x01a5, 1048575,
+    0x01a8, 1048575,
+    0x01ad, 1048575,
+    0x01b0, 1048575,
+    0x01b4, 1048575,
+    0x01b6, 1048575,
+    0x01b9, 1048575,
+    0x01bd, 1048575,
+    0x01bf, 1048632,
+    0x01c5, 1048575,
+    0x01c6, 1048574,
+    0x01c8, 1048575,
+    0x01c9, 1048574,
+    0x01cb, 1048575,
+    0x01cc, 1048574,
+    0x01ce, 1048575,
+    0x01d0, 1048575,
+    0x01d2, 1048575,
+    0x01d4, 1048575,
+    0x01d6, 1048575,
+    0x01d8, 1048575,
+    0x01da, 1048575,
+    0x01dc, 1048575,
+    0x01dd, 1048497,
+    0x01df, 1048575,
+    0x01e1, 1048575,
+    0x01e3, 1048575,
+    0x01e5, 1048575,
+    0x01e7, 1048575,
+    0x01e9, 1048575,
+    0x01eb, 1048575,
+    0x01ed, 1048575,
+    0x01ef, 1048575,
+    0x01f2, 1048575,
+    0x01f3, 1048574,
+    0x01f5, 1048575,
+    0x01f9, 1048575,
+    0x01fb, 1048575,
+    0x01fd, 1048575,
+    0x01ff, 1048575,
+    0x0201, 1048575,
+    0x0203, 1048575,
+    0x0205, 1048575,
+    0x0207, 1048575,
+    0x0209, 1048575,
+    0x020b, 1048575,
+    0x020d, 1048575,
+    0x020f, 1048575,
+    0x0211, 1048575,
+    0x0213, 1048575,
+    0x0215, 1048575,
+    0x0217, 1048575,
+    0x0219, 1048575,
+    0x021b, 1048575,
+    0x021d, 1048575,
+    0x021f, 1048575,
+    0x0223, 1048575,
+    0x0225, 1048575,
+    0x0227, 1048575,
+    0x0229, 1048575,
+    0x022b, 1048575,
+    0x022d, 1048575,
+    0x022f, 1048575,
+    0x0231, 1048575,
+    0x0233, 1048575,
+    0x023c, 1048575,
+    0x0242, 1048575,
+    0x0247, 1048575,
+    0x0249, 1048575,
+    0x024b, 1048575,
+    0x024d, 1048575,
+    0x024f, 1048575,
+    0x0250, 1059359,
+    0x0251, 1059356,
+    0x0252, 1059358,
+    0x0253, 1048366,
+    0x0254, 1048370,
+    0x0259, 1048374,
+    0x025b, 1048373,
+    0x025c, 1090895,
+    0x0260, 1048371,
+    0x0261, 1090891,
+    0x0263, 1048369,
+    0x0265, 1090856,
+    0x0266, 1090884,
+    0x0268, 1048367,
+    0x0269, 1048365,
+    0x026b, 1059319,
+    0x026c, 1090881,
+    0x026f, 1048365,
+    0x0271, 1059325,
+    0x0272, 1048363,
+    0x0275, 1048362,
+    0x027d, 1059303,
+    0x0280, 1048358,
+    0x0283, 1048358,
+    0x0287, 1090858,
+    0x0288, 1048358,
+    0x0289, 1048507,
+    0x028c, 1048505,
+    0x0292, 1048357,
+    0x029e, 1090834,
+    0x0345, 1048660,
+    0x0371, 1048575,
+    0x0373, 1048575,
+    0x0377, 1048575,
+    0x03ac, 1048538,
+    0x03c2, 1048545,
+    0x03cc, 1048512,
+    0x03d0, 1048514,
+    0x03d1, 1048519,
+    0x03d5, 1048529,
+    0x03d6, 1048522,
+    0x03d7, 1048568,
+    0x03d9, 1048575,
+    0x03db, 1048575,
+    0x03dd, 1048575,
+    0x03df, 1048575,
+    0x03e1, 1048575,
+    0x03e3, 1048575,
+    0x03e5, 1048575,
+    0x03e7, 1048575,
+    0x03e9, 1048575,
+    0x03eb, 1048575,
+    0x03ed, 1048575,
+    0x03ef, 1048575,
+    0x03f0, 1048490,
+    0x03f1, 1048496,
+    0x03f2, 1048583,
+    0x03f3, 1048460,
+    0x03f5, 1048480,
+    0x03f8, 1048575,
+    0x03fb, 1048575,
+    0x0461, 1048575,
+    0x0463, 1048575,
+    0x0465, 1048575,
+    0x0467, 1048575,
+    0x0469, 1048575,
+    0x046b, 1048575,
+    0x046d, 1048575,
+    0x046f, 1048575,
+    0x0471, 1048575,
+    0x0473, 1048575,
+    0x0475, 1048575,
+    0x0477, 1048575,
+    0x0479, 1048575,
+    0x047b, 1048575,
+    0x047d, 1048575,
+    0x047f, 1048575,
+    0x0481, 1048575,
+    0x048b, 1048575,
+    0x048d, 1048575,
+    0x048f, 1048575,
+    0x0491, 1048575,
+    0x0493, 1048575,
+    0x0495, 1048575,
+    0x0497, 1048575,
+    0x0499, 1048575,
+    0x049b, 1048575,
+    0x049d, 1048575,
+    0x049f, 1048575,
+    0x04a1, 1048575,
+    0x04a3, 1048575,
+    0x04a5, 1048575,
+    0x04a7, 1048575,
+    0x04a9, 1048575,
+    0x04ab, 1048575,
+    0x04ad, 1048575,
+    0x04af, 1048575,
+    0x04b1, 1048575,
+    0x04b3, 1048575,
+    0x04b5, 1048575,
+    0x04b7, 1048575,
+    0x04b9, 1048575,
+    0x04bb, 1048575,
+    0x04bd, 1048575,
+    0x04bf, 1048575,
+    0x04c2, 1048575,
+    0x04c4, 1048575,
+    0x04c6, 1048575,
+    0x04c8, 1048575,
+    0x04ca, 1048575,
+    0x04cc, 1048575,
+    0x04ce, 1048575,
+    0x04cf, 1048561,
+    0x04d1, 1048575,
+    0x04d3, 1048575,
+    0x04d5, 1048575,
+    0x04d7, 1048575,
+    0x04d9, 1048575,
+    0x04db, 1048575,
+    0x04dd, 1048575,
+    0x04df, 1048575,
+    0x04e1, 1048575,
+    0x04e3, 1048575,
+    0x04e5, 1048575,
+    0x04e7, 1048575,
+    0x04e9, 1048575,
+    0x04eb, 1048575,
+    0x04ed, 1048575,
+    0x04ef, 1048575,
+    0x04f1, 1048575,
+    0x04f3, 1048575,
+    0x04f5, 1048575,
+    0x04f7, 1048575,
+    0x04f9, 1048575,
+    0x04fb, 1048575,
+    0x04fd, 1048575,
+    0x04ff, 1048575,
+    0x0501, 1048575,
+    0x0503, 1048575,
+    0x0505, 1048575,
+    0x0507, 1048575,
+    0x0509, 1048575,
+    0x050b, 1048575,
+    0x050d, 1048575,
+    0x050f, 1048575,
+    0x0511, 1048575,
+    0x0513, 1048575,
+    0x0515, 1048575,
+    0x0517, 1048575,
+    0x0519, 1048575,
+    0x051b, 1048575,
+    0x051d, 1048575,
+    0x051f, 1048575,
+    0x0521, 1048575,
+    0x0523, 1048575,
+    0x0525, 1048575,
+    0x0527, 1048575,
+    0x0529, 1048575,
+    0x052b, 1048575,
+    0x052d, 1048575,
+    0x052f, 1048575,
+    0x1d79, 1083908,
+    0x1d7d, 1052390,
+    0x1e01, 1048575,
+    0x1e03, 1048575,
+    0x1e05, 1048575,
+    0x1e07, 1048575,
+    0x1e09, 1048575,
+    0x1e0b, 1048575,
+    0x1e0d, 1048575,
+    0x1e0f, 1048575,
+    0x1e11, 1048575,
+    0x1e13, 1048575,
+    0x1e15, 1048575,
+    0x1e17, 1048575,
+    0x1e19, 1048575,
+    0x1e1b, 1048575,
+    0x1e1d, 1048575,
+    0x1e1f, 1048575,
+    0x1e21, 1048575,
+    0x1e23, 1048575,
+    0x1e25, 1048575,
+    0x1e27, 1048575,
+    0x1e29, 1048575,
+    0x1e2b, 1048575,
+    0x1e2d, 1048575,
+    0x1e2f, 1048575,
+    0x1e31, 1048575,
+    0x1e33, 1048575,
+    0x1e35, 1048575,
+    0x1e37, 1048575,
+    0x1e39, 1048575,
+    0x1e3b, 1048575,
+    0x1e3d, 1048575,
+    0x1e3f, 1048575,
+    0x1e41, 1048575,
+    0x1e43, 1048575,
+    0x1e45, 1048575,
+    0x1e47, 1048575,
+    0x1e49, 1048575,
+    0x1e4b, 1048575,
+    0x1e4d, 1048575,
+    0x1e4f, 1048575,
+    0x1e51, 1048575,
+    0x1e53, 1048575,
+    0x1e55, 1048575,
+    0x1e57, 1048575,
+    0x1e59, 1048575,
+    0x1e5b, 1048575,
+    0x1e5d, 1048575,
+    0x1e5f, 1048575,
+    0x1e61, 1048575,
+    0x1e63, 1048575,
+    0x1e65, 1048575,
+    0x1e67, 1048575,
+    0x1e69, 1048575,
+    0x1e6b, 1048575,
+    0x1e6d, 1048575,
+    0x1e6f, 1048575,
+    0x1e71, 1048575,
+    0x1e73, 1048575,
+    0x1e75, 1048575,
+    0x1e77, 1048575,
+    0x1e79, 1048575,
+    0x1e7b, 1048575,
+    0x1e7d, 1048575,
+    0x1e7f, 1048575,
+    0x1e81, 1048575,
+    0x1e83, 1048575,
+    0x1e85, 1048575,
+    0x1e87, 1048575,
+    0x1e89, 1048575,
+    0x1e8b, 1048575,
+    0x1e8d, 1048575,
+    0x1e8f, 1048575,
+    0x1e91, 1048575,
+    0x1e93, 1048575,
+    0x1e95, 1048575,
+    0x1e9b, 1048517,
+    0x1ea1, 1048575,
+    0x1ea3, 1048575,
+    0x1ea5, 1048575,
+    0x1ea7, 1048575,
+    0x1ea9, 1048575,
+    0x1eab, 1048575,
+    0x1ead, 1048575,
+    0x1eaf, 1048575,
+    0x1eb1, 1048575,
+    0x1eb3, 1048575,
+    0x1eb5, 1048575,
+    0x1eb7, 1048575,
+    0x1eb9, 1048575,
+    0x1ebb, 1048575,
+    0x1ebd, 1048575,
+    0x1ebf, 1048575,
+    0x1ec1, 1048575,
+    0x1ec3, 1048575,
+    0x1ec5, 1048575,
+    0x1ec7, 1048575,
+    0x1ec9, 1048575,
+    0x1ecb, 1048575,
+    0x1ecd, 1048575,
+    0x1ecf, 1048575,
+    0x1ed1, 1048575,
+    0x1ed3, 1048575,
+    0x1ed5, 1048575,
+    0x1ed7, 1048575,
+    0x1ed9, 1048575,
+    0x1edb, 1048575,
+    0x1edd, 1048575,
+    0x1edf, 1048575,
+    0x1ee1, 1048575,
+    0x1ee3, 1048575,
+    0x1ee5, 1048575,
+    0x1ee7, 1048575,
+    0x1ee9, 1048575,
+    0x1eeb, 1048575,
+    0x1eed, 1048575,
+    0x1eef, 1048575,
+    0x1ef1, 1048575,
+    0x1ef3, 1048575,
+    0x1ef5, 1048575,
+    0x1ef7, 1048575,
+    0x1ef9, 1048575,
+    0x1efb, 1048575,
+    0x1efd, 1048575,
+    0x1eff, 1048575,
+    0x1f51, 1048584,
+    0x1f53, 1048584,
+    0x1f55, 1048584,
+    0x1f57, 1048584,
+    0x1fb3, 1048585,
+    0x1fbe, 1041371,
+    0x1fc3, 1048585,
+    0x1fe5, 1048583,
+    0x1ff3, 1048585,
+    0x214e, 1048548,
+    0x2184, 1048575,
+    0x2c61, 1048575,
+    0x2c65, 1037781,
+    0x2c66, 1037784,
+    0x2c68, 1048575,
+    0x2c6a, 1048575,
+    0x2c6c, 1048575,
+    0x2c73, 1048575,
+    0x2c76, 1048575,
+    0x2c81, 1048575,
+    0x2c83, 1048575,
+    0x2c85, 1048575,
+    0x2c87, 1048575,
+    0x2c89, 1048575,
+    0x2c8b, 1048575,
+    0x2c8d, 1048575,
+    0x2c8f, 1048575,
+    0x2c91, 1048575,
+    0x2c93, 1048575,
+    0x2c95, 1048575,
+    0x2c97, 1048575,
+    0x2c99, 1048575,
+    0x2c9b, 1048575,
+    0x2c9d, 1048575,
+    0x2c9f, 1048575,
+    0x2ca1, 1048575,
+    0x2ca3, 1048575,
+    0x2ca5, 1048575,
+    0x2ca7, 1048575,
+    0x2ca9, 1048575,
+    0x2cab, 1048575,
+    0x2cad, 1048575,
+    0x2caf, 1048575,
+    0x2cb1, 1048575,
+    0x2cb3, 1048575,
+    0x2cb5, 1048575,
+    0x2cb7, 1048575,
+    0x2cb9, 1048575,
+    0x2cbb, 1048575,
+    0x2cbd, 1048575,
+    0x2cbf, 1048575,
+    0x2cc1, 1048575,
+    0x2cc3, 1048575,
+    0x2cc5, 1048575,
+    0x2cc7, 1048575,
+    0x2cc9, 1048575,
+    0x2ccb, 1048575,
+    0x2ccd, 1048575,
+    0x2ccf, 1048575,
+    0x2cd1, 1048575,
+    0x2cd3, 1048575,
+    0x2cd5, 1048575,
+    0x2cd7, 1048575,
+    0x2cd9, 1048575,
+    0x2cdb, 1048575,
+    0x2cdd, 1048575,
+    0x2cdf, 1048575,
+    0x2ce1, 1048575,
+    0x2ce3, 1048575,
+    0x2cec, 1048575,
+    0x2cee, 1048575,
+    0x2cf3, 1048575,
+    0x2d27, 1041312,
+    0x2d2d, 1041312,
+    0xa641, 1048575,
+    0xa643, 1048575,
+    0xa645, 1048575,
+    0xa647, 1048575,
+    0xa649, 1048575,
+    0xa64b, 1048575,
+    0xa64d, 1048575,
+    0xa64f, 1048575,
+    0xa651, 1048575,
+    0xa653, 1048575,
+    0xa655, 1048575,
+    0xa657, 1048575,
+    0xa659, 1048575,
+    0xa65b, 1048575,
+    0xa65d, 1048575,
+    0xa65f, 1048575,
+    0xa661, 1048575,
+    0xa663, 1048575,
+    0xa665, 1048575,
+    0xa667, 1048575,
+    0xa669, 1048575,
+    0xa66b, 1048575,
+    0xa66d, 1048575,
+    0xa681, 1048575,
+    0xa683, 1048575,
+    0xa685, 1048575,
+    0xa687, 1048575,
+    0xa689, 1048575,
+    0xa68b, 1048575,
+    0xa68d, 1048575,
+    0xa68f, 1048575,
+    0xa691, 1048575,
+    0xa693, 1048575,
+    0xa695, 1048575,
+    0xa697, 1048575,
+    0xa699, 1048575,
+    0xa69b, 1048575,
+    0xa723, 1048575,
+    0xa725, 1048575,
+    0xa727, 1048575,
+    0xa729, 1048575,
+    0xa72b, 1048575,
+    0xa72d, 1048575,
+    0xa72f, 1048575,
+    0xa733, 1048575,
+    0xa735, 1048575,
+    0xa737, 1048575,
+    0xa739, 1048575,
+    0xa73b, 1048575,
+    0xa73d, 1048575,
+    0xa73f, 1048575,
+    0xa741, 1048575,
+    0xa743, 1048575,
+    0xa745, 1048575,
+    0xa747, 1048575,
+    0xa749, 1048575,
+    0xa74b, 1048575,
+    0xa74d, 1048575,
+    0xa74f, 1048575,
+    0xa751, 1048575,
+    0xa753, 1048575,
+    0xa755, 1048575,
+    0xa757, 1048575,
+    0xa759, 1048575,
+    0xa75b, 1048575,
+    0xa75d, 1048575,
+    0xa75f, 1048575,
+    0xa761, 1048575,
+    0xa763, 1048575,
+    0xa765, 1048575,
+    0xa767, 1048575,
+    0xa769, 1048575,
+    0xa76b, 1048575,
+    0xa76d, 1048575,
+    0xa76f, 1048575,
+    0xa77a, 1048575,
+    0xa77c, 1048575,
+    0xa77f, 1048575,
+    0xa781, 1048575,
+    0xa783, 1048575,
+    0xa785, 1048575,
+    0xa787, 1048575,
+    0xa78c, 1048575,
+    0xa791, 1048575,
+    0xa793, 1048575,
+    0xa797, 1048575,
+    0xa799, 1048575,
+    0xa79b, 1048575,
+    0xa79d, 1048575,
+    0xa79f, 1048575,
+    0xa7a1, 1048575,
+    0xa7a3, 1048575,
+    0xa7a5, 1048575,
+    0xa7a7, 1048575,
+    0xa7a9, 1048575,
 };
 
 } // !namespace
 
 char32_t toupper(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, toupperr, nelem (toupperr)/3, 3);
+   p = rbsearch(c, toupperr, nelem (toupperr)/3, 3);
 
-	if (p && c >= p[0] && c <= p[1])
-		return c + p[2] - 1048576;
+   if (p && c >= p[0] && c <= p[1])
+       return c + p[2] - 1048576;
 
-	p = rbsearch(c, touppers, nelem (touppers)/2, 2);
+ p = rbsearch(c, touppers, nelem (touppers)/2, 2);
 
-	if (p && c == p[0])
-		return c + p[1] - 1048576;
+   if (p && c == p[0])
+       return c + p[1] - 1048576;
 
-	return c;
+   return c;
 }
 
 namespace {
 
 const char32_t tolowerr[] = {
-	0x0041, 0x005a, 1048608,
-	0x00c0, 0x00d6, 1048608,
-	0x00d8, 0x00de, 1048608,
-	0x0189, 0x018a, 1048781,
-	0x01b1, 0x01b2, 1048793,
-	0x0388, 0x038a, 1048613,
-	0x038e, 0x038f, 1048639,
-	0x0391, 0x03a1, 1048608,
-	0x03a3, 0x03ab, 1048608,
-	0x03fd, 0x03ff, 1048446,
-	0x0400, 0x040f, 1048656,
-	0x0410, 0x042f, 1048608,
-	0x0531, 0x0556, 1048624,
-	0x10a0, 0x10c5, 1055840,
-	0x1f08, 0x1f0f, 1048568,
-	0x1f18, 0x1f1d, 1048568,
-	0x1f28, 0x1f2f, 1048568,
-	0x1f38, 0x1f3f, 1048568,
-	0x1f48, 0x1f4d, 1048568,
-	0x1f68, 0x1f6f, 1048568,
-	0x1f88, 0x1f8f, 1048568,
-	0x1f98, 0x1f9f, 1048568,
-	0x1fa8, 0x1faf, 1048568,
-	0x1fb8, 0x1fb9, 1048568,
-	0x1fba, 0x1fbb, 1048502,
-	0x1fc8, 0x1fcb, 1048490,
-	0x1fd8, 0x1fd9, 1048568,
-	0x1fda, 0x1fdb, 1048476,
-	0x1fe8, 0x1fe9, 1048568,
-	0x1fea, 0x1feb, 1048464,
-	0x1ff8, 0x1ff9, 1048448,
-	0x1ffa, 0x1ffb, 1048450,
-	0x2160, 0x216f, 1048592,
-	0x24b6, 0x24cf, 1048602,
-	0x2c00, 0x2c2e, 1048624,
-	0x2c7e, 0x2c7f, 1037761,
-	0xff21, 0xff3a, 1048608,
-	0x10400, 0x10427, 1048616,
-	0x118a0, 0x118bf, 1048608,
+    0x0041, 0x005a, 1048608,
+    0x00c0, 0x00d6, 1048608,
+    0x00d8, 0x00de, 1048608,
+    0x0189, 0x018a, 1048781,
+    0x01b1, 0x01b2, 1048793,
+    0x0388, 0x038a, 1048613,
+    0x038e, 0x038f, 1048639,
+    0x0391, 0x03a1, 1048608,
+    0x03a3, 0x03ab, 1048608,
+    0x03fd, 0x03ff, 1048446,
+    0x0400, 0x040f, 1048656,
+    0x0410, 0x042f, 1048608,
+    0x0531, 0x0556, 1048624,
+    0x10a0, 0x10c5, 1055840,
+    0x1f08, 0x1f0f, 1048568,
+    0x1f18, 0x1f1d, 1048568,
+    0x1f28, 0x1f2f, 1048568,
+    0x1f38, 0x1f3f, 1048568,
+    0x1f48, 0x1f4d, 1048568,
+    0x1f68, 0x1f6f, 1048568,
+    0x1f88, 0x1f8f, 1048568,
+    0x1f98, 0x1f9f, 1048568,
+    0x1fa8, 0x1faf, 1048568,
+    0x1fb8, 0x1fb9, 1048568,
+    0x1fba, 0x1fbb, 1048502,
+    0x1fc8, 0x1fcb, 1048490,
+    0x1fd8, 0x1fd9, 1048568,
+    0x1fda, 0x1fdb, 1048476,
+    0x1fe8, 0x1fe9, 1048568,
+    0x1fea, 0x1feb, 1048464,
+    0x1ff8, 0x1ff9, 1048448,
+    0x1ffa, 0x1ffb, 1048450,
+    0x2160, 0x216f, 1048592,
+    0x24b6, 0x24cf, 1048602,
+    0x2c00, 0x2c2e, 1048624,
+    0x2c7e, 0x2c7f, 1037761,
+    0xff21, 0xff3a, 1048608,
+    0x10400, 0x10427, 1048616,
+    0x118a0, 0x118bf, 1048608,
 };
 
 } // !namespace
@@ -3373,666 +3373,666 @@
 namespace {
 
 const char32_t tolowers[] = {
-	0x0100, 1048577,
-	0x0102, 1048577,
-	0x0104, 1048577,
-	0x0106, 1048577,
-	0x0108, 1048577,
-	0x010a, 1048577,
-	0x010c, 1048577,
-	0x010e, 1048577,
-	0x0110, 1048577,
-	0x0112, 1048577,
-	0x0114, 1048577,
-	0x0116, 1048577,
-	0x0118, 1048577,
-	0x011a, 1048577,
-	0x011c, 1048577,
-	0x011e, 1048577,
-	0x0120, 1048577,
-	0x0122, 1048577,
-	0x0124, 1048577,
-	0x0126, 1048577,
-	0x0128, 1048577,
-	0x012a, 1048577,
-	0x012c, 1048577,
-	0x012e, 1048577,
-	0x0130, 1048377,
-	0x0132, 1048577,
-	0x0134, 1048577,
-	0x0136, 1048577,
-	0x0139, 1048577,
-	0x013b, 1048577,
-	0x013d, 1048577,
-	0x013f, 1048577,
-	0x0141, 1048577,
-	0x0143, 1048577,
-	0x0145, 1048577,
-	0x0147, 1048577,
-	0x014a, 1048577,
-	0x014c, 1048577,
-	0x014e, 1048577,
-	0x0150, 1048577,
-	0x0152, 1048577,
-	0x0154, 1048577,
-	0x0156, 1048577,
-	0x0158, 1048577,
-	0x015a, 1048577,
-	0x015c, 1048577,
-	0x015e, 1048577,
-	0x0160, 1048577,
-	0x0162, 1048577,
-	0x0164, 1048577,
-	0x0166, 1048577,
-	0x0168, 1048577,
-	0x016a, 1048577,
-	0x016c, 1048577,
-	0x016e, 1048577,
-	0x0170, 1048577,
-	0x0172, 1048577,
-	0x0174, 1048577,
-	0x0176, 1048577,
-	0x0178, 1048455,
-	0x0179, 1048577,
-	0x017b, 1048577,
-	0x017d, 1048577,
-	0x0181, 1048786,
-	0x0182, 1048577,
-	0x0184, 1048577,
-	0x0186, 1048782,
-	0x0187, 1048577,
-	0x018b, 1048577,
-	0x018e, 1048655,
-	0x018f, 1048778,
-	0x0190, 1048779,
-	0x0191, 1048577,
-	0x0193, 1048781,
-	0x0194, 1048783,
-	0x0196, 1048787,
-	0x0197, 1048785,
-	0x0198, 1048577,
-	0x019c, 1048787,
-	0x019d, 1048789,
-	0x019f, 1048790,
-	0x01a0, 1048577,
-	0x01a2, 1048577,
-	0x01a4, 1048577,
-	0x01a6, 1048794,
-	0x01a7, 1048577,
-	0x01a9, 1048794,
-	0x01ac, 1048577,
-	0x01ae, 1048794,
-	0x01af, 1048577,
-	0x01b3, 1048577,
-	0x01b5, 1048577,
-	0x01b7, 1048795,
-	0x01b8, 1048577,
-	0x01bc, 1048577,
-	0x01c4, 1048578,
-	0x01c5, 1048577,
-	0x01c7, 1048578,
-	0x01c8, 1048577,
-	0x01ca, 1048578,
-	0x01cb, 1048577,
-	0x01cd, 1048577,
-	0x01cf, 1048577,
-	0x01d1, 1048577,
-	0x01d3, 1048577,
-	0x01d5, 1048577,
-	0x01d7, 1048577,
-	0x01d9, 1048577,
-	0x01db, 1048577,
-	0x01de, 1048577,
-	0x01e0, 1048577,
-	0x01e2, 1048577,
-	0x01e4, 1048577,
-	0x01e6, 1048577,
-	0x01e8, 1048577,
-	0x01ea, 1048577,
-	0x01ec, 1048577,
-	0x01ee, 1048577,
-	0x01f1, 1048578,
-	0x01f2, 1048577,
-	0x01f4, 1048577,
-	0x01f6, 1048479,
-	0x01f7, 1048520,
-	0x01f8, 1048577,
-	0x01fa, 1048577,
-	0x01fc, 1048577,
-	0x01fe, 1048577,
-	0x0200, 1048577,
-	0x0202, 1048577,
-	0x0204, 1048577,
-	0x0206, 1048577,
-	0x0208, 1048577,
-	0x020a, 1048577,
-	0x020c, 1048577,
-	0x020e, 1048577,
-	0x0210, 1048577,
-	0x0212, 1048577,
-	0x0214, 1048577,
-	0x0216, 1048577,
-	0x0218, 1048577,
-	0x021a, 1048577,
-	0x021c, 1048577,
-	0x021e, 1048577,
-	0x0220, 1048446,
-	0x0222, 1048577,
-	0x0224, 1048577,
-	0x0226, 1048577,
-	0x0228, 1048577,
-	0x022a, 1048577,
-	0x022c, 1048577,
-	0x022e, 1048577,
-	0x0230, 1048577,
-	0x0232, 1048577,
-	0x023a, 1059371,
-	0x023b, 1048577,
-	0x023d, 1048413,
-	0x023e, 1059368,
-	0x0241, 1048577,
-	0x0243, 1048381,
-	0x0244, 1048645,
-	0x0245, 1048647,
-	0x0246, 1048577,
-	0x0248, 1048577,
-	0x024a, 1048577,
-	0x024c, 1048577,
-	0x024e, 1048577,
-	0x0370, 1048577,
-	0x0372, 1048577,
-	0x0376, 1048577,
-	0x037f, 1048692,
-	0x0386, 1048614,
-	0x038c, 1048640,
-	0x03cf, 1048584,
-	0x03d8, 1048577,
-	0x03da, 1048577,
-	0x03dc, 1048577,
-	0x03de, 1048577,
-	0x03e0, 1048577,
-	0x03e2, 1048577,
-	0x03e4, 1048577,
-	0x03e6, 1048577,
-	0x03e8, 1048577,
-	0x03ea, 1048577,
-	0x03ec, 1048577,
-	0x03ee, 1048577,
-	0x03f4, 1048516,
-	0x03f7, 1048577,
-	0x03f9, 1048569,
-	0x03fa, 1048577,
-	0x0460, 1048577,
-	0x0462, 1048577,
-	0x0464, 1048577,
-	0x0466, 1048577,
-	0x0468, 1048577,
-	0x046a, 1048577,
-	0x046c, 1048577,
-	0x046e, 1048577,
-	0x0470, 1048577,
-	0x0472, 1048577,
-	0x0474, 1048577,
-	0x0476, 1048577,
-	0x0478, 1048577,
-	0x047a, 1048577,
-	0x047c, 1048577,
-	0x047e, 1048577,
-	0x0480, 1048577,
-	0x048a, 1048577,
-	0x048c, 1048577,
-	0x048e, 1048577,
-	0x0490, 1048577,
-	0x0492, 1048577,
-	0x0494, 1048577,
-	0x0496, 1048577,
-	0x0498, 1048577,
-	0x049a, 1048577,
-	0x049c, 1048577,
-	0x049e, 1048577,
-	0x04a0, 1048577,
-	0x04a2, 1048577,
-	0x04a4, 1048577,
-	0x04a6, 1048577,
-	0x04a8, 1048577,
-	0x04aa, 1048577,
-	0x04ac, 1048577,
-	0x04ae, 1048577,
-	0x04b0, 1048577,
-	0x04b2, 1048577,
-	0x04b4, 1048577,
-	0x04b6, 1048577,
-	0x04b8, 1048577,
-	0x04ba, 1048577,
-	0x04bc, 1048577,
-	0x04be, 1048577,
-	0x04c0, 1048591,
-	0x04c1, 1048577,
-	0x04c3, 1048577,
-	0x04c5, 1048577,
-	0x04c7, 1048577,
-	0x04c9, 1048577,
-	0x04cb, 1048577,
-	0x04cd, 1048577,
-	0x04d0, 1048577,
-	0x04d2, 1048577,
-	0x04d4, 1048577,
-	0x04d6, 1048577,
-	0x04d8, 1048577,
-	0x04da, 1048577,
-	0x04dc, 1048577,
-	0x04de, 1048577,
-	0x04e0, 1048577,
-	0x04e2, 1048577,
-	0x04e4, 1048577,
-	0x04e6, 1048577,
-	0x04e8, 1048577,
-	0x04ea, 1048577,
-	0x04ec, 1048577,
-	0x04ee, 1048577,
-	0x04f0, 1048577,
-	0x04f2, 1048577,
-	0x04f4, 1048577,
-	0x04f6, 1048577,
-	0x04f8, 1048577,
-	0x04fa, 1048577,
-	0x04fc, 1048577,
-	0x04fe, 1048577,
-	0x0500, 1048577,
-	0x0502, 1048577,
-	0x0504, 1048577,
-	0x0506, 1048577,
-	0x0508, 1048577,
-	0x050a, 1048577,
-	0x050c, 1048577,
-	0x050e, 1048577,
-	0x0510, 1048577,
-	0x0512, 1048577,
-	0x0514, 1048577,
-	0x0516, 1048577,
-	0x0518, 1048577,
-	0x051a, 1048577,
-	0x051c, 1048577,
-	0x051e, 1048577,
-	0x0520, 1048577,
-	0x0522, 1048577,
-	0x0524, 1048577,
-	0x0526, 1048577,
-	0x0528, 1048577,
-	0x052a, 1048577,
-	0x052c, 1048577,
-	0x052e, 1048577,
-	0x10c7, 1055840,
-	0x10cd, 1055840,
-	0x1e00, 1048577,
-	0x1e02, 1048577,
-	0x1e04, 1048577,
-	0x1e06, 1048577,
-	0x1e08, 1048577,
-	0x1e0a, 1048577,
-	0x1e0c, 1048577,
-	0x1e0e, 1048577,
-	0x1e10, 1048577,
-	0x1e12, 1048577,
-	0x1e14, 1048577,
-	0x1e16, 1048577,
-	0x1e18, 1048577,
-	0x1e1a, 1048577,
-	0x1e1c, 1048577,
-	0x1e1e, 1048577,
-	0x1e20, 1048577,
-	0x1e22, 1048577,
-	0x1e24, 1048577,
-	0x1e26, 1048577,
-	0x1e28, 1048577,
-	0x1e2a, 1048577,
-	0x1e2c, 1048577,
-	0x1e2e, 1048577,
-	0x1e30, 1048577,
-	0x1e32, 1048577,
-	0x1e34, 1048577,
-	0x1e36, 1048577,
-	0x1e38, 1048577,
-	0x1e3a, 1048577,
-	0x1e3c, 1048577,
-	0x1e3e, 1048577,
-	0x1e40, 1048577,
-	0x1e42, 1048577,
-	0x1e44, 1048577,
-	0x1e46, 1048577,
-	0x1e48, 1048577,
-	0x1e4a, 1048577,
-	0x1e4c, 1048577,
-	0x1e4e, 1048577,
-	0x1e50, 1048577,
-	0x1e52, 1048577,
-	0x1e54, 1048577,
-	0x1e56, 1048577,
-	0x1e58, 1048577,
-	0x1e5a, 1048577,
-	0x1e5c, 1048577,
-	0x1e5e, 1048577,
-	0x1e60, 1048577,
-	0x1e62, 1048577,
-	0x1e64, 1048577,
-	0x1e66, 1048577,
-	0x1e68, 1048577,
-	0x1e6a, 1048577,
-	0x1e6c, 1048577,
-	0x1e6e, 1048577,
-	0x1e70, 1048577,
-	0x1e72, 1048577,
-	0x1e74, 1048577,
-	0x1e76, 1048577,
-	0x1e78, 1048577,
-	0x1e7a, 1048577,
-	0x1e7c, 1048577,
-	0x1e7e, 1048577,
-	0x1e80, 1048577,
-	0x1e82, 1048577,
-	0x1e84, 1048577,
-	0x1e86, 1048577,
-	0x1e88, 1048577,
-	0x1e8a, 1048577,
-	0x1e8c, 1048577,
-	0x1e8e, 1048577,
-	0x1e90, 1048577,
-	0x1e92, 1048577,
-	0x1e94, 1048577,
-	0x1e9e, 1040961,
-	0x1ea0, 1048577,
-	0x1ea2, 1048577,
-	0x1ea4, 1048577,
-	0x1ea6, 1048577,
-	0x1ea8, 1048577,
-	0x1eaa, 1048577,
-	0x1eac, 1048577,
-	0x1eae, 1048577,
-	0x1eb0, 1048577,
-	0x1eb2, 1048577,
-	0x1eb4, 1048577,
-	0x1eb6, 1048577,
-	0x1eb8, 1048577,
-	0x1eba, 1048577,
-	0x1ebc, 1048577,
-	0x1ebe, 1048577,
-	0x1ec0, 1048577,
-	0x1ec2, 1048577,
-	0x1ec4, 1048577,
-	0x1ec6, 1048577,
-	0x1ec8, 1048577,
-	0x1eca, 1048577,
-	0x1ecc, 1048577,
-	0x1ece, 1048577,
-	0x1ed0, 1048577,
-	0x1ed2, 1048577,
-	0x1ed4, 1048577,
-	0x1ed6, 1048577,
-	0x1ed8, 1048577,
-	0x1eda, 1048577,
-	0x1edc, 1048577,
-	0x1ede, 1048577,
-	0x1ee0, 1048577,
-	0x1ee2, 1048577,
-	0x1ee4, 1048577,
-	0x1ee6, 1048577,
-	0x1ee8, 1048577,
-	0x1eea, 1048577,
-	0x1eec, 1048577,
-	0x1eee, 1048577,
-	0x1ef0, 1048577,
-	0x1ef2, 1048577,
-	0x1ef4, 1048577,
-	0x1ef6, 1048577,
-	0x1ef8, 1048577,
-	0x1efa, 1048577,
-	0x1efc, 1048577,
-	0x1efe, 1048577,
-	0x1f59, 1048568,
-	0x1f5b, 1048568,
-	0x1f5d, 1048568,
-	0x1f5f, 1048568,
-	0x1fbc, 1048567,
-	0x1fcc, 1048567,
-	0x1fec, 1048569,
-	0x1ffc, 1048567,
-	0x2126, 1041059,
-	0x212a, 1040193,
-	0x212b, 1040314,
-	0x2132, 1048604,
-	0x2183, 1048577,
-	0x2c60, 1048577,
-	0x2c62, 1037833,
-	0x2c63, 1044762,
-	0x2c64, 1037849,
-	0x2c67, 1048577,
-	0x2c69, 1048577,
-	0x2c6b, 1048577,
-	0x2c6d, 1037796,
-	0x2c6e, 1037827,
-	0x2c6f, 1037793,
-	0x2c70, 1037794,
-	0x2c72, 1048577,
-	0x2c75, 1048577,
-	0x2c80, 1048577,
-	0x2c82, 1048577,
-	0x2c84, 1048577,
-	0x2c86, 1048577,
-	0x2c88, 1048577,
-	0x2c8a, 1048577,
-	0x2c8c, 1048577,
-	0x2c8e, 1048577,
-	0x2c90, 1048577,
-	0x2c92, 1048577,
-	0x2c94, 1048577,
-	0x2c96, 1048577,
-	0x2c98, 1048577,
-	0x2c9a, 1048577,
-	0x2c9c, 1048577,
-	0x2c9e, 1048577,
-	0x2ca0, 1048577,
-	0x2ca2, 1048577,
-	0x2ca4, 1048577,
-	0x2ca6, 1048577,
-	0x2ca8, 1048577,
-	0x2caa, 1048577,
-	0x2cac, 1048577,
-	0x2cae, 1048577,
-	0x2cb0, 1048577,
-	0x2cb2, 1048577,
-	0x2cb4, 1048577,
-	0x2cb6, 1048577,
-	0x2cb8, 1048577,
-	0x2cba, 1048577,
-	0x2cbc, 1048577,
-	0x2cbe, 1048577,
-	0x2cc0, 1048577,
-	0x2cc2, 1048577,
-	0x2cc4, 1048577,
-	0x2cc6, 1048577,
-	0x2cc8, 1048577,
-	0x2cca, 1048577,
-	0x2ccc, 1048577,
-	0x2cce, 1048577,
-	0x2cd0, 1048577,
-	0x2cd2, 1048577,
-	0x2cd4, 1048577,
-	0x2cd6, 1048577,
-	0x2cd8, 1048577,
-	0x2cda, 1048577,
-	0x2cdc, 1048577,
-	0x2cde, 1048577,
-	0x2ce0, 1048577,
-	0x2ce2, 1048577,
-	0x2ceb, 1048577,
-	0x2ced, 1048577,
-	0x2cf2, 1048577,
-	0xa640, 1048577,
-	0xa642, 1048577,
-	0xa644, 1048577,
-	0xa646, 1048577,
-	0xa648, 1048577,
-	0xa64a, 1048577,
-	0xa64c, 1048577,
-	0xa64e, 1048577,
-	0xa650, 1048577,
-	0xa652, 1048577,
-	0xa654, 1048577,
-	0xa656, 1048577,
-	0xa658, 1048577,
-	0xa65a, 1048577,
-	0xa65c, 1048577,
-	0xa65e, 1048577,
-	0xa660, 1048577,
-	0xa662, 1048577,
-	0xa664, 1048577,
-	0xa666, 1048577,
-	0xa668, 1048577,
-	0xa66a, 1048577,
-	0xa66c, 1048577,
-	0xa680, 1048577,
-	0xa682, 1048577,
-	0xa684, 1048577,
-	0xa686, 1048577,
-	0xa688, 1048577,
-	0xa68a, 1048577,
-	0xa68c, 1048577,
-	0xa68e, 1048577,
-	0xa690, 1048577,
-	0xa692, 1048577,
-	0xa694, 1048577,
-	0xa696, 1048577,
-	0xa698, 1048577,
-	0xa69a, 1048577,
-	0xa722, 1048577,
-	0xa724, 1048577,
-	0xa726, 1048577,
-	0xa728, 1048577,
-	0xa72a, 1048577,
-	0xa72c, 1048577,
-	0xa72e, 1048577,
-	0xa732, 1048577,
-	0xa734, 1048577,
-	0xa736, 1048577,
-	0xa738, 1048577,
-	0xa73a, 1048577,
-	0xa73c, 1048577,
-	0xa73e, 1048577,
-	0xa740, 1048577,
-	0xa742, 1048577,
-	0xa744, 1048577,
-	0xa746, 1048577,
-	0xa748, 1048577,
-	0xa74a, 1048577,
-	0xa74c, 1048577,
-	0xa74e, 1048577,
-	0xa750, 1048577,
-	0xa752, 1048577,
-	0xa754, 1048577,
-	0xa756, 1048577,
-	0xa758, 1048577,
-	0xa75a, 1048577,
-	0xa75c, 1048577,
-	0xa75e, 1048577,
-	0xa760, 1048577,
-	0xa762, 1048577,
-	0xa764, 1048577,
-	0xa766, 1048577,
-	0xa768, 1048577,
-	0xa76a, 1048577,
-	0xa76c, 1048577,
-	0xa76e, 1048577,
-	0xa779, 1048577,
-	0xa77b, 1048577,
-	0xa77d, 1013244,
-	0xa77e, 1048577,
-	0xa780, 1048577,
-	0xa782, 1048577,
-	0xa784, 1048577,
-	0xa786, 1048577,
-	0xa78b, 1048577,
-	0xa78d, 1006296,
-	0xa790, 1048577,
-	0xa792, 1048577,
-	0xa796, 1048577,
-	0xa798, 1048577,
-	0xa79a, 1048577,
-	0xa79c, 1048577,
-	0xa79e, 1048577,
-	0xa7a0, 1048577,
-	0xa7a2, 1048577,
-	0xa7a4, 1048577,
-	0xa7a6, 1048577,
-	0xa7a8, 1048577,
-	0xa7aa, 1006268,
-	0xa7ab, 1006257,
-	0xa7ac, 1006261,
-	0xa7ad, 1006271,
-	0xa7b0, 1006318,
-	0xa7b1, 1006294,
+    0x0100, 1048577,
+    0x0102, 1048577,
+    0x0104, 1048577,
+    0x0106, 1048577,
+    0x0108, 1048577,
+    0x010a, 1048577,
+    0x010c, 1048577,
+    0x010e, 1048577,
+    0x0110, 1048577,
+    0x0112, 1048577,
+    0x0114, 1048577,
+    0x0116, 1048577,
+    0x0118, 1048577,
+    0x011a, 1048577,
+    0x011c, 1048577,
+    0x011e, 1048577,
+    0x0120, 1048577,
+    0x0122, 1048577,
+    0x0124, 1048577,
+    0x0126, 1048577,
+    0x0128, 1048577,
+    0x012a, 1048577,
+    0x012c, 1048577,
+    0x012e, 1048577,
+    0x0130, 1048377,
+    0x0132, 1048577,
+    0x0134, 1048577,
+    0x0136, 1048577,
+    0x0139, 1048577,
+    0x013b, 1048577,
+    0x013d, 1048577,
+    0x013f, 1048577,
+    0x0141, 1048577,
+    0x0143, 1048577,
+    0x0145, 1048577,
+    0x0147, 1048577,
+    0x014a, 1048577,
+    0x014c, 1048577,
+    0x014e, 1048577,
+    0x0150, 1048577,
+    0x0152, 1048577,
+    0x0154, 1048577,
+    0x0156, 1048577,
+    0x0158, 1048577,
+    0x015a, 1048577,
+    0x015c, 1048577,
+    0x015e, 1048577,
+    0x0160, 1048577,
+    0x0162, 1048577,
+    0x0164, 1048577,
+    0x0166, 1048577,
+    0x0168, 1048577,
+    0x016a, 1048577,
+    0x016c, 1048577,
+    0x016e, 1048577,
+    0x0170, 1048577,
+    0x0172, 1048577,
+    0x0174, 1048577,
+    0x0176, 1048577,
+    0x0178, 1048455,
+    0x0179, 1048577,
+    0x017b, 1048577,
+    0x017d, 1048577,
+    0x0181, 1048786,
+    0x0182, 1048577,
+    0x0184, 1048577,
+    0x0186, 1048782,
+    0x0187, 1048577,
+    0x018b, 1048577,
+    0x018e, 1048655,
+    0x018f, 1048778,
+    0x0190, 1048779,
+    0x0191, 1048577,
+    0x0193, 1048781,
+    0x0194, 1048783,
+    0x0196, 1048787,
+    0x0197, 1048785,
+    0x0198, 1048577,
+    0x019c, 1048787,
+    0x019d, 1048789,
+    0x019f, 1048790,
+    0x01a0, 1048577,
+    0x01a2, 1048577,
+    0x01a4, 1048577,
+    0x01a6, 1048794,
+    0x01a7, 1048577,
+    0x01a9, 1048794,
+    0x01ac, 1048577,
+    0x01ae, 1048794,
+    0x01af, 1048577,
+    0x01b3, 1048577,
+    0x01b5, 1048577,
+    0x01b7, 1048795,
+    0x01b8, 1048577,
+    0x01bc, 1048577,
+    0x01c4, 1048578,
+    0x01c5, 1048577,
+    0x01c7, 1048578,
+    0x01c8, 1048577,
+    0x01ca, 1048578,
+    0x01cb, 1048577,
+    0x01cd, 1048577,
+    0x01cf, 1048577,
+    0x01d1, 1048577,
+    0x01d3, 1048577,
+    0x01d5, 1048577,
+    0x01d7, 1048577,
+    0x01d9, 1048577,
+    0x01db, 1048577,
+    0x01de, 1048577,
+    0x01e0, 1048577,
+    0x01e2, 1048577,
+    0x01e4, 1048577,
+    0x01e6, 1048577,
+    0x01e8, 1048577,
+    0x01ea, 1048577,
+    0x01ec, 1048577,
+    0x01ee, 1048577,
+    0x01f1, 1048578,
+    0x01f2, 1048577,
+    0x01f4, 1048577,
+    0x01f6, 1048479,
+    0x01f7, 1048520,
+    0x01f8, 1048577,
+    0x01fa, 1048577,
+    0x01fc, 1048577,
+    0x01fe, 1048577,
+    0x0200, 1048577,
+    0x0202, 1048577,
+    0x0204, 1048577,
+    0x0206, 1048577,
+    0x0208, 1048577,
+    0x020a, 1048577,
+    0x020c, 1048577,
+    0x020e, 1048577,
+    0x0210, 1048577,
+    0x0212, 1048577,
+    0x0214, 1048577,
+    0x0216, 1048577,
+    0x0218, 1048577,
+    0x021a, 1048577,
+    0x021c, 1048577,
+    0x021e, 1048577,
+    0x0220, 1048446,
+    0x0222, 1048577,
+    0x0224, 1048577,
+    0x0226, 1048577,
+    0x0228, 1048577,
+    0x022a, 1048577,
+    0x022c, 1048577,
+    0x022e, 1048577,
+    0x0230, 1048577,
+    0x0232, 1048577,
+    0x023a, 1059371,
+    0x023b, 1048577,
+    0x023d, 1048413,
+    0x023e, 1059368,
+    0x0241, 1048577,
+    0x0243, 1048381,
+    0x0244, 1048645,
+    0x0245, 1048647,
+    0x0246, 1048577,
+    0x0248, 1048577,
+    0x024a, 1048577,
+    0x024c, 1048577,
+    0x024e, 1048577,
+    0x0370, 1048577,
+    0x0372, 1048577,
+    0x0376, 1048577,
+    0x037f, 1048692,
+    0x0386, 1048614,
+    0x038c, 1048640,
+    0x03cf, 1048584,
+    0x03d8, 1048577,
+    0x03da, 1048577,
+    0x03dc, 1048577,
+    0x03de, 1048577,
+    0x03e0, 1048577,
+    0x03e2, 1048577,
+    0x03e4, 1048577,
+    0x03e6, 1048577,
+    0x03e8, 1048577,
+    0x03ea, 1048577,
+    0x03ec, 1048577,
+    0x03ee, 1048577,
+    0x03f4, 1048516,
+    0x03f7, 1048577,
+    0x03f9, 1048569,
+    0x03fa, 1048577,
+    0x0460, 1048577,
+    0x0462, 1048577,
+    0x0464, 1048577,
+    0x0466, 1048577,
+    0x0468, 1048577,
+    0x046a, 1048577,
+    0x046c, 1048577,
+    0x046e, 1048577,
+    0x0470, 1048577,
+    0x0472, 1048577,
+    0x0474, 1048577,
+    0x0476, 1048577,
+    0x0478, 1048577,
+    0x047a, 1048577,
+    0x047c, 1048577,
+    0x047e, 1048577,
+    0x0480, 1048577,
+    0x048a, 1048577,
+    0x048c, 1048577,
+    0x048e, 1048577,
+    0x0490, 1048577,
+    0x0492, 1048577,
+    0x0494, 1048577,
+    0x0496, 1048577,
+    0x0498, 1048577,
+    0x049a, 1048577,
+    0x049c, 1048577,
+    0x049e, 1048577,
+    0x04a0, 1048577,
+    0x04a2, 1048577,
+    0x04a4, 1048577,
+    0x04a6, 1048577,
+    0x04a8, 1048577,
+    0x04aa, 1048577,
+    0x04ac, 1048577,
+    0x04ae, 1048577,
+    0x04b0, 1048577,
+    0x04b2, 1048577,
+    0x04b4, 1048577,
+    0x04b6, 1048577,
+    0x04b8, 1048577,
+    0x04ba, 1048577,
+    0x04bc, 1048577,
+    0x04be, 1048577,
+    0x04c0, 1048591,
+    0x04c1, 1048577,
+    0x04c3, 1048577,
+    0x04c5, 1048577,
+    0x04c7, 1048577,
+    0x04c9, 1048577,
+    0x04cb, 1048577,
+    0x04cd, 1048577,
+    0x04d0, 1048577,
+    0x04d2, 1048577,
+    0x04d4, 1048577,
+    0x04d6, 1048577,
+    0x04d8, 1048577,
+    0x04da, 1048577,
+    0x04dc, 1048577,
+    0x04de, 1048577,
+    0x04e0, 1048577,
+    0x04e2, 1048577,
+    0x04e4, 1048577,
+    0x04e6, 1048577,
+    0x04e8, 1048577,
+    0x04ea, 1048577,
+    0x04ec, 1048577,
+    0x04ee, 1048577,
+    0x04f0, 1048577,
+    0x04f2, 1048577,
+    0x04f4, 1048577,
+    0x04f6, 1048577,
+    0x04f8, 1048577,
+    0x04fa, 1048577,
+    0x04fc, 1048577,
+    0x04fe, 1048577,
+    0x0500, 1048577,
+    0x0502, 1048577,
+    0x0504, 1048577,
+    0x0506, 1048577,
+    0x0508, 1048577,
+    0x050a, 1048577,
+    0x050c, 1048577,
+    0x050e, 1048577,
+    0x0510, 1048577,
+    0x0512, 1048577,
+    0x0514, 1048577,
+    0x0516, 1048577,
+    0x0518, 1048577,
+    0x051a, 1048577,
+    0x051c, 1048577,
+    0x051e, 1048577,
+    0x0520, 1048577,
+    0x0522, 1048577,
+    0x0524, 1048577,
+    0x0526, 1048577,
+    0x0528, 1048577,
+    0x052a, 1048577,
+    0x052c, 1048577,
+    0x052e, 1048577,
+    0x10c7, 1055840,
+    0x10cd, 1055840,
+    0x1e00, 1048577,
+    0x1e02, 1048577,
+    0x1e04, 1048577,
+    0x1e06, 1048577,
+    0x1e08, 1048577,
+    0x1e0a, 1048577,
+    0x1e0c, 1048577,
+    0x1e0e, 1048577,
+    0x1e10, 1048577,
+    0x1e12, 1048577,
+    0x1e14, 1048577,
+    0x1e16, 1048577,
+    0x1e18, 1048577,
+    0x1e1a, 1048577,
+    0x1e1c, 1048577,
+    0x1e1e, 1048577,
+    0x1e20, 1048577,
+    0x1e22, 1048577,
+    0x1e24, 1048577,
+    0x1e26, 1048577,
+    0x1e28, 1048577,
+    0x1e2a, 1048577,
+    0x1e2c, 1048577,
+    0x1e2e, 1048577,
+    0x1e30, 1048577,
+    0x1e32, 1048577,
+    0x1e34, 1048577,
+    0x1e36, 1048577,
+    0x1e38, 1048577,
+    0x1e3a, 1048577,
+    0x1e3c, 1048577,
+    0x1e3e, 1048577,
+    0x1e40, 1048577,
+    0x1e42, 1048577,
+    0x1e44, 1048577,
+    0x1e46, 1048577,
+    0x1e48, 1048577,
+    0x1e4a, 1048577,
+    0x1e4c, 1048577,
+    0x1e4e, 1048577,
+    0x1e50, 1048577,
+    0x1e52, 1048577,
+    0x1e54, 1048577,
+    0x1e56, 1048577,
+    0x1e58, 1048577,
+    0x1e5a, 1048577,
+    0x1e5c, 1048577,
+    0x1e5e, 1048577,
+    0x1e60, 1048577,
+    0x1e62, 1048577,
+    0x1e64, 1048577,
+    0x1e66, 1048577,
+    0x1e68, 1048577,
+    0x1e6a, 1048577,
+    0x1e6c, 1048577,
+    0x1e6e, 1048577,
+    0x1e70, 1048577,
+    0x1e72, 1048577,
+    0x1e74, 1048577,
+    0x1e76, 1048577,
+    0x1e78, 1048577,
+    0x1e7a, 1048577,
+    0x1e7c, 1048577,
+    0x1e7e, 1048577,
+    0x1e80, 1048577,
+    0x1e82, 1048577,
+    0x1e84, 1048577,
+    0x1e86, 1048577,
+    0x1e88, 1048577,
+    0x1e8a, 1048577,
+    0x1e8c, 1048577,
+    0x1e8e, 1048577,
+    0x1e90, 1048577,
+    0x1e92, 1048577,
+    0x1e94, 1048577,
+    0x1e9e, 1040961,
+    0x1ea0, 1048577,
+    0x1ea2, 1048577,
+    0x1ea4, 1048577,
+    0x1ea6, 1048577,
+    0x1ea8, 1048577,
+    0x1eaa, 1048577,
+    0x1eac, 1048577,
+    0x1eae, 1048577,
+    0x1eb0, 1048577,
+    0x1eb2, 1048577,
+    0x1eb4, 1048577,
+    0x1eb6, 1048577,
+    0x1eb8, 1048577,
+    0x1eba, 1048577,
+    0x1ebc, 1048577,
+    0x1ebe, 1048577,
+    0x1ec0, 1048577,
+    0x1ec2, 1048577,
+    0x1ec4, 1048577,
+    0x1ec6, 1048577,
+    0x1ec8, 1048577,
+    0x1eca, 1048577,
+    0x1ecc, 1048577,
+    0x1ece, 1048577,
+    0x1ed0, 1048577,
+    0x1ed2, 1048577,
+    0x1ed4, 1048577,
+    0x1ed6, 1048577,
+    0x1ed8, 1048577,
+    0x1eda, 1048577,
+    0x1edc, 1048577,
+    0x1ede, 1048577,
+    0x1ee0, 1048577,
+    0x1ee2, 1048577,
+    0x1ee4, 1048577,
+    0x1ee6, 1048577,
+    0x1ee8, 1048577,
+    0x1eea, 1048577,
+    0x1eec, 1048577,
+    0x1eee, 1048577,
+    0x1ef0, 1048577,
+    0x1ef2, 1048577,
+    0x1ef4, 1048577,
+    0x1ef6, 1048577,
+    0x1ef8, 1048577,
+    0x1efa, 1048577,
+    0x1efc, 1048577,
+    0x1efe, 1048577,
+    0x1f59, 1048568,
+    0x1f5b, 1048568,
+    0x1f5d, 1048568,
+    0x1f5f, 1048568,
+    0x1fbc, 1048567,
+    0x1fcc, 1048567,
+    0x1fec, 1048569,
+    0x1ffc, 1048567,
+    0x2126, 1041059,
+    0x212a, 1040193,
+    0x212b, 1040314,
+    0x2132, 1048604,
+    0x2183, 1048577,
+    0x2c60, 1048577,
+    0x2c62, 1037833,
+    0x2c63, 1044762,
+    0x2c64, 1037849,
+    0x2c67, 1048577,
+    0x2c69, 1048577,
+    0x2c6b, 1048577,
+    0x2c6d, 1037796,
+    0x2c6e, 1037827,
+    0x2c6f, 1037793,
+    0x2c70, 1037794,
+    0x2c72, 1048577,
+    0x2c75, 1048577,
+    0x2c80, 1048577,
+    0x2c82, 1048577,
+    0x2c84, 1048577,
+    0x2c86, 1048577,
+    0x2c88, 1048577,
+    0x2c8a, 1048577,
+    0x2c8c, 1048577,
+    0x2c8e, 1048577,
+    0x2c90, 1048577,
+    0x2c92, 1048577,
+    0x2c94, 1048577,
+    0x2c96, 1048577,
+    0x2c98, 1048577,
+    0x2c9a, 1048577,
+    0x2c9c, 1048577,
+    0x2c9e, 1048577,
+    0x2ca0, 1048577,
+    0x2ca2, 1048577,
+    0x2ca4, 1048577,
+    0x2ca6, 1048577,
+    0x2ca8, 1048577,
+    0x2caa, 1048577,
+    0x2cac, 1048577,
+    0x2cae, 1048577,
+    0x2cb0, 1048577,
+    0x2cb2, 1048577,
+    0x2cb4, 1048577,
+    0x2cb6, 1048577,
+    0x2cb8, 1048577,
+    0x2cba, 1048577,
+    0x2cbc, 1048577,
+    0x2cbe, 1048577,
+    0x2cc0, 1048577,
+    0x2cc2, 1048577,
+    0x2cc4, 1048577,
+    0x2cc6, 1048577,
+    0x2cc8, 1048577,
+    0x2cca, 1048577,
+    0x2ccc, 1048577,
+    0x2cce, 1048577,
+    0x2cd0, 1048577,
+    0x2cd2, 1048577,
+    0x2cd4, 1048577,
+    0x2cd6, 1048577,
+    0x2cd8, 1048577,
+    0x2cda, 1048577,
+    0x2cdc, 1048577,
+    0x2cde, 1048577,
+    0x2ce0, 1048577,
+    0x2ce2, 1048577,
+    0x2ceb, 1048577,
+    0x2ced, 1048577,
+    0x2cf2, 1048577,
+    0xa640, 1048577,
+    0xa642, 1048577,
+    0xa644, 1048577,
+    0xa646, 1048577,
+    0xa648, 1048577,
+    0xa64a, 1048577,
+    0xa64c, 1048577,
+    0xa64e, 1048577,
+    0xa650, 1048577,
+    0xa652, 1048577,
+    0xa654, 1048577,
+    0xa656, 1048577,
+    0xa658, 1048577,
+    0xa65a, 1048577,
+    0xa65c, 1048577,
+    0xa65e, 1048577,
+    0xa660, 1048577,
+    0xa662, 1048577,
+    0xa664, 1048577,
+    0xa666, 1048577,
+    0xa668, 1048577,
+    0xa66a, 1048577,
+    0xa66c, 1048577,
+    0xa680, 1048577,
+    0xa682, 1048577,
+    0xa684, 1048577,
+    0xa686, 1048577,
+    0xa688, 1048577,
+    0xa68a, 1048577,
+    0xa68c, 1048577,
+    0xa68e, 1048577,
+    0xa690, 1048577,
+    0xa692, 1048577,
+    0xa694, 1048577,
+    0xa696, 1048577,
+    0xa698, 1048577,
+    0xa69a, 1048577,
+    0xa722, 1048577,
+    0xa724, 1048577,
+    0xa726, 1048577,
+    0xa728, 1048577,
+    0xa72a, 1048577,
+    0xa72c, 1048577,
+    0xa72e, 1048577,
+    0xa732, 1048577,
+    0xa734, 1048577,
+    0xa736, 1048577,
+    0xa738, 1048577,
+    0xa73a, 1048577,
+    0xa73c, 1048577,
+    0xa73e, 1048577,
+    0xa740, 1048577,
+    0xa742, 1048577,
+    0xa744, 1048577,
+    0xa746, 1048577,
+    0xa748, 1048577,
+    0xa74a, 1048577,
+    0xa74c, 1048577,
+    0xa74e, 1048577,
+    0xa750, 1048577,
+    0xa752, 1048577,
+    0xa754, 1048577,
+    0xa756, 1048577,
+    0xa758, 1048577,
+    0xa75a, 1048577,
+    0xa75c, 1048577,
+    0xa75e, 1048577,
+    0xa760, 1048577,
+    0xa762, 1048577,
+    0xa764, 1048577,
+    0xa766, 1048577,
+    0xa768, 1048577,
+    0xa76a, 1048577,
+    0xa76c, 1048577,
+    0xa76e, 1048577,
+    0xa779, 1048577,
+    0xa77b, 1048577,
+    0xa77d, 1013244,
+    0xa77e, 1048577,
+    0xa780, 1048577,
+    0xa782, 1048577,
+    0xa784, 1048577,
+    0xa786, 1048577,
+    0xa78b, 1048577,
+    0xa78d, 1006296,
+    0xa790, 1048577,
+    0xa792, 1048577,
+    0xa796, 1048577,
+    0xa798, 1048577,
+    0xa79a, 1048577,
+    0xa79c, 1048577,
+    0xa79e, 1048577,
+    0xa7a0, 1048577,
+    0xa7a2, 1048577,
+    0xa7a4, 1048577,
+    0xa7a6, 1048577,
+    0xa7a8, 1048577,
+    0xa7aa, 1006268,
+    0xa7ab, 1006257,
+    0xa7ac, 1006261,
+    0xa7ad, 1006271,
+    0xa7b0, 1006318,
+    0xa7b1, 1006294,
 };
 
 } // !namespace
 
 char32_t tolower(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, tolowerr, nelem (tolowerr)/3, 3);
+   p = rbsearch(c, tolowerr, nelem (tolowerr)/3, 3);
 
-	if (p && c >= p[0] && c <= p[1])
-		return c + p[2] - 1048576;
+   if (p && c >= p[0] && c <= p[1])
+       return c + p[2] - 1048576;
 
-	p = rbsearch(c, tolowers, nelem (tolowers)/2, 2);
+ p = rbsearch(c, tolowers, nelem (tolowers)/2, 2);
 
-	if (p && c == p[0])
-		return c + p[1] - 1048576;
+   if (p && c == p[0])
+       return c + p[1] - 1048576;
 
-	return c;
+   return c;
 }
 
 namespace {
 
 const char32_t totitler[] = {
-	0x0061, 0x007a, 1048544,
-	0x00e0, 0x00f6, 1048544,
-	0x00f8, 0x00fe, 1048544,
-	0x023f, 0x0240, 1059391,
-	0x0256, 0x0257, 1048371,
-	0x028a, 0x028b, 1048359,
-	0x037b, 0x037d, 1048706,
-	0x03ad, 0x03af, 1048539,
-	0x03b1, 0x03c1, 1048544,
-	0x03c3, 0x03cb, 1048544,
-	0x03cd, 0x03ce, 1048513,
-	0x0430, 0x044f, 1048544,
-	0x0450, 0x045f, 1048496,
-	0x0561, 0x0586, 1048528,
-	0x1f00, 0x1f07, 1048584,
-	0x1f10, 0x1f15, 1048584,
-	0x1f20, 0x1f27, 1048584,
-	0x1f30, 0x1f37, 1048584,
-	0x1f40, 0x1f45, 1048584,
-	0x1f60, 0x1f67, 1048584,
-	0x1f70, 0x1f71, 1048650,
-	0x1f72, 0x1f75, 1048662,
-	0x1f76, 0x1f77, 1048676,
-	0x1f78, 0x1f79, 1048704,
-	0x1f7a, 0x1f7b, 1048688,
-	0x1f7c, 0x1f7d, 1048702,
-	0x1f80, 0x1f87, 1048584,
-	0x1f90, 0x1f97, 1048584,
-	0x1fa0, 0x1fa7, 1048584,
-	0x1fb0, 0x1fb1, 1048584,
-	0x1fd0, 0x1fd1, 1048584,
-	0x1fe0, 0x1fe1, 1048584,
-	0x2170, 0x217f, 1048560,
-	0x24d0, 0x24e9, 1048550,
-	0x2c30, 0x2c5e, 1048528,
-	0x2d00, 0x2d25, 1041312,
-	0xff41, 0xff5a, 1048544,
-	0x10428, 0x1044f, 1048536,
-	0x118c0, 0x118df, 1048544,
+    0x0061, 0x007a, 1048544,
+    0x00e0, 0x00f6, 1048544,
+    0x00f8, 0x00fe, 1048544,
+    0x023f, 0x0240, 1059391,
+    0x0256, 0x0257, 1048371,
+    0x028a, 0x028b, 1048359,
+    0x037b, 0x037d, 1048706,
+    0x03ad, 0x03af, 1048539,
+    0x03b1, 0x03c1, 1048544,
+    0x03c3, 0x03cb, 1048544,
+    0x03cd, 0x03ce, 1048513,
+    0x0430, 0x044f, 1048544,
+    0x0450, 0x045f, 1048496,
+    0x0561, 0x0586, 1048528,
+    0x1f00, 0x1f07, 1048584,
+    0x1f10, 0x1f15, 1048584,
+    0x1f20, 0x1f27, 1048584,
+    0x1f30, 0x1f37, 1048584,
+    0x1f40, 0x1f45, 1048584,
+    0x1f60, 0x1f67, 1048584,
+    0x1f70, 0x1f71, 1048650,
+    0x1f72, 0x1f75, 1048662,
+    0x1f76, 0x1f77, 1048676,
+    0x1f78, 0x1f79, 1048704,
+    0x1f7a, 0x1f7b, 1048688,
+    0x1f7c, 0x1f7d, 1048702,
+    0x1f80, 0x1f87, 1048584,
+    0x1f90, 0x1f97, 1048584,
+    0x1fa0, 0x1fa7, 1048584,
+    0x1fb0, 0x1fb1, 1048584,
+    0x1fd0, 0x1fd1, 1048584,
+    0x1fe0, 0x1fe1, 1048584,
+    0x2170, 0x217f, 1048560,
+    0x24d0, 0x24e9, 1048550,
+    0x2c30, 0x2c5e, 1048528,
+    0x2d00, 0x2d25, 1041312,
+    0xff41, 0xff5a, 1048544,
+    0x10428, 0x1044f, 1048536,
+    0x118c0, 0x118df, 1048544,
 };
 
 } // !namespace
@@ -4040,755 +4040,755 @@
 namespace {
 
 const char32_t totitles[] = {
-	0x00b5, 1049319,
-	0x00ff, 1048697,
-	0x0101, 1048575,
-	0x0103, 1048575,
-	0x0105, 1048575,
-	0x0107, 1048575,
-	0x0109, 1048575,
-	0x010b, 1048575,
-	0x010d, 1048575,
-	0x010f, 1048575,
-	0x0111, 1048575,
-	0x0113, 1048575,
-	0x0115, 1048575,
-	0x0117, 1048575,
-	0x0119, 1048575,
-	0x011b, 1048575,
-	0x011d, 1048575,
-	0x011f, 1048575,
-	0x0121, 1048575,
-	0x0123, 1048575,
-	0x0125, 1048575,
-	0x0127, 1048575,
-	0x0129, 1048575,
-	0x012b, 1048575,
-	0x012d, 1048575,
-	0x012f, 1048575,
-	0x0131, 1048344,
-	0x0133, 1048575,
-	0x0135, 1048575,
-	0x0137, 1048575,
-	0x013a, 1048575,
-	0x013c, 1048575,
-	0x013e, 1048575,
-	0x0140, 1048575,
-	0x0142, 1048575,
-	0x0144, 1048575,
-	0x0146, 1048575,
-	0x0148, 1048575,
-	0x014b, 1048575,
-	0x014d, 1048575,
-	0x014f, 1048575,
-	0x0151, 1048575,
-	0x0153, 1048575,
-	0x0155, 1048575,
-	0x0157, 1048575,
-	0x0159, 1048575,
-	0x015b, 1048575,
-	0x015d, 1048575,
-	0x015f, 1048575,
-	0x0161, 1048575,
-	0x0163, 1048575,
-	0x0165, 1048575,
-	0x0167, 1048575,
-	0x0169, 1048575,
-	0x016b, 1048575,
-	0x016d, 1048575,
-	0x016f, 1048575,
-	0x0171, 1048575,
-	0x0173, 1048575,
-	0x0175, 1048575,
-	0x0177, 1048575,
-	0x017a, 1048575,
-	0x017c, 1048575,
-	0x017e, 1048575,
-	0x017f, 1048276,
-	0x0180, 1048771,
-	0x0183, 1048575,
-	0x0185, 1048575,
-	0x0188, 1048575,
-	0x018c, 1048575,
-	0x0192, 1048575,
-	0x0195, 1048673,
-	0x0199, 1048575,
-	0x019a, 1048739,
-	0x019e, 1048706,
-	0x01a1, 1048575,
-	0x01a3, 1048575,
-	0x01a5, 1048575,
-	0x01a8, 1048575,
-	0x01ad, 1048575,
-	0x01b0, 1048575,
-	0x01b4, 1048575,
-	0x01b6, 1048575,
-	0x01b9, 1048575,
-	0x01bd, 1048575,
-	0x01bf, 1048632,
-	0x01c4, 1048577,
-	0x01c6, 1048575,
-	0x01c7, 1048577,
-	0x01c9, 1048575,
-	0x01ca, 1048577,
-	0x01cc, 1048575,
-	0x01ce, 1048575,
-	0x01d0, 1048575,
-	0x01d2, 1048575,
-	0x01d4, 1048575,
-	0x01d6, 1048575,
-	0x01d8, 1048575,
-	0x01da, 1048575,
-	0x01dc, 1048575,
-	0x01dd, 1048497,
-	0x01df, 1048575,
-	0x01e1, 1048575,
-	0x01e3, 1048575,
-	0x01e5, 1048575,
-	0x01e7, 1048575,
-	0x01e9, 1048575,
-	0x01eb, 1048575,
-	0x01ed, 1048575,
-	0x01ef, 1048575,
-	0x01f1, 1048577,
-	0x01f3, 1048575,
-	0x01f5, 1048575,
-	0x01f9, 1048575,
-	0x01fb, 1048575,
-	0x01fd, 1048575,
-	0x01ff, 1048575,
-	0x0201, 1048575,
-	0x0203, 1048575,
-	0x0205, 1048575,
-	0x0207, 1048575,
-	0x0209, 1048575,
-	0x020b, 1048575,
-	0x020d, 1048575,
-	0x020f, 1048575,
-	0x0211, 1048575,
-	0x0213, 1048575,
-	0x0215, 1048575,
-	0x0217, 1048575,
-	0x0219, 1048575,
-	0x021b, 1048575,
-	0x021d, 1048575,
-	0x021f, 1048575,
-	0x0223, 1048575,
-	0x0225, 1048575,
-	0x0227, 1048575,
-	0x0229, 1048575,
-	0x022b, 1048575,
-	0x022d, 1048575,
-	0x022f, 1048575,
-	0x0231, 1048575,
-	0x0233, 1048575,
-	0x023c, 1048575,
-	0x0242, 1048575,
-	0x0247, 1048575,
-	0x0249, 1048575,
-	0x024b, 1048575,
-	0x024d, 1048575,
-	0x024f, 1048575,
-	0x0250, 1059359,
-	0x0251, 1059356,
-	0x0252, 1059358,
-	0x0253, 1048366,
-	0x0254, 1048370,
-	0x0259, 1048374,
-	0x025b, 1048373,
-	0x025c, 1090895,
-	0x0260, 1048371,
-	0x0261, 1090891,
-	0x0263, 1048369,
-	0x0265, 1090856,
-	0x0266, 1090884,
-	0x0268, 1048367,
-	0x0269, 1048365,
-	0x026b, 1059319,
-	0x026c, 1090881,
-	0x026f, 1048365,
-	0x0271, 1059325,
-	0x0272, 1048363,
-	0x0275, 1048362,
-	0x027d, 1059303,
-	0x0280, 1048358,
-	0x0283, 1048358,
-	0x0287, 1090858,
-	0x0288, 1048358,
-	0x0289, 1048507,
-	0x028c, 1048505,
-	0x0292, 1048357,
-	0x029e, 1090834,
-	0x0345, 1048660,
-	0x0371, 1048575,
-	0x0373, 1048575,
-	0x0377, 1048575,
-	0x03ac, 1048538,
-	0x03c2, 1048545,
-	0x03cc, 1048512,
-	0x03d0, 1048514,
-	0x03d1, 1048519,
-	0x03d5, 1048529,
-	0x03d6, 1048522,
-	0x03d7, 1048568,
-	0x03d9, 1048575,
-	0x03db, 1048575,
-	0x03dd, 1048575,
-	0x03df, 1048575,
-	0x03e1, 1048575,
-	0x03e3, 1048575,
-	0x03e5, 1048575,
-	0x03e7, 1048575,
-	0x03e9, 1048575,
-	0x03eb, 1048575,
-	0x03ed, 1048575,
-	0x03ef, 1048575,
-	0x03f0, 1048490,
-	0x03f1, 1048496,
-	0x03f2, 1048583,
-	0x03f3, 1048460,
-	0x03f5, 1048480,
-	0x03f8, 1048575,
-	0x03fb, 1048575,
-	0x0461, 1048575,
-	0x0463, 1048575,
-	0x0465, 1048575,
-	0x0467, 1048575,
-	0x0469, 1048575,
-	0x046b, 1048575,
-	0x046d, 1048575,
-	0x046f, 1048575,
-	0x0471, 1048575,
-	0x0473, 1048575,
-	0x0475, 1048575,
-	0x0477, 1048575,
-	0x0479, 1048575,
-	0x047b, 1048575,
-	0x047d, 1048575,
-	0x047f, 1048575,
-	0x0481, 1048575,
-	0x048b, 1048575,
-	0x048d, 1048575,
-	0x048f, 1048575,
-	0x0491, 1048575,
-	0x0493, 1048575,
-	0x0495, 1048575,
-	0x0497, 1048575,
-	0x0499, 1048575,
-	0x049b, 1048575,
-	0x049d, 1048575,
-	0x049f, 1048575,
-	0x04a1, 1048575,
-	0x04a3, 1048575,
-	0x04a5, 1048575,
-	0x04a7, 1048575,
-	0x04a9, 1048575,
-	0x04ab, 1048575,
-	0x04ad, 1048575,
-	0x04af, 1048575,
-	0x04b1, 1048575,
-	0x04b3, 1048575,
-	0x04b5, 1048575,
-	0x04b7, 1048575,
-	0x04b9, 1048575,
-	0x04bb, 1048575,
-	0x04bd, 1048575,
-	0x04bf, 1048575,
-	0x04c2, 1048575,
-	0x04c4, 1048575,
-	0x04c6, 1048575,
-	0x04c8, 1048575,
-	0x04ca, 1048575,
-	0x04cc, 1048575,
-	0x04ce, 1048575,
-	0x04cf, 1048561,
-	0x04d1, 1048575,
-	0x04d3, 1048575,
-	0x04d5, 1048575,
-	0x04d7, 1048575,
-	0x04d9, 1048575,
-	0x04db, 1048575,
-	0x04dd, 1048575,
-	0x04df, 1048575,
-	0x04e1, 1048575,
-	0x04e3, 1048575,
-	0x04e5, 1048575,
-	0x04e7, 1048575,
-	0x04e9, 1048575,
-	0x04eb, 1048575,
-	0x04ed, 1048575,
-	0x04ef, 1048575,
-	0x04f1, 1048575,
-	0x04f3, 1048575,
-	0x04f5, 1048575,
-	0x04f7, 1048575,
-	0x04f9, 1048575,
-	0x04fb, 1048575,
-	0x04fd, 1048575,
-	0x04ff, 1048575,
-	0x0501, 1048575,
-	0x0503, 1048575,
-	0x0505, 1048575,
-	0x0507, 1048575,
-	0x0509, 1048575,
-	0x050b, 1048575,
-	0x050d, 1048575,
-	0x050f, 1048575,
-	0x0511, 1048575,
-	0x0513, 1048575,
-	0x0515, 1048575,
-	0x0517, 1048575,
-	0x0519, 1048575,
-	0x051b, 1048575,
-	0x051d, 1048575,
-	0x051f, 1048575,
-	0x0521, 1048575,
-	0x0523, 1048575,
-	0x0525, 1048575,
-	0x0527, 1048575,
-	0x0529, 1048575,
-	0x052b, 1048575,
-	0x052d, 1048575,
-	0x052f, 1048575,
-	0x1d79, 1083908,
-	0x1d7d, 1052390,
-	0x1e01, 1048575,
-	0x1e03, 1048575,
-	0x1e05, 1048575,
-	0x1e07, 1048575,
-	0x1e09, 1048575,
-	0x1e0b, 1048575,
-	0x1e0d, 1048575,
-	0x1e0f, 1048575,
-	0x1e11, 1048575,
-	0x1e13, 1048575,
-	0x1e15, 1048575,
-	0x1e17, 1048575,
-	0x1e19, 1048575,
-	0x1e1b, 1048575,
-	0x1e1d, 1048575,
-	0x1e1f, 1048575,
-	0x1e21, 1048575,
-	0x1e23, 1048575,
-	0x1e25, 1048575,
-	0x1e27, 1048575,
-	0x1e29, 1048575,
-	0x1e2b, 1048575,
-	0x1e2d, 1048575,
-	0x1e2f, 1048575,
-	0x1e31, 1048575,
-	0x1e33, 1048575,
-	0x1e35, 1048575,
-	0x1e37, 1048575,
-	0x1e39, 1048575,
-	0x1e3b, 1048575,
-	0x1e3d, 1048575,
-	0x1e3f, 1048575,
-	0x1e41, 1048575,
-	0x1e43, 1048575,
-	0x1e45, 1048575,
-	0x1e47, 1048575,
-	0x1e49, 1048575,
-	0x1e4b, 1048575,
-	0x1e4d, 1048575,
-	0x1e4f, 1048575,
-	0x1e51, 1048575,
-	0x1e53, 1048575,
-	0x1e55, 1048575,
-	0x1e57, 1048575,
-	0x1e59, 1048575,
-	0x1e5b, 1048575,
-	0x1e5d, 1048575,
-	0x1e5f, 1048575,
-	0x1e61, 1048575,
-	0x1e63, 1048575,
-	0x1e65, 1048575,
-	0x1e67, 1048575,
-	0x1e69, 1048575,
-	0x1e6b, 1048575,
-	0x1e6d, 1048575,
-	0x1e6f, 1048575,
-	0x1e71, 1048575,
-	0x1e73, 1048575,
-	0x1e75, 1048575,
-	0x1e77, 1048575,
-	0x1e79, 1048575,
-	0x1e7b, 1048575,
-	0x1e7d, 1048575,
-	0x1e7f, 1048575,
-	0x1e81, 1048575,
-	0x1e83, 1048575,
-	0x1e85, 1048575,
-	0x1e87, 1048575,
-	0x1e89, 1048575,
-	0x1e8b, 1048575,
-	0x1e8d, 1048575,
-	0x1e8f, 1048575,
-	0x1e91, 1048575,
-	0x1e93, 1048575,
-	0x1e95, 1048575,
-	0x1e9b, 1048517,
-	0x1ea1, 1048575,
-	0x1ea3, 1048575,
-	0x1ea5, 1048575,
-	0x1ea7, 1048575,
-	0x1ea9, 1048575,
-	0x1eab, 1048575,
-	0x1ead, 1048575,
-	0x1eaf, 1048575,
-	0x1eb1, 1048575,
-	0x1eb3, 1048575,
-	0x1eb5, 1048575,
-	0x1eb7, 1048575,
-	0x1eb9, 1048575,
-	0x1ebb, 1048575,
-	0x1ebd, 1048575,
-	0x1ebf, 1048575,
-	0x1ec1, 1048575,
-	0x1ec3, 1048575,
-	0x1ec5, 1048575,
-	0x1ec7, 1048575,
-	0x1ec9, 1048575,
-	0x1ecb, 1048575,
-	0x1ecd, 1048575,
-	0x1ecf, 1048575,
-	0x1ed1, 1048575,
-	0x1ed3, 1048575,
-	0x1ed5, 1048575,
-	0x1ed7, 1048575,
-	0x1ed9, 1048575,
-	0x1edb, 1048575,
-	0x1edd, 1048575,
-	0x1edf, 1048575,
-	0x1ee1, 1048575,
-	0x1ee3, 1048575,
-	0x1ee5, 1048575,
-	0x1ee7, 1048575,
-	0x1ee9, 1048575,
-	0x1eeb, 1048575,
-	0x1eed, 1048575,
-	0x1eef, 1048575,
-	0x1ef1, 1048575,
-	0x1ef3, 1048575,
-	0x1ef5, 1048575,
-	0x1ef7, 1048575,
-	0x1ef9, 1048575,
-	0x1efb, 1048575,
-	0x1efd, 1048575,
-	0x1eff, 1048575,
-	0x1f51, 1048584,
-	0x1f53, 1048584,
-	0x1f55, 1048584,
-	0x1f57, 1048584,
-	0x1fb3, 1048585,
-	0x1fbe, 1041371,
-	0x1fc3, 1048585,
-	0x1fe5, 1048583,
-	0x1ff3, 1048585,
-	0x214e, 1048548,
-	0x2184, 1048575,
-	0x2c61, 1048575,
-	0x2c65, 1037781,
-	0x2c66, 1037784,
-	0x2c68, 1048575,
-	0x2c6a, 1048575,
-	0x2c6c, 1048575,
-	0x2c73, 1048575,
-	0x2c76, 1048575,
-	0x2c81, 1048575,
-	0x2c83, 1048575,
-	0x2c85, 1048575,
-	0x2c87, 1048575,
-	0x2c89, 1048575,
-	0x2c8b, 1048575,
-	0x2c8d, 1048575,
-	0x2c8f, 1048575,
-	0x2c91, 1048575,
-	0x2c93, 1048575,
-	0x2c95, 1048575,
-	0x2c97, 1048575,
-	0x2c99, 1048575,
-	0x2c9b, 1048575,
-	0x2c9d, 1048575,
-	0x2c9f, 1048575,
-	0x2ca1, 1048575,
-	0x2ca3, 1048575,
-	0x2ca5, 1048575,
-	0x2ca7, 1048575,
-	0x2ca9, 1048575,
-	0x2cab, 1048575,
-	0x2cad, 1048575,
-	0x2caf, 1048575,
-	0x2cb1, 1048575,
-	0x2cb3, 1048575,
-	0x2cb5, 1048575,
-	0x2cb7, 1048575,
-	0x2cb9, 1048575,
-	0x2cbb, 1048575,
-	0x2cbd, 1048575,
-	0x2cbf, 1048575,
-	0x2cc1, 1048575,
-	0x2cc3, 1048575,
-	0x2cc5, 1048575,
-	0x2cc7, 1048575,
-	0x2cc9, 1048575,
-	0x2ccb, 1048575,
-	0x2ccd, 1048575,
-	0x2ccf, 1048575,
-	0x2cd1, 1048575,
-	0x2cd3, 1048575,
-	0x2cd5, 1048575,
-	0x2cd7, 1048575,
-	0x2cd9, 1048575,
-	0x2cdb, 1048575,
-	0x2cdd, 1048575,
-	0x2cdf, 1048575,
-	0x2ce1, 1048575,
-	0x2ce3, 1048575,
-	0x2cec, 1048575,
-	0x2cee, 1048575,
-	0x2cf3, 1048575,
-	0x2d27, 1041312,
-	0x2d2d, 1041312,
-	0xa641, 1048575,
-	0xa643, 1048575,
-	0xa645, 1048575,
-	0xa647, 1048575,
-	0xa649, 1048575,
-	0xa64b, 1048575,
-	0xa64d, 1048575,
-	0xa64f, 1048575,
-	0xa651, 1048575,
-	0xa653, 1048575,
-	0xa655, 1048575,
-	0xa657, 1048575,
-	0xa659, 1048575,
-	0xa65b, 1048575,
-	0xa65d, 1048575,
-	0xa65f, 1048575,
-	0xa661, 1048575,
-	0xa663, 1048575,
-	0xa665, 1048575,
-	0xa667, 1048575,
-	0xa669, 1048575,
-	0xa66b, 1048575,
-	0xa66d, 1048575,
-	0xa681, 1048575,
-	0xa683, 1048575,
-	0xa685, 1048575,
-	0xa687, 1048575,
-	0xa689, 1048575,
-	0xa68b, 1048575,
-	0xa68d, 1048575,
-	0xa68f, 1048575,
-	0xa691, 1048575,
-	0xa693, 1048575,
-	0xa695, 1048575,
-	0xa697, 1048575,
-	0xa699, 1048575,
-	0xa69b, 1048575,
-	0xa723, 1048575,
-	0xa725, 1048575,
-	0xa727, 1048575,
-	0xa729, 1048575,
-	0xa72b, 1048575,
-	0xa72d, 1048575,
-	0xa72f, 1048575,
-	0xa733, 1048575,
-	0xa735, 1048575,
-	0xa737, 1048575,
-	0xa739, 1048575,
-	0xa73b, 1048575,
-	0xa73d, 1048575,
-	0xa73f, 1048575,
-	0xa741, 1048575,
-	0xa743, 1048575,
-	0xa745, 1048575,
-	0xa747, 1048575,
-	0xa749, 1048575,
-	0xa74b, 1048575,
-	0xa74d, 1048575,
-	0xa74f, 1048575,
-	0xa751, 1048575,
-	0xa753, 1048575,
-	0xa755, 1048575,
-	0xa757, 1048575,
-	0xa759, 1048575,
-	0xa75b, 1048575,
-	0xa75d, 1048575,
-	0xa75f, 1048575,
-	0xa761, 1048575,
-	0xa763, 1048575,
-	0xa765, 1048575,
-	0xa767, 1048575,
-	0xa769, 1048575,
-	0xa76b, 1048575,
-	0xa76d, 1048575,
-	0xa76f, 1048575,
-	0xa77a, 1048575,
-	0xa77c, 1048575,
-	0xa77f, 1048575,
-	0xa781, 1048575,
-	0xa783, 1048575,
-	0xa785, 1048575,
-	0xa787, 1048575,
-	0xa78c, 1048575,
-	0xa791, 1048575,
-	0xa793, 1048575,
-	0xa797, 1048575,
-	0xa799, 1048575,
-	0xa79b, 1048575,
-	0xa79d, 1048575,
-	0xa79f, 1048575,
-	0xa7a1, 1048575,
-	0xa7a3, 1048575,
-	0xa7a5, 1048575,
-	0xa7a7, 1048575,
-	0xa7a9, 1048575,
+    0x00b5, 1049319,
+    0x00ff, 1048697,
+    0x0101, 1048575,
+    0x0103, 1048575,
+    0x0105, 1048575,
+    0x0107, 1048575,
+    0x0109, 1048575,
+    0x010b, 1048575,
+    0x010d, 1048575,
+    0x010f, 1048575,
+    0x0111, 1048575,
+    0x0113, 1048575,
+    0x0115, 1048575,
+    0x0117, 1048575,
+    0x0119, 1048575,
+    0x011b, 1048575,
+    0x011d, 1048575,
+    0x011f, 1048575,
+    0x0121, 1048575,
+    0x0123, 1048575,
+    0x0125, 1048575,
+    0x0127, 1048575,
+    0x0129, 1048575,
+    0x012b, 1048575,
+    0x012d, 1048575,
+    0x012f, 1048575,
+    0x0131, 1048344,
+    0x0133, 1048575,
+    0x0135, 1048575,
+    0x0137, 1048575,
+    0x013a, 1048575,
+    0x013c, 1048575,
+    0x013e, 1048575,
+    0x0140, 1048575,
+    0x0142, 1048575,
+    0x0144, 1048575,
+    0x0146, 1048575,
+    0x0148, 1048575,
+    0x014b, 1048575,
+    0x014d, 1048575,
+    0x014f, 1048575,
+    0x0151, 1048575,
+    0x0153, 1048575,
+    0x0155, 1048575,
+    0x0157, 1048575,
+    0x0159, 1048575,
+    0x015b, 1048575,
+    0x015d, 1048575,
+    0x015f, 1048575,
+    0x0161, 1048575,
+    0x0163, 1048575,
+    0x0165, 1048575,
+    0x0167, 1048575,
+    0x0169, 1048575,
+    0x016b, 1048575,
+    0x016d, 1048575,
+    0x016f, 1048575,
+    0x0171, 1048575,
+    0x0173, 1048575,
+    0x0175, 1048575,
+    0x0177, 1048575,
+    0x017a, 1048575,
+    0x017c, 1048575,
+    0x017e, 1048575,
+    0x017f, 1048276,
+    0x0180, 1048771,
+    0x0183, 1048575,
+    0x0185, 1048575,
+    0x0188, 1048575,
+    0x018c, 1048575,
+    0x0192, 1048575,
+    0x0195, 1048673,
+    0x0199, 1048575,
+    0x019a, 1048739,
+    0x019e, 1048706,
+    0x01a1, 1048575,
+    0x01a3, 1048575,
+    0x01a5, 1048575,
+    0x01a8, 1048575,
+    0x01ad, 1048575,
+    0x01b0, 1048575,
+    0x01b4, 1048575,
+    0x01b6, 1048575,
+    0x01b9, 1048575,
+    0x01bd, 1048575,
+    0x01bf, 1048632,
+    0x01c4, 1048577,
+    0x01c6, 1048575,
+    0x01c7, 1048577,
+    0x01c9, 1048575,
+    0x01ca, 1048577,
+    0x01cc, 1048575,
+    0x01ce, 1048575,
+    0x01d0, 1048575,
+    0x01d2, 1048575,
+    0x01d4, 1048575,
+    0x01d6, 1048575,
+    0x01d8, 1048575,
+    0x01da, 1048575,
+    0x01dc, 1048575,
+    0x01dd, 1048497,
+    0x01df, 1048575,
+    0x01e1, 1048575,
+    0x01e3, 1048575,
+    0x01e5, 1048575,
+    0x01e7, 1048575,
+    0x01e9, 1048575,
+    0x01eb, 1048575,
+    0x01ed, 1048575,
+    0x01ef, 1048575,
+    0x01f1, 1048577,
+    0x01f3, 1048575,
+    0x01f5, 1048575,
+    0x01f9, 1048575,
+    0x01fb, 1048575,
+    0x01fd, 1048575,
+    0x01ff, 1048575,
+    0x0201, 1048575,
+    0x0203, 1048575,
+    0x0205, 1048575,
+    0x0207, 1048575,
+    0x0209, 1048575,
+    0x020b, 1048575,
+    0x020d, 1048575,
+    0x020f, 1048575,
+    0x0211, 1048575,
+    0x0213, 1048575,
+    0x0215, 1048575,
+    0x0217, 1048575,
+    0x0219, 1048575,
+    0x021b, 1048575,
+    0x021d, 1048575,
+    0x021f, 1048575,
+    0x0223, 1048575,
+    0x0225, 1048575,
+    0x0227, 1048575,
+    0x0229, 1048575,
+    0x022b, 1048575,
+    0x022d, 1048575,
+    0x022f, 1048575,
+    0x0231, 1048575,
+    0x0233, 1048575,
+    0x023c, 1048575,
+    0x0242, 1048575,
+    0x0247, 1048575,
+    0x0249, 1048575,
+    0x024b, 1048575,
+    0x024d, 1048575,
+    0x024f, 1048575,
+    0x0250, 1059359,
+    0x0251, 1059356,
+    0x0252, 1059358,
+    0x0253, 1048366,
+    0x0254, 1048370,
+    0x0259, 1048374,
+    0x025b, 1048373,
+    0x025c, 1090895,
+    0x0260, 1048371,
+    0x0261, 1090891,
+    0x0263, 1048369,
+    0x0265, 1090856,
+    0x0266, 1090884,
+    0x0268, 1048367,
+    0x0269, 1048365,
+    0x026b, 1059319,
+    0x026c, 1090881,
+    0x026f, 1048365,
+    0x0271, 1059325,
+    0x0272, 1048363,
+    0x0275, 1048362,
+    0x027d, 1059303,
+    0x0280, 1048358,
+    0x0283, 1048358,
+    0x0287, 1090858,
+    0x0288, 1048358,
+    0x0289, 1048507,
+    0x028c, 1048505,
+    0x0292, 1048357,
+    0x029e, 1090834,
+    0x0345, 1048660,
+    0x0371, 1048575,
+    0x0373, 1048575,
+    0x0377, 1048575,
+    0x03ac, 1048538,
+    0x03c2, 1048545,
+    0x03cc, 1048512,
+    0x03d0, 1048514,
+    0x03d1, 1048519,
+    0x03d5, 1048529,
+    0x03d6, 1048522,
+    0x03d7, 1048568,
+    0x03d9, 1048575,
+    0x03db, 1048575,
+    0x03dd, 1048575,
+    0x03df, 1048575,
+    0x03e1, 1048575,
+    0x03e3, 1048575,
+    0x03e5, 1048575,
+    0x03e7, 1048575,
+    0x03e9, 1048575,
+    0x03eb, 1048575,
+    0x03ed, 1048575,
+    0x03ef, 1048575,
+    0x03f0, 1048490,
+    0x03f1, 1048496,
+    0x03f2, 1048583,
+    0x03f3, 1048460,
+    0x03f5, 1048480,
+    0x03f8, 1048575,
+    0x03fb, 1048575,
+    0x0461, 1048575,
+    0x0463, 1048575,
+    0x0465, 1048575,
+    0x0467, 1048575,
+    0x0469, 1048575,
+    0x046b, 1048575,
+    0x046d, 1048575,
+    0x046f, 1048575,
+    0x0471, 1048575,
+    0x0473, 1048575,
+    0x0475, 1048575,
+    0x0477, 1048575,
+    0x0479, 1048575,
+    0x047b, 1048575,
+    0x047d, 1048575,
+    0x047f, 1048575,
+    0x0481, 1048575,
+    0x048b, 1048575,
+    0x048d, 1048575,
+    0x048f, 1048575,
+    0x0491, 1048575,
+    0x0493, 1048575,
+    0x0495, 1048575,
+    0x0497, 1048575,
+    0x0499, 1048575,
+    0x049b, 1048575,
+    0x049d, 1048575,
+    0x049f, 1048575,
+    0x04a1, 1048575,
+    0x04a3, 1048575,
+    0x04a5, 1048575,
+    0x04a7, 1048575,
+    0x04a9, 1048575,
+    0x04ab, 1048575,
+    0x04ad, 1048575,
+    0x04af, 1048575,
+    0x04b1, 1048575,
+    0x04b3, 1048575,
+    0x04b5, 1048575,
+    0x04b7, 1048575,
+    0x04b9, 1048575,
+    0x04bb, 1048575,
+    0x04bd, 1048575,
+    0x04bf, 1048575,
+    0x04c2, 1048575,
+    0x04c4, 1048575,
+    0x04c6, 1048575,
+    0x04c8, 1048575,
+    0x04ca, 1048575,
+    0x04cc, 1048575,
+    0x04ce, 1048575,
+    0x04cf, 1048561,
+    0x04d1, 1048575,
+    0x04d3, 1048575,
+    0x04d5, 1048575,
+    0x04d7, 1048575,
+    0x04d9, 1048575,
+    0x04db, 1048575,
+    0x04dd, 1048575,
+    0x04df, 1048575,
+    0x04e1, 1048575,
+    0x04e3, 1048575,
+    0x04e5, 1048575,
+    0x04e7, 1048575,
+    0x04e9, 1048575,
+    0x04eb, 1048575,
+    0x04ed, 1048575,
+    0x04ef, 1048575,
+    0x04f1, 1048575,
+    0x04f3, 1048575,
+    0x04f5, 1048575,
+    0x04f7, 1048575,
+    0x04f9, 1048575,
+    0x04fb, 1048575,
+    0x04fd, 1048575,
+    0x04ff, 1048575,
+    0x0501, 1048575,
+    0x0503, 1048575,
+    0x0505, 1048575,
+    0x0507, 1048575,
+    0x0509, 1048575,
+    0x050b, 1048575,
+    0x050d, 1048575,
+    0x050f, 1048575,
+    0x0511, 1048575,
+    0x0513, 1048575,
+    0x0515, 1048575,
+    0x0517, 1048575,
+    0x0519, 1048575,
+    0x051b, 1048575,
+    0x051d, 1048575,
+    0x051f, 1048575,
+    0x0521, 1048575,
+    0x0523, 1048575,
+    0x0525, 1048575,
+    0x0527, 1048575,
+    0x0529, 1048575,
+    0x052b, 1048575,
+    0x052d, 1048575,
+    0x052f, 1048575,
+    0x1d79, 1083908,
+    0x1d7d, 1052390,
+    0x1e01, 1048575,
+    0x1e03, 1048575,
+    0x1e05, 1048575,
+    0x1e07, 1048575,
+    0x1e09, 1048575,
+    0x1e0b, 1048575,
+    0x1e0d, 1048575,
+    0x1e0f, 1048575,
+    0x1e11, 1048575,
+    0x1e13, 1048575,
+    0x1e15, 1048575,
+    0x1e17, 1048575,
+    0x1e19, 1048575,
+    0x1e1b, 1048575,
+    0x1e1d, 1048575,
+    0x1e1f, 1048575,
+    0x1e21, 1048575,
+    0x1e23, 1048575,
+    0x1e25, 1048575,
+    0x1e27, 1048575,
+    0x1e29, 1048575,
+    0x1e2b, 1048575,
+    0x1e2d, 1048575,
+    0x1e2f, 1048575,
+    0x1e31, 1048575,
+    0x1e33, 1048575,
+    0x1e35, 1048575,
+    0x1e37, 1048575,
+    0x1e39, 1048575,
+    0x1e3b, 1048575,
+    0x1e3d, 1048575,
+    0x1e3f, 1048575,
+    0x1e41, 1048575,
+    0x1e43, 1048575,
+    0x1e45, 1048575,
+    0x1e47, 1048575,
+    0x1e49, 1048575,
+    0x1e4b, 1048575,
+    0x1e4d, 1048575,
+    0x1e4f, 1048575,
+    0x1e51, 1048575,
+    0x1e53, 1048575,
+    0x1e55, 1048575,
+    0x1e57, 1048575,
+    0x1e59, 1048575,
+    0x1e5b, 1048575,
+    0x1e5d, 1048575,
+    0x1e5f, 1048575,
+    0x1e61, 1048575,
+    0x1e63, 1048575,
+    0x1e65, 1048575,
+    0x1e67, 1048575,
+    0x1e69, 1048575,
+    0x1e6b, 1048575,
+    0x1e6d, 1048575,
+    0x1e6f, 1048575,
+    0x1e71, 1048575,
+    0x1e73, 1048575,
+    0x1e75, 1048575,
+    0x1e77, 1048575,
+    0x1e79, 1048575,
+    0x1e7b, 1048575,
+    0x1e7d, 1048575,
+    0x1e7f, 1048575,
+    0x1e81, 1048575,
+    0x1e83, 1048575,
+    0x1e85, 1048575,
+    0x1e87, 1048575,
+    0x1e89, 1048575,
+    0x1e8b, 1048575,
+    0x1e8d, 1048575,
+    0x1e8f, 1048575,
+    0x1e91, 1048575,
+    0x1e93, 1048575,
+    0x1e95, 1048575,
+    0x1e9b, 1048517,
+    0x1ea1, 1048575,
+    0x1ea3, 1048575,
+    0x1ea5, 1048575,
+    0x1ea7, 1048575,
+    0x1ea9, 1048575,
+    0x1eab, 1048575,
+    0x1ead, 1048575,
+    0x1eaf, 1048575,
+    0x1eb1, 1048575,
+    0x1eb3, 1048575,
+    0x1eb5, 1048575,
+    0x1eb7, 1048575,
+    0x1eb9, 1048575,
+    0x1ebb, 1048575,
+    0x1ebd, 1048575,
+    0x1ebf, 1048575,
+    0x1ec1, 1048575,
+    0x1ec3, 1048575,
+    0x1ec5, 1048575,
+    0x1ec7, 1048575,
+    0x1ec9, 1048575,
+    0x1ecb, 1048575,
+    0x1ecd, 1048575,
+    0x1ecf, 1048575,
+    0x1ed1, 1048575,
+    0x1ed3, 1048575,
+    0x1ed5, 1048575,
+    0x1ed7, 1048575,
+    0x1ed9, 1048575,
+    0x1edb, 1048575,
+    0x1edd, 1048575,
+    0x1edf, 1048575,
+    0x1ee1, 1048575,
+    0x1ee3, 1048575,
+    0x1ee5, 1048575,
+    0x1ee7, 1048575,
+    0x1ee9, 1048575,
+    0x1eeb, 1048575,
+    0x1eed, 1048575,
+    0x1eef, 1048575,
+    0x1ef1, 1048575,
+    0x1ef3, 1048575,
+    0x1ef5, 1048575,
+    0x1ef7, 1048575,
+    0x1ef9, 1048575,
+    0x1efb, 1048575,
+    0x1efd, 1048575,
+    0x1eff, 1048575,
+    0x1f51, 1048584,
+    0x1f53, 1048584,
+    0x1f55, 1048584,
+    0x1f57, 1048584,
+    0x1fb3, 1048585,
+    0x1fbe, 1041371,
+    0x1fc3, 1048585,
+    0x1fe5, 1048583,
+    0x1ff3, 1048585,
+    0x214e, 1048548,
+    0x2184, 1048575,
+    0x2c61, 1048575,
+    0x2c65, 1037781,
+    0x2c66, 1037784,
+    0x2c68, 1048575,
+    0x2c6a, 1048575,
+    0x2c6c, 1048575,
+    0x2c73, 1048575,
+    0x2c76, 1048575,
+    0x2c81, 1048575,
+    0x2c83, 1048575,
+    0x2c85, 1048575,
+    0x2c87, 1048575,
+    0x2c89, 1048575,
+    0x2c8b, 1048575,
+    0x2c8d, 1048575,
+    0x2c8f, 1048575,
+    0x2c91, 1048575,
+    0x2c93, 1048575,
+    0x2c95, 1048575,
+    0x2c97, 1048575,
+    0x2c99, 1048575,
+    0x2c9b, 1048575,
+    0x2c9d, 1048575,
+    0x2c9f, 1048575,
+    0x2ca1, 1048575,
+    0x2ca3, 1048575,
+    0x2ca5, 1048575,
+    0x2ca7, 1048575,
+    0x2ca9, 1048575,
+    0x2cab, 1048575,
+    0x2cad, 1048575,
+    0x2caf, 1048575,
+    0x2cb1, 1048575,
+    0x2cb3, 1048575,
+    0x2cb5, 1048575,
+    0x2cb7, 1048575,
+    0x2cb9, 1048575,
+    0x2cbb, 1048575,
+    0x2cbd, 1048575,
+    0x2cbf, 1048575,
+    0x2cc1, 1048575,
+    0x2cc3, 1048575,
+    0x2cc5, 1048575,
+    0x2cc7, 1048575,
+    0x2cc9, 1048575,
+    0x2ccb, 1048575,
+    0x2ccd, 1048575,
+    0x2ccf, 1048575,
+    0x2cd1, 1048575,
+    0x2cd3, 1048575,
+    0x2cd5, 1048575,
+    0x2cd7, 1048575,
+    0x2cd9, 1048575,
+    0x2cdb, 1048575,
+    0x2cdd, 1048575,
+    0x2cdf, 1048575,
+    0x2ce1, 1048575,
+    0x2ce3, 1048575,
+    0x2cec, 1048575,
+    0x2cee, 1048575,
+    0x2cf3, 1048575,
+    0x2d27, 1041312,
+    0x2d2d, 1041312,
+    0xa641, 1048575,
+    0xa643, 1048575,
+    0xa645, 1048575,
+    0xa647, 1048575,
+    0xa649, 1048575,
+    0xa64b, 1048575,
+    0xa64d, 1048575,
+    0xa64f, 1048575,
+    0xa651, 1048575,
+    0xa653, 1048575,
+    0xa655, 1048575,
+    0xa657, 1048575,
+    0xa659, 1048575,
+    0xa65b, 1048575,
+    0xa65d, 1048575,
+    0xa65f, 1048575,
+    0xa661, 1048575,
+    0xa663, 1048575,
+    0xa665, 1048575,
+    0xa667, 1048575,
+    0xa669, 1048575,
+    0xa66b, 1048575,
+    0xa66d, 1048575,
+    0xa681, 1048575,
+    0xa683, 1048575,
+    0xa685, 1048575,
+    0xa687, 1048575,
+    0xa689, 1048575,
+    0xa68b, 1048575,
+    0xa68d, 1048575,
+    0xa68f, 1048575,
+    0xa691, 1048575,
+    0xa693, 1048575,
+    0xa695, 1048575,
+    0xa697, 1048575,
+    0xa699, 1048575,
+    0xa69b, 1048575,
+    0xa723, 1048575,
+    0xa725, 1048575,
+    0xa727, 1048575,
+    0xa729, 1048575,
+    0xa72b, 1048575,
+    0xa72d, 1048575,
+    0xa72f, 1048575,
+    0xa733, 1048575,
+    0xa735, 1048575,
+    0xa737, 1048575,
+    0xa739, 1048575,
+    0xa73b, 1048575,
+    0xa73d, 1048575,
+    0xa73f, 1048575,
+    0xa741, 1048575,
+    0xa743, 1048575,
+    0xa745, 1048575,
+    0xa747, 1048575,
+    0xa749, 1048575,
+    0xa74b, 1048575,
+    0xa74d, 1048575,
+    0xa74f, 1048575,
+    0xa751, 1048575,
+    0xa753, 1048575,
+    0xa755, 1048575,
+    0xa757, 1048575,
+    0xa759, 1048575,
+    0xa75b, 1048575,
+    0xa75d, 1048575,
+    0xa75f, 1048575,
+    0xa761, 1048575,
+    0xa763, 1048575,
+    0xa765, 1048575,
+    0xa767, 1048575,
+    0xa769, 1048575,
+    0xa76b, 1048575,
+    0xa76d, 1048575,
+    0xa76f, 1048575,
+    0xa77a, 1048575,
+    0xa77c, 1048575,
+    0xa77f, 1048575,
+    0xa781, 1048575,
+    0xa783, 1048575,
+    0xa785, 1048575,
+    0xa787, 1048575,
+    0xa78c, 1048575,
+    0xa791, 1048575,
+    0xa793, 1048575,
+    0xa797, 1048575,
+    0xa799, 1048575,
+    0xa79b, 1048575,
+    0xa79d, 1048575,
+    0xa79f, 1048575,
+    0xa7a1, 1048575,
+    0xa7a3, 1048575,
+    0xa7a5, 1048575,
+    0xa7a7, 1048575,
+    0xa7a9, 1048575,
 };
 
 } // !namespace
 
 char32_t totitle(char32_t c) noexcept
 {
-	const char32_t *p;
+   const char32_t *p;
 
-	p = rbsearch(c, totitler, nelem (totitler)/3, 3);
+   p = rbsearch(c, totitler, nelem (totitler)/3, 3);
 
-	if (p && c >= p[0] && c <= p[1])
-		return c + p[2] - 1048576;
+   if (p && c >= p[0] && c <= p[1])
+       return c + p[2] - 1048576;
 
-	p = rbsearch(c, totitles, nelem (totitles)/2, 2);
+ p = rbsearch(c, totitles, nelem (totitles)/2, 2);
 
-	if (p && c == p[0])
-		return c + p[1] - 1048576;
+   if (p && c == p[0])
+       return c + p[1] - 1048576;
 
-	return c;
+   return c;
 }
 
 void encode(char32_t c, char res[5]) noexcept
 {
-	switch (nbytesPoint(c)) {
-	case 1:
-		res[0] = static_cast<char>(c);
-		res[1] = '\0';
-		break;
-	case 2:
-		res[0] = 0xC0 | ((c >> 6)  & 0x1F);
-		res[1] = 0x80 | (c & 0x3F);
-		res[2] = '\0';
-		break;
-	case 3:
-		res[0] = 0xE0 | ((c >> 12) & 0xF );
-		res[1] = 0x80 | ((c >> 6)  & 0x3F);
-		res[2] = 0x80 | (c & 0x3F);
-		res[3] = '\0';
-		break;
-	case 4:
-		res[0] = 0xF0 | ((c >> 18) & 0x7 );
-		res[1] = 0x80 | ((c >> 12) & 0x3F);
-		res[2] = 0x80 | ((c >> 6)  & 0x3F);
-		res[3] = 0x80 | (c & 0x3F);
-		res[4] = '\0';
-		break;
-	default:
-		break;
-	}
+    switch (nbytesPoint(c)) {
+    case 1:
+        res[0] = static_cast<char>(c);
+        res[1] = '\0';
+        break;
+    case 2:
+        res[0] = 0xC0 | ((c >> 6)  & 0x1F);
+        res[1] = 0x80 | (c & 0x3F);
+        res[2] = '\0';
+        break;
+    case 3:
+        res[0] = 0xE0 | ((c >> 12) & 0xF );
+        res[1] = 0x80 | ((c >> 6)  & 0x3F);
+        res[2] = 0x80 | (c & 0x3F);
+        res[3] = '\0';
+        break;
+    case 4:
+        res[0] = 0xF0 | ((c >> 18) & 0x7 );
+        res[1] = 0x80 | ((c >> 12) & 0x3F);
+        res[2] = 0x80 | ((c >> 6)  & 0x3F);
+        res[3] = 0x80 | (c & 0x3F);
+        res[4] = '\0';
+        break;
+    default:
+        break;
+    }
 }
 
 void decode(char32_t &c, const char *res) noexcept
 {
-	c = 0;
+    c = 0;
 
-	switch (nbytesUtf8(res[0])) {
-	case 1:
-		c = res[0];
-		break;
-	case 2:
-		c =  (res[0] & 0x1f) << 6;
-		c |= (res[1] & 0x3f);
-		break;
-	case 3:
-		c =  (res[0] & 0x0f) << 12;
-		c |= (res[1] & 0x3f) << 6;
-		c |= (res[2] & 0x3f);
-		break;
-	case 4:
-		c =  (res[0] & 0x07) << 16;
-		c |= (res[1] & 0x3f) << 12;
-		c |= (res[2] & 0x3f) << 6;
-		c |= (res[3] & 0x3f);
-	default:
-		break;
-	}
+    switch (nbytesUtf8(res[0])) {
+    case 1:
+        c = res[0];
+        break;
+    case 2:
+        c =  (res[0] & 0x1f) << 6;
+        c |= (res[1] & 0x3f);
+        break;
+    case 3:
+        c =  (res[0] & 0x0f) << 12;
+        c |= (res[1] & 0x3f) << 6;
+        c |= (res[2] & 0x3f);
+        break;
+    case 4:
+        c =  (res[0] & 0x07) << 16;
+        c |= (res[1] & 0x3f) << 12;
+        c |= (res[2] & 0x3f) << 6;
+        c |= (res[3] & 0x3f);
+    default:
+        break;
+    }
 }
 
 int nbytesUtf8(char c) noexcept
 {
-	if (static_cast<unsigned char>(c) <= 127)
-		return 1;
-	if ((c & 0xE0) == 0xC0)
-		return 2;
-	if ((c & 0xF0) == 0xE0)
-		return 3;
-	if ((c & 0xF8) == 0xF0)
-		return 4;
+    if (static_cast<unsigned char>(c) <= 127)
+        return 1;
+    if ((c & 0xE0) == 0xC0)
+        return 2;
+    if ((c & 0xF0) == 0xE0)
+        return 3;
+    if ((c & 0xF8) == 0xF0)
+        return 4;
 
-	return -1;
+    return -1;
 }
 
 int nbytesPoint(char32_t c) noexcept
 {
-	if (c <= 0x7F)
-		return 1;
-	if (c <= 0x7FF)
-		return 2;
-	if (c <= 0xFFFF)
-		return 3;
-	if (c <= 0x1FFFFF)
-		return 4;
+    if (c <= 0x7F)
+        return 1;
+    if (c <= 0x7FF)
+        return 2;
+    if (c <= 0xFFFF)
+        return 3;
+    if (c <= 0x1FFFFF)
+        return 4;
 
-	return -1;
+    return -1;
 }
 
 unsigned length(const std::string &str)
 {
-	unsigned total = 0;
+    unsigned total = 0;
 
-	forEach(str, [&] (char32_t) {
-		++ total;
-	});
+    forEach(str, [&] (char32_t) {
+        ++ total;
+    });
 
-	return total;
+    return total;
 }
 
 std::string toUtf8(const std::u32string &array)
 {
-	std::string res;
+    std::string res;
 
-	for (size_t i = 0; i < array.size(); ++i) {
-		char tmp[5];
-		int size = nbytesPoint(array[i]);
+    for (size_t i = 0; i < array.size(); ++i) {
+        char tmp[5];
+        int size = nbytesPoint(array[i]);
 
-		if (size < 0)
-			throw std::invalid_argument("invalid sequence");
+        if (size < 0)
+            throw std::invalid_argument("invalid sequence");
 
-		encode(array[i], tmp);
-		res.insert(res.length(), tmp);
-	}
+        encode(array[i], tmp);
+        res.insert(res.length(), tmp);
+    }
 
-	return res;
+    return res;
 }
 
 std::u32string toUtf32(const std::string &str)
 {
-	std::u32string res;
+    std::u32string res;
 
-	forEach(str, [&] (char32_t code) {
-		res.push_back(code);
-	});
+    forEach(str, [&] (char32_t code) {
+        res.push_back(code);
+    });
 
-	return res;
+    return res;
 }
 
 } // !unicode
--- a/lib/irccd/unicode.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/unicode.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -16,8 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifndef IRCCD_UNICODE_HPP
-#define IRCCD_UNICODE_HPP
+#ifndef UNICODE_HPP
+#define UNICODE_HPP
 
 /**
  * \file unicode.hpp
@@ -85,7 +85,7 @@
  * Iterate over all real characters in the UTF-8 string.
  *
  * The function must have the following signature:
- *	void f(char ch)
+ *  void f(char ch)
  *
  * \param str the UTF-8 string
  * \param function the function callback
@@ -94,18 +94,18 @@
 template <typename Func>
 void forEach(const std::string &str, Func function)
 {
-	for (size_t i = 0; i < str.size(); ) {
-		char32_t point = 0;
-		int size = nbytesUtf8(str[i]);
+    for (size_t i = 0; i < str.size(); ) {
+        char32_t point = 0;
+        int size = nbytesUtf8(str[i]);
 
-		if (size < 0)
-			throw std::invalid_argument("invalid sequence");
+        if (size < 0)
+            throw std::invalid_argument("invalid sequence");
 
-		decode(point, str.data() + i);
-		function(point);
+        decode(point, str.data() + i);
+        function(point);
 
-		i += size;
-	}
+        i += size;
+    }
 }
 
 /**
@@ -206,10 +206,10 @@
  */
 inline std::u32string toupper(std::u32string str)
 {
-	for (size_t i = 0; i < str.size(); ++i)
-		str[i] = toupper(str[i]);
+    for (size_t i = 0; i < str.size(); ++i)
+        str[i] = toupper(str[i]);
 
-	return str;
+    return str;
 }
 
 /**
@@ -221,15 +221,15 @@
  */
 inline std::string toupper(const std::string &str)
 {
-	std::string result;
-	char buffer[5];
+    std::string result;
+    char buffer[5];
 
-	forEach(str, [&] (char32_t code) {
-		encode(toupper(code), buffer);
-		result += buffer;
-	});
+    forEach(str, [&] (char32_t code) {
+        encode(toupper(code), buffer);
+        result += buffer;
+    });
 
-	return result;
+    return result;
 }
 
 /**
@@ -240,10 +240,10 @@
  */
 inline std::u32string tolower(std::u32string str)
 {
-	for (size_t i = 0; i < str.size(); ++i)
-		str[i] = tolower(str[i]);
+    for (size_t i = 0; i < str.size(); ++i)
+        str[i] = tolower(str[i]);
 
-	return str;
+    return str;
 }
 
 /**
@@ -255,19 +255,19 @@
  */
 inline std::string tolower(const std::string &str)
 {
-	std::string result;
-	char buffer[5];
+    std::string result;
+    char buffer[5];
 
-	forEach(str, [&] (char32_t code) {
-		encode(tolower(code), buffer);
-		result += buffer;
-	});
+    forEach(str, [&] (char32_t code) {
+        encode(tolower(code), buffer);
+        result += buffer;
+    });
 
-	return result;
+    return result;
 }
 
 } // !unicode
 
 } // !irccd
 
-#endif // !IRCCD_UNICODE_HPP
+#endif // !UNICODE_HPP
--- a/lib/irccd/util.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/util.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -47,373 +47,373 @@
 namespace {
 
 const std::unordered_map<std::string, int> colorTable{
-	{ "white",	0	},
-	{ "black",	1	},
-	{ "blue",	2	},
-	{ "green",	3	},
-	{ "red",	4	},
-	{ "brown",	5	},
-	{ "purple",	6	},
-	{ "orange",	7	},
-	{ "yellow",	8	},
-	{ "lightgreen",	9	},
-	{ "cyan",	10	},
-	{ "lightcyan",	11	},
-	{ "lightblue",	12	},
-	{ "pink",	13	},
-	{ "grey",	14	},
-	{ "lightgrey",	15	}
+    { "white",      0   },
+    { "black",      1   },
+    { "blue",       2   },
+    { "green",      3   },
+    { "red",        4   },
+    { "brown",      5   },
+    { "purple",     6   },
+    { "orange",     7   },
+    { "yellow",     8   },
+    { "lightgreen", 9   },
+    { "cyan",       10  },
+    { "lightcyan",  11  },
+    { "lightblue",  12  },
+    { "pink",       13  },
+    { "grey",       14  },
+    { "lightgrey",  15  }
 };
 
 const std::unordered_map<std::string, char> attributesTable{
-	{ "bold",	'\x02'	},
-	{ "italic",	'\x09'	},
-	{ "strike",	'\x13'	},
-	{ "reset",	'\x0f'	},
-	{ "underline",	'\x15'	},
-	{ "underline2",	'\x1f'	},
-	{ "reverse",	'\x16'	}
+    { "bold",       '\x02'  },
+    { "italic",     '\x09'  },
+    { "strike",     '\x13'  },
+    { "reset",      '\x0f'  },
+    { "underline",  '\x15'  },
+    { "underline2", '\x1f'  },
+    { "reverse",    '\x16'  }
 };
 
 inline bool isReserved(char token) noexcept
 {
-	return token == '#' || token == '@' || token == '$' || token == '!';
+    return token == '#' || token == '@' || token == '$' || token == '!';
 }
 
 std::string substituteDate(const std::string &text, const Substitution &params)
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
 #if defined(HAVE_STD_PUT_TIME)
-	oss << std::put_time(std::localtime(&params.time), text.c_str());
+    oss << std::put_time(std::localtime(&params.time), text.c_str());
 #else
-	/*
-	 * Quick and dirty hack because GCC does not have this function.
-	 */
-	char buffer[4096];
+    /*
+     * Quick and dirty hack because GCC does not have this function.
+     */
+    char buffer[4096];
 
-	std::strftime(buffer, sizeof (buffer) - 1, text.c_str(), std::localtime(&params.time));
+    std::strftime(buffer, sizeof (buffer) - 1, text.c_str(), std::localtime(&params.time));
 
-	oss << buffer;
+    oss << buffer;
 #endif
 
-	return oss.str();
+    return oss.str();
 }
 
 std::string substituteKeywords(const std::string &content, const Substitution &params)
 {
-	auto value = params.keywords.find(content);
+    auto value = params.keywords.find(content);
 
-	if (value != params.keywords.end())
-		return value->second;
+    if (value != params.keywords.end())
+        return value->second;
 
-	return "";
+    return "";
 }
 
 std::string substituteEnv(const std::string &content)
 {
-	auto value = std::getenv(content.c_str());
+    auto value = std::getenv(content.c_str());
 
-	if (value != nullptr)
-		return value;
+    if (value != nullptr)
+        return value;
 
-	return "";
+    return "";
 }
 
 std::string substituteAttributes(const std::string &content)
 {
-	std::stringstream oss;
-	std::vector<std::string> list = split(content, ",");
+    std::stringstream oss;
+    std::vector<std::string> list = split(content, ",");
 
-	// @{} means reset.
-	if (list.empty())
-		return std::string(1, attributesTable.at("reset"));
+    // @{} means reset.
+    if (list.empty())
+        return std::string(1, attributesTable.at("reset"));
 
-	// Remove useless spaces.
-	std::transform(list.begin(), list.end(), list.begin(), strip);
+    // Remove useless spaces.
+    std::transform(list.begin(), list.end(), list.begin(), strip);
 
-	/*
-	 * 0: foreground
-	 * 1: background
-	 * 2-n: attributes
-	 */
-	auto foreground = list[0];
-	if (!foreground.empty() || list.size() >= 2) {
-		// Color sequence.
-		oss << '\x03';
+    /*
+     * 0: foreground
+     * 1: background
+     * 2-n: attributes
+     */
+    auto foreground = list[0];
+    if (!foreground.empty() || list.size() >= 2) {
+        // Color sequence.
+        oss << '\x03';
 
-		// Foreground.
-		auto it = colorTable.find(foreground);
-		if (it != colorTable.end())
-			oss << it->second;
+        // Foreground.
+        auto it = colorTable.find(foreground);
+        if (it != colorTable.end())
+            oss << it->second;
 
-		// Background.
-		if (list.size() >= 2 && (it = colorTable.find(list[1])) != colorTable.end())
-			oss << "," << it->second;
+        // Background.
+        if (list.size() >= 2 && (it = colorTable.find(list[1])) != colorTable.end())
+            oss << "," << it->second;
 
-		// Attributes.
-		for (std::size_t i = 2; i < list.size(); ++i) {
-			auto attribute = attributesTable.find(list[i]);
+        // Attributes.
+        for (std::size_t i = 2; i < list.size(); ++i) {
+            auto attribute = attributesTable.find(list[i]);
 
-			if (attribute != attributesTable.end())
-				oss << attribute->second;
-		}
-	}
+            if (attribute != attributesTable.end())
+                oss << attribute->second;
+        }
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 std::string substituteShell(const std::string &command)
 {
 #if defined(HAVE_POPEN)
-	std::unique_ptr<FILE, std::function<int (FILE *)>> fp(popen(command.c_str(), "r"), pclose);
+    std::unique_ptr<FILE, std::function<int (FILE *)>> fp(popen(command.c_str(), "r"), pclose);
 
-	if (fp == nullptr)
-		throw std::runtime_error(std::strerror(errno));
+    if (fp == nullptr)
+        throw std::runtime_error(std::strerror(errno));
 
-	std::string result;
-	std::array<char, 128> buffer;
-	std::size_t n;
+    std::string result;
+    std::array<char, 128> buffer;
+    std::size_t n;
 
-	while ((n = std::fread(buffer.data(), 1, 128, fp.get())) > 0)
-		result.append(buffer.data(), n);
-	if (std::ferror(fp.get()))
-		throw std::runtime_error(std::strerror(errno));
+    while ((n = std::fread(buffer.data(), 1, 128, fp.get())) > 0)
+        result.append(buffer.data(), n);
+    if (std::ferror(fp.get()))
+        throw std::runtime_error(std::strerror(errno));
 
-	// Erase final '\n'.
-	auto it = result.find('\n');
-	if (it != std::string::npos)
-		result.erase(it);
+    // Erase final '\n'.
+    auto it = result.find('\n');
+    if (it != std::string::npos)
+        result.erase(it);
 
-	return result;
+    return result;
 #else
-	throw std::runtime_error("shell template not available");
+    throw std::runtime_error("shell template not available");
 #endif
 }
 
 std::string substitute(std::string::const_iterator &it, std::string::const_iterator &end, char token, const Substitution &params)
 {
-	assert(isReserved(token));
+    assert(isReserved(token));
 
-	std::string content, value;
+    std::string content, value;
 
-	if (it == end)
-		return "";
+    if (it == end)
+        return "";
 
-	while (it != end && *it != '}')
-		content += *it++;
+    while (it != end && *it != '}')
+        content += *it++;
 
-	if (it == end || *it != '}')
-		throw std::invalid_argument("unclosed "s + token + " construct"s);
+    if (it == end || *it != '}')
+        throw std::invalid_argument("unclosed "s + token + " construct"s);
 
-	it++;
+    it++;
 
-	// Create default original value if flag is disabled.
-	value = std::string(1, token) + "{"s + content + "}"s;
+    // Create default original value if flag is disabled.
+    value = std::string(1, token) + "{"s + content + "}"s;
 
-	switch (token) {
-	case '#':
-		if (params.flags & Substitution::Keywords)
-			value = substituteKeywords(content, params);
-		break;
-	case '$':
-		if (params.flags & Substitution::Env)
-			value = substituteEnv(content);
-		break;
-	case '@':
-		if (params.flags & Substitution::IrcAttrs)
-			value = substituteAttributes(content);
-		break;
-	case '!':
-		if (params.flags & Substitution::Shell)
-			value = substituteShell(content);
-		break;
-	default:
-		break;
-	}
+    switch (token) {
+    case '#':
+        if (params.flags & Substitution::Keywords)
+            value = substituteKeywords(content, params);
+        break;
+    case '$':
+        if (params.flags & Substitution::Env)
+            value = substituteEnv(content);
+        break;
+    case '@':
+        if (params.flags & Substitution::IrcAttrs)
+            value = substituteAttributes(content);
+        break;
+    case '!':
+        if (params.flags & Substitution::Shell)
+            value = substituteShell(content);
+        break;
+    default:
+        break;
+    }
 
-	return value;
+    return value;
 }
 
 } // !namespace
 
 std::string format(std::string text, const Substitution &params)
 {
-	/*
-	 * Change the date format before anything else to avoid interpolation with keywords and
-	 * user input.
-	 */
-	if (params.flags & Substitution::Date)
-		text = substituteDate(text, params);
+    /*
+     * Change the date format before anything else to avoid interpolation with keywords and
+     * user input.
+     */
+    if (params.flags & Substitution::Date)
+        text = substituteDate(text, params);
 
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	for (auto it = text.cbegin(), end = text.cend(); it != end; ) {
-		auto token = *it;
+    for (auto it = text.cbegin(), end = text.cend(); it != end; ) {
+        auto token = *it;
 
-		/* Is the current character a reserved token or not? */
-		if (!isReserved(token)) {
-			oss << *it++;
-			continue;
-		}
+        /* Is the current character a reserved token or not? */
+        if (!isReserved(token)) {
+            oss << *it++;
+            continue;
+        }
 
-		/* The token was at the end, just write it and return now. */
-		if (++it == end) {
-			oss << token;
-			continue;
-		}
+        /* The token was at the end, just write it and return now. */
+        if (++it == end) {
+            oss << token;
+            continue;
+        }
 
-		/* The token is declaring a template variable, substitute it. */
-		if (*it == '{') {
-			oss << substitute(++it, end, token, params);
-			continue;
-		}
+        /* The token is declaring a template variable, substitute it. */
+        if (*it == '{') {
+            oss << substitute(++it, end, token, params);
+            continue;
+        }
 
-		/*
-		 * If the next token is different from the previous one, just let the next iteration parse the string because
-		 * we can have the following constructs.
-		 *
-		 * "@#{var}" -> "@value"
-		 */
-		if (*it != token) {
-			oss << token;
-			continue;
-		}
+        /*
+         * If the next token is different from the previous one, just let the next iteration parse the string because
+         * we can have the following constructs.
+         *
+         * "@#{var}" -> "@value"
+         */
+        if (*it != token) {
+            oss << token;
+            continue;
+        }
 
-		/*
-		 * Write the token only if it's not a variable because at this step we may have the following
-		 * constructs.
-		 *
-		 * "##" -> "##"
-		 * "##hello" -> "##hello"
-		 * "##{hello}" -> "#{hello}"
-		 */
-		if (++it == end)
-			oss << token << token;
-		else if (*it == '{')
-			oss << token;
-	}
+        /*
+         * Write the token only if it's not a variable because at this step we may have the following
+         * constructs.
+         *
+         * "##" -> "##"
+         * "##hello" -> "##hello"
+         * "##{hello}" -> "#{hello}"
+         */
+        if (++it == end)
+            oss << token << token;
+        else if (*it == '{')
+            oss << token;
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 std::string strip(std::string str)
 {
-	auto test = [] (char c) { return !std::isspace(c); };
+    auto test = [] (char c) { return !std::isspace(c); };
 
-	str.erase(str.begin(), std::find_if(str.begin(), str.end(), test));
-	str.erase(std::find_if(str.rbegin(), str.rend(), test).base(), str.end());
+    str.erase(str.begin(), std::find_if(str.begin(), str.end(), test));
+    str.erase(std::find_if(str.rbegin(), str.rend(), test).base(), str.end());
 
-	return str;
+    return str;
 }
 
 std::vector<std::string> split(const std::string &list, const std::string &delimiters, int max)
 {
-	std::vector<std::string> result;
-	std::size_t next = -1, current;
-	int count = 1;
-	bool finished = false;
+    std::vector<std::string> result;
+    std::size_t next = -1, current;
+    int count = 1;
+    bool finished = false;
 
-	if (list.empty())
-		return result;
+    if (list.empty())
+        return result;
 
-	do {
-		std::string val;
+    do {
+        std::string val;
 
-		current = next + 1;
-		next = list.find_first_of(delimiters, current);
+        current = next + 1;
+        next = list.find_first_of(delimiters, current);
 
-		// split max, get until the end.
-		if (max >= 0 && count++ >= max) {
-			val = list.substr(current, std::string::npos);
-			finished = true;
-		} else {
-			val = list.substr(current, next - current);
-			finished = next == std::string::npos;
-		}
+        // split max, get until the end.
+        if (max >= 0 && count++ >= max) {
+            val = list.substr(current, std::string::npos);
+            finished = true;
+        } else {
+            val = list.substr(current, next - current);
+            finished = next == std::string::npos;
+        }
 
-		result.push_back(val);
-	} while (!finished);
+        result.push_back(val);
+    } while (!finished);
 
-	return result;
+    return result;
 }
 
 MessagePair parseMessage(std::string message, const std::string &cc, const std::string &name)
 {
-	std::string result = message;
-	bool iscommand = false;
+    std::string result = message;
+    bool iscommand = false;
 
-	// handle special commands "!<plugin> command"
-	if (cc.length() > 0) {
-		auto pos = result.find_first_of(" \t");
-		auto fullcommand = cc + name;
+    // handle special commands "!<plugin> command"
+    if (cc.length() > 0) {
+        auto pos = result.find_first_of(" \t");
+        auto fullcommand = cc + name;
 
-		/*
-		 * If the message that comes is "!foo" without spaces we
-		 * compare the command char + the plugin name. If there
-		 * is a space, we check until we find a space, if not
-		 * typing "!foo123123" will trigger foo plugin.
-		 */
-		if (pos == std::string::npos)
-			iscommand = result == fullcommand;
-		else
-			iscommand = result.length() >= fullcommand.length() && result.compare(0, pos, fullcommand) == 0;
+        /*
+         * If the message that comes is "!foo" without spaces we
+         * compare the command char + the plugin name. If there
+         * is a space, we check until we find a space, if not
+         * typing "!foo123123" will trigger foo plugin.
+         */
+        if (pos == std::string::npos)
+            iscommand = result == fullcommand;
+        else
+            iscommand = result.length() >= fullcommand.length() && result.compare(0, pos, fullcommand) == 0;
 
-		if (iscommand) {
-			/*
-			 * If no space is found we just set the message to "" otherwise
-			 * the plugin name will be passed through onCommand
-			 */
-			if (pos == std::string::npos)
-				result = "";
-			else
-				result = message.substr(pos + 1);
-		}
-	}
+        if (iscommand) {
+            /*
+             * If no space is found we just set the message to "" otherwise
+             * the plugin name will be passed through onCommand
+             */
+            if (pos == std::string::npos)
+                result = "";
+            else
+                result = message.substr(pos + 1);
+        }
+    }
 
-	return MessagePair(result, ((iscommand) ? MessageType::Command : MessageType::Message));
+    return MessagePair(result, ((iscommand) ? MessageType::Command : MessageType::Message));
 }
 
 bool isBoolean(std::string value) noexcept
 {
-	return (value = unicode::toupper(value)) == "1" || value == "YES" || value == "TRUE" || value == "ON";
+    return (value = unicode::toupper(value)) == "1" || value == "YES" || value == "TRUE" || value == "ON";
 }
 
 bool isInt(const std::string &str, int base) noexcept
 {
-	if (str.empty())
-		return false;
+    if (str.empty())
+        return false;
 
-	char *ptr;
+    char *ptr;
 
-	std::strtol(str.c_str(), &ptr, base);
+    std::strtol(str.c_str(), &ptr, base);
 
-	return *ptr == 0;
+    return *ptr == 0;
 }
 
 bool isReal(const std::string &str) noexcept
 {
-	if (str.empty())
-		return false;
+    if (str.empty())
+        return false;
 
-	char *ptr;
+    char *ptr;
 
-	std::strtod(str.c_str(), &ptr);
+    std::strtod(str.c_str(), &ptr);
 
-	return *ptr == 0;
+    return *ptr == 0;
 }
 
 std::string nextNetwork(std::string &input)
 {
-	std::string result;
-	std::string::size_type pos = input.find("\r\n\r\n");
+    std::string result;
+    std::string::size_type pos = input.find("\r\n\r\n");
 
-	if ((pos = input.find("\r\n\r\n")) != std::string::npos) {
-		result = input.substr(0, pos);
-		input.erase(input.begin(), input.begin() + pos + 4);
-	}
+    if ((pos = input.find("\r\n\r\n")) != std::string::npos) {
+        result = input.substr(0, pos);
+        input.erase(input.begin(), input.begin() + pos + 4);
+    }
 
-	return result;
+    return result;
 }
 
 } // util
--- a/lib/irccd/util.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/util.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -54,8 +54,8 @@
  * Example: `!reminder help' may invoke the command event if a plugin reminder exists.
  */
 enum class MessageType {
-	Command,		//!< special command
-	Message			//!< standard message
+    Command,                        //!< special command
+    Message                         //!< standard message
 };
 
 /**
@@ -69,31 +69,31 @@
  */
 class Substitution {
 public:
-	/**
-	 * \brief Disable or enable some features.
-	 */
-	enum Flags {
-		Date		= (1 << 0),	//!< date templates
-		Keywords	= (1 << 1),	//!< keywords
-		Env		= (1 << 2),	//!< environment variables
-		Shell		= (1 << 3),	//!< command line command
-		IrcAttrs	= (1 << 4)	//!< IRC escape codes
-	};
+    /**
+     * \brief Disable or enable some features.
+     */
+    enum Flags {
+        Date        = (1 << 0),     //!< date templates
+        Keywords    = (1 << 1),     //!< keywords
+        Env         = (1 << 2),     //!< environment variables
+        Shell       = (1 << 3),     //!< command line command
+        IrcAttrs    = (1 << 4)      //!< IRC escape codes
+    };
 
-	/**
-	 * Flags for selecting templates.
-	 */
-	std::uint8_t flags{Date | Keywords | Env | IrcAttrs};
+    /**
+     * Flags for selecting templates.
+     */
+    std::uint8_t flags{Date | Keywords | Env | IrcAttrs};
 
-	/**
-	 * Fill that field if you want a date.
-	 */
-	std::time_t time{std::time(nullptr)};
+    /**
+     * Fill that field if you want a date.
+     */
+    std::time_t time{std::time(nullptr)};
 
-	/**
-	 * Fill that map if you want to replace keywords.
-	 */
-	std::unordered_map<std::string, std::string> keywords;
+    /**
+     * Fill that map if you want to replace keywords.
+     */
+    std::unordered_map<std::string, std::string> keywords;
 };
 
 /**
@@ -171,16 +171,16 @@
 template <typename InputIt, typename DelimType = char>
 std::string join(InputIt first, InputIt last, DelimType delim = ':')
 {
-	std::ostringstream oss;
+    std::ostringstream oss;
 
-	if (first != last) {
-		oss << *first;
+    if (first != last) {
+        oss << *first;
 
-		while (++first != last)
-			oss << delim << *first;
-	}
+        while (++first != last)
+            oss << delim << *first;
+    }
 
-	return oss.str();
+    return oss.str();
 }
 
 /**
@@ -193,7 +193,7 @@
 template <typename T, typename DelimType = char>
 inline std::string join(std::initializer_list<T> list, DelimType delim = ':')
 {
-	return join(list.begin(), list.end(), delim);
+    return join(list.begin(), list.end(), delim);
 }
 
 /**
@@ -215,7 +215,7 @@
  */
 inline bool isIdentifierValid(const std::string &name)
 {
-	return std::regex_match(name, std::regex("[A-Za-z0-9-_]+"));
+    return std::regex_match(name, std::regex("[A-Za-z0-9-_]+"));
 }
 
 /**
@@ -252,7 +252,7 @@
  */
 inline bool isNumber(const std::string &value) noexcept
 {
-	return isInt(value) || isReal(value);
+    return isInt(value) || isReal(value);
 }
 
 /**
@@ -275,19 +275,19 @@
 template <typename T>
 inline T toNumber(const std::string &number, T min = std::numeric_limits<T>::min(), T max = std::numeric_limits<T>::max())
 {
-	static_assert(std::is_integral<T>::value, "T must be integer type");
+    static_assert(std::is_integral<T>::value, "T must be integer type");
 
-	std::conditional_t<std::is_unsigned<T>::value, unsigned long long, long long> value;
+    std::conditional_t<std::is_unsigned<T>::value, unsigned long long, long long> value;
 
-	if (std::is_unsigned<T>::value)
-		value = std::stoull(number);
-	else
-		value = std::stoll(number);
+    if (std::is_unsigned<T>::value)
+        value = std::stoull(number);
+    else
+        value = std::stoll(number);
 
-	if (value < min || value > max)
-		throw std::out_of_range("out of range");
+    if (value < min || value > max)
+        throw std::out_of_range("out of range");
 
-	return static_cast<T>(value);
+    return static_cast<T>(value);
 }
 
 /**
--- a/lib/irccd/xdg.hpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/lib/irccd/xdg.hpp	Tue Jun 21 20:52:17 2016 +0200
@@ -16,8 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifndef IRCCD_XDG_HPP
-#define IRCCD_XDG_HPP
+#ifndef XDG_HPP
+#define XDG_HPP
 
 /**
  * \file xdg.hpp
@@ -43,148 +43,148 @@
  */
 class Xdg {
 private:
-	std::string m_configHome;
-	std::string m_dataHome;
-	std::string m_cacheHome;
-	std::string m_runtimeDir;
-	std::vector<std::string> m_configDirs;
-	std::vector<std::string> m_dataDirs;
+    std::string m_configHome;
+    std::string m_dataHome;
+    std::string m_cacheHome;
+    std::string m_runtimeDir;
+    std::vector<std::string> m_configDirs;
+    std::vector<std::string> m_dataDirs;
 
-	bool isabsolute(const std::string &path) const noexcept
-	{
-		return path.length() > 0 && path[0] == '/';
-	}
+    bool isabsolute(const std::string &path) const noexcept
+    {
+        return path.length() > 0 && path[0] == '/';
+    }
 
-	std::vector<std::string> split(const std::string &arg) const
-	{
-		std::stringstream iss(arg);
-		std::string item;
-		std::vector<std::string> elems;
+    std::vector<std::string> split(const std::string &arg) const
+    {
+        std::stringstream iss(arg);
+        std::string item;
+        std::vector<std::string> elems;
 
-		while (std::getline(iss, item, ':'))
-			if (isabsolute(item))
-				elems.push_back(item);
+        while (std::getline(iss, item, ':'))
+            if (isabsolute(item))
+                elems.push_back(item);
 
-		return elems;
-	}
+        return elems;
+    }
 
-	std::string envOrHome(const std::string &var, const std::string &repl) const
-	{
-		auto value = std::getenv(var.c_str());
+    std::string envOrHome(const std::string &var, const std::string &repl) const
+    {
+        auto value = std::getenv(var.c_str());
 
-		if (value == nullptr || !isabsolute(value)) {
-			auto home = std::getenv("HOME");
+        if (value == nullptr || !isabsolute(value)) {
+            auto home = std::getenv("HOME");
 
-			if (home == nullptr)
-				throw std::runtime_error("could not get home directory");
+            if (home == nullptr)
+                throw std::runtime_error("could not get home directory");
 
-			return std::string(home) + "/" + repl;
-		}
+            return std::string(home) + "/" + repl;
+        }
 
-		return value;
-	}
+        return value;
+    }
 
-	std::vector<std::string> listOrDefaults(const std::string &var, const std::vector<std::string> &list) const
-	{
-		auto value = std::getenv(var.c_str());
+    std::vector<std::string> listOrDefaults(const std::string &var, const std::vector<std::string> &list) const
+    {
+        auto value = std::getenv(var.c_str());
 
-		if (!value)
-			return list;
+        if (!value)
+            return list;
 
-		// No valid item at all? Use defaults.
-		auto result = split(value);
+        // No valid item at all? Use defaults.
+        auto result = split(value);
 
-		return (result.size() == 0) ? list : result;
-	}
+        return (result.size() == 0) ? list : result;
+    }
 
 public:
-	/**
-	 * Open an xdg instance and load directories.
-	 *
-	 * \throw std::runtime_error on failures
-	 */
-	Xdg()
-	{
-		m_configHome	= envOrHome("XDG_CONFIG_HOME", ".config");
-		m_dataHome	= envOrHome("XDG_DATA_HOME", ".local/share");
-		m_cacheHome	= envOrHome("XDG_CACHE_HOME", ".cache");
+    /**
+     * Open an xdg instance and load directories.
+     *
+     * \throw std::runtime_error on failures
+     */
+    Xdg()
+    {
+        m_configHome    = envOrHome("XDG_CONFIG_HOME", ".config");
+        m_dataHome      = envOrHome("XDG_DATA_HOME", ".local/share");
+        m_cacheHome     = envOrHome("XDG_CACHE_HOME", ".cache");
 
-		m_configDirs	= listOrDefaults("XDG_CONFIG_DIRS", { "/etc/xdg" });
-		m_dataDirs	= listOrDefaults("XDG_DATA_DIRS", { "/usr/local/share", "/usr/share" });
+        m_configDirs    = listOrDefaults("XDG_CONFIG_DIRS", { "/etc/xdg" });
+        m_dataDirs      = listOrDefaults("XDG_DATA_DIRS", { "/usr/local/share", "/usr/share" });
 
-		/*
-		 * Runtime directory is a special case and does not have a replacement, the application should manage
-		 * this by itself.
-		 */
-		auto runtime = std::getenv("XDG_RUNTIME_DIR");
-		if (runtime && isabsolute(runtime))
-			m_runtimeDir = runtime;
-	}
+        /*
+         * Runtime directory is a special case and does not have a replacement, the application should manage
+         * this by itself.
+         */
+        auto runtime = std::getenv("XDG_RUNTIME_DIR");
+        if (runtime && isabsolute(runtime))
+            m_runtimeDir = runtime;
+    }
 
-	/**
-	 * Get the config directory. ${XDG_CONFIG_HOME} or ${HOME}/.config
-	 *
-	 * \return the config directory
-	 */
-	inline const std::string &configHome() const noexcept
-	{
-		return m_configHome;
-	}
+    /**
+     * Get the config directory. ${XDG_CONFIG_HOME} or ${HOME}/.config
+     *
+     * \return the config directory
+     */
+    inline const std::string &configHome() const noexcept
+    {
+        return m_configHome;
+    }
 
-	/**
-	 * Get the data directory. ${XDG_DATA_HOME} or ${HOME}/.local/share
-	 *
-	 * \return the data directory
-	 */
-	inline const std::string &dataHome() const noexcept
-	{
-		return m_dataHome;
-	}
+    /**
+     * Get the data directory. ${XDG_DATA_HOME} or ${HOME}/.local/share
+     *
+     * \return the data directory
+     */
+    inline const std::string &dataHome() const noexcept
+    {
+        return m_dataHome;
+    }
 
-	/**
-	 * Get the cache directory. ${XDG_CACHE_HOME} or ${HOME}/.cache
-	 *
-	 * \return the cache directory
-	 */
-	inline const std::string &cacheHome() const noexcept
-	{
-		return m_cacheHome;
-	}
+    /**
+     * Get the cache directory. ${XDG_CACHE_HOME} or ${HOME}/.cache
+     *
+     * \return the cache directory
+     */
+    inline const std::string &cacheHome() const noexcept
+    {
+        return m_cacheHome;
+    }
 
-	/**
-	 * Get the runtime directory.
-	 *
-	 * There is no replacement for XDG_RUNTIME_DIR, if it is not set, an empty valus is returned and the user is
-	 * responsible of using something else.
-	 *
-	 * \return the runtime directory
-	 */
-	inline const std::string &runtimeDir() const noexcept
-	{
-		return m_runtimeDir;
-	}
+    /**
+     * Get the runtime directory.
+     *
+     * There is no replacement for XDG_RUNTIME_DIR, if it is not set, an empty valus is returned and the user is
+     * responsible of using something else.
+     *
+     * \return the runtime directory
+     */
+    inline const std::string &runtimeDir() const noexcept
+    {
+        return m_runtimeDir;
+    }
 
-	/**
-	 * Get the standard config directories. ${XDG_CONFIG_DIRS} or { "/etc/xdg" }
-	 *
-	 * \return the list of config directories
-	 */
-	inline const std::vector<std::string> &configDirs() const noexcept
-	{
-		return m_configDirs;
-	}
+    /**
+     * Get the standard config directories. ${XDG_CONFIG_DIRS} or { "/etc/xdg" }
+     *
+     * \return the list of config directories
+     */
+    inline const std::vector<std::string> &configDirs() const noexcept
+    {
+        return m_configDirs;
+    }
 
-	/**
-	 * Get the data directories. ${XDG_DATA_DIRS} or { "/usr/local/share", "/usr/share" }
-	 *
-	 * \return the list of data directories
-	 */
-	inline const std::vector<std::string> &dataDirs() const noexcept
-	{
-		return m_dataDirs;
-	}
+    /**
+     * Get the data directories. ${XDG_DATA_DIRS} or { "/usr/local/share", "/usr/share" }
+     *
+     * \return the list of data directories
+     */
+    inline const std::vector<std::string> &dataDirs() const noexcept
+    {
+        return m_dataDirs;
+    }
 };
 
 } // !irccd
 
-#endif // !IRCCD_XDG_HPP
+#endif // !XDG_HPP
--- a/plugins/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -19,61 +19,61 @@
 project(plugins)
 
 add_custom_target(
-	all-plugins ALL
-	COMMENT "Irccd plugins"
+    all-plugins ALL
+    COMMENT "Irccd plugins"
 )
 
 set_target_properties(
-	all-plugins
-	PROPERTIES
-		FOLDER meta
+    all-plugins
+    PROPERTIES
+        FOLDER meta
 )
 
 foreach (plugin ${IRCCD_PLUGINS})
-	string(TOUPPER ${plugin} optname)
+    string(TOUPPER ${plugin} optname)
 
-	if (WITH_PLUGIN_${optname})
-		# 1. Configure the plugin and install it.
-		irccd_define_plugin(${plugin}/${plugin}.js)
+    if (WITH_PLUGIN_${optname})
+        # 1. Configure the plugin and install it.
+        irccd_define_plugin(${plugin}/${plugin}.js)
 
-		# 2. Build documentation.
-		if (WITH_HTML)
-			set(basedocdir ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR})
+        # 2. Build documentation.
+        if (WITH_HTML)
+            set(basedocdir ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR})
 
-			file(RELATIVE_PATH baseurl ${basedocdir}/plugin ${basedocdir})
-	
-			pandoc(
-				OUTPUT ${basedocdir}/plugin/${plugin}.html
-				SOURCES ${plugin}/${plugin}.md
-				TEMPLATE ${resources_SOURCE_DIR}/template.html
-				DEPENDS
-					${resources_SOURCE_DIR}/template.html
-					docs-resources
-				ARGS -Vguide
-				VARIABLE baseurl:${baseurl}
-				FROM markdown TO html5
-				STANTALONE MAKE_DIRECTORY TOC
-			)
-	
-			list(APPEND outputs ${basedocdir}/plugin/${plugin}.html)
-			install(FILES ${basedocdir}/plugin/${plugin}.html DESTINATION ${WITH_DOCDIR}/plugin)
-		endif ()
+            file(RELATIVE_PATH baseurl ${basedocdir}/plugin ${basedocdir})
+    
+            pandoc(
+                OUTPUT ${basedocdir}/plugin/${plugin}.html
+                SOURCES ${plugin}/${plugin}.md
+                TEMPLATE ${resources_SOURCE_DIR}/template.html
+                DEPENDS
+                    ${resources_SOURCE_DIR}/template.html
+                    docs-resources
+                ARGS -Vguide
+                VARIABLE baseurl:${baseurl}
+                FROM markdown TO html5
+                STANTALONE MAKE_DIRECTORY TOC
+            )
+    
+            list(APPEND outputs ${basedocdir}/plugin/${plugin}.html)
+            install(FILES ${basedocdir}/plugin/${plugin}.html DESTINATION ${WITH_DOCDIR}/plugin)
+        endif ()
 
-		add_custom_target(
-			plugin-${plugin}
-			SOURCES
-				${outputs}
-				${plugin}/${plugin}.js
-				${plugin}/${plugin}.md
-		)
+        add_custom_target(
+            plugin-${plugin}
+            SOURCES
+                ${outputs}
+                ${plugin}/${plugin}.js
+                ${plugin}/${plugin}.md
+        )
 
-		set_target_properties(
-			plugin-${plugin}
-			PROPERTIES
-				PROJECT_LABEL ${plugin}
-				FOLDER plugins
-		)
+        set_target_properties(
+            plugin-${plugin}
+            PROPERTIES
+                PROJECT_LABEL ${plugin}
+                FOLDER plugins
+        )
 
-		add_dependencies(all-plugins plugin-${plugin})
-	endif ()
+        add_dependencies(all-plugins plugin-${plugin})
+    endif ()
 endforeach ()
--- a/plugins/ask/ask.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/ask/ask.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,10 +18,10 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "Crazy module for asking a medium",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "Crazy module for asking a medium",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
@@ -32,41 +32,41 @@
 
 /* List of answers */
 var answers = [
-	"Yes",
-	"No"
+    "Yes",
+    "No"
 ];
 
 function onLoad()
 {
-	try {
-		// User specified file?
-		if (Plugin.config["file"])
-			path = Plugin.config["file"];
-		else
-			path = Plugin.configPath + "answers.conf";
+    try {
+        // User specified file?
+        if (Plugin.config["file"])
+            path = Plugin.config["file"];
+        else
+            path = Plugin.configPath + "answers.conf";
 
-		var file = new File(path, "r");
-		var line;
+        var file = new File(path, "r");
+        var line;
 
-		// Reset.
-		answers = [];
+        // Reset.
+        answers = [];
 
-		while ((line = file.readline()))
-			// Skip empty lines.
-			if (line.length > 0)
-				answers.push(line);
-	} catch (e) {
-		Logger.warning(path + ": " + e.message);
-		Logger.warning("using default answers");
-	}
+        while ((line = file.readline()))
+            // Skip empty lines.
+            if (line.length > 0)
+                answers.push(line);
+    } catch (e) {
+        Logger.warning(path + ": " + e.message);
+        Logger.warning("using default answers");
+    }
 }
 
 function onCommand(server, origin, channel)
 {
-	var target = Util.splituser(origin);
-	var response = answers[Math.floor(Math.random() * answers.length)];
+    var target = Util.splituser(origin);
+    var response = answers[Math.floor(Math.random() * answers.length)];
 
-	server.message(channel, target + ", " + response);
+    server.message(channel, target + ", " + response);
 }
 
 onReload = onLoad;
--- a/plugins/auth/auth.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/auth/auth.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,10 +18,10 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "Generic plugin to authenticate to services",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "Generic plugin to authenticate to services",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
@@ -32,53 +32,53 @@
 
 function authenticateNickserv(server, password)
 {
-	Logger.info("authenticating to NickServ on " + server.toString());
+    Logger.info("authenticating to NickServ on " + server.toString());
 
-	var username = Plugin.config[server.toString() + ".username"];
-	var str = Util.format("identify #{username}#{password}", {
-		"username": username ? (username + " ") : "",
-		"password": password
-	});
+    var username = Plugin.config[server.toString() + ".username"];
+    var str = Util.format("identify #{username}#{password}", {
+        "username": username ? (username + " ") : "",
+        "password": password
+    });
 
-	server.message("NickServ", str);
+    server.message("NickServ", str);
 }
 
 function authenticateQuakenet(server, password)
 {
-	var username = Plugin.config[server.toString() + ".username"];
+    var username = Plugin.config[server.toString() + ".username"];
 
-	if (!username)
-		Logger.warning("missing username for quakenet backend on " + server.toString());
-	else {
-		Logger.info("authenticating to Q on " + server.toString());
-		server.message("Q@CServe.quakenet.org", Util.format("AUTH #{username} #{password}", {
-			"username": username,
-			"password": password
-		}));
-	}
+    if (!username)
+        Logger.warning("missing username for quakenet backend on " + server.toString());
+    else {
+        Logger.info("authenticating to Q on " + server.toString());
+        server.message("Q@CServe.quakenet.org", Util.format("AUTH #{username} #{password}", {
+            "username": username,
+            "password": password
+        }));
+    }
 }
 
 function onConnect(server)
 {
-	var type = Plugin.config[server.toString() + ".type"];
+    var type = Plugin.config[server.toString() + ".type"];
 
-	if (type) {
-		// Password is mandatory.
-		var password = Plugin.config[server.toString() + ".password"];
+    if (type) {
+        // Password is mandatory.
+        var password = Plugin.config[server.toString() + ".password"];
 
-		if (!password)
-			Logger.warning("missing password for " + server.toString());
+        if (!password)
+            Logger.warning("missing password for " + server.toString());
 
-		switch (type) {
-		case "nickserv":
-			authenticateNickserv(server, password);
-			break;
-		case "quakenet":
-			authenticateQuakenet(server, password);
-			break;
-		default:
-			Logger.warning("unknown '" + type + "' backend");
-			break;
-		}
-	}
+        switch (type) {
+        case "nickserv":
+            authenticateNickserv(server, password);
+            break;
+        case "quakenet":
+            authenticateQuakenet(server, password);
+            break;
+        default:
+            Logger.warning("unknown '" + type + "' backend");
+            break;
+        }
+    }
 }
--- a/plugins/hangman/hangman.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/hangman/hangman.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,10 +18,10 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "A hangman game for IRC",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "A hangman game for IRC",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
@@ -37,23 +37,23 @@
 
 // Formats.
 Plugin.format = {
-	"asked":	"#{nickname}, '#{letter}' was already asked.",
-	"dead":		"#{nickname}, fail the word was: #{word}.",
-	"found":	"#{nickname}, nice! the word is now #{word}",
-	"running":	"#{nickname}, the game is already running.",
-	"start":	"#{nickname}, the game is started, the word to find is: #{word}",
-	"win":		"#{nickname}, congratulations, the word is #{word}.",
-	"wrong-word":	"#{nickname}, this is not the word.",
-	"wrong-player":	"#{nickname}, please wait until someone else proposes.",
-	"wrong-letter":	"#{nickname}, there is no '#{letter}'."
+    "asked":        "#{nickname}, '#{letter}' was already asked.",
+    "dead":         "#{nickname}, fail the word was: #{word}.",
+    "found":        "#{nickname}, nice! the word is now #{word}",
+    "running":      "#{nickname}, the game is already running.",
+    "start":        "#{nickname}, the game is started, the word to find is: #{word}",
+    "win":          "#{nickname}, congratulations, the word is #{word}.",
+    "wrong-word":   "#{nickname}, this is not the word.",
+    "wrong-player": "#{nickname}, please wait until someone else proposes.",
+    "wrong-letter": "#{nickname}, there is no '#{letter}'."
 };
 
 function Hangman(server, channel)
 {
-	this.server = server;
-	this.channel = channel;
-	this.tries = 10;
-	this.select();
+    this.server = server;
+    this.channel = channel;
+    this.tries = 10;
+    this.select();
 }
 
 /**
@@ -75,7 +75,7 @@
  */
 Hangman.find = function (server, channel)
 {
-	return Hangman.map[server.toString() + '@' + channel];
+    return Hangman.map[server.toString() + '@' + channel];
 }
 
 /**
@@ -87,7 +87,7 @@
  */
 Hangman.create = function (server, channel)
 {
-	return Hangman.map[server.toString() + "@" + channel] = new Hangman(server, channel);
+    return Hangman.map[server.toString() + "@" + channel] = new Hangman(server, channel);
 }
 
 /**
@@ -97,7 +97,7 @@
  */
 Hangman.remove = function (game)
 {
-	delete Hangman.map[game.server + "@" + game.channel];
+    delete Hangman.map[game.server + "@" + game.channel];
 }
 
 /**
@@ -108,14 +108,14 @@
  */
 Hangman.isWord = function (word)
 {
-	if (word.length === 0)
-		return false;
+    if (word.length === 0)
+        return false;
 
-	for (var i = 0; i < word.length; ++i)
-		if (!Unicode.isLetter(word.charCodeAt(i)))
-			return false;
+    for (var i = 0; i < word.length; ++i)
+        if (!Unicode.isLetter(word.charCodeAt(i)))
+            return false;
 
-	return true;
+    return true;
 }
 
 /**
@@ -123,31 +123,31 @@
  */
 Hangman.loadWords = function ()
 {
-	var path;
+    var path;
 
-	// User specified file?
-	if (Plugin.config["file"])
-		path = Plugin.config["file"];
-	else
-		path = Plugin.configPath + "words.conf";
+    // User specified file?
+    if (Plugin.config["file"])
+        path = Plugin.config["file"];
+    else
+        path = Plugin.configPath + "words.conf";
 
-	try {
-		Logger.info("loading words...");
+    try {
+        Logger.info("loading words...");
 
-		var file = new File(path, "r");
-		var line;
+        var file = new File(path, "r");
+        var line;
 
-		while ((line = file.readline()) !== undefined)
-			if (Hangman.isWord(line))
-				Hangman.words.push(line);
-	} catch (e) {
-		throw new Error("could not open '" + path + "'");
-	}
+        while ((line = file.readline()) !== undefined)
+            if (Hangman.isWord(line))
+                Hangman.words.push(line);
+    } catch (e) {
+        throw new Error("could not open '" + path + "'");
+    }
 
-	if (Hangman.words.length === 0)
-		throw new Error("empty word database");
+    if (Hangman.words.length === 0)
+        throw new Error("empty word database");
 
-	Logger.info("number of words in database: " + Hangman.words.length);
+    Logger.info("number of words in database: " + Hangman.words.length);
 }
 
 /**
@@ -155,26 +155,26 @@
  */
 Hangman.loadFormats = function ()
 {
-	// --- DEPRECATED -------------------------------------------
-	//
-	// This code will be removed.
-	//
-	// Since:	2.1.0
-	// Until:	3.0.0
-	// Reason:	new [format] section replaces it.
-	//
-	// ----------------------------------------------------------
-	for (var key in Plugin.format) {
-		var optname = "format-" + key;
+    // --- DEPRECATED -------------------------------------------
+    //
+    // This code will be removed.
+    //
+    // Since:    2.1.0
+    // Until:    3.0.0
+    // Reason:    new [format] section replaces it.
+    //
+    // ----------------------------------------------------------
+    for (var key in Plugin.format) {
+        var optname = "format-" + key;
 
-		if (typeof (Plugin.config[optname]) !== "string")
-			continue;
+        if (typeof (Plugin.config[optname]) !== "string")
+            continue;
 
-		if (Plugin.config[optname].length === 0)
-			Logger.warning("skipping empty '" + optname + "' format");
-		else
-			Plugin.format[key] = Plugin.config[optname];
-	}
+        if (Plugin.config[optname].length === 0)
+            Logger.warning("skipping empty '" + optname + "' format");
+        else
+            Plugin.format[key] = Plugin.config[optname];
+    }
 }
 
 /**
@@ -182,20 +182,20 @@
  */
 Hangman.prototype.select = function ()
 {
-	// Reload the words if empty.
-	if (!this.words || this.words.length === 0)
-		this.words = Hangman.words.slice(0);
+    // Reload the words if empty.
+    if (!this.words || this.words.length === 0)
+        this.words = Hangman.words.slice(0);
 
-	var i = Math.floor(Math.random() * this.words.length);
+    var i = Math.floor(Math.random() * this.words.length);
 
-	this.word = this.words[i];
-	this.words.splice(i, 1);
+    this.word = this.words[i];
+    this.words.splice(i, 1);
 
-	// Fill table.
-	this.table = {};
+    // Fill table.
+    this.table = {};
 
-	for (var j = 0; j < this.word.length; ++j)
-		this.table[this.word.charCodeAt(j)] = false;
+    for (var j = 0; j < this.word.length; ++j)
+        this.table[this.word.charCodeAt(j)] = false;
 }
 
 /**
@@ -205,21 +205,21 @@
  */
 Hangman.prototype.formatWord = function ()
 {
-	var str = "";
+    var str = "";
 
-	for (var i = 0; i < this.word.length; ++i) {
-		var ch = this.word.charCodeAt(i);
+    for (var i = 0; i < this.word.length; ++i) {
+        var ch = this.word.charCodeAt(i);
 
-		if (!this.table[ch])
-			str += "_";
-		else
-			str += String.fromCharCode(ch);
+        if (!this.table[ch])
+            str += "_";
+        else
+            str += String.fromCharCode(ch);
 
-		if (i + 1 < this.word.length)
-			str += " ";
-	}
+        if (i + 1 < this.word.length)
+            str += " ";
+    }
 
-	return str;
+    return str;
 }
 
 /**
@@ -231,139 +231,139 @@
  */
 Hangman.prototype.propose = function (ch, nickname)
 {
-	var status = "found";
+    var status = "found";
 
-	// Check for collaborative mode.
-	if (Plugin.config["collaborative"] === "true") {
-		if (this.last !== undefined && this.last === nickname)
-			return "wrong-player";
+    // Check for collaborative mode.
+    if (Plugin.config["collaborative"] === "true") {
+        if (this.last !== undefined && this.last === nickname)
+            return "wrong-player";
 
-		this.last = nickname;
-	}
+        this.last = nickname;
+    }
 
-	if (typeof(ch) == "number") {
-		if (this.table[ch] === undefined) {
-			this.tries -= 1;
-			status = "wrong-letter";
-		} else {
-			if (this.table[ch]) {
-				this.tries -= 1;
-				status = "asked";
-			} else
-				this.table[ch] = true;
-		}
-	} else {
-		if (this.word != ch) {
-			this.tries -= 1;
-			status = "wrong-word";
-		} else
-			status = "win";
-	}
+    if (typeof(ch) == "number") {
+        if (this.table[ch] === undefined) {
+            this.tries -= 1;
+            status = "wrong-letter";
+        } else {
+            if (this.table[ch]) {
+                this.tries -= 1;
+                status = "asked";
+            } else
+                this.table[ch] = true;
+        }
+    } else {
+        if (this.word != ch) {
+            this.tries -= 1;
+            status = "wrong-word";
+        } else
+            status = "win";
+    }
 
-	// Check if dead.
-	if (this.tries <= 0)
-		status = "dead";
+    // Check if dead.
+    if (this.tries <= 0)
+        status = "dead";
 
-	// Check if win.
-	var win = true;
+    // Check if win.
+    var win = true;
 
-	for (var i = 0; i < this.word.length; ++i) {
-		if (!this.table[this.word.charCodeAt(i)]) {
-			win = false;
-			break;
-		}
-	}
+    for (var i = 0; i < this.word.length; ++i) {
+        if (!this.table[this.word.charCodeAt(i)]) {
+            win = false;
+            break;
+        }
+    }
 
-	if (win)
-		status = "win";
+    if (win)
+        status = "win";
 
-	return status;
+    return status;
 }
 
 function onLoad()
 {
-	Hangman.loadFormats();
-	Hangman.loadWords();
+    Hangman.loadFormats();
+    Hangman.loadWords();
 }
 
 onReload = onLoad;
 
 function propose(server, channel, origin, game, proposition)
 {
-	var kw = {
-		channel: channel,
-		command: server.info().commandChar + Plugin.info().name,
-		nickname: Util.splituser(origin),
-		origin: origin,
-		plugin: Plugin.info().name,
-		server: server.toString()
-	};
+    var kw = {
+        channel: channel,
+        command: server.info().commandChar + Plugin.info().name,
+        nickname: Util.splituser(origin),
+        origin: origin,
+        plugin: Plugin.info().name,
+        server: server.toString()
+    };
 
-	var st = game.propose(proposition, kw.nickname);
+    var st = game.propose(proposition, kw.nickname);
 
-	switch (st) {
-	case "found":
-		kw.word = game.formatWord();
-		server.message(channel, Util.format(Plugin.format["found"], kw));
-		break;
-	case "wrong-letter":
-	case "wrong-player":
-	case "wrong-word":
-		kw.word = proposition;
-	case "asked":
-		kw.letter = String.fromCharCode(proposition);
-		server.message(channel, Util.format(Plugin.format[st], kw));
-		break;
-	case "dead":
-	case "win":
-		kw.word = game.word;
-		server.message(channel, Util.format(Plugin.format[st], kw));
+    switch (st) {
+    case "found":
+        kw.word = game.formatWord();
+        server.message(channel, Util.format(Plugin.format["found"], kw));
+        break;
+    case "wrong-letter":
+    case "wrong-player":
+    case "wrong-word":
+        kw.word = proposition;
+    case "asked":
+        kw.letter = String.fromCharCode(proposition);
+        server.message(channel, Util.format(Plugin.format[st], kw));
+        break;
+    case "dead":
+    case "win":
+        kw.word = game.word;
+        server.message(channel, Util.format(Plugin.format[st], kw));
 
-		// Remove the game.
-		Hangman.remove(game);
-		break;
-	default:
-		break;
-	}
+        // Remove the game.
+        Hangman.remove(game);
+        break;
+    default:
+        break;
+    }
 }
 
 function onCommand(server, origin, channel, message)
 {
-	var game = Hangman.find(server, channel);
-	var kw = {
-		channel: channel,
-		command: server.info().commandChar + Plugin.info().name,
-		nickname: Util.splituser(origin),
-		origin: origin,
-		plugin: Plugin.info().name,
-		server: server.toString()
-	};
+    var game = Hangman.find(server, channel);
+    var kw = {
+        channel: channel,
+        command: server.info().commandChar + Plugin.info().name,
+        nickname: Util.splituser(origin),
+        origin: origin,
+        plugin: Plugin.info().name,
+        server: server.toString()
+    };
 
-	if (game) {
-		var list = message.split(" \t");
+    if (game) {
+        var list = message.split(" \t");
 
-		if (list.length === 0 || String(list[0]).length === 0)
-			server.message(channel, Util.format(Plugin.format["running"], kw));
-		else {
-			var word = String(list[0]);
+        if (list.length === 0 || String(list[0]).length === 0)
+            server.message(channel, Util.format(Plugin.format["running"], kw));
+        else {
+            var word = String(list[0]);
 
-			if (Hangman.isWord(word))
-				propose(server, channel, origin, game, word);
-		}
-	} else {
-		game = Hangman.create(server, channel);
-		kw.word = game.formatWord();
-		server.message(channel, Util.format(Plugin.format["start"], kw));
-	}
+            if (Hangman.isWord(word))
+                propose(server, channel, origin, game, word);
+        }
+    } else {
+        game = Hangman.create(server, channel);
+        kw.word = game.formatWord();
+        server.message(channel, Util.format(Plugin.format["start"], kw));
+    }
 }
 
 function onMessage(server, origin, channel, message)
 {
-	var game = Hangman.find(server, channel);
+    var game = Hangman.find(server, channel);
 
-	if (!game)
-		return;
+    if (!game)
+        return;
 
-	if (message.length === 1 && Unicode.isLetter(message.charCodeAt(0)))
-		propose(server, channel, origin, game, message.charCodeAt(0));
+    if (message.length === 1 && Unicode.isLetter(message.charCodeAt(0)))
+        propose(server, channel, origin, game, message.charCodeAt(0));
 }
--- a/plugins/history/history.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/history/history.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,207 +18,207 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "track nickname's history",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "track nickname's history",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
-var Directory	= Irccd.Directory;
-var File	= Irccd.File;
-var Logger	= Irccd.Logger;
-var Plugin	= Irccd.Plugin;
-var Server	= Irccd.Server;
-var Util	= Irccd.Util;
+var Directory   = Irccd.Directory;
+var File        = Irccd.File;
+var Logger      = Irccd.Logger;
+var Plugin      = Irccd.Plugin;
+var Server      = Irccd.Server;
+var Util        = Irccd.Util;
 
 Plugin.format = {
-	"error":	"#{nickname}, I'm sorry, something went wrong.",
-	"seen":		"#{nickname}, I've seen #{target} for the last time the %d-%m-%Y %H:%M",
-	"said":		"#{nickname}, #{target} said on %d-%m-%Y %H:%M: #{message}",
-	"unknown":	"#{nickname}, I've never seen #{target}.",
-	"usage":	"#{nickname}, usage: #{plugin} seen | said <target>."
+    "error":    "#{nickname}, I'm sorry, something went wrong.",
+    "seen":     "#{nickname}, I've seen #{target} for the last time the %d-%m-%Y %H:%M",
+    "said":     "#{nickname}, #{target} said on %d-%m-%Y %H:%M: #{message}",
+    "unknown":  "#{nickname}, I've never seen #{target}.",
+    "usage":    "#{nickname}, usage: #{plugin} seen | said <target>."
 };
 
 function isSelf(server, origin)
 {
-	return server.info().nickname === Util.splituser(origin);
+    return server.info().nickname === Util.splituser(origin);
 }
 
 function command(server)
 {
-	return server.info().commandChar + "history";
+    return server.info().commandChar + "history";
 }
 
 function path(server, channel)
 {
-	var p;
+    var p;
 
-	if (Plugin.config["file"] !== undefined) {
-		p = Util.format(Plugin.config["file"], {
-			"server":	server.toString(),
-			"channel":	channel
-		});
-	} else
-		p = Plugin.cachePath + "db.json";
+    if (Plugin.config["file"] !== undefined) {
+        p = Util.format(Plugin.config["file"], {
+            "server":    server.toString(),
+            "channel":    channel
+        });
+    } else
+        p = Plugin.cachePath + "db.json";
 
-	return p;
+    return p;
 }
 
 function read(server, channel, nickname)
 {
-	var p = path(server, channel);
-	var db = {};
+    var p = path(server, channel);
+    var db = {};
 
-	if (File.exists(p)) {
-		var file = new File(path(server, channel), "r");
-		var str = file.read();
+    if (File.exists(p)) {
+        var file = new File(path(server, channel), "r");
+        var str = file.read();
 
-		db = JSON.parse(str);
-	}
+        db = JSON.parse(str);
+    }
 
-	// Complete if needed.
-	if (!db[server])
-		db[server] = {};
-	if (!db[server][channel])
-		db[server][channel] = {};
-	if (!db[server][channel][nickname])
-		db[server][channel][nickname] = {};
+    // Complete if needed.
+    if (!db[server])
+        db[server] = {};
+    if (!db[server][channel])
+        db[server][channel] = {};
+    if (!db[server][channel][nickname])
+        db[server][channel][nickname] = {};
 
-	return db;
+    return db;
 }
 
 function write(server, channel, nickname, message)
 {
-	var db = read(server, channel, nickname);
-	var entry = db[server][channel][nickname];
-	var p = path(server, channel);
+    var db = read(server, channel, nickname);
+    var entry = db[server][channel][nickname];
+    var p = path(server, channel);
 
-	if (!File.exists(File.dirname(p))) {
-		Logger.debug("creating directory " + File.dirname(p));
-		Directory.mkdir(File.dirname(p));
-	}
+    if (!File.exists(File.dirname(p))) {
+        Logger.debug("creating directory " + File.dirname(p));
+        Directory.mkdir(File.dirname(p));
+    }
 
-	var file = new File(path(server, channel), "wt");
+    var file = new File(path(server, channel), "wt");
 
-	entry.timestamp = Date.now();
-	entry.message = (message) ? message : entry.message;
+    entry.timestamp = Date.now();
+    entry.message = (message) ? message : entry.message;
 
-	file.write(JSON.stringify(db));
+    file.write(JSON.stringify(db));
 }
 
 function find(server, channel, target)
 {
-	var db = read(server, channel, target);
-	var it = db[server][channel][target];
+    var db = read(server, channel, target);
+    var it = db[server][channel][target];
 
-	if (it.timestamp)
-		return it;
+    if (it.timestamp)
+        return it;
 }
 
 function loadFormats()
 {
-	// --- DEPRECATED -------------------------------------------
-	//
-	// This code will be removed.
-	//
-	// Since:	2.1.0
-	// Until:	3.0.0
-	// Reason:	new [format] section replaces it.
-	//
-	// ----------------------------------------------------------
-	for (var key in Plugin.format) {
-		var optname = "format-" + key;
+    // --- DEPRECATED -------------------------------------------
+    //
+    // This code will be removed.
+    //
+    // Since:    2.1.0
+    // Until:    3.0.0
+    // Reason:    new [format] section replaces it.
+    //
+    // ----------------------------------------------------------
+    for (var key in Plugin.format) {
+        var optname = "format-" + key;
 
-		if (typeof (Plugin.config[optname]) !== "string")
-			continue;
+        if (typeof (Plugin.config[optname]) !== "string")
+            continue;
 
-		if (Plugin.config[optname].length === 0)
-			Logger.warning("skipping empty '" + optname + "' format");
-		else
-			Plugin.format[key] = Plugin.config[optname];
-	}
+        if (Plugin.config[optname].length === 0)
+            Logger.warning("skipping empty '" + optname + "' format");
+        else
+            Plugin.format[key] = Plugin.config[optname];
+    }
 }
 
 function onCommand(server, origin, channel, message)
 {
-	var args = message.trim().split(" ");
-	var kw = {
-		channel: channel,
-		command: command(server),
-		nickname: Util.splituser(origin),
-		origin: origin,
-		plugin: Plugin.info().name,
-		server: server.toString()
-	};
+    var args = message.trim().split(" ");
+    var kw = {
+        channel: channel,
+        command: command(server),
+        nickname: Util.splituser(origin),
+        origin: origin,
+        plugin: Plugin.info().name,
+        server: server.toString()
+    };
 
-	if (args.length !== 2 || args[0].length === 0 || args[1].length === 0) {
-		server.message(channel, Util.format(Plugin.format.usage, kw));
-		return;
-	}
+    if (args.length !== 2 || args[0].length === 0 || args[1].length === 0) {
+        server.message(channel, Util.format(Plugin.format.usage, kw));
+        return;
+    }
 
-	if (args[0] !== "seen" && args[0] !== "said") {
-		server.message(channel, Util.format(Plugin.format.usage, kw));
-		return;
-	}
+    if (args[0] !== "seen" && args[0] !== "said") {
+        server.message(channel, Util.format(Plugin.format.usage, kw));
+        return;
+    }
 
-	if (isSelf(server, args[1]))
-		return;
+    if (isSelf(server, args[1]))
+        return;
 
-	try {
-		var info = find(server, channel, args[1]);
+    try {
+        var info = find(server, channel, args[1]);
 
-		kw.target = args[1];
+        kw.target = args[1];
 
-		if (!info) {
-			server.message(channel, Util.format(Plugin.format.unknown, kw));
-			return;
-		}
+        if (!info) {
+            server.message(channel, Util.format(Plugin.format.unknown, kw));
+            return;
+        }
 
-		kw.date = info.timestamp;
-		kw.message = info.message ? info.message : "";
+        kw.date = info.timestamp;
+        kw.message = info.message ? info.message : "";
 
-		server.message(channel, Util.format(Plugin.format[args[0] == "seen" ? "seen" : "said"], kw));
-	} catch (e) {
-		server.message(channel, Util.format(Plugin.format["error"], kw));
-	}
+        server.message(channel, Util.format(Plugin.format[args[0] == "seen" ? "seen" : "said"], kw));
+    } catch (e) {
+        server.message(channel, Util.format(Plugin.format["error"], kw));
+    }
 }
 
 function onJoin(server, origin, channel)
 {
-	write(server, channel, Util.splituser(origin));
+    write(server, channel, Util.splituser(origin));
 }
 
 function onMessage(server, origin, channel, message)
 {
-	write(server, channel, Util.splituser(origin), message);
+    write(server, channel, Util.splituser(origin), message);
 }
 
 onMe = onMessage;
 
 function onTopic(server, origin, channel)
 {
-	write(server, channel, Util.splituser(origin));
+    write(server, channel, Util.splituser(origin));
 }
 
 function onLoad()
 {
-	var table = Server.list();
+    var table = Server.list();
 
-	for (var k in table)
-		for (var c in table[k].info().channels)
-			table[k].names(c);
+    for (var k in table)
+        for (var c in table[k].info().channels)
+            table[k].names(c);
 
-	loadFormats();
+    loadFormats();
 }
 
 function onReload()
 {
-	loadFormats();
+    loadFormats();
 }
 
 function onNames(server, channel, list)
 {
-	for (var i = 0; i < list.length; ++i)
-		write(server, channel, list[i]);
+    for (var i = 0; i < list.length; ++i)
+        write(server, channel, list[i]);
 }
--- a/plugins/logger/logger.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/logger/logger.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,34 +18,34 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "A plugin to log everything",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "A plugin to log everything",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
-var Directory	= Irccd.Directory;
-var File	= Irccd.File;
-var Logger	= Irccd.Logger;
-var Plugin	= Irccd.Plugin;
-var Util	= Irccd.Util;
+var Directory   = Irccd.Directory;
+var File        = Irccd.File;
+var Logger      = Irccd.Logger;
+var Plugin      = Irccd.Plugin;
+var Util        = Irccd.Util;
 
 /**
  * All available formats.
  */
 Plugin.format = {
-	"cmode":	"%H:%M:%S :: #{nickname} changed the mode to: #{mode} #{arg}",
-	"cnotice":	"%H:%M:%S :: [notice] (#{channel}) #{nickname}: #{message}",
-	"join":		"%H:%M:%S >> #{nickname} joined #{channel}",
-	"kick":		"%H:%M:%S :: #{target} has been kicked by #{nickname} [reason: #{reason}]",
-	"me":		"%H:%M:%S * #{nickname} #{message}",
-	"message":	"%H:%M:%S #{nickname}: #{message}",
-	"mode":		"%H:%M:%S :: #{nickname} set mode #{mode} to #{arg}",
-	"notice":	"%H:%M:%S [notice] (#{nickname}) #{message}",
-	"part":		"%H:%M:%S << #{nickname} left #{channel} [#{reason}]",
-	"query":	"%H:%M:%S #{nickname}: #{message}",
-	"topic":	"%H:%M:%S :: #{nickname} changed the topic of #{channel} to: #{topic}"
+    "cmode":    "%H:%M:%S :: #{nickname} changed the mode to: #{mode} #{arg}",
+    "cnotice":  "%H:%M:%S :: [notice] (#{channel}) #{nickname}: #{message}",
+    "join":     "%H:%M:%S >> #{nickname} joined #{channel}",
+    "kick":     "%H:%M:%S :: #{target} has been kicked by #{nickname} [reason: #{reason}]",
+    "me":       "%H:%M:%S * #{nickname} #{message}",
+    "message":  "%H:%M:%S #{nickname}: #{message}",
+    "mode":     "%H:%M:%S :: #{nickname} set mode #{mode} to #{arg}",
+    "notice":   "%H:%M:%S [notice] (#{nickname}) #{message}",
+    "part":     "%H:%M:%S << #{nickname} left #{channel} [#{reason}]",
+    "query":    "%H:%M:%S #{nickname}: #{message}",
+    "topic":    "%H:%M:%S :: #{nickname} changed the topic of #{channel} to: #{topic}"
 };
 
 /**
@@ -53,172 +53,172 @@
  */
 function loadFormats()
 {
-	// --- DEPRECATED -------------------------------------------
-	//
-	// This code will be removed.
-	//
-	// Since:	2.1.0
-	// Until:	3.0.0
-	// Reason:	new [format] section replaces it.
-	//
-	// ----------------------------------------------------------
-	for (var key in Plugin.format) {
-		var optname = "format-" + key;
+    // --- DEPRECATED -------------------------------------------
+    //
+    // This code will be removed.
+    //
+    // Since:    2.1.0
+    // Until:    3.0.0
+    // Reason:    new [format] section replaces it.
+    //
+    // ----------------------------------------------------------
+    for (var key in Plugin.format) {
+        var optname = "format-" + key;
 
-		if (typeof (Plugin.config[optname]) !== "string")
-			continue;
+        if (typeof (Plugin.config[optname]) !== "string")
+            continue;
 
-		if (Plugin.config[optname].length === 0)
-			Logger.warning("skipping empty '" + optname + "' format");
-		else
-			Plugin.format[key] = Plugin.config[optname];
-	}
+        if (Plugin.config[optname].length === 0)
+            Logger.warning("skipping empty '" + optname + "' format");
+        else
+            Plugin.format[key] = Plugin.config[optname];
+    }
 }
 
 function keywords(server, channel, origin, extra)
 {
-	var kw = {
-		"server": server.toString(),
-		"channel": channel,
-		"origin": origin,
-		"nickname": Util.splituser(origin)
-	};
+    var kw = {
+        "server": server.toString(),
+        "channel": channel,
+        "origin": origin,
+        "nickname": Util.splituser(origin)
+    };
 
-	for (var key in extra)
-		kw[key] = extra[key];
+    for (var key in extra)
+        kw[key] = extra[key];
 
-	return kw;
+    return kw;
 }
 
 function write(fmt, args)
 {
-	var path = Util.format(Plugin.config["path"], args);
-	var directory = File.dirname(path);
+    var path = Util.format(Plugin.config["path"], args);
+    var directory = File.dirname(path);
 
-	// Try to create the directory.
-	if (!File.exists(directory)) {
-		Logger.debug("creating directory: " + directory);
-		Directory.mkdir(directory);
-	}
+    // Try to create the directory.
+    if (!File.exists(directory)) {
+        Logger.debug("creating directory: " + directory);
+        Directory.mkdir(directory);
+    }
 
-	Logger.debug("opening: " + path);
+    Logger.debug("opening: " + path);
 
-	var str = Util.format(Plugin.format[fmt], args);
-	var file = new File(path, "a");
+    var str = Util.format(Plugin.format[fmt], args);
+    var file = new File(path, "a");
 
-	file.write(str + "\n");
+    file.write(str + "\n");
 }
 
 function onLoad()
 {
-	if (Plugin.config["path"] === undefined)
-		throw new Error("Missing 'path' option");
+    if (Plugin.config["path"] === undefined)
+        throw new Error("Missing 'path' option");
 
-	loadFormats();
+    loadFormats();
 }
 
 function onReload()
 {
-	loadFormats();
+    loadFormats();
 }
 
 function onChannelMode(server, origin, channel, mode, arg)
 {
-	write("cmode", keywords(server, channel, origin, {
-		"arg":		arg,
-		"mode":		mode,
-		"source":	channel
-	}));
+    write("cmode", keywords(server, channel, origin, {
+        "arg":        arg,
+        "mode":        mode,
+        "source":    channel
+    }));
 }
 
 function onChannelNotice(server, origin, channel, notice)
 {
-	write("cnotice", keywords(server, channel, origin, {
-		"message":	notice,
-		"source":	channel
-	}));
+    write("cnotice", keywords(server, channel, origin, {
+        "message":    notice,
+        "source":    channel
+    }));
 }
 
 function onInvite(server, origin, channel)
 {
-	write("invite", keywords(server, channel, origin, {
-		"source":	channel
-	}));
+    write("invite", keywords(server, channel, origin, {
+        "source":    channel
+    }));
 }
 
 function onJoin(server, origin, channel)
 {
-	write("join", keywords(server, channel, origin, {
-		"source":	channel
-	}));
+    write("join", keywords(server, channel, origin, {
+        "source":    channel
+    }));
 }
 
 function onKick(server, origin, channel, target, reason)
 {
-	write("kick", keywords(server, channel, origin, {
-		"target":	target,
-		"source":	channel,
-		"reason":	reason
-	}));
+    write("kick", keywords(server, channel, origin, {
+        "target":    target,
+        "source":    channel,
+        "reason":    reason
+    }));
 }
 
 function onMe(server, origin, channel, message)
 {
-	write("me", keywords(server, channel, origin, {
-		"message":	message,
-		"source":	channel
-	}));
+    write("me", keywords(server, channel, origin, {
+        "message":    message,
+        "source":    channel
+    }));
 }
 
 function onMessage(server, origin, channel, message)
 {
-	write("message", keywords(server, channel, origin, {
-		"message":	message,
-		"source":	channel
-	}));
+    write("message", keywords(server, channel, origin, {
+        "message":    message,
+        "source":    channel
+    }));
 }
 
 function onMode(server, origin, mode)
 {
-	write("mode", keywords(server, undefined, origin, {
-		"mode":		mode,
-		"source":	Util.splituser(origin)
-	}));
+    write("mode", keywords(server, undefined, origin, {
+        "mode":        mode,
+        "source":    Util.splituser(origin)
+    }));
 }
 
 function onNick(server, origin, nickname)
 {
-	// TODO: write for all servers/channels a log entry
+    // TODO: write for all servers/channels a log entry
 }
 
 function onNotice(server, origin, notice)
 {
-	write("notice", keywords(server, undefined, origin, {
-		"message":	notice,
-		"source":	Util.splituser(origin)
-	}));
+    write("notice", keywords(server, undefined, origin, {
+        "message":    notice,
+        "source":    Util.splituser(origin)
+    }));
 }
 
 function onPart(server, origin, channel, reason)
 {
-	write("part", keywords(server, channel, origin, {
-		"reason":	reason,
-		"source":	channel
-	}));
+    write("part", keywords(server, channel, origin, {
+        "reason":    reason,
+        "source":    channel
+    }));
 }
 
 function onQuery(server, origin, message)
 {
-	write("query", keywords(server, undefined, origin, {
-		"source":	Util.splituser(origin),
-		"message":	message
-	}));
+    write("query", keywords(server, undefined, origin, {
+        "source":    Util.splituser(origin),
+        "message":    message
+    }));
 }
 
 function onTopic(server, origin, channel, topic)
 {
-	write("topic", keywords(server, channel, origin, {
-		"source":	channel,
-		"topic":	topic
-	}));
+    write("topic", keywords(server, channel, origin, {
+        "source":    channel,
+        "topic":    topic
+    }));
 }
--- a/plugins/plugin/plugin.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/plugin/plugin.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,10 +18,10 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "A plugin to inspect plugins",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "A plugin to inspect plugins",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
@@ -29,132 +29,132 @@
 var Plugin = Irccd.Plugin;
 
 Plugin.format = {
-	"usage":	"#{nickname}, usage: #{command} list | info plugin",
-	"info":		"#{nickname}, #{name}: #{summary}, version #{version} by #{author} (#{license} license).",
-	"not-found":	"#{nickname}, plugin #{name} does not exist.",
-	"too-long":	"#{nickname}, plugin list too long, ask in query for more details."
+    "usage":        "#{nickname}, usage: #{command} list | info plugin",
+    "info":         "#{nickname}, #{name}: #{summary}, version #{version} by #{author} (#{license} license).",
+    "not-found":    "#{nickname}, plugin #{name} does not exist.",
+    "too-long":     "#{nickname}, plugin list too long, ask in query for more details."
 }
 
 var commands = {
-	loadFormats: function ()
-	{
-		// --- DEPRECATED -----------------------------------
-		//
-		// This code will be removed.
-		//
-		// Since:	2.1.0
-		// Until:	3.0.0
-		// Reason:	new [format] section replaces it.
-		//
-		// --------------------------------------------------
-		for (var key in Plugin.format) {
-			var optname = "format-" + key;
-	
-			if (typeof (Plugin.config[optname]) !== "string")
-				continue;
-	
-			if (Plugin.config[optname].length === 0)
-				Logger.warning("skipping empty '" + optname + "' format");
-			else
-				Plugin.format[key] = Plugin.config[optname];
-		}
-	},
-	
-	keywords: function (server, channel, origin)
-	{
-		return {
-			channel: channel,
-			command: server.info().commandChar + Plugin.info().name,
-			nickname: Util.splituser(origin),
-			origin: origin,
-			plugin: Plugin.info().name,
-			server: server.toString()
-		}
-	},
+    loadFormats: function ()
+    {
+        // --- DEPRECATED -----------------------------------
+        //
+        // This code will be removed.
+        //
+        // Since:    2.1.0
+        // Until:    3.0.0
+        // Reason:    new [format] section replaces it.
+        //
+        // --------------------------------------------------
+        for (var key in Plugin.format) {
+            var optname = "format-" + key;
+    
+            if (typeof (Plugin.config[optname]) !== "string")
+                continue;
+    
+            if (Plugin.config[optname].length === 0)
+                Logger.warning("skipping empty '" + optname + "' format");
+            else
+                Plugin.format[key] = Plugin.config[optname];
+        }
+    },
+    
+    keywords: function (server, channel, origin)
+    {
+        return {
+            channel: channel,
+            command: server.info().commandChar + Plugin.info().name,
+            nickname: Util.splituser(origin),
+            origin: origin,
+            plugin: Plugin.info().name,
+            server: server.toString()
+        }
+    },
 
-	list: function (server, origin, target, query)
-	{
-		var kw = commands.keywords(server, target, origin);
-		var list = Plugin.list();
-		var str;
+    list: function (server, origin, target, query)
+    {
+        var kw = commands.keywords(server, target, origin);
+        var list = Plugin.list();
+        var str;
 
-		if (!query && list.length >= 16)
-			str = Util.format(Plugin.format["too-long"], kw);
-		else
-			str = list.join(" ");
+        if (!query && list.length >= 16)
+            str = Util.format(Plugin.format["too-long"], kw);
+        else
+            str = list.join(" ");
 
-		server.message(target, str);
-	},
+        server.message(target, str);
+    },
 
-	info: function (server, origin, target, name)
-	{
-		var kw = commands.keywords(server, target, origin);
-		var info = Plugin.info(name);
-		var str;
+    info: function (server, origin, target, name)
+    {
+        var kw = commands.keywords(server, target, origin);
+        var info = Plugin.info(name);
+        var str;
 
-		kw.name = name;
+        kw.name = name;
 
-		if (info) {
-			kw.author = info.author;
-			kw.license = info.license;
-			kw.summary = info.summary;
-			kw.version = info.version;
-	
-			str = Util.format(Plugin.format["info"], kw);
-		} else
-			str = Util.format(Plugin.format["not-found"], kw);
-	
-		server.message(target, str);
-	},
+        if (info) {
+            kw.author = info.author;
+            kw.license = info.license;
+            kw.summary = info.summary;
+            kw.version = info.version;
+    
+            str = Util.format(Plugin.format["info"], kw);
+        } else
+            str = Util.format(Plugin.format["not-found"], kw);
+    
+        server.message(target, str);
+    },
 
-	usage: function (server, origin, target)
-	{
-		server.message(target, Util.format(Plugin.format["usage"], commands.keywords(server, target, origin)));
-	},
+    usage: function (server, origin, target)
+    {
+        server.message(target, Util.format(Plugin.format["usage"], commands.keywords(server, target, origin)));
+    },
 
-	execute: function (server, origin, target, message, query)
-	{
-		if (message.length === 0) {
-			commands.usage(server, origin, target);
-			return;
-		}
+    execute: function (server, origin, target, message, query)
+    {
+        if (message.length === 0) {
+            commands.usage(server, origin, target);
+            return;
+        }
 
-		var list = message.split(" ");
+        var list = message.split(" ");
 
-		switch (list[0]) {
-		case "info":
-			if (list.length === 2)
-				commands.info(server, origin, target, list[1]);
-			else
-				commands.usage(server, origin, target);
+        switch (list[0]) {
+        case "info":
+            if (list.length === 2)
+                commands.info(server, origin, target, list[1]);
+            else
+                commands.usage(server, origin, target);
 
-			break;
-		case "list":
-			commands.list(server, origin, target, query);
-			break;
-		default:
-			commands.usage(server, origin, target);
-			break;
-		}
-	}
+            break;
+        case "list":
+            commands.list(server, origin, target, query);
+            break;
+        default:
+            commands.usage(server, origin, target);
+            break;
+        }
+    }
 };
 
 function onCommand(server, origin, channel, message)
 {
-	commands.execute(server, origin, channel, message, false)
+    commands.execute(server, origin, channel, message, false)
 }
 
 function onLoad()
 {
-	commands.loadFormats();
+    commands.loadFormats();
 }
 
 function onQueryCommand(server, origin, message)
 {
-	commands.execute(server, origin, origin, message, true)
+    commands.execute(server, origin, origin, message, true)
 }
 
 function onReload()
 {
-	commands.loadFormats();
+    commands.loadFormats();
 }
--- a/plugins/roulette/roulette.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/plugins/roulette/roulette.js	Tue Jun 21 20:52:17 2016 +0200
@@ -18,10 +18,10 @@
 
 // Plugin information.
 info = {
-	author: "David Demelier <markand@malikania.fr>",
-	license: "ISC",
-	summary: "A russian roulette for IRC",
-	version: "@IRCCD_VERSION@"
+    author: "David Demelier <markand@malikania.fr>",
+    license: "ISC",
+    summary: "A russian roulette for IRC",
+    version: "@IRCCD_VERSION@"
 };
 
 // Modules.
@@ -34,16 +34,16 @@
  * Formats for writing.
  */
 Plugin.format = {
-	"lucky":	"#{nickname}, you're lucky this time",
-	"shot":		"HEADSHOT"
+    "lucky":    "#{nickname}, you're lucky this time",
+    "shot":     "HEADSHOT"
 };
 
 function Gun(server, channel)
 {
-	this.server = server;
-	this.channel = channel;
-	this.index = 0;
-	this.bullet = Math.floor(Math.random() * 6);
+    this.server = server;
+    this.channel = channel;
+    this.index = 0;
+    this.bullet = Math.floor(Math.random() * 6);
 }
 
 /**
@@ -60,7 +60,7 @@
  */
 Gun.find = function (server, channel)
 {
-	return Gun.map[server.toString() + '@' + channel];
+    return Gun.map[server.toString() + '@' + channel];
 }
 
 /**
@@ -72,7 +72,7 @@
  */
 Gun.create = function (server, channel)
 {
-	return Gun.map[server.toString() + "@" + channel] = new Gun(server, channel);
+    return Gun.map[server.toString() + "@" + channel] = new Gun(server, channel);
 }
 
 /**
@@ -82,7 +82,7 @@
  */
 Gun.remove = function (game)
 {
-	delete Gun.map[game.server + "@" + game.channel];
+    delete Gun.map[game.server + "@" + game.channel];
 }
 
 /**
@@ -90,61 +90,61 @@
  */
 Gun.loadFormats = function ()
 {
-	// --- DEPRECATED ------------------------------------------
-	//
-	// This code will be removed.
-	//
-	// Since:	2.1.0
-	// Until:	3.0.0
-	// Reason:	new [format] section replaces it.
-	//
-	// ----------------------------------------------------------
-	for (var key in Plugin.format) {
-		var optname = "format-" + key;
+    // --- DEPRECATED ------------------------------------------
+    //
+    // This code will be removed.
+    //
+    // Since:    2.1.0
+    // Until:    3.0.0
+    // Reason:    new [format] section replaces it.
+    //
+    // ----------------------------------------------------------
+    for (var key in Plugin.format) {
+        var optname = "format-" + key;
 
-		if (typeof (Plugin.config[optname]) !== "string")
-			continue;
+        if (typeof (Plugin.config[optname]) !== "string")
+            continue;
 
-		if (Plugin.config[optname].length === 0)
-			Logger.warning("skipping empty '" + optname + "' format");
-		else
-			Plugin.format[key] = Plugin.config[optname];
-	}
+        if (Plugin.config[optname].length === 0)
+            Logger.warning("skipping empty '" + optname + "' format");
+        else
+            Plugin.format[key] = Plugin.config[optname];
+    }
 }
 
 Gun.prototype.shot = function ()
 {
-	return this.index++ === this.bullet;
+    return this.index++ === this.bullet;
 }
 
 function onLoad()
 {
-	Gun.loadFormats();
+    Gun.loadFormats();
 }
 
 onReload = onLoad;
 
 function onCommand(server, origin, channel)
 {
-	var kw = {
-		channel: channel,
-		command: server.info().commandChar + Plugin.info().name,
-		nickname: Util.splituser(origin),
-		origin: origin,
-		server: server.toString(),
-		plugin: Plugin.info().name
-	};
+    var kw = {
+        channel: channel,
+        command: server.info().commandChar + Plugin.info().name,
+        nickname: Util.splituser(origin),
+        origin: origin,
+        server: server.toString(),
+        plugin: Plugin.info().name
+    };
 
-	var game = Gun.find(server, channel);
+    var game = Gun.find(server, channel);
 
-	if (!game)
-		game = Gun.create(server, channel);
+    if (!game)
+        game = Gun.create(server, channel);
 
-	if (game.shot()) {
-		server.kick(Util.splituser(origin), channel, Util.format(Plugin.format["shot"], kw));
-		Gun.remove(game);
-	} else {
-		kw.count = (6 - game.index).toString();
-		server.message(channel, Util.format(Plugin.format["lucky"], kw));
-	}
+    if (game.shot()) {
+        server.kick(Util.splituser(origin), channel, Util.format(Plugin.format["shot"], kw));
+        Gun.remove(game);
+    } else {
+        kw.count = (6 - game.index).toString();
+        server.message(channel, Util.format(Plugin.format["lucky"], kw));
+    }
 }
--- a/tests/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -20,30 +20,30 @@
 project(tests)
 
 if (WITH_TESTS)
-	# Misc
-	add_subdirectory(command)
-	add_subdirectory(elapsedtimer)
-	add_subdirectory(logger)
-	add_subdirectory(path)
-	add_subdirectory(rules)
-	add_subdirectory(timer)
-	add_subdirectory(util)
+    # Misc
+    add_subdirectory(command)
+    add_subdirectory(elapsedtimer)
+    add_subdirectory(logger)
+    add_subdirectory(path)
+    add_subdirectory(rules)
+    add_subdirectory(timer)
+    add_subdirectory(util)
 
-	# JS API
-	if (WITH_JS)
-		add_subdirectory(js-elapsedtimer)
-		add_subdirectory(js-file)
-		add_subdirectory(js-irccd)
-		add_subdirectory(js-logger)
-		add_subdirectory(js-system)
-		add_subdirectory(js-timer)
-		add_subdirectory(js-unicode)
-		add_subdirectory(js-util)
-		add_subdirectory(plugin-ask)
-		add_subdirectory(plugin-auth)
-		add_subdirectory(plugin-hangman)
-		add_subdirectory(plugin-history)
-		add_subdirectory(plugin-logger)
-		add_subdirectory(plugin-plugin)
-	endif ()
+    # JS API
+    if (WITH_JS)
+        add_subdirectory(js-elapsedtimer)
+        add_subdirectory(js-file)
+        add_subdirectory(js-irccd)
+        add_subdirectory(js-logger)
+        add_subdirectory(js-system)
+        add_subdirectory(js-timer)
+        add_subdirectory(js-unicode)
+        add_subdirectory(js-util)
+        add_subdirectory(plugin-ask)
+        add_subdirectory(plugin-auth)
+        add_subdirectory(plugin-hangman)
+        add_subdirectory(plugin-history)
+        add_subdirectory(plugin-logger)
+        add_subdirectory(plugin-plugin)
+    endif ()
 endif ()
--- a/tests/command/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/command/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME command
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME command
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/command/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/command/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -24,110 +24,110 @@
 
 class MyCommand : public Command {
 public:
-	MyCommand()
-		: Command("test", "Test")
-	{
-	}
+    MyCommand()
+        : Command("test", "Test")
+    {
+    }
 
-	std::string help() const override
-	{
-		return "This is a super command";
-	}
+    std::string help() const override
+    {
+        return "This is a super command";
+    }
 
-	std::vector<Property> properties() const
-	{
-		return {
-			{ "b", { json::Type::Boolean			} },
-			{ "i", { json::Type::Int			} },
-			{ "m", { json::Type::Boolean, json::Type::Int, json::Type::String	} }
-		};
-	}
+    std::vector<Property> properties() const
+    {
+        return {
+            { "b", { json::Type::Boolean }},
+            { "i", { json::Type::Int }},
+            { "m", { json::Type::Boolean, json::Type::Int, json::Type::String }}
+        };
+    }
 };
 
 TEST(Properties, valid)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
-		{ "b", true	},
-		{ "i", 123	},
-		{ "m", "abc"	}
-	})));
+    ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
+        { "b", true     },
+        { "i", 123      },
+        { "m", "abc"    }
+    })));
 
-	ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
-		{ "b", true	},
-		{ "i", 123	},
-		{ "m", 456	}
-	})));
+    ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
+        { "b", true     },
+        { "i", 123      },
+        { "m", 456      }
+    })));
 
-	ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
-		{ "b", true	},
-		{ "i", 123	},
-		{ "m", "456"	}
-	})));
+    ASSERT_NO_THROW(cmd.exec(*irccd, json::object({
+        { "b", true     },
+        { "i", 123      },
+        { "m", "456"    }
+    })));
 }
 
 TEST(Properties, missingB)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_THROW(cmd.exec(*irccd, json::object({
-		{ "i", 123	},
-		{ "m", "abc"	}
-	})), std::invalid_argument);
+    ASSERT_THROW(cmd.exec(*irccd, json::object({
+        { "i", 123      },
+        { "m", "abc"    }
+    })), std::invalid_argument);
 }
 
 TEST(Properties, missingI)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_THROW(cmd.exec(*irccd, json::object({
-		{ "b", true	},
-		{ "m", "abc"	}
-	})), std::invalid_argument);
+    ASSERT_THROW(cmd.exec(*irccd, json::object({
+        { "b", true     },
+        { "m", "abc"    }
+    })), std::invalid_argument);
 }
 
 TEST(Properties, missingM)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_THROW(cmd.exec(*irccd, json::object({
-		{ "b", true	},
-		{ "i", 123	},
-	})), std::invalid_argument);
+    ASSERT_THROW(cmd.exec(*irccd, json::object({
+        { "b", true     },
+        { "i", 123      },
+    })), std::invalid_argument);
 }
 
 TEST(Properties, invalidB)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_THROW(cmd.exec(*irccd, json::object({
-		{ "b", "fail"	},
-		{ "i", 123	},
-		{ "m", "abc"	}
-	})), std::invalid_argument);
+    ASSERT_THROW(cmd.exec(*irccd, json::object({
+        { "b", "fail"   },
+        { "i", 123      },
+        { "m", "abc"    }
+    })), std::invalid_argument);
 }
 
 TEST(Properties, invalidM)
 {
-	Irccd *irccd = nullptr;
-	MyCommand cmd;
+    Irccd *irccd = nullptr;
+    MyCommand cmd;
 
-	ASSERT_THROW(cmd.exec(*irccd, json::object({
-		{ "b", "fail"	},
-		{ "i", 123	},
-		{ "m", nullptr	}
-	})), std::invalid_argument);
+    ASSERT_THROW(cmd.exec(*irccd, json::object({
+        { "b", "fail"   },
+        { "i", 123      },
+        { "m", nullptr  }
+    })), std::invalid_argument);
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
-}
\ No newline at end of file
+    return RUN_ALL_TESTS();
+}
--- a/tests/elapsedtimer/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/elapsedtimer/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME elapsedtimer
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME elapsedtimer
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/elapsedtimer/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/elapsedtimer/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -27,29 +27,29 @@
 
 TEST(TestElapsedTimer, standard)
 {
-	ElapsedTimer timer;
+    ElapsedTimer timer;
 
-	std::this_thread::sleep_for(300ms);
+    std::this_thread::sleep_for(300ms);
 
-	ASSERT_GE(timer.elapsed(), 250U);
-	ASSERT_LE(timer.elapsed(), 350U);
+    ASSERT_GE(timer.elapsed(), 250U);
+    ASSERT_LE(timer.elapsed(), 350U);
 }
 
 TEST(TestElapsedTimer, reset)
 {
-	ElapsedTimer timer;
+    ElapsedTimer timer;
 
-	std::this_thread::sleep_for(300ms);
+    std::this_thread::sleep_for(300ms);
 
-	timer.reset();
+    timer.reset();
 
-	ASSERT_LE(timer.elapsed(), 100U);
+    ASSERT_LE(timer.elapsed(), 100U);
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
 
--- a/tests/js-elapsedtimer/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-elapsedtimer/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME js-elapsedtimer
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-elapsedtimer
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
 
--- a/tests/js-elapsedtimer/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-elapsedtimer/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -31,57 +31,57 @@
 
 class TestElapsedTimer : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestElapsedTimer()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.ElapsedTimer")->load(m_irccd, m_plugin);
-	}
+    TestElapsedTimer()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.ElapsedTimer")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestElapsedTimer, standard)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "timer = new Irccd.ElapsedTimer();") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "timer = new Irccd.ElapsedTimer();") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		std::this_thread::sleep_for(300ms);
+        std::this_thread::sleep_for(300ms);
 
-		if (duk_peval_string(m_plugin->context(), "result = timer.elapsed();") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (duk_peval_string(m_plugin->context(), "result = timer.elapsed();") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_GE(duk_get_int(m_plugin->context(), -1), 250);
-		ASSERT_LE(duk_get_int(m_plugin->context(), -1), 350);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_GE(duk_get_int(m_plugin->context(), -1), 250);
+        ASSERT_LE(duk_get_int(m_plugin->context(), -1), 350);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestElapsedTimer, reset)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "timer = new Irccd.ElapsedTimer();") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "timer = new Irccd.ElapsedTimer();") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		std::this_thread::sleep_for(300ms);
+        std::this_thread::sleep_for(300ms);
 
-		if (duk_peval_string(m_plugin->context(), "timer.reset(); result = timer.elapsed();") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (duk_peval_string(m_plugin->context(), "timer.reset(); result = timer.elapsed();") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_LE(duk_get_int(m_plugin->context(), -1), 100);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_LE(duk_get_int(m_plugin->context(), -1), 100);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-file/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-file/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,22 +17,22 @@
 #
 
 irccd_define_test(
-	NAME js-file
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-file
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
 
 #
 # Create following tree:
 #
 # CMAKE_BINARY_DIR
-#	| tests
-#	|	|-- file.txt
-#	|	|-- lines.txt
-#	|	|-- level-1
-#	|	|	| -- file-1.txt
-#	|	|	| -- level-2
-#	|	|	|	| -- file-2.txt
+#    | tests
+#    |    |-- file.txt
+#    |    |-- lines.txt
+#    |    |-- level-1
+#    |    |    | -- file-1.txt
+#    |    |    | -- level-2
+#    |    |    |    | -- file-2.txt
 #
 file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tests/level-1/level-2)
 file(WRITE ${CMAKE_BINARY_DIR}/tests/file.txt "file.txt")
--- a/tests/js-file/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-file/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,410 +30,410 @@
 
 class TestJsFile : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsFile()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.File")->load(m_irccd, m_plugin);
-	}
+    TestJsFile()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.File")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsFile, functionBasename)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "result = Irccd.File.basename('/usr/local/etc/irccd.conf');") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "result = Irccd.File.basename('/usr/local/etc/irccd.conf');") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("irccd.conf", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("irccd.conf", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, functionDirname)
 {
-	try {
-		duk_peval_string(m_plugin->context(), "result = Irccd.File.dirname('/usr/local/etc/irccd.conf');");
+    try {
+        duk_peval_string(m_plugin->context(), "result = Irccd.File.dirname('/usr/local/etc/irccd.conf');");
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("/usr/local/etc", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("/usr/local/etc", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, functionExists)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
-		duk_peval_string(m_plugin->context(), "result = Irccd.File.exists(directory + '/file.txt')");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
+        duk_peval_string(m_plugin->context(), "result = Irccd.File.exists(directory + '/file.txt')");
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, functionExists2)
 {
-	try {
-		duk_peval_string(m_plugin->context(), "result = Irccd.File.exists('file_which_does_not_exist.txt')");
+    try {
+        duk_peval_string(m_plugin->context(), "result = Irccd.File.exists('file_which_does_not_exist.txt')");
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, functionRemove)
 {
-	// First create a dummy file
-	std::ofstream("test-js-fs.remove");
+    // First create a dummy file
+    std::ofstream("test-js-fs.remove");
 
-	try {
-		if (duk_peval_string(m_plugin->context(), "Irccd.File.remove('test-js-fs.remove');") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+    try {
+        if (duk_peval_string(m_plugin->context(), "Irccd.File.remove('test-js-fs.remove');") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 
-	std::ifstream in("test-js-fs.remove");
+    std::ifstream in("test-js-fs.remove");
 
-	ASSERT_FALSE(in.is_open());
+    ASSERT_FALSE(in.is_open());
 }
 
 TEST_F(TestJsFile, methodBasename)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
-			"result = f.basename();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
+            "result = f.basename();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("file-1.txt", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("file-1.txt", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodBasenameClosed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
-			"f.close();"
-			"result = f.basename();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
+            "f.close();"
+            "result = f.basename();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("file-1.txt", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("file-1.txt", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodDirname)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
-			"result = f.dirname();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
+            "result = f.dirname();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ(IRCCD_TESTS_DIRECTORY "/level-1", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ(IRCCD_TESTS_DIRECTORY "/level-1", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodDirnameClosed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
-			"f.close();"
-			"result = f.dirname();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/level-1/file-1.txt', 'r');"
+            "f.close();"
+            "result = f.dirname();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ(IRCCD_TESTS_DIRECTORY "/level-1", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ(IRCCD_TESTS_DIRECTORY "/level-1", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodLines)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"result = new Irccd.File(directory + '/lines.txt', 'r').lines();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "result = new Irccd.File(directory + '/lines.txt', 'r').lines();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		std::vector<std::string> expected{"a", "b", "c"};
+        std::vector<std::string> expected{"a", "b", "c"};
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek1)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.seek(Irccd.File.SeekSet, 4);"
-			"result = f.read(1);"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.seek(Irccd.File.SeekSet, 4);"
+            "result = f.read(1);"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(".", dukx_get_std_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(".", dukx_get_std_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek1Closed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.close();"
-			"f.seek(Irccd.File.SeekSet, 4);"
-			"result = f.read(1);"
-			"result = typeof (result) === \"undefined\";"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.close();"
+            "f.seek(Irccd.File.SeekSet, 4);"
+            "result = f.read(1);"
+            "result = typeof (result) === \"undefined\";"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek2)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.seek(Irccd.File.SeekSet, 2);"
-			"f.seek(Irccd.File.SeekCur, 2);"
-			"result = f.read(1);"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.seek(Irccd.File.SeekSet, 2);"
+            "f.seek(Irccd.File.SeekCur, 2);"
+            "result = f.read(1);"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(".", dukx_get_std_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(".", dukx_get_std_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek2Closed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.close();"
-			"f.seek(Irccd.File.SeekSet, 2);"
-			"f.seek(Irccd.File.SeekCur, 2);"
-			"result = f.read(1);"
-			"result = typeof (result) === \"undefined\";"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.close();"
+            "f.seek(Irccd.File.SeekSet, 2);"
+            "f.seek(Irccd.File.SeekCur, 2);"
+            "result = f.read(1);"
+            "result = typeof (result) === \"undefined\";"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek3)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.seek(Irccd.File.SeekEnd, -2);"
-			"result = f.read(1);"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.seek(Irccd.File.SeekEnd, -2);"
+            "result = f.read(1);"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("x", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("x", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodSeek3Closed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"f.close();"
-			"f.seek(Irccd.File.SeekEnd, -2);"
-			"result = f.read(1);"
-			"result = typeof (result) === \"undefined\";"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "f.close();"
+            "f.seek(Irccd.File.SeekEnd, -2);"
+            "result = f.read(1);"
+            "result = typeof (result) === \"undefined\";"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodRead1)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = new Irccd.File(directory + '/file.txt', 'r');"
-			"result = f.read();"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = new Irccd.File(directory + '/file.txt', 'r');"
+            "result = f.read();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("file.txt", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("file.txt", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodReadline)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"result = [];"
-			"f = new Irccd.File(directory + '/lines.txt', 'r');"
-			"for (var s; s = f.readline(); ) {"
-			"  result.push(s);"
-			"}"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "result = [];"
+            "f = new Irccd.File(directory + '/lines.txt', 'r');"
+            "for (var s; s = f.readline(); ) {"
+            "  result.push(s);"
+            "}"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		std::vector<std::string> expected{"a", "b", "c"};
+        std::vector<std::string> expected{"a", "b", "c"};
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsFile, methodReadlineClosed)
 {
-	try {
-		duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
-		duk_put_global_string(m_plugin->context(), "directory");
+    try {
+        duk_push_string(m_plugin->context(), IRCCD_TESTS_DIRECTORY);
+        duk_put_global_string(m_plugin->context(), "directory");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"result = [];"
-			"f = new Irccd.File(directory + '/lines.txt', 'r');"
-			"f.close();"
-			"for (var s; s = f.readline(); ) {"
-			"  result.push(s);"
-			"}"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "result = [];"
+            "f = new Irccd.File(directory + '/lines.txt', 'r');"
+            "f.close();"
+            "for (var s; s = f.readline(); ) {"
+            "  result.push(s);"
+            "}"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		std::vector<std::string> expected;
+        std::vector<std::string> expected;
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(expected, dukx_get_array(m_plugin->context(), -1, dukx_get_std_string));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-irccd/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-irccd/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME js-irccd
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-irccd
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/js-irccd/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-irccd/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -28,116 +28,116 @@
 
 class TestJsIrccd : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsIrccd()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-	}
+    TestJsIrccd()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsIrccd, version)
 {
-	try {
-		auto ret = duk_peval_string(m_plugin->context(),
-			"major = Irccd.version.major;"
-			"minor = Irccd.version.minor;"
-			"patch = Irccd.version.patch;"
-		);
+    try {
+        auto ret = duk_peval_string(m_plugin->context(),
+            "major = Irccd.version.major;"
+            "minor = Irccd.version.minor;"
+            "patch = Irccd.version.patch;"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "major"));
-		ASSERT_EQ(IRCCD_VERSION_MAJOR, duk_get_int(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "minor"));
-		ASSERT_EQ(IRCCD_VERSION_MINOR, duk_get_int(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "patch"));
-		ASSERT_EQ(IRCCD_VERSION_PATCH, duk_get_int(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "major"));
+        ASSERT_EQ(IRCCD_VERSION_MAJOR, duk_get_int(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "minor"));
+        ASSERT_EQ(IRCCD_VERSION_MINOR, duk_get_int(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "patch"));
+        ASSERT_EQ(IRCCD_VERSION_PATCH, duk_get_int(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsIrccd, fromJavascript)
 {
-	try {
-		auto ret = duk_peval_string(m_plugin->context(),
-			"try {"
-			"  throw new Irccd.SystemError(1, 'test');"
-			"} catch (e) {"
-			"  errno = e.errno;"
-			"  name = e.name;"
-			"  message = e.message;"
-			"  v1 = (e instanceof Error);"
-			"  v2 = (e instanceof Irccd.SystemError);"
-			"}"
-		);
+    try {
+        auto ret = duk_peval_string(m_plugin->context(),
+            "try {"
+            "  throw new Irccd.SystemError(1, 'test');"
+            "} catch (e) {"
+            "  errno = e.errno;"
+            "  name = e.name;"
+            "  message = e.message;"
+            "  v1 = (e instanceof Error);"
+            "  v2 = (e instanceof Irccd.SystemError);"
+            "}"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "errno"));
-		ASSERT_EQ(1, duk_get_int(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "name"));
-		ASSERT_STREQ("SystemError", duk_get_string(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "message"));
-		ASSERT_STREQ("test", duk_get_string(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v1"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v2"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "errno"));
+        ASSERT_EQ(1, duk_get_int(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "name"));
+        ASSERT_STREQ("SystemError", duk_get_string(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "message"));
+        ASSERT_STREQ("test", duk_get_string(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v1"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v2"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsIrccd, fromNative)
 {
-	try {
-		duk_push_c_function(m_plugin->context(), [] (duk_context *ctx) -> duk_ret_t {
-			dukx_throw(ctx, SystemError(EINVAL, "hey"));
+    try {
+        duk_push_c_function(m_plugin->context(), [] (duk_context *ctx) -> duk_ret_t {
+            dukx_throw(ctx, SystemError(EINVAL, "hey"));
 
-			return 0;
-		}, 0);
+            return 0;
+        }, 0);
 
-		duk_put_global_string(m_plugin->context(), "f");
+        duk_put_global_string(m_plugin->context(), "f");
 
-		auto ret = duk_peval_string(m_plugin->context(),
-			"try {"
-			"  f();"
-			"} catch (e) {"
-			"  errno = e.errno;"
-			"  name = e.name;"
-			"  message = e.message;"
-			"  v1 = (e instanceof Error);"
-			"  v2 = (e instanceof Irccd.SystemError);"
-			"}"
-		);
+        auto ret = duk_peval_string(m_plugin->context(),
+            "try {"
+            "  f();"
+            "} catch (e) {"
+            "  errno = e.errno;"
+            "  name = e.name;"
+            "  message = e.message;"
+            "  v1 = (e instanceof Error);"
+            "  v2 = (e instanceof Irccd.SystemError);"
+            "}"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "errno"));
-		ASSERT_EQ(EINVAL, duk_get_int(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "name"));
-		ASSERT_STREQ("SystemError", duk_get_string(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "message"));
-		ASSERT_STREQ("hey", duk_get_string(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v1"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v2"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "errno"));
+        ASSERT_EQ(EINVAL, duk_get_int(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "name"));
+        ASSERT_STREQ("SystemError", duk_get_string(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "message"));
+        ASSERT_STREQ("hey", duk_get_string(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v1"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "v2"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-logger/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-logger/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME js-logger
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-logger
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/js-logger/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-logger/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -38,82 +38,82 @@
 
 class LoggerIfaceTest : public log::Interface {
 public:
-	void info(const std::string &line) override
-	{
-		lineInfo = line;
-	}
+    void info(const std::string &line) override
+    {
+        lineInfo = line;
+    }
 
-	void warning(const std::string &line) override
-	{
-		lineWarning = line;
-	}
+    void warning(const std::string &line) override
+    {
+        lineWarning = line;
+    }
 
-	void debug(const std::string &line) override
-	{
-		lineDebug = line;
-	}
+    void debug(const std::string &line) override
+    {
+        lineDebug = line;
+    }
 };
 
 class TestJsLogger : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsLogger()
-		: m_plugin(std::make_shared<JsPlugin>("test", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.Plugin")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.Logger")->load(m_irccd, m_plugin);
-	}
+    TestJsLogger()
+        : m_plugin(std::make_shared<JsPlugin>("test", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.Plugin")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.Logger")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsLogger, info)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "Irccd.Logger.info(\"hello!\");") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "Irccd.Logger.info(\"hello!\");") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_EQ("plugin test: hello!", lineInfo);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_EQ("plugin test: hello!", lineInfo);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsLogger, warning)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "Irccd.Logger.warning(\"FAIL!\");") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "Irccd.Logger.warning(\"FAIL!\");") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_EQ("plugin test: FAIL!", lineWarning);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_EQ("plugin test: FAIL!", lineWarning);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 #if !defined(NDEBUG)
 
 TEST_F(TestJsLogger, debug)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "Irccd.Logger.debug(\"starting\");") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "Irccd.Logger.debug(\"starting\");") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_EQ("plugin test: starting", lineDebug);
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_EQ("plugin test: starting", lineDebug);
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 #endif
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	log::setVerbose(true);
-	log::setInterface(std::make_unique<LoggerIfaceTest>());
+    log::setVerbose(true);
+    log::setInterface(std::make_unique<LoggerIfaceTest>());
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-system/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-system/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,9 +17,9 @@
 #
 
 irccd_define_test(
-	NAME js-system
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS IRCCD_EXECUTABLE=\"$<TARGET_FILE:irccd>\"
+    NAME js-system
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS IRCCD_EXECUTABLE=\"$<TARGET_FILE:irccd>\"
 )
 
--- a/tests/js-system/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-system/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,55 +30,55 @@
 
 class TestJsSystem : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsSystem()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.File")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.System")->load(m_irccd, m_plugin);
-	}
+    TestJsSystem()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.File")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.System")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsSystem, home)
 {
-	try {
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.System.home();");
+    try {
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.System.home();");
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_EQ(sys::home(), duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_EQ(sys::home(), duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 #if defined(HAVE_POPEN)
 
 TEST_F(TestJsSystem, popen)
 {
-	try {
-		auto ret = duk_peval_string(m_plugin->context(),
-			"f = Irccd.System.popen(\"" IRCCD_EXECUTABLE " --version\", \"r\");"
-			"r = f.readline();"
-		);
+    try {
+        auto ret = duk_peval_string(m_plugin->context(),
+            "f = Irccd.System.popen(\"" IRCCD_EXECUTABLE " --version\", \"r\");"
+            "r = f.readline();"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "r"));
-		ASSERT_STREQ(IRCCD_VERSION, duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "r"));
+        ASSERT_STREQ(IRCCD_VERSION, duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 #endif
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-timer/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-timer/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,11 +17,11 @@
 #
 
 irccd_define_test(
-	NAME js-timer
-	SOURCES main.cpp
-	RESOURCES
-		${CMAKE_CURRENT_SOURCE_DIR}/timer-single.js
-		${CMAKE_CURRENT_SOURCE_DIR}/timer-repeat.js
-		${CMAKE_CURRENT_SOURCE_DIR}/timer-pending.js
-	LIBRARIES libirccd
+    NAME js-timer
+    SOURCES main.cpp
+    RESOURCES
+        ${CMAKE_CURRENT_SOURCE_DIR}/timer-single.js
+        ${CMAKE_CURRENT_SOURCE_DIR}/timer-repeat.js
+        ${CMAKE_CURRENT_SOURCE_DIR}/timer-pending.js
+    LIBRARIES libirccd
 )
--- a/tests/js-timer/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-timer/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -29,40 +29,40 @@
 
 TEST(Basic, single)
 {
-	Irccd irccd;
-	ElapsedTimer timer;
+    Irccd irccd;
+    ElapsedTimer timer;
 
-	auto plugin = std::make_shared<JsPlugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-single.js");
+    auto plugin = std::make_shared<JsPlugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-single.js");
 
-	plugin->onLoad(irccd);
-	irccd.pluginService().add(plugin);
+    plugin->onLoad(irccd);
+    irccd.pluginService().add(plugin);
 
-	while (timer.elapsed() < 3000) {
-		irccd.poll();
-		irccd.dispatch();
-	}
+    while (timer.elapsed() < 3000) {
+        irccd.poll();
+        irccd.dispatch();
+    }
 
-	ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
-	ASSERT_EQ(1, duk_get_int(plugin->context(), -1));
+    ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
+    ASSERT_EQ(1, duk_get_int(plugin->context(), -1));
 }
 
 TEST(Basic, repeat)
 {
-	Irccd irccd;
-	ElapsedTimer timer;
+    Irccd irccd;
+    ElapsedTimer timer;
 
-	auto plugin = std::make_shared<JsPlugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-repeat.js");
+    auto plugin = std::make_shared<JsPlugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-repeat.js");
 
-	plugin->onLoad(irccd);
-	irccd.pluginService().add(plugin);
+    plugin->onLoad(irccd);
+    irccd.pluginService().add(plugin);
 
-	while (timer.elapsed() < 3000) {
-		irccd.poll();
-		irccd.dispatch();
-	}
+    while (timer.elapsed() < 3000) {
+        irccd.poll();
+        irccd.dispatch();
+    }
 
-	ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
-	ASSERT_GE(duk_get_int(plugin->context(), -1), 5);
+    ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
+    ASSERT_GE(duk_get_int(plugin->context(), -1), 5);
 }
 
 #if 0
@@ -73,31 +73,31 @@
 
 TEST(Basic, pending)
 {
-	/*
-	 * This test ensure that if pending actions on a stopped timer are never executed.
-	 */
-	Irccd irccd;
-	ElapsedTimer timer;
+    /*
+     * This test ensure that if pending actions on a stopped timer are never executed.
+     */
+    Irccd irccd;
+    ElapsedTimer timer;
 
-	auto plugin = std::make_shared<Plugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-pending.js");
+    auto plugin = std::make_shared<Plugin>("timer", IRCCD_TESTS_DIRECTORY "/timer-pending.js");
 
-	irccd.addPlugin(plugin);
-	irccd.poll();
-	irccd.dispatch();
+    irccd.addPlugin(plugin);
+    irccd.poll();
+    irccd.dispatch();
 
-	ASSERT_EQ(0, plugin->context().getGlobal<int>("count"));
+    ASSERT_EQ(0, plugin->context().getGlobal<int>("count"));
 }
 
 #endif
 
 int main(int argc, char **argv)
 {
-	// Needed for some components.
-	sys::setProgramName("irccd");
-	path::setApplicationPath(argv[0]);
-	log::setInterface(std::make_unique<log::Silent>());
-	log::setVerbose(true);
-	testing::InitGoogleTest(&argc, argv);
+    // Needed for some components.
+    sys::setProgramName("irccd");
+    path::setApplicationPath(argv[0]);
+    log::setInterface(std::make_unique<log::Silent>());
+    log::setVerbose(true);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-timer/timer-pending.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-timer/timer-pending.js	Tue Jun 21 20:52:17 2016 +0200
@@ -2,13 +2,13 @@
 
 function onLoad()
 {
-	t = new Irccd.Timer(Irccd.Timer.Repeat, 500, function () {
-		count += 1;
-	});
+    t = new Irccd.Timer(Irccd.Timer.Repeat, 500, function () {
+        count += 1;
+    });
 
-	t.start();
+    t.start();
 
-	/* Force the plugin to wait so that timer push some events in the irccd's queue */
-	Irccd.System.sleep(3);
-	t.stop();
+    /* Force the plugin to wait so that timer push some events in the irccd's queue */
+    Irccd.System.sleep(3);
+    t.stop();
 }
--- a/tests/js-timer/timer-repeat.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-timer/timer-repeat.js	Tue Jun 21 20:52:17 2016 +0200
@@ -2,9 +2,9 @@
 
 function onLoad()
 {
-	t = new Irccd.Timer(Irccd.Timer.Repeat, 500, function () {
-		count += 1;
-	});
+    t = new Irccd.Timer(Irccd.Timer.Repeat, 500, function () {
+        count += 1;
+    });
 
-	t.start();
+    t.start();
 }
--- a/tests/js-timer/timer-single.js	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-timer/timer-single.js	Tue Jun 21 20:52:17 2016 +0200
@@ -2,9 +2,9 @@
 
 function onLoad()
 {
-	t = new Irccd.Timer(Irccd.Timer.Single, 500, function () {
-		count += 1;
-	});
+    t = new Irccd.Timer(Irccd.Timer.Single, 500, function () {
+        count += 1;
+    });
 
-	t.start();
+    t.start();
 }
--- a/tests/js-unicode/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-unicode/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME js-unicode
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-unicode
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/js-unicode/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-unicode/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -33,65 +33,65 @@
 
 class TestJsUnicode : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsUnicode()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.Unicode")->load(m_irccd, m_plugin);
-	}
+    TestJsUnicode()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.Unicode")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsUnicode, isLetter)
 {
-	try {
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLetter(String('é').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    try {
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLetter(String('é').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
 
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLetter(String('€').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLetter(String('€').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsUnicode, isLower)
 {
-	try {
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLower(String('é').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    try {
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLower(String('é').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
 
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLower(String('É').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isLower(String('É').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsUnicode, isUpper)
 {
-	try {
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isUpper(String('É').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
+    try {
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isUpper(String('É').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_TRUE(duk_get_boolean(m_plugin->context(), -1));
 
-		duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isUpper(String('é').charCodeAt(0));");
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        duk_peval_string_noresult(m_plugin->context(), "result = Irccd.Unicode.isUpper(String('é').charCodeAt(0));");
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_FALSE(duk_get_boolean(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/js-util/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-util/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME js-util
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME js-util
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/js-util/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/js-util/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -29,63 +29,63 @@
 
 class TestJsUtil : public testing::Test {
 protected:
-	Irccd m_irccd;
-	std::shared_ptr<JsPlugin> m_plugin;
+    Irccd m_irccd;
+    std::shared_ptr<JsPlugin> m_plugin;
 
-	TestJsUtil()
-		: m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
-	{
-		m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
-		m_irccd.moduleService().get("Irccd.Util")->load(m_irccd, m_plugin);
-	}
+    TestJsUtil()
+        : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js"))
+    {
+        m_irccd.moduleService().get("Irccd")->load(m_irccd, m_plugin);
+        m_irccd.moduleService().get("Irccd.Util")->load(m_irccd, m_plugin);
+    }
 };
 
 TEST_F(TestJsUtil, formatSimple)
 {
-	try {
-		auto ret = duk_peval_string(m_plugin->context(),
-			"result = Irccd.Util.format(\"#{target}\", { target: \"markand\" })"
-		);
+    try {
+        auto ret = duk_peval_string(m_plugin->context(),
+            "result = Irccd.Util.format(\"#{target}\", { target: \"markand\" })"
+        );
 
-		if (ret != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+        if (ret != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("markand", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("markand", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsUtil, splituser)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "result = Irccd.Util.splituser(\"user!~user@hyper/super/host\");") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "result = Irccd.Util.splituser(\"user!~user@hyper/super/host\");") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("user", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("user", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 TEST_F(TestJsUtil, splithost)
 {
-	try {
-		if (duk_peval_string(m_plugin->context(), "result = Irccd.Util.splithost(\"user!~user@hyper/super/host\");") != 0)
-			throw dukx_exception(m_plugin->context(), -1);
+    try {
+        if (duk_peval_string(m_plugin->context(), "result = Irccd.Util.splithost(\"user!~user@hyper/super/host\");") != 0)
+            throw dukx_exception(m_plugin->context(), -1);
 
-		ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
-		ASSERT_STREQ("!~user@hyper/super/host", duk_get_string(m_plugin->context(), -1));
-	} catch (const std::exception &ex) {
-		FAIL() << ex.what();
-	}
+        ASSERT_TRUE(duk_get_global_string(m_plugin->context(), "result"));
+        ASSERT_STREQ("!~user@hyper/super/host", duk_get_string(m_plugin->context(), -1));
+    } catch (const std::exception &ex) {
+        FAIL() << ex.what();
+    }
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/logger/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/logger/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME logger
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME logger
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/logger/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/logger/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -34,72 +34,72 @@
 
 class MyInterface : public log::Interface {
 public:
-	void debug(const std::string &line) override
-	{
-		lineDebug = line;
-	}
+    void debug(const std::string &line) override
+    {
+        lineDebug = line;
+    }
 
-	void info(const std::string &line) override
-	{
-		lineInfo = line;
-	}
+    void info(const std::string &line) override
+    {
+        lineInfo = line;
+    }
 
-	void warning(const std::string &line) override
-	{
-		lineWarning = line;
-	}
+    void warning(const std::string &line) override
+    {
+        lineWarning = line;
+    }
 };
 
 class MyFilter : public log::Filter {
 public:
-	std::string preDebug(std::string input) const override
-	{
-		return std::reverse(input.begin(), input.end()), input;
-	}
+    std::string preDebug(std::string input) const override
+    {
+        return std::reverse(input.begin(), input.end()), input;
+    }
 
-	std::string preInfo(std::string input) const override
-	{
-		return std::reverse(input.begin(), input.end()), input;
-	}
+    std::string preInfo(std::string input) const override
+    {
+        return std::reverse(input.begin(), input.end()), input;
+    }
 
-	std::string preWarning(std::string input) const override
-	{
-		return std::reverse(input.begin(), input.end()), input;
-	}
+    std::string preWarning(std::string input) const override
+    {
+        return std::reverse(input.begin(), input.end()), input;
+    }
 };
 
 #if !defined(NDEBUG)
 
 TEST(Logger, debug)
 {
-	log::debug("debug");
+    log::debug("debug");
 
-	ASSERT_EQ("gubed", lineDebug);
+    ASSERT_EQ("gubed", lineDebug);
 }
 
 #endif
 
 TEST(Logger, info)
 {
-	log::info("info");
+    log::info("info");
 
-	ASSERT_EQ("ofni", lineInfo);
+    ASSERT_EQ("ofni", lineInfo);
 }
 
 TEST(Logger, warning)
 {
-	log::warning("warning");
+    log::warning("warning");
 
-	ASSERT_EQ("gninraw", lineWarning);
+    ASSERT_EQ("gninraw", lineWarning);
 }
 
 int main(int argc, char **argv)
 {
-	log::setVerbose(true);
-	log::setInterface(std::make_unique<MyInterface>());
-	log::setFilter(std::make_unique<MyFilter>());
+    log::setVerbose(true);
+    log::setInterface(std::make_unique<MyInterface>());
+    log::setFilter(std::make_unique<MyFilter>());
 
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/path/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/path/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME path
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME path
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/path/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/path/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -33,42 +33,42 @@
 
 TEST(Back, nochange)
 {
-	std::string path = "\\usr\\local\\etc\\";
-	std::string result = path::clean(path);
+    std::string path = "\\usr\\local\\etc\\";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ(path, result);
+    ASSERT_EQ(path, result);
 }
 
 TEST(Back, duplicateBegin)
 {
-	std::string path = "\\\\usr\\local\\etc\\";
-	std::string result = path::clean(path);
+    std::string path = "\\\\usr\\local\\etc\\";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("\\usr\\local\\etc\\", result);
+    ASSERT_EQ("\\usr\\local\\etc\\", result);
 }
 
 TEST(Back, duplicateEnd)
 {
-	std::string path = "\\usr\\local\\etc\\\\";
-	std::string result = path::clean(path);
+    std::string path = "\\usr\\local\\etc\\\\";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("\\usr\\local\\etc\\", result);
+    ASSERT_EQ("\\usr\\local\\etc\\", result);
 }
 
 TEST(Back, duplicateEverywhere)
 {
-	std::string path = "\\\\usr\\\\local\\\\etc\\\\";
-	std::string result = path::clean(path);
+    std::string path = "\\\\usr\\\\local\\\\etc\\\\";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("\\usr\\local\\etc\\", result);
+    ASSERT_EQ("\\usr\\local\\etc\\", result);
 }
 
 TEST(Back, missingTrailing)
 {
-	std::string path = "\\usr\\local\\etc";
-	std::string result = path::clean(path);
+    std::string path = "\\usr\\local\\etc";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("\\usr\\local\\etc\\", result);
+    ASSERT_EQ("\\usr\\local\\etc\\", result);
 }
 
 #else
@@ -79,42 +79,42 @@
 
 TEST(Forward, nochange)
 {
-	std::string path = "/usr/local/etc/";
-	std::string result = path::clean(path);
+    std::string path = "/usr/local/etc/";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ(path, result);
+    ASSERT_EQ(path, result);
 }
 
 TEST(Forward, duplicateBegin)
 {
-	std::string path = "//usr/local/etc/";
-	std::string result = path::clean(path);
+    std::string path = "//usr/local/etc/";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("/usr/local/etc/", result);
+    ASSERT_EQ("/usr/local/etc/", result);
 }
 
 TEST(Forward, duplicateEnd)
 {
-	std::string path = "/usr/local/etc//";
-	std::string result = path::clean(path);
+    std::string path = "/usr/local/etc//";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("/usr/local/etc/", result);
+    ASSERT_EQ("/usr/local/etc/", result);
 }
 
 TEST(Forward, duplicateEverywhere)
 {
-	std::string path = "//usr//local//etc//";
-	std::string result = path::clean(path);
+    std::string path = "//usr//local//etc//";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("/usr/local/etc/", result);
+    ASSERT_EQ("/usr/local/etc/", result);
 }
 
 TEST(Forward, missingTrailing)
 {
-	std::string path = "/usr/local/etc";
-	std::string result = path::clean(path);
+    std::string path = "/usr/local/etc";
+    std::string result = path::clean(path);
 
-	ASSERT_EQ("/usr/local/etc/", result);
+    ASSERT_EQ("/usr/local/etc/", result);
 }
 
 #endif
@@ -125,23 +125,23 @@
 
 int main(int argc, char **argv)
 {
-	/*
-	 * Just show everything for test purpose.
-	 */
-	path::setApplicationPath(argv[0]);
-	log::setInterface(std::make_unique<log::Console>());
-	log::debug() << "System paths:" << std::endl;
-	log::debug() << "  config(system):  " << path::get(path::PathConfig, path::OwnerSystem) << std::endl;
-	log::debug() << "  data(system):    " << path::get(path::PathData, path::OwnerSystem) << std::endl;
-	log::debug() << "  plugins(system): " << path::get(path::PathPlugins, path::OwnerSystem) << std::endl;
-	log::debug() << "  cache(system):   " << path::get(path::PathCache, path::OwnerSystem) << std::endl;
-	log::debug() << "User paths:" << std::endl;
-	log::debug() << "  config(user):    " << path::get(path::PathConfig, path::OwnerUser) << std::endl;
-	log::debug() << "  data(user):      " << path::get(path::PathData, path::OwnerUser) << std::endl;
-	log::debug() << "  plugins(user):   " << path::get(path::PathPlugins, path::OwnerUser) << std::endl;
-	log::debug() << "  cache(user):     " << path::get(path::PathCache, path::OwnerUser) << std::endl;
+    /*
+     * Just show everything for test purpose.
+     */
+    path::setApplicationPath(argv[0]);
+    log::setInterface(std::make_unique<log::Console>());
+    log::debug() << "System paths:" << std::endl;
+    log::debug() << "  config(system):  " << path::get(path::PathConfig, path::OwnerSystem) << std::endl;
+    log::debug() << "  data(system):    " << path::get(path::PathData, path::OwnerSystem) << std::endl;
+    log::debug() << "  plugins(system): " << path::get(path::PathPlugins, path::OwnerSystem) << std::endl;
+    log::debug() << "  cache(system):   " << path::get(path::PathCache, path::OwnerSystem) << std::endl;
+    log::debug() << "User paths:" << std::endl;
+    log::debug() << "  config(user):    " << path::get(path::PathConfig, path::OwnerUser) << std::endl;
+    log::debug() << "  data(user):      " << path::get(path::PathData, path::OwnerUser) << std::endl;
+    log::debug() << "  plugins(user):   " << path::get(path::PathPlugins, path::OwnerUser) << std::endl;
+    log::debug() << "  cache(user):     " << path::get(path::PathCache, path::OwnerUser) << std::endl;
 
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-ask/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-ask/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-ask
-	SOURCES main.cpp answers.conf
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-ask
+    SOURCES main.cpp answers.conf
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-ask/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-ask/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,67 +26,67 @@
 
 class ServerTest : public Server {
 private:
-	std::string m_last;
+    std::string m_last;
 
 public:
-	inline ServerTest()
-		: Server("test", ServerInfo())
-	{
-	}
+    inline ServerTest()
+        : Server("test", ServerInfo())
+    {
+    }
 
-	inline const std::string &last() const noexcept
-	{
-		return m_last;
-	}
+    inline const std::string &last() const noexcept
+    {
+        return m_last;
+    }
 
-	void message(std::string target, std::string message) override
-	{
-		m_last = util::join({target, message});
-	}
+    void message(std::string target, std::string message) override
+    {
+        m_last = util::join({target, message});
+    }
 };
 
 class AskTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_server;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_server;
+    std::shared_ptr<Plugin> m_plugin;
 
 public:
-	AskTest()
-		: m_ps(m_irccd.pluginService())
-		, m_server(std::make_shared<ServerTest>())
-	{
-		m_ps.setConfig("ask", {{"file", SOURCEDIR "/answers.conf"}});
-		m_ps.load("ask", PLUGINDIR "/ask.js");
-		m_plugin = m_ps.require("ask");
-	}
+    AskTest()
+        : m_ps(m_irccd.pluginService())
+        , m_server(std::make_shared<ServerTest>())
+    {
+        m_ps.setConfig("ask", {{"file", SOURCEDIR "/answers.conf"}});
+        m_ps.load("ask", PLUGINDIR "/ask.js");
+        m_plugin = m_ps.require("ask");
+    }
 };
 
 TEST_F(AskTest, basic)
 {
-	bool no = false;
-	bool yes = false;
+    bool no = false;
+    bool yes = false;
 
-	// Invoke the plugin 1000 times, it will be very unlucky to not have both answers in that amount of tries.
-	for (int i = 0; i < 1000; ++i) {
-		m_plugin->onCommand(m_irccd, m_server, "tester", "#dummy", "");
+    // Invoke the plugin 1000 times, it will be very unlucky to not have both answers in that amount of tries.
+    for (int i = 0; i < 1000; ++i) {
+        m_plugin->onCommand(m_irccd, m_server, "tester", "#dummy", "");
 
-		if (m_server->last() == "#dummy:tester, YES")
-			yes = true;
-		if (m_server->last() == "#dummy:tester, NO")
-			no = true;
-	}
+        if (m_server->last() == "#dummy:tester, YES")
+            yes = true;
+        if (m_server->last() == "#dummy:tester, NO")
+            no = true;
+    }
 
-	ASSERT_TRUE(no);
-	ASSERT_TRUE(yes);
+    ASSERT_TRUE(no);
+    ASSERT_TRUE(yes);
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-auth/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-auth/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-auth
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-auth
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-auth/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-auth/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,82 +26,82 @@
 
 class ServerTest : public Server {
 private:
-	std::string m_last;
+    std::string m_last;
 
 public:
-	inline ServerTest(std::string name)
-		: Server(std::move(name), ServerInfo())
-	{
-	}
+    inline ServerTest(std::string name)
+        : Server(std::move(name), ServerInfo())
+    {
+    }
 
-	inline const std::string &last() const noexcept
-	{
-		return m_last;
-	}
+    inline const std::string &last() const noexcept
+    {
+        return m_last;
+    }
 
-	void message(std::string target, std::string message) override
-	{
-		m_last = util::join({target, message});
-	}
+    void message(std::string target, std::string message) override
+    {
+        m_last = util::join({target, message});
+    }
 };
 
 class AuthTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_nickserv1;
-	std::shared_ptr<ServerTest> m_nickserv2;
-	std::shared_ptr<ServerTest> m_quakenet;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_nickserv1;
+    std::shared_ptr<ServerTest> m_nickserv2;
+    std::shared_ptr<ServerTest> m_quakenet;
+    std::shared_ptr<Plugin> m_plugin;
 
 public:
-	AuthTest()
-		: m_ps(m_irccd.pluginService())
-		, m_nickserv1(std::make_shared<ServerTest>("nickserv1"))
-		, m_nickserv2(std::make_shared<ServerTest>("nickserv2"))
-		, m_quakenet(std::make_shared<ServerTest>("quakenet"))
-	{
-		m_ps.setConfig("auth", {
-			{ "nickserv1.type", "nickserv" },
-			{ "nickserv1.password", "plopation" },
-			{ "nickserv2.type", "nickserv" },
-			{ "nickserv2.password", "something" },
-			{ "nickserv2.username", "jean" },
-			{ "quakenet.type", "quakenet" },
-			{ "quakenet.password", "hello" },
-			{ "quakenet.username", "mario" }
-		});
-		m_ps.load("auth", PLUGINDIR "/auth.js");
-		m_plugin = m_ps.require("auth");
-	}
+    AuthTest()
+        : m_ps(m_irccd.pluginService())
+        , m_nickserv1(std::make_shared<ServerTest>("nickserv1"))
+        , m_nickserv2(std::make_shared<ServerTest>("nickserv2"))
+        , m_quakenet(std::make_shared<ServerTest>("quakenet"))
+    {
+        m_ps.setConfig("auth", {
+            { "nickserv1.type", "nickserv" },
+            { "nickserv1.password", "plopation" },
+            { "nickserv2.type", "nickserv" },
+            { "nickserv2.password", "something" },
+            { "nickserv2.username", "jean" },
+            { "quakenet.type", "quakenet" },
+            { "quakenet.password", "hello" },
+            { "quakenet.username", "mario" }
+        });
+        m_ps.load("auth", PLUGINDIR "/auth.js");
+        m_plugin = m_ps.require("auth");
+    }
 };
 
 TEST_F(AuthTest, nickserv1)
 {
-	m_plugin->onConnect(m_irccd, m_nickserv1);
+    m_plugin->onConnect(m_irccd, m_nickserv1);
 
-	ASSERT_EQ("NickServ:identify plopation", m_nickserv1->last());
+    ASSERT_EQ("NickServ:identify plopation", m_nickserv1->last());
 }
 
 TEST_F(AuthTest, nickserv2)
 {
-	m_plugin->onConnect(m_irccd, m_nickserv2);
+    m_plugin->onConnect(m_irccd, m_nickserv2);
 
-	ASSERT_EQ("NickServ:identify jean something", m_nickserv2->last());
+    ASSERT_EQ("NickServ:identify jean something", m_nickserv2->last());
 }
 
 TEST_F(AuthTest, quakenet)
 {
-	m_plugin->onConnect(m_irccd, m_quakenet);
+    m_plugin->onConnect(m_irccd, m_quakenet);
 
-	ASSERT_EQ("Q@CServe.quakenet.org:AUTH mario hello", m_quakenet->last());
+    ASSERT_EQ("Q@CServe.quakenet.org:AUTH mario hello", m_quakenet->last());
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-hangman/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-hangman/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-hangman
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-hangman
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-hangman/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-hangman/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -26,183 +26,183 @@
 
 class ServerTest : public Server {
 private:
-	std::string m_last;
+    std::string m_last;
 
 public:
-	inline ServerTest()
-		: Server("test", ServerInfo())
-	{
-	}
+    inline ServerTest()
+        : Server("test", ServerInfo())
+    {
+    }
 
-	inline const std::string &last() const noexcept
-	{
-		return m_last;
-	}
+    inline const std::string &last() const noexcept
+    {
+        return m_last;
+    }
 
-	void message(std::string target, std::string message) override
-	{
-		m_last = util::join({target, message});
-	}
+    void message(std::string target, std::string message) override
+    {
+        m_last = util::join({target, message});
+    }
 };
 
 class HangmanTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_server;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_server;
+    std::shared_ptr<Plugin> m_plugin;
 
 public:
-	HangmanTest()
-		: m_ps(m_irccd.pluginService())
-		, m_server(std::make_shared<ServerTest>())
-	{
-		m_ps.setFormats("hangman", {
-			{ "asked", "asked=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
-			{ "dead", "dead=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
-			{ "found", "found=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
-			{ "start", "start=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
-			{ "win", "win=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
-			{ "wrong-letter", "wrong-letter=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
-			{ "wrong-player", "wrong-player=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
-			{ "wrong-word", "wrong-word=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" }
-		});
-	}
+    HangmanTest()
+        : m_ps(m_irccd.pluginService())
+        , m_server(std::make_shared<ServerTest>())
+    {
+        m_ps.setFormats("hangman", {
+            { "asked", "asked=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
+            { "dead", "dead=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
+            { "found", "found=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
+            { "start", "start=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
+            { "win", "win=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" },
+            { "wrong-letter", "wrong-letter=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
+            { "wrong-player", "wrong-player=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{letter}" },
+            { "wrong-word", "wrong-word=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{word}" }
+        });
+    }
 
-	void load(PluginConfig config = PluginConfig())
-	{
-		// Add file if not there.
-		if (config.count("file") == 0)
-			config.emplace("file", SOURCEDIR "/words.conf");
+    void load(PluginConfig config = PluginConfig())
+    {
+        // Add file if not there.
+        if (config.count("file") == 0)
+            config.emplace("file", SOURCEDIR "/words.conf");
 
-		m_ps.setConfig("hangman", config);
-		m_ps.load("hangman", PLUGINDIR "/hangman.js");
-		m_plugin = m_ps.require("hangman");
-	}
+        m_ps.setConfig("hangman", config);
+        m_ps.load("hangman", PLUGINDIR "/hangman.js");
+        m_plugin = m_ps.require("hangman");
+    }
 };
 
 TEST_F(HangmanTest, asked)
 {
-	load({{ "collaborative", "false" }});
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
 
-	ASSERT_EQ("#hangman:asked=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s", m_server->last());
+    ASSERT_EQ("#hangman:asked=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s", m_server->last());
 }
 
 TEST_F(HangmanTest, dead)
 {
-	load({{ "collaborative", "false" }});
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "a");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "b");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "c");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "d");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "e");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "f");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "g");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "h");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "i");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "j");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "a");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "b");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "c");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "d");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "e");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "f");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "g");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "h");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "i");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "j");
 
-	ASSERT_EQ("#hangman:dead=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
+    ASSERT_EQ("#hangman:dead=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
 }
 
 TEST_F(HangmanTest, found)
 {
-	load({{ "collaborative", "false" }});
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
 
-	ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
+    ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
 }
 
 TEST_F(HangmanTest, start)
 {
-	load();
+    load();
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
 
-	ASSERT_EQ("#hangman:start=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:_ _ _", m_server->last());
+    ASSERT_EQ("#hangman:start=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:_ _ _", m_server->last());
 }
 
 TEST_F(HangmanTest, win1)
 {
-	load({{ "collaborative", "false" }});
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "y");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "y");
 
-	ASSERT_EQ("#hangman:win=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
+    ASSERT_EQ("#hangman:win=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
 }
 
 TEST_F(HangmanTest, win2)
 {
-	load({{ "collaborative", "false" }});
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "sky");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "sky");
 
-	ASSERT_EQ("#hangman:win=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
+    ASSERT_EQ("#hangman:win=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:sky", m_server->last());
 }
 
 TEST_F(HangmanTest, wrongLetter)
 {
-	load();
+    load();
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "x");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "x");
 
-	ASSERT_EQ("#hangman:wrong-letter=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:x", m_server->last());
+    ASSERT_EQ("#hangman:wrong-letter=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:x", m_server->last());
 }
 
 TEST_F(HangmanTest, wrongWord)
 {
-	load();
+    load();
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "cheese");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "cheese");
 
-	ASSERT_EQ("#hangman:wrong-word=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:cheese", m_server->last());
+    ASSERT_EQ("#hangman:wrong-word=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:cheese", m_server->last());
 }
 
 TEST_F(HangmanTest, collaborativeDisabled)
 {
-	// Disable collaborative mode.
-	load({{ "collaborative", "false" }});
+    // Disable collaborative mode.
+    load({{ "collaborative", "false" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
-	ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
-	ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s k _", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
+    ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s k _", m_server->last());
 }
 
 TEST_F(HangmanTest, collaborativeEnabled)
 {
-	// Enable collaborative mode.
-	load({{ "collaborative", "true" }});
+    // Enable collaborative mode.
+    load({{ "collaborative", "true" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
-	ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
-	ASSERT_EQ("#hangman:wrong-player=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:k", m_server->last());
-	m_plugin->onMessage(m_irccd, m_server, "francis!francis@localhost", "#hangman", "k");
-	ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:francis!francis@localhost:francis:s k _", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#hangman", "");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "s");
+    ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:s _ _", m_server->last());
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#hangman", "k");
+    ASSERT_EQ("#hangman:wrong-player=hangman:!hangman:test:#hangman:jean!jean@localhost:jean:k", m_server->last());
+    m_plugin->onMessage(m_irccd, m_server, "francis!francis@localhost", "#hangman", "k");
+    ASSERT_EQ("#hangman:found=hangman:!hangman:test:#hangman:francis!francis@localhost:francis:s k _", m_server->last());
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-history/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-history/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-history
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-history
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-history/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-history/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -28,107 +28,107 @@
 
 class ServerTest : public Server {
 private:
-	std::string m_last;
+    std::string m_last;
 
 public:
-	inline ServerTest()
-		: Server("test", ServerInfo())
-	{
-	}
+    inline ServerTest()
+        : Server("test", ServerInfo())
+    {
+    }
 
-	inline const std::string &last() const noexcept
-	{
-		return m_last;
-	}
+    inline const std::string &last() const noexcept
+    {
+        return m_last;
+    }
 
-	void message(std::string target, std::string message) override
-	{
-		m_last = util::join({target, message});
-	}
+    void message(std::string target, std::string message) override
+    {
+        m_last = util::join({target, message});
+    }
 };
 
 class HistoryTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_server;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_server;
+    std::shared_ptr<Plugin> m_plugin;
 
 public:
-	HistoryTest()
-		: m_ps(m_irccd.pluginService())
-		, m_server(std::make_shared<ServerTest>())
-	{
-		m_ps.setFormats("history", {
-			{ "error", "error=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" },
-			{ "seen", "seen=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}:%H:%M" },
-			{ "said", "said=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}:#{message}:%H:%M" },
-			{ "unknown", "unknown=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}" },
-		});
-	}
+    HistoryTest()
+        : m_ps(m_irccd.pluginService())
+        , m_server(std::make_shared<ServerTest>())
+    {
+        m_ps.setFormats("history", {
+            { "error", "error=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" },
+            { "seen", "seen=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}:%H:%M" },
+            { "said", "said=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}:#{message}:%H:%M" },
+            { "unknown", "unknown=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{target}" },
+        });
+    }
 
-	void load(PluginConfig config = PluginConfig())
-	{
-		// Add file if not there.
-		if (config.count("file") == 0)
-			config.emplace("file", SOURCEDIR "/words.conf");
+    void load(PluginConfig config = PluginConfig())
+    {
+        // Add file if not there.
+        if (config.count("file") == 0)
+            config.emplace("file", SOURCEDIR "/words.conf");
 
-		m_ps.setConfig("history", config);
-		m_ps.load("history", PLUGINDIR "/history.js");
-		m_plugin = m_ps.require("history");
-	}
+        m_ps.setConfig("history", config);
+        m_ps.load("history", PLUGINDIR "/history.js");
+        m_plugin = m_ps.require("history");
+    }
 };
 
 TEST_F(HistoryTest, formatError)
 {
-	load({{ "file", SOURCEDIR "/broken-conf.json" }});
+    load({{ "file", SOURCEDIR "/broken-conf.json" }});
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#history", "seen francis");
-	ASSERT_EQ("#history:error=history:!history:test:#history:jean!jean@localhost:jean", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#history", "seen francis");
+    ASSERT_EQ("#history:error=history:!history:test:#history:jean!jean@localhost:jean", m_server->last());
 }
 
 TEST_F(HistoryTest, formatSeen)
 {
-	std::regex rule("#history:seen=history:!history:test:#history:destructor!dst@localhost:destructor:jean:\\d{2}:\\d{2}");
+    std::regex rule("#history:seen=history:!history:test:#history:destructor!dst@localhost:destructor:jean:\\d{2}:\\d{2}");
 
-	remove(BINARYDIR "/seen.json");
-	load({{ "file", BINARYDIR "/seen.json" }});
+    remove(BINARYDIR "/seen.json");
+    load({{ "file", BINARYDIR "/seen.json" }});
 
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
-	m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "seen jean");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
+    m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "seen jean");
 
-	ASSERT_TRUE(std::regex_match(m_server->last(), rule));
+    ASSERT_TRUE(std::regex_match(m_server->last(), rule));
 }
 
 TEST_F(HistoryTest, formatSaid)
 {
-	std::regex rule("#history:said=history:!history:test:#history:destructor!dst@localhost:destructor:jean:hello:\\d{2}:\\d{2}");
+    std::regex rule("#history:said=history:!history:test:#history:destructor!dst@localhost:destructor:jean:hello:\\d{2}:\\d{2}");
 
-	remove(BINARYDIR "/said.json");
-	load({{ "file", BINARYDIR "/said.json" }});
+    remove(BINARYDIR "/said.json");
+    load({{ "file", BINARYDIR "/said.json" }});
 
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
-	m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "said jean");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
+    m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "said jean");
 
-	ASSERT_TRUE(std::regex_match(m_server->last(), rule));
+    ASSERT_TRUE(std::regex_match(m_server->last(), rule));
 }
 
 TEST_F(HistoryTest, formatUnknown)
 {
-	remove(BINARYDIR "/unknown.json");
-	load({{ "file", BINARYDIR "/unknown.json" }});
+    remove(BINARYDIR "/unknown.json");
+    load({{ "file", BINARYDIR "/unknown.json" }});
 
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
-	m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "seen nobody");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#history", "hello");
+    m_plugin->onCommand(m_irccd, m_server, "destructor!dst@localhost", "#history", "seen nobody");
 
-	ASSERT_EQ("#history:unknown=history:!history:test:#history:destructor!dst@localhost:destructor:nobody", m_server->last());
+    ASSERT_EQ("#history:unknown=history:!history:test:#history:destructor!dst@localhost:destructor:nobody", m_server->last());
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-logger/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-logger/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-logger
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-logger
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-logger/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-logger/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,164 +30,164 @@
 
 class ServerTest : public Server {
 public:
-	inline ServerTest()
-		: Server("test", ServerInfo())
-	{
-	}
+    inline ServerTest()
+        : Server("test", ServerInfo())
+    {
+    }
 };
 
 class LoggerTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_server;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_server;
+    std::shared_ptr<Plugin> m_plugin;
 
-	std::string last() const
-	{
-		std::ifstream file(BINARYDIR "/log.txt");
+    std::string last() const
+    {
+        std::ifstream file(BINARYDIR "/log.txt");
 
-		return std::string(std::istreambuf_iterator<char>(file.rdbuf()), {});
-	}
+        return std::string(std::istreambuf_iterator<char>(file.rdbuf()), {});
+    }
 
 public:
-	LoggerTest()
-		: m_ps(m_irccd.pluginService())
-		, m_server(std::make_shared<ServerTest>())
-	{
-		remove(BINARYDIR "/log.txt");
+    LoggerTest()
+        : m_ps(m_irccd.pluginService())
+        , m_server(std::make_shared<ServerTest>())
+    {
+        remove(BINARYDIR "/log.txt");
 
-		m_ps.setFormats("logger", {
-			{ "cmode", "cmode=#{server}:#{channel}:#{origin}:#{nickname}:#{mode}:#{arg}" },
-			{ "cnotice", "cnotice=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
-			{ "join", "join=#{server}:#{channel}:#{origin}:#{nickname}" },
-			{ "kick", "kick=#{server}:#{channel}:#{origin}:#{nickname}:#{target}:#{reason}" },
-			{ "me", "me=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
-			{ "message", "message=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
-			{ "mode", "mode=#{server}:#{origin}:#{nickname}:#{mode}:#{arg}" },
-			{ "notice", "notice=#{server}:#{origin}:#{nickname}:#{message}" },
-			{ "part", "part=#{server}:#{channel}:#{origin}:#{nickname}:#{reason}" },
-			{ "query", "query=#{server}:#{origin}:#{nickname}:#{message}" },
-			{ "topic", "topic=#{server}:#{channel}:#{origin}:#{nickname}:#{topic}" },
-		});
-	}
+        m_ps.setFormats("logger", {
+            { "cmode", "cmode=#{server}:#{channel}:#{origin}:#{nickname}:#{mode}:#{arg}" },
+            { "cnotice", "cnotice=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
+            { "join", "join=#{server}:#{channel}:#{origin}:#{nickname}" },
+            { "kick", "kick=#{server}:#{channel}:#{origin}:#{nickname}:#{target}:#{reason}" },
+            { "me", "me=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
+            { "message", "message=#{server}:#{channel}:#{origin}:#{nickname}:#{message}" },
+            { "mode", "mode=#{server}:#{origin}:#{nickname}:#{mode}:#{arg}" },
+            { "notice", "notice=#{server}:#{origin}:#{nickname}:#{message}" },
+            { "part", "part=#{server}:#{channel}:#{origin}:#{nickname}:#{reason}" },
+            { "query", "query=#{server}:#{origin}:#{nickname}:#{message}" },
+            { "topic", "topic=#{server}:#{channel}:#{origin}:#{nickname}:#{topic}" },
+        });
+    }
 
-	void load(PluginConfig config = PluginConfig())
-	{
-		if (config.count("path") == 0)
-			config.emplace("path", BINARYDIR "/log.txt");
+    void load(PluginConfig config = PluginConfig())
+    {
+        if (config.count("path") == 0)
+            config.emplace("path", BINARYDIR "/log.txt");
 
-		m_ps.setConfig("logger", config);
-		m_ps.load("logger", PLUGINDIR "/logger.js");
-		m_plugin = m_ps.require("logger");
-	}
+        m_ps.setConfig("logger", config);
+        m_ps.load("logger", PLUGINDIR "/logger.js");
+        m_plugin = m_ps.require("logger");
+    }
 };
 
 TEST_F(LoggerTest, formatChannelMode)
 {
-	load();
+    load();
 
-	m_plugin->onChannelMode(m_irccd, m_server, "jean!jean@localhost", "#staff", "+o", "jean");
+    m_plugin->onChannelMode(m_irccd, m_server, "jean!jean@localhost", "#staff", "+o", "jean");
 
-	ASSERT_EQ("cmode=test:#staff:jean!jean@localhost:jean:+o:jean\n", last());
+    ASSERT_EQ("cmode=test:#staff:jean!jean@localhost:jean:+o:jean\n", last());
 }
 
 TEST_F(LoggerTest, formatChannelNotice)
 {
-	load();
+    load();
 
-	m_plugin->onChannelNotice(m_irccd, m_server, "jean!jean@localhost", "#staff", "bonjour!");
+    m_plugin->onChannelNotice(m_irccd, m_server, "jean!jean@localhost", "#staff", "bonjour!");
 
-	ASSERT_EQ("cnotice=test:#staff:jean!jean@localhost:jean:bonjour!\n", last());
+    ASSERT_EQ("cnotice=test:#staff:jean!jean@localhost:jean:bonjour!\n", last());
 }
 
 TEST_F(LoggerTest, formatJoin)
 {
-	load();
+    load();
 
-	m_plugin->onJoin(m_irccd, m_server, "jean!jean@localhost", "#staff");
+    m_plugin->onJoin(m_irccd, m_server, "jean!jean@localhost", "#staff");
 
-	ASSERT_EQ("join=test:#staff:jean!jean@localhost:jean\n", last());
+    ASSERT_EQ("join=test:#staff:jean!jean@localhost:jean\n", last());
 }
 
 TEST_F(LoggerTest, formatKick)
 {
-	load();
+    load();
 
-	m_plugin->onKick(m_irccd, m_server, "jean!jean@localhost", "#staff", "badboy", "please do not flood");
+    m_plugin->onKick(m_irccd, m_server, "jean!jean@localhost", "#staff", "badboy", "please do not flood");
 
-	ASSERT_EQ("kick=test:#staff:jean!jean@localhost:jean:badboy:please do not flood\n", last());
+    ASSERT_EQ("kick=test:#staff:jean!jean@localhost:jean:badboy:please do not flood\n", last());
 }
 
 TEST_F(LoggerTest, formatMe)
 {
-	load();
+    load();
 
-	m_plugin->onMe(m_irccd, m_server, "jean!jean@localhost", "#staff", "is drinking water");
+    m_plugin->onMe(m_irccd, m_server, "jean!jean@localhost", "#staff", "is drinking water");
 
-	ASSERT_EQ("me=test:#staff:jean!jean@localhost:jean:is drinking water\n", last());
+    ASSERT_EQ("me=test:#staff:jean!jean@localhost:jean:is drinking water\n", last());
 }
 
 TEST_F(LoggerTest, formatMessage)
 {
-	load();
+    load();
 
-	m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#staff", "hello guys");
+    m_plugin->onMessage(m_irccd, m_server, "jean!jean@localhost", "#staff", "hello guys");
 
-	ASSERT_EQ("message=test:#staff:jean!jean@localhost:jean:hello guys\n", last());
+    ASSERT_EQ("message=test:#staff:jean!jean@localhost:jean:hello guys\n", last());
 }
 
 TEST_F(LoggerTest, formatMode)
 {
-	load();
+    load();
 
-	m_plugin->onMode(m_irccd, m_server, "jean!jean@localhost", "+i");
+    m_plugin->onMode(m_irccd, m_server, "jean!jean@localhost", "+i");
 
-	ASSERT_EQ("mode=test:jean!jean@localhost:jean:+i:\n", last());
+    ASSERT_EQ("mode=test:jean!jean@localhost:jean:+i:\n", last());
 }
 
 TEST_F(LoggerTest, formatNotice)
 {
-	load();
+    load();
 
-	m_plugin->onNotice(m_irccd, m_server, "jean!jean@localhost", "tu veux voir mon chat ?");
+    m_plugin->onNotice(m_irccd, m_server, "jean!jean@localhost", "tu veux voir mon chat ?");
 
-	ASSERT_EQ("notice=test:jean!jean@localhost:jean:tu veux voir mon chat ?\n", last());
+    ASSERT_EQ("notice=test:jean!jean@localhost:jean:tu veux voir mon chat ?\n", last());
 }
 
 TEST_F(LoggerTest, formatPart)
 {
-	load();
+    load();
 
-	m_plugin->onPart(m_irccd, m_server, "jean!jean@localhost", "#staff", "too noisy here");
+    m_plugin->onPart(m_irccd, m_server, "jean!jean@localhost", "#staff", "too noisy here");
 
-	ASSERT_EQ("part=test:#staff:jean!jean@localhost:jean:too noisy here\n", last());
+    ASSERT_EQ("part=test:#staff:jean!jean@localhost:jean:too noisy here\n", last());
 }
 
 TEST_F(LoggerTest, formatQuery)
 {
-	load();
+    load();
 
-	m_plugin->onQuery(m_irccd, m_server, "jean!jean@localhost", "much irccd, wow");
+    m_plugin->onQuery(m_irccd, m_server, "jean!jean@localhost", "much irccd, wow");
 
-	ASSERT_EQ("query=test:jean!jean@localhost:jean:much irccd, wow\n", last());
+    ASSERT_EQ("query=test:jean!jean@localhost:jean:much irccd, wow\n", last());
 }
 
 TEST_F(LoggerTest, formatTopic)
 {
-	load();
+    load();
 
-	m_plugin->onTopic(m_irccd, m_server, "jean!jean@localhost", "#staff", "oh yeah yeaaaaaaaah");
+    m_plugin->onTopic(m_irccd, m_server, "jean!jean@localhost", "#staff", "oh yeah yeaaaaaaaah");
 
-	ASSERT_EQ("topic=test:#staff:jean!jean@localhost:jean:oh yeah yeaaaaaaaah\n", last());
+    ASSERT_EQ("topic=test:#staff:jean!jean@localhost:jean:oh yeah yeaaaaaaaah\n", last());
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
-	log::setInterface(std::make_unique<log::Silent>());
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
+    log::setInterface(std::make_unique<log::Silent>());
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/plugin-plugin/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-plugin/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,8 +17,8 @@
 #
 
 irccd_define_test(
-	NAME plugin-plugin
-	SOURCES main.cpp
-	LIBRARIES libirccd
-	FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
+    NAME plugin-plugin
+    SOURCES main.cpp
+    LIBRARIES libirccd
+    FLAGS PLUGINDIR=\"${IRCCD_FAKEROOTDIR}/${WITH_PLUGINDIR}\"
 )
--- a/tests/plugin-plugin/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/plugin-plugin/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -31,103 +31,103 @@
 
 class ServerTest : public Server {
 private:
-	std::string m_last;
+    std::string m_last;
 
 public:
-	inline ServerTest()
-		: Server("test", ServerInfo())
-	{
-	}
+    inline ServerTest()
+        : Server("test", ServerInfo())
+    {
+    }
 
-	inline const std::string &last() const noexcept
-	{
-		return m_last;
-	}
+    inline const std::string &last() const noexcept
+    {
+        return m_last;
+    }
 
-	void message(std::string target, std::string message) override
-	{
-		m_last = util::join({target, message});
-	}
+    void message(std::string target, std::string message) override
+    {
+        m_last = util::join({target, message});
+    }
 };
 
 class FakePlugin : public Plugin {
 public:
-	FakePlugin()
-		: Plugin("fake", "")
-	{
-		setAuthor("jean");
-		setVersion("0.0.0.0.0.1");
-		setLicense("BEER");
-		setSummary("Fake White Beer 2000");
-	}
+    FakePlugin()
+        : Plugin("fake", "")
+    {
+        setAuthor("jean");
+        setVersion("0.0.0.0.0.1");
+        setLicense("BEER");
+        setSummary("Fake White Beer 2000");
+    }
 };
 
 class PluginTest : public testing::Test {
 protected:
-	Irccd m_irccd;
-	PluginService &m_ps;
+    Irccd m_irccd;
+    PluginService &m_ps;
 
-	std::shared_ptr<ServerTest> m_server;
-	std::shared_ptr<Plugin> m_plugin;
+    std::shared_ptr<ServerTest> m_server;
+    std::shared_ptr<Plugin> m_plugin;
 
 public:
-	PluginTest()
-		: m_ps(m_irccd.pluginService())
-		, m_server(std::make_shared<ServerTest>())
-	{
-		m_ps.add(std::make_shared<FakePlugin>());
-		m_ps.setFormats("plugin", {
-			{ "usage", "usage=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" },
-			{ "info", "info=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{author}:#{license}:#{name}:#{summary}:#{version}" },
-			{ "not-found", "not-found=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{name}" },
-			{ "too-long", "too-long=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" }
-		});
-		m_ps.load("plugin", PLUGINDIR "/plugin.js");
-		m_plugin = m_ps.require("plugin");
-	}
+    PluginTest()
+        : m_ps(m_irccd.pluginService())
+        , m_server(std::make_shared<ServerTest>())
+    {
+        m_ps.add(std::make_shared<FakePlugin>());
+        m_ps.setFormats("plugin", {
+            { "usage", "usage=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" },
+            { "info", "info=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{author}:#{license}:#{name}:#{summary}:#{version}" },
+            { "not-found", "not-found=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}:#{name}" },
+            { "too-long", "too-long=#{plugin}:#{command}:#{server}:#{channel}:#{origin}:#{nickname}" }
+        });
+        m_ps.load("plugin", PLUGINDIR "/plugin.js");
+        m_plugin = m_ps.require("plugin");
+    }
 };
 
 TEST_F(PluginTest, formatUsage)
 {
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "");
-	ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "");
+    ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "fail");
-	ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "fail");
+    ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info");
-	ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info");
+    ASSERT_EQ("#staff:usage=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
 }
 
 TEST_F(PluginTest, formatInfo)
 {
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info fake");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info fake");
 
-	ASSERT_EQ("#staff:info=plugin:!plugin:test:#staff:jean!jean@localhost:jean:jean:BEER:fake:Fake White Beer 2000:0.0.0.0.0.1", m_server->last());
+    ASSERT_EQ("#staff:info=plugin:!plugin:test:#staff:jean!jean@localhost:jean:jean:BEER:fake:Fake White Beer 2000:0.0.0.0.0.1", m_server->last());
 }
 
 TEST_F(PluginTest, formatNotFound)
 {
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info doesnotexistsihope");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "info doesnotexistsihope");
 
-	ASSERT_EQ("#staff:not-found=plugin:!plugin:test:#staff:jean!jean@localhost:jean:doesnotexistsihope", m_server->last());
+    ASSERT_EQ("#staff:not-found=plugin:!plugin:test:#staff:jean!jean@localhost:jean:doesnotexistsihope", m_server->last());
 }
 
 TEST_F(PluginTest, formatTooLong)
 {
-	for (int i = 0; i < 100; ++i)
-		m_ps.add(std::make_shared<Plugin>("plugin-n-{}"_format(i), ""));
+    for (int i = 0; i < 100; ++i)
+        m_ps.add(std::make_shared<Plugin>("plugin-n-{}"_format(i), ""));
 
-	m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "list");
+    m_plugin->onCommand(m_irccd, m_server, "jean!jean@localhost", "#staff", "list");
 
-	ASSERT_EQ("#staff:too-long=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
+    ASSERT_EQ("#staff:too-long=plugin:!plugin:test:#staff:jean!jean@localhost:jean", m_server->last());
 }
 
 int main(int argc, char **argv)
 {
-	path::setApplicationPath(argv[0]);
-	testing::InitGoogleTest(&argc, argv);
-	log::setInterface(std::make_unique<log::Silent>());
+    path::setApplicationPath(argv[0]);
+    testing::InitGoogleTest(&argc, argv);
+    log::setInterface(std::make_unique<log::Silent>());
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/rules/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/rules/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME rules
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME rules
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/rules/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/rules/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,20 +30,20 @@
  * # On all servers, each channel #staff can't use the onCommand event,
  * # everything else is allowed.
  * #
- * [rule]	#1
- * servers	= ""
- * channels	= "#staff"
- * events	= "onCommand"
- * action	= drop
+ * [rule]       #1
+ * servers      = ""
+ * channels     = "#staff"
+ * events       = "onCommand"
+ * action       = drop
  *
  * #
  * # However, the same onCommand on #staff is allowed on server "unsafe"
  * #
- * [rule]	#2
- * servers	= "unsafe"
- * channels	= "#staff"
- * events	= "onCommand"
- * action	= accept
+ * [rule]       #2
+ * servers      = "unsafe"
+ * channels     = "#staff"
+ * events       = "onCommand"
+ * action       = accept
  *
  * #
  * # Plugin game is only allowed on server "malikania" and "localhost",
@@ -52,187 +52,187 @@
  * # The first rule #3-1 disable the plugin game for every server, it is
  * # reenabled again with the #3-2.
  * #
- * [rule]	#3-1
- * plugins	= "game"
- * action	= drop
+ * [rule]       #3-1
+ * plugins      = "game"
+ * action       = drop
  *
- * [rule]	#3-2
- * servers	= "malikania localhost"
- * channels	= "#games"
- * plugins	= "game"
- * events	= "onMessage onCommand"
- * action	= accept
+ * [rule]       #3-2
+ * servers      = "malikania localhost"
+ * channels     = "#games"
+ * plugins      = "game"
+ * events       = "onMessage onCommand"
+ * action       = accept
  */
 class RulesTest : public testing::Test {
 protected:
-	RuleService m_rules;
+    RuleService m_rules;
 
-	RulesTest()
-	{
-		// #1
-		{
-			m_rules.add({
-				RuleSet{		},	// Servers
-				RuleSet{ "#staff"	},	// Channels
-				RuleSet{		},	// Origins
-				RuleSet{		},	// Plugins
-				RuleSet{ "onCommand"	},	// Events
-				RuleAction::Drop
-			});
-		}
+    RulesTest()
+    {
+        // #1
+        {
+            m_rules.add({
+                RuleSet{                }, // Servers
+                RuleSet{ "#staff"       }, // Channels
+                RuleSet{                }, // Origins
+                RuleSet{                }, // Plugins
+                RuleSet{ "onCommand"    }, // Events
+                RuleAction::Drop
+            });
+        }
 
-		// #2
-		{
-			m_rules.add({
-				RuleSet{ "unsafe"	},
-				RuleSet{ "#staff"	},
-				RuleSet{		},
-				RuleSet{		},
-				RuleSet{ "onCommand"	},
-				RuleAction::Accept
-			});
-		}
+        // #2
+        {
+            m_rules.add({
+                RuleSet{ "unsafe"       },
+                RuleSet{ "#staff"       },
+                RuleSet{                },
+                RuleSet{                },
+                RuleSet{ "onCommand"    },
+                RuleAction::Accept
+            });
+        }
 
-		// #3-1
-		{
-			m_rules.add({
-				RuleSet{},
-				RuleSet{},
-				RuleSet{},
-				RuleSet{"game"},
-				RuleSet{},
-				RuleAction::Drop
-			});
-		}
+        // #3-1
+        {
+            m_rules.add({
+                RuleSet{},
+                RuleSet{},
+                RuleSet{},
+                RuleSet{"game"},
+                RuleSet{},
+                RuleAction::Drop
+            });
+        }
 
-		// #3-2
-		{
-			m_rules.add({
-				RuleSet{ "malikania", "localhost"	},
-				RuleSet{ "#games"			},
-				RuleSet{ 				},
-				RuleSet{ "game"				},
-				RuleSet{ "onCommand", "onMessage"	},
-				RuleAction::Accept
-			});
-		}
-	}
+        // #3-2
+        {
+            m_rules.add({
+                RuleSet{ "malikania", "localhost"   },
+                RuleSet{ "#games"                   },
+                RuleSet{                            },
+                RuleSet{ "game"                     },
+                RuleSet{ "onCommand", "onMessage"   },
+                RuleAction::Accept
+            });
+        }
+    }
 };
 
 TEST_F(RulesTest, basicMatch1)
 {
-	Rule m;
+    Rule m;
 
-	/*
-	 * [rule]
-	 */
-	ASSERT_TRUE(m.match("freenode", "#test", "a", "", ""));
-	ASSERT_TRUE(m.match("", "", "", "", ""));
+    /*
+     * [rule]
+     */
+    ASSERT_TRUE(m.match("freenode", "#test", "a", "", ""));
+    ASSERT_TRUE(m.match("", "", "", "", ""));
 }
 
 TEST_F(RulesTest, basicMatch2)
 {
-	Rule m(RuleSet{"freenode"});
+    Rule m(RuleSet{"freenode"});
 
-	/*
-	 * [rule]
-	 * servers	= "freenode"
-	 */
+    /*
+     * [rule]
+     * servers    = "freenode"
+     */
 
-	ASSERT_TRUE(m.match("freenode", "#test", "a", "", ""));
-	ASSERT_FALSE(m.match("malikania", "#test", "a", "", ""));
-	ASSERT_TRUE(m.match("freenode", "", "jean", "", "onMessage"));
+    ASSERT_TRUE(m.match("freenode", "#test", "a", "", ""));
+    ASSERT_FALSE(m.match("malikania", "#test", "a", "", ""));
+    ASSERT_TRUE(m.match("freenode", "", "jean", "", "onMessage"));
 }
 
 TEST_F(RulesTest, basicMatch3)
 {
-	Rule m(RuleSet{"freenode"}, RuleSet{"#staff"});
+    Rule m(RuleSet{"freenode"}, RuleSet{"#staff"});
 
-	/*
-	 * [rule]
-	 * servers	= "freenode"
-	 * channels	= "#staff"
-	 */
+    /*
+     * [rule]
+     * servers    = "freenode"
+     * channels    = "#staff"
+     */
 
-	ASSERT_TRUE(m.match("freenode", "#staff", "a", "", ""));
-	ASSERT_FALSE(m.match("freenode", "#test", "a", "", ""));
-	ASSERT_FALSE(m.match("malikania", "#staff", "a", "", ""));
+    ASSERT_TRUE(m.match("freenode", "#staff", "a", "", ""));
+    ASSERT_FALSE(m.match("freenode", "#test", "a", "", ""));
+    ASSERT_FALSE(m.match("malikania", "#staff", "a", "", ""));
 }
 
 TEST_F(RulesTest, basicMatch4)
 {
-	Rule m(RuleSet{"malikania"}, RuleSet{"#staff"}, RuleSet{"a"});
+    Rule m(RuleSet{"malikania"}, RuleSet{"#staff"}, RuleSet{"a"});
 
-	/*
-	 * [rule]
-	 * servers	= "malikania"
-	 * channels	= "#staff"
-	 * plugins	= "a"
-	 */
+    /*
+     * [rule]
+     * servers    = "malikania"
+     * channels    = "#staff"
+     * plugins    = "a"
+     */
 
-	ASSERT_TRUE(m.match("malikania", "#staff", "a", "",""));
-	ASSERT_FALSE(m.match("malikania", "#staff", "b", "", ""));
-	ASSERT_FALSE(m.match("freenode", "#staff", "a", "", ""));
+    ASSERT_TRUE(m.match("malikania", "#staff", "a", "",""));
+    ASSERT_FALSE(m.match("malikania", "#staff", "b", "", ""));
+    ASSERT_FALSE(m.match("freenode", "#staff", "a", "", ""));
 }
 
 TEST_F(RulesTest, complexMatch1)
 {
-	Rule m(RuleSet{"malikania", "freenode"});
+    Rule m(RuleSet{"malikania", "freenode"});
 
-	/*
-	 * [rule]
-	 * servers	= "malikania freenode"
-	 */
+    /*
+     * [rule]
+     * servers    = "malikania freenode"
+     */
 
-	ASSERT_TRUE(m.match("malikania", "", "", "", ""));
-	ASSERT_TRUE(m.match("freenode", "", "", "", ""));
-	ASSERT_FALSE(m.match("no", "", "", "", ""));
+    ASSERT_TRUE(m.match("malikania", "", "", "", ""));
+    ASSERT_TRUE(m.match("freenode", "", "", "", ""));
+    ASSERT_FALSE(m.match("no", "", "", "", ""));
 }
 
 TEST_F(RulesTest, basicSolve)
 {
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("malikania", "#staff", "", "a", "onMessage"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("malikania", "#staff", "", "a", "onMessage"));
 
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("freenode", "#staff", "", "b", "onTopic"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("freenode", "#staff", "", "b", "onTopic"));
 
-	/* Not allowed */
-	ASSERT_FALSE(m_rules.solve("malikania", "#staff", "", "", "onCommand"));
+    /* Not allowed */
+    ASSERT_FALSE(m_rules.solve("malikania", "#staff", "", "", "onCommand"));
 
-	/* Not allowed */
-	ASSERT_FALSE(m_rules.solve("freenode", "#staff", "", "c", "onCommand"));
+    /* Not allowed */
+    ASSERT_FALSE(m_rules.solve("freenode", "#staff", "", "c", "onCommand"));
 
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("unsafe", "#staff", "", "c", "onCommand"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("unsafe", "#staff", "", "c", "onCommand"));
 }
 
 TEST_F(RulesTest, gamesSolve)
 {
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("malikania", "#games", "", "game", "onMessage"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("malikania", "#games", "", "game", "onMessage"));
 
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("localhost", "#games", "", "game", "onMessage"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("localhost", "#games", "", "game", "onMessage"));
 
-	/* Allowed */
-	ASSERT_TRUE(m_rules.solve("malikania", "#games", "", "game", "onCommand"));
+    /* Allowed */
+    ASSERT_TRUE(m_rules.solve("malikania", "#games", "", "game", "onCommand"));
 
-	/* Not allowed */
-	ASSERT_FALSE(m_rules.solve("malikania", "#games", "", "game", "onQuery"));
+    /* Not allowed */
+    ASSERT_FALSE(m_rules.solve("malikania", "#games", "", "game", "onQuery"));
 
-	/* Not allowed */
-	ASSERT_FALSE(m_rules.solve("freenode", "#no", "", "game", "onMessage"));
+    /* Not allowed */
+    ASSERT_FALSE(m_rules.solve("freenode", "#no", "", "game", "onMessage"));
 
-	/* Not allowed */
-	ASSERT_FALSE(m_rules.solve("malikania", "#test", "", "game", "onMessage"));
+    /* Not allowed */
+    ASSERT_FALSE(m_rules.solve("malikania", "#test", "", "game", "onMessage"));
 }
 
 } // !irccd
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/timer/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/timer/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME timer
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME timer
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/timer/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/timer/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -30,68 +30,68 @@
 
 TEST(Basic, single)
 {
-	Timer timer(TimerType::Single, 1000);
-	ElapsedTimer elapsed;
-	int count = 0;
+    Timer timer(TimerType::Single, 1000);
+    ElapsedTimer elapsed;
+    int count = 0;
 
-	timer.onSignal.connect([&] () {
-		count = elapsed.elapsed();
-	});
+    timer.onSignal.connect([&] () {
+        count = elapsed.elapsed();
+    });
 
-	elapsed.reset();
-	timer.start();
+    elapsed.reset();
+    timer.start();
 
-	std::this_thread::sleep_for(3s);
+    std::this_thread::sleep_for(3s);
 
-	ASSERT_GE(count, 900);
-	ASSERT_LE(count, 1100);
+    ASSERT_GE(count, 900);
+    ASSERT_LE(count, 1100);
 
 }
 
 TEST(Basic, repeat)
 {
-	Timer timer(TimerType::Repeat, 500);
-	int max = 0;
+    Timer timer(TimerType::Repeat, 500);
+    int max = 0;
 
-	timer.onSignal.connect([&] () {
-		max ++;
-	});
+    timer.onSignal.connect([&] () {
+        max ++;
+    });
 
-	timer.start();
+    timer.start();
 
-	// Should be at least 5
-	std::this_thread::sleep_for(3s);
+    // Should be at least 5
+    std::this_thread::sleep_for(3s);
 
-	ASSERT_GE(max, 5);
+    ASSERT_GE(max, 5);
 
-	timer.stop();
+    timer.stop();
 }
 
 TEST(Basic, restart)
 {
-	Timer timer(TimerType::Repeat, 500);
-	int max = 0;
+    Timer timer(TimerType::Repeat, 500);
+    int max = 0;
 
-	timer.onSignal.connect([&] () {
-		max ++;
-	});
+    timer.onSignal.connect([&] () {
+        max ++;
+    });
 
-	timer.start();
-	std::this_thread::sleep_for(3s);
-	timer.stop();
-	std::this_thread::sleep_for(3s);
-	timer.start();
-	std::this_thread::sleep_for(3s);
+    timer.start();
+    std::this_thread::sleep_for(3s);
+    timer.stop();
+    std::this_thread::sleep_for(3s);
+    timer.start();
+    std::this_thread::sleep_for(3s);
 
-	ASSERT_GE(max, 10);
-	ASSERT_LT(max, 15);
+    ASSERT_GE(max, 10);
+    ASSERT_LT(max, 15);
 
-	timer.stop();
+    timer.stop();
 }
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/tests/util/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/util/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -17,7 +17,7 @@
 #
 
 irccd_define_test(
-	NAME util
-	SOURCES main.cpp
-	LIBRARIES libirccd
+    NAME util
+    SOURCES main.cpp
+    LIBRARIES libirccd
 )
--- a/tests/util/main.cpp	Tue Jun 21 12:36:46 2016 +0200
+++ b/tests/util/main.cpp	Tue Jun 21 20:52:17 2016 +0200
@@ -31,122 +31,122 @@
 
 TEST(Format, nothing)
 {
-	std::string expected = "hello world!";
-	std::string result = util::format("hello world!");
+    std::string expected = "hello world!";
+    std::string result = util::format("hello world!");
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Format, escape)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.keywords.emplace("target", "hello");
+    params.keywords.emplace("target", "hello");
 
-	ASSERT_EQ("$@#", util::format("$@#"));
-	ASSERT_EQ(" $ @ # ", util::format(" $ @ # "));
-	ASSERT_EQ("#", util::format("#"));
-	ASSERT_EQ(" # ", util::format(" # "));
-	ASSERT_EQ("#@", util::format("#@"));
-	ASSERT_EQ("##", util::format("##"));
-	ASSERT_EQ("#!", util::format("#!"));
-	ASSERT_EQ("#{target}", util::format("##{target}"));
-	ASSERT_EQ("@hello", util::format("@#{target}", params));
-	ASSERT_EQ("hello#", util::format("#{target}#", params));
-	ASSERT_ANY_THROW(util::format("#{failure"));
+    ASSERT_EQ("$@#", util::format("$@#"));
+    ASSERT_EQ(" $ @ # ", util::format(" $ @ # "));
+    ASSERT_EQ("#", util::format("#"));
+    ASSERT_EQ(" # ", util::format(" # "));
+    ASSERT_EQ("#@", util::format("#@"));
+    ASSERT_EQ("##", util::format("##"));
+    ASSERT_EQ("#!", util::format("#!"));
+    ASSERT_EQ("#{target}", util::format("##{target}"));
+    ASSERT_EQ("@hello", util::format("@#{target}", params));
+    ASSERT_EQ("hello#", util::format("#{target}#", params));
+    ASSERT_ANY_THROW(util::format("#{failure"));
 }
 
 TEST(Format, disableDate)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.flags &= ~(util::Substitution::Date);
+    params.flags &= ~(util::Substitution::Date);
 
-	ASSERT_EQ("%H:%M", util::format("%H:%M", params));
+    ASSERT_EQ("%H:%M", util::format("%H:%M", params));
 }
 
 TEST(Format, disableKeywords)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.keywords.emplace("target", "hello");
-	params.flags &= ~(util::Substitution::Keywords);
+    params.keywords.emplace("target", "hello");
+    params.flags &= ~(util::Substitution::Keywords);
 
-	ASSERT_EQ("#{target}", util::format("#{target}", params));
+    ASSERT_EQ("#{target}", util::format("#{target}", params));
 }
 
 TEST(Format, disableEnv)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.flags &= ~(util::Substitution::Env);
+    params.flags &= ~(util::Substitution::Env);
 
-	ASSERT_EQ("${HOME}", util::format("${HOME}", params));
+    ASSERT_EQ("${HOME}", util::format("${HOME}", params));
 }
 
 TEST(Format, keywordSimple)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.keywords.insert({"target", "irccd"});
+    params.keywords.insert({"target", "irccd"});
 
-	std::string expected = "hello irccd!";
-	std::string result = util::format("hello #{target}!", params);
+    std::string expected = "hello irccd!";
+    std::string result = util::format("hello #{target}!", params);
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Format, keywordMultiple)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.keywords.insert({"target", "irccd"});
-	params.keywords.insert({"source", "nightmare"});
+    params.keywords.insert({"target", "irccd"});
+    params.keywords.insert({"source", "nightmare"});
 
-	std::string expected = "hello irccd from nightmare!";
-	std::string result = util::format("hello #{target} from #{source}!", params);
+    std::string expected = "hello irccd from nightmare!";
+    std::string result = util::format("hello #{target} from #{source}!", params);
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Format, keywordAdjTwice)
 {
-	util::Substitution params;
+    util::Substitution params;
 
-	params.keywords.insert({"target", "irccd"});
+    params.keywords.insert({"target", "irccd"});
 
-	std::string expected = "hello irccdirccd!";
-	std::string result = util::format("hello #{target}#{target}!", params);
+    std::string expected = "hello irccdirccd!";
+    std::string result = util::format("hello #{target}#{target}!", params);
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Format, keywordMissing)
 {
-	std::string expected = "hello !";
-	std::string result = util::format("hello #{target}!");
+    std::string expected = "hello !";
+    std::string result = util::format("hello #{target}!");
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Format, envSimple)
 {
-	std::string home = sys::env("HOME");
+    std::string home = sys::env("HOME");
 
-	if (!home.empty()) {
-		std::string expected = "my home is " + home;
-		std::string result = util::format("my home is ${HOME}");
+    if (!home.empty()) {
+        std::string expected = "my home is " + home;
+        std::string result = util::format("my home is ${HOME}");
 
-		ASSERT_EQ(expected, result);
-	}
+        ASSERT_EQ(expected, result);
+    }
 }
 
 TEST(Format, envMissing)
 {
-	std::string expected = "value is ";
-	std::string result = util::format("value is ${HOPE_THIS_VAR_NOT_EXIST}");
+    std::string expected = "value is ";
+    std::string result = util::format("value is ${HOPE_THIS_VAR_NOT_EXIST}");
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 /* --------------------------------------------------------
@@ -157,18 +157,18 @@
 
 TEST(Split, simple)
 {
-	List expected { "a", "b" };
-	List result = util::split("a;b", ";");
+    List expected { "a", "b" };
+    List result = util::split("a;b", ";");
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Split, cut)
 {
-	List expected { "msg", "#staff", "foo bar baz" };
-	List result = util::split("msg;#staff;foo bar baz", ";", 3);
+    List expected { "msg", "#staff", "foo bar baz" };
+    List result = util::split("msg;#staff;foo bar baz", ";", 3);
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 /* --------------------------------------------------------
@@ -177,74 +177,74 @@
 
 TEST(Strip, left)
 {
-	std::string value = "   123";
-	std::string result = util::strip(value);
+    std::string value = "   123";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("123", result);
+    ASSERT_EQ("123", result);
 }
 
 TEST(Strip, right)
 {
-	std::string value = "123   ";
-	std::string result = util::strip(value);
+    std::string value = "123   ";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("123", result);
+    ASSERT_EQ("123", result);
 }
 
 TEST(Strip, both)
 {
-	std::string value = "   123   ";
-	std::string result = util::strip(value);
+    std::string value = "   123   ";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("123", result);
+    ASSERT_EQ("123", result);
 }
 
 TEST(Strip, none)
 {
-	std::string value = "without";
-	std::string result = util::strip(value);
+    std::string value = "without";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("without", result);
+    ASSERT_EQ("without", result);
 }
 
 TEST(Strip, betweenEmpty)
 {
-	std::string value = "one list";
-	std::string result = util::strip(value);
+    std::string value = "one list";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("one list", result);
+    ASSERT_EQ("one list", result);
 }
 
 TEST(Strip, betweenLeft)
 {
-	std::string value = "  space at left";
-	std::string result = util::strip(value);
+    std::string value = "  space at left";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("space at left", result);
+    ASSERT_EQ("space at left", result);
 }
 
 TEST(Strip, betweenRight)
 {
-	std::string value = "space at right  ";
-	std::string result = util::strip(value);
+    std::string value = "space at right  ";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("space at right", result);
+    ASSERT_EQ("space at right", result);
 }
 
 TEST(Strip, betweenBoth)
 {
-	std::string value = "  space at both  ";
-	std::string result = util::strip(value);
+    std::string value = "  space at both  ";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("space at both", result);
+    ASSERT_EQ("space at both", result);
 }
 
 TEST(Strip, empty)
 {
-	std::string value = "    ";
-	std::string result = util::strip(value);
+    std::string value = "    ";
+    std::string result = util::strip(value);
 
-	ASSERT_EQ("", result);
+    ASSERT_EQ("", result);
 }
 
 /* --------------------------------------------------------
@@ -253,42 +253,42 @@
 
 TEST(Join, empty)
 {
-	std::string expected = "";
-	std::string result = util::join<int>({});
+    std::string expected = "";
+    std::string result = util::join<int>({});
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Join, one)
 {
-	std::string expected = "1";
-	std::string result = util::join({1});
+    std::string expected = "1";
+    std::string result = util::join({1});
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Join, two)
 {
-	std::string expected = "1:2";
-	std::string result = util::join({1, 2});
+    std::string expected = "1:2";
+    std::string result = util::join({1, 2});
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Join, delimiterString)
 {
-	std::string expected = "1;;2;;3";
-	std::string result = util::join({1, 2, 3}, ";;");
+    std::string expected = "1;;2;;3";
+    std::string result = util::join({1, 2, 3}, ";;");
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 TEST(Join, delimiterChar)
 {
-	std::string expected = "1@2@3@4";
-	std::string result = util::join({1, 2, 3, 4}, '@');
+    std::string expected = "1@2@3@4";
+    std::string result = util::join({1, 2, 3, 4}, '@');
 
-	ASSERT_EQ(expected, result);
+    ASSERT_EQ(expected, result);
 }
 
 /* --------------------------------------------------------
@@ -297,20 +297,20 @@
 
 TEST(IsIdentifierValid, correct)
 {
-	ASSERT_TRUE(util::isIdentifierValid("localhost"));
-	ASSERT_TRUE(util::isIdentifierValid("localhost2"));
-	ASSERT_TRUE(util::isIdentifierValid("localhost2-4_"));
+    ASSERT_TRUE(util::isIdentifierValid("localhost"));
+    ASSERT_TRUE(util::isIdentifierValid("localhost2"));
+    ASSERT_TRUE(util::isIdentifierValid("localhost2-4_"));
 }
 
 TEST(IsIdentifierValid, incorrect)
 {
-	ASSERT_FALSE(util::isIdentifierValid(""));
-	ASSERT_FALSE(util::isIdentifierValid("localhost with spaces"));
-	ASSERT_FALSE(util::isIdentifierValid("localhost*"));
-	ASSERT_FALSE(util::isIdentifierValid("&&"));
-	ASSERT_FALSE(util::isIdentifierValid("@'"));
-	ASSERT_FALSE(util::isIdentifierValid("##"));
-	ASSERT_FALSE(util::isIdentifierValid("===++"));
+    ASSERT_FALSE(util::isIdentifierValid(""));
+    ASSERT_FALSE(util::isIdentifierValid("localhost with spaces"));
+    ASSERT_FALSE(util::isIdentifierValid("localhost*"));
+    ASSERT_FALSE(util::isIdentifierValid("&&"));
+    ASSERT_FALSE(util::isIdentifierValid("@'"));
+    ASSERT_FALSE(util::isIdentifierValid("##"));
+    ASSERT_FALSE(util::isIdentifierValid("===++"));
 }
 
 /* --------------------------------------------------------
@@ -319,34 +319,34 @@
 
 TEST(IsBoolean, correct)
 {
-	// true
-	ASSERT_TRUE(util::isBoolean("true"));
-	ASSERT_TRUE(util::isBoolean("True"));
-	ASSERT_TRUE(util::isBoolean("TRUE"));
-	ASSERT_TRUE(util::isBoolean("TruE"));
+    // true
+    ASSERT_TRUE(util::isBoolean("true"));
+    ASSERT_TRUE(util::isBoolean("True"));
+    ASSERT_TRUE(util::isBoolean("TRUE"));
+    ASSERT_TRUE(util::isBoolean("TruE"));
 
-	// yes
-	ASSERT_TRUE(util::isBoolean("yes"));
-	ASSERT_TRUE(util::isBoolean("Yes"));
-	ASSERT_TRUE(util::isBoolean("YES"));
-	ASSERT_TRUE(util::isBoolean("YeS"));
+    // yes
+    ASSERT_TRUE(util::isBoolean("yes"));
+    ASSERT_TRUE(util::isBoolean("Yes"));
+    ASSERT_TRUE(util::isBoolean("YES"));
+    ASSERT_TRUE(util::isBoolean("YeS"));
 
-	// on
-	ASSERT_TRUE(util::isBoolean("on"));
-	ASSERT_TRUE(util::isBoolean("On"));
-	ASSERT_TRUE(util::isBoolean("oN"));
-	ASSERT_TRUE(util::isBoolean("ON"));
+    // on
+    ASSERT_TRUE(util::isBoolean("on"));
+    ASSERT_TRUE(util::isBoolean("On"));
+    ASSERT_TRUE(util::isBoolean("oN"));
+    ASSERT_TRUE(util::isBoolean("ON"));
 
-	// 1
-	ASSERT_TRUE(util::isBoolean("1"));
+    // 1
+    ASSERT_TRUE(util::isBoolean("1"));
 }
 
 TEST(IsBoolean, incorrect)
 {
-	ASSERT_FALSE(util::isBoolean("false"));
-	ASSERT_FALSE(util::isBoolean("lol"));
-	ASSERT_FALSE(util::isBoolean(""));
-	ASSERT_FALSE(util::isBoolean("0"));
+    ASSERT_FALSE(util::isBoolean("false"));
+    ASSERT_FALSE(util::isBoolean("lol"));
+    ASSERT_FALSE(util::isBoolean(""));
+    ASSERT_FALSE(util::isBoolean("0"));
 }
 
 /* --------------------------------------------------------
@@ -355,15 +355,15 @@
 
 TEST(IsNumber, correct)
 {
-	ASSERT_TRUE(util::isNumber("123"));
-	ASSERT_TRUE(util::isNumber("-123"));
-	ASSERT_TRUE(util::isNumber("123.67"));
+    ASSERT_TRUE(util::isNumber("123"));
+    ASSERT_TRUE(util::isNumber("-123"));
+    ASSERT_TRUE(util::isNumber("123.67"));
 }
 
 TEST(IsNumber, incorrect)
 {
-	ASSERT_FALSE(util::isNumber("lol"));
-	ASSERT_FALSE(util::isNumber("this is not a number"));
+    ASSERT_FALSE(util::isNumber("lol"));
+    ASSERT_FALSE(util::isNumber("this is not a number"));
 }
 
 /*
@@ -373,46 +373,46 @@
 
 TEST(ToNumber, correct)
 {
-	/* unsigned */
-	ASSERT_EQ(50u, util::toNumber<std::uint8_t>("50"));
-	ASSERT_EQ(5000u, util::toNumber<std::uint16_t>("5000"));
-	ASSERT_EQ(50000u, util::toNumber<std::uint32_t>("50000"));
-	ASSERT_EQ(500000u, util::toNumber<std::uint64_t>("500000"));
+    /* unsigned */
+    ASSERT_EQ(50u, util::toNumber<std::uint8_t>("50"));
+    ASSERT_EQ(5000u, util::toNumber<std::uint16_t>("5000"));
+    ASSERT_EQ(50000u, util::toNumber<std::uint32_t>("50000"));
+    ASSERT_EQ(500000u, util::toNumber<std::uint64_t>("500000"));
 
-	/* signed */
-	ASSERT_EQ(-50, util::toNumber<std::int8_t>("-50"));
-	ASSERT_EQ(-500, util::toNumber<std::int16_t>("-500"));
-	ASSERT_EQ(-5000, util::toNumber<std::int32_t>("-5000"));
-	ASSERT_EQ(-50000, util::toNumber<std::int64_t>("-50000"));
+    /* signed */
+    ASSERT_EQ(-50, util::toNumber<std::int8_t>("-50"));
+    ASSERT_EQ(-500, util::toNumber<std::int16_t>("-500"));
+    ASSERT_EQ(-5000, util::toNumber<std::int32_t>("-5000"));
+    ASSERT_EQ(-50000, util::toNumber<std::int64_t>("-50000"));
 }
 
 TEST(ToNumber, incorrect)
 {
-	/* unsigned */
-	ASSERT_THROW(util::toNumber<std::uint8_t>("300"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::uint16_t>("80000"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::uint8_t>("-125"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::uint16_t>("-25000"), std::out_of_range);
+    /* unsigned */
+    ASSERT_THROW(util::toNumber<std::uint8_t>("300"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::uint16_t>("80000"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::uint8_t>("-125"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::uint16_t>("-25000"), std::out_of_range);
 
-	/* signed */
-	ASSERT_THROW(util::toNumber<std::int8_t>("300"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::int16_t>("80000"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::int8_t>("-300"), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::int16_t>("-80000"), std::out_of_range);
+    /* signed */
+    ASSERT_THROW(util::toNumber<std::int8_t>("300"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::int16_t>("80000"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::int8_t>("-300"), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::int16_t>("-80000"), std::out_of_range);
 
-	/* not numbers */
-	ASSERT_THROW(util::toNumber<std::uint8_t>("nonono"), std::invalid_argument);
+    /* not numbers */
+    ASSERT_THROW(util::toNumber<std::uint8_t>("nonono"), std::invalid_argument);
 
-	/* custom ranges */
-	ASSERT_THROW(util::toNumber<std::uint8_t>("50", 0, 10), std::out_of_range);
-	ASSERT_THROW(util::toNumber<std::int8_t>("-50", -10, 10), std::out_of_range);
+    /* custom ranges */
+    ASSERT_THROW(util::toNumber<std::uint8_t>("50", 0, 10), std::out_of_range);
+    ASSERT_THROW(util::toNumber<std::int8_t>("-50", -10, 10), std::out_of_range);
 }
 
 } // !irccd
 
 int main(int argc, char **argv)
 {
-	testing::InitGoogleTest(&argc, argv);
+    testing::InitGoogleTest(&argc, argv);
 
-	return RUN_ALL_TESTS();
+    return RUN_ALL_TESTS();
 }
--- a/win32/CMakeLists.txt	Tue Jun 21 12:36:46 2016 +0200
+++ b/win32/CMakeLists.txt	Tue Jun 21 20:52:17 2016 +0200
@@ -21,24 +21,24 @@
 # they are also installed.
 #
 if (IRCCD_64BITS)
-	set(ARCH "amd64")
-	set(LIBGCC libgcc_s_seh-1.dll)
+    set(ARCH "amd64")
+    set(LIBGCC libgcc_s_seh-1.dll)
 else ()
-	set(ARCH "x86")
-	set(LIBGCC libgcc_s_dw2-1.dll)
+    set(ARCH "x86")
+    set(LIBGCC libgcc_s_dw2-1.dll)
 endif ()
 
 set(
-	FILES
-	${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libeay32.dll
-	${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libstdc++-6.dll
-	${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libwinpthread-1.dll
-	${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/ssleay32.dll
-	${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/${LIBGCC}
+    FILES
+    ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libeay32.dll
+    ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libstdc++-6.dll
+    ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/libwinpthread-1.dll
+    ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/ssleay32.dll
+    ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/${LIBGCC}
 )
 
 install(FILES ${FILES} DESTINATION ${WITH_BINDIR})
 
 if (IRCCD_PACKAGE)
-	file(COPY ${FILES} DESTINATION ${CMAKE_BINARY_DIR}/installer/packages/base/data/${WITH_BINDIR})
+    file(COPY ${FILES} DESTINATION ${CMAKE_BINARY_DIR}/installer/packages/base/data/${WITH_BINDIR})
 endif ()