changeset 59:92b0be5ce4b0 release-2.0 2.0.0

Merge from stable-2
author David Demelier <markand@malikania.fr>
date Tue, 01 Mar 2016 08:52:51 +0100
parents d914cffaa469 (current diff) 6aeecf87f684 (diff)
children 223487a685b1
files doc/html/resources/css/irccd.css
diffstat 46 files changed, 639 insertions(+), 529 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CHANGES.md	Tue Mar 01 08:52:51 2016 +0100
@@ -0,0 +1,7 @@
+IRC Client Daemon CHANGES
+=========================
+
+irccd 2.0.0 2016-03-01
+----------------------
+
+  - Initial 2.0.0 release.
--- a/cmake/IrccdOptions.cmake	Tue Feb 23 12:59:58 2016 +0100
+++ b/cmake/IrccdOptions.cmake	Tue Mar 01 08:52:51 2016 +0100
@@ -54,12 +54,6 @@
 # WITH_TEST_IRCPORT	Which IRC server port to use for tests (default: 6667)
 #
 
-#
-# Options for developers:
-#
-# WITH_WEB		Set to true to use the HTML template for official irccd website.
-#
-
 # Manual pages on Windows are pretty useless.
 if (WIN32)
 	set(DEFAULT_MAN "No")
@@ -80,7 +74,7 @@
 option(WITH_SYSTEMD "Install systemd service" ${DEFAULT_SYSTEMD})
 option(WITH_DOCS "Enable building of all documentation" On)
 option(WITH_HTML "Enable building of HTML documentation" On)
-option(WITH_DOXYGEN "Enable doxygen" On)
+option(WITH_DOXYGEN "Enable doxygen" Off)
 option(WITH_MAN "Install man pages" ${DEFAULT_MAN})
 
 # Build options for all plugins.
@@ -98,8 +92,6 @@
 set(WITH_TEST_IRCHOST "127.0.0.1" CACHE STRING "IRC host for tests")
 set(WITH_TEST_IRCPORT 6667 CACHE STRING "IRC port for test")
 
-option(WITH_WEB "Use HTML template for official website" Off)
-
 # ---------------------------------------------------------
 # Installation paths
 # ---------------------------------------------------------
--- a/cmake/IrccdPackage.cmake	Tue Feb 23 12:59:58 2016 +0100
+++ b/cmake/IrccdPackage.cmake	Tue Mar 01 08:52:51 2016 +0100
@@ -18,7 +18,7 @@
 
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "irccd-${IRCCD_VERSION}")
 set(CPACK_SOURCE_GENERATOR TXZ ZIP)
-set(CPACK_SOURCE_IGNORE_FILES .hg .hgignore)
+set(CPACK_SOURCE_IGNORE_FILES "/[.]hg" "/CMakeLists[.]txt[.]user")
 
 #
 # Define the binary package name.
@@ -28,6 +28,12 @@
 if (WIN32)
 	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 ()
 endif ()
 
 if (IRCCD_64BITS)
--- a/cmake/IrccdVersion.cmake	Tue Feb 23 12:59:58 2016 +0100
+++ b/cmake/IrccdVersion.cmake	Tue Mar 01 08:52:51 2016 +0100
@@ -21,7 +21,19 @@
 set(IRCCD_VERSION_MINOR "0")
 set(IRCCD_VERSION_PATCH "0")
 set(IRCCD_VERSION "${IRCCD_VERSION_MAJOR}.${IRCCD_VERSION_MINOR}.${IRCCD_VERSION_PATCH}")
-set(IRCCD_RELEASE_DATE "2015-12-17")
+
+#
+# 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)
+#
+set(IRCCD_RELEASE_DATE_YEAR 2016)
+set(IRCCD_RELEASE_DATE_MONTH 03)
+set(IRCCD_RELEASE_DATE_DAY 01)
+set(IRCCD_RELEASE_DATE "${IRCCD_RELEASE_DATE_YEAR}-${IRCCD_RELEASE_DATE_MONTH}-${IRCCD_RELEASE_DATE_DAY}")
 
 # All plugins.
 set(
--- a/cmake/function/IrccdDefineHtml.cmake	Tue Feb 23 12:59:58 2016 +0100
+++ b/cmake/function/IrccdDefineHtml.cmake	Tue Mar 01 08:52:51 2016 +0100
@@ -63,10 +63,6 @@
 		set(base ${CMAKE_BINARY_DIR}/docs)
 	endif ()
 
-	if (WITH_WEB)
-		set(ARGS web:1)
-	endif ()
-
 	if (HTML_OUTPUT)
 		#
 		# First signature.
@@ -98,7 +94,7 @@
 				${resources_SOURCE_DIR}/template.html
 				docs-resources
 			ARGS ${HTML_ARGS}
-			VARIABLE baseurl:${baseurl} doc:1 ${ARGS}
+			VARIABLE baseurl:${baseurl}
 			FROM markdown TO html5
 			STANTALONE MAKE_DIRECTORY
 		)
@@ -132,7 +128,7 @@
 					${resources_SOURCE_DIR}/template.html
 					docs-resources
 				ARGS ${HTML_ARGS}
-				VARIABLE baseurl:${baseurl} standalone:1 doc:1 ${ARGS}
+				VARIABLE baseurl:${baseurl}
 				FROM markdown TO html5
 				STANTALONE MAKE_DIRECTORY
 			)
--- a/cmake/installer/config/config.xml.in	Tue Feb 23 12:59:58 2016 +0100
+++ b/cmake/installer/config/config.xml.in	Tue Mar 01 08:52:51 2016 +0100
@@ -5,7 +5,7 @@
 	<Title>IRC Client Daemon Setup</Title>
 	<Publisher>Malikania Projects</Publisher>
 	<ProductUrl>http://projects.malikania.fr/irccd</ProductUrl>
-	<StartMenuDir>Irccd</StartMenuDir>
+	<StartMenuDir>Irccd @IRCCD_VERSION@</StartMenuDir>
 	<AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>
-	<TargetDir>@CMAKE_INSTALL_PREFIX@</TargetDir>
-</Installer>
\ No newline at end of file
+	<TargetDir>@PKGTARGETDIR@</TargetDir>
+</Installer>
--- a/doc/examples/CMakeLists.txt	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/examples/CMakeLists.txt	Tue Mar 01 08:52:51 2016 +0100
@@ -21,12 +21,12 @@
 if (IRCCD_RELOCATABLE)
 	add_custom_command(
 		OUTPUT
-			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf
-			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf
+			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf.sample
+			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf.sample
 		COMMAND
-			${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf ${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf
+			${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf ${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf.sample
 		COMMAND
-			${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf ${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf
+			${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf ${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf.sample
 		DEPENDS
 			${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
 			${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
@@ -35,8 +35,8 @@
 	add_custom_target(
 		docs-examples
 		DEPENDS
-			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf
-			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf
+			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccd.conf.sample
+			${CMAKE_BINARY_DIR}/fakeroot/${WITH_CONFDIR}/irccdctl.conf.sample
 		SOURCES
 			${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf
 			${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf
--- a/doc/examples/irccd.conf	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/examples/irccd.conf	Tue Mar 01 08:52:51 2016 +0100
@@ -19,7 +19,7 @@
 #
 # [plugins]
 # abc =				# This will search for abc
-# ask = /tmp/ask.lua		# This use /tmp/ask.lua to load the plugin
+# ask = /tmp/ask.js		# This use /tmp/ask.js to load the plugin
 
 [plugins]
 history = ""
--- a/doc/html/api/module/Irccd.File/method/close.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/html/api/module/Irccd.File/method/close.md	Tue Mar 01 08:52:51 2016 +0100
@@ -1,5 +1,5 @@
----
-method: close
-summary: "Force close of the file, automatically called when object is collected."
-synopsis: "File.prototype.close()"
----
+---
+method: close
+summary: "Force close of the file, automatically called when object is collected."
+synopsis: "File.prototype.close()"
+---
--- a/doc/html/api/module/Irccd.Plugin/index.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/html/api/module/Irccd.Plugin/index.md	Tue Mar 01 08:52:51 2016 +0100
@@ -7,6 +7,39 @@
 
 This module let you manage plugins.
 
+## Constants
+
+The following properties are defined:
+
+  - **cachePath**: (string) the path to the cache directory,
+  - **configPath**: (string) the path to the configuration directory,
+  - **dataPath**: (string) the path to the data directory.
+
+## Configuration
+
+An additional property `config` is defined with all options set in the appropriate `[plugin.<name>]` from the user
+configuration file.
+
+### Example
+
+If the configuration file configures the plugin **xyz**:
+
+<div class="panel panel-info">
+ <div class="panel-heading">~/.config/irccd/irccd.conf</div>
+ <div class="panel-body">
+````ini
+[plugin.xyz]
+foo = true
+baz = "hello"
+````
+ </div>
+</div>
+
+Then `Irccd.Plugin.config` will have the following properties:
+
+  - **foo**: (string) set to "true",
+  - **baz**: (string) set to "hello".
+
 ## Functions
 
   - [info](function/info.html)
--- a/doc/html/guide/07-socket/03-messages.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/html/guide/07-socket/03-messages.md	Tue Mar 01 08:52:51 2016 +0100
@@ -2,4 +2,159 @@
 
 The following messages are broadcasted to the clients on specific events.
 
-**Coming soon**
+Events are very close to the [JavaScript events][events], refer to the documentation for more information.
+
+### onChannelMode
+
+#### Properties
+
+  - **event**: (string) "onChannelMode",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **mode**: (string) the mode,
+  - **argument**: (string) the argument.
+
+### onChannelNotice
+
+#### Properties
+
+  - **event**: (string) "onChannelNotice",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **message**: (string) the notice.
+
+### onConnect
+
+#### Properties
+
+  - **event**: (string) "onConnect",
+  - **server**: (string) the server id.
+
+### onInvite
+
+#### Properties
+
+  - **event**: (string) "onInvite"
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel.
+
+### onJoin
+
+#### Properties
+
+  - **event**: (string) "onJoin",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel.
+
+### onKick
+
+#### Properties
+
+  - **event**: (string) "onKick",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **target**: (string) the target,
+  - **reason**: (string) the reason.
+
+### onMessage
+
+#### Properties
+
+  - **event**: (string) "onMessage",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **message**: (string) the message.
+
+### onMe
+
+#### Properties
+
+  - **event**: (string) "onMe",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **target**: (string) the target,
+  - **message**: (string) the message.
+
+### onMode
+
+#### Properties
+
+  - **event**: (string) "onMode",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **mode**: (string) the mode.
+
+### onNames
+
+#### Properties
+
+  - **event**: (string) "onNames",
+  - **server**: (string) the server id,
+  - **channel**: (string) the channel,
+  - **names**: (string list) the list of names.
+
+### onNick
+
+#### Properties
+
+  - **event**: (string) "onNick",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **nickname**: (string) the new nickname.
+
+### onNotice
+
+#### Properties
+
+  - **event**: (string) "onNotice",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **message**: (string) the message.
+
+### onPart
+
+#### Properties
+
+  - **event**: (string) "onPart",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **reason**: (string) the reason.
+
+### onQuery
+
+#### Properties
+
+  - **event**: (string) "onQuery",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **message**: (string) the message.
+
+### onTopic
+
+#### Properties
+
+  - **event**: (string) "onTopic",
+  - **server**: (string) the server id,
+  - **origin**: (string) the originator,
+  - **channel**: (string) the channel,
+  - **topic**: (string) the topic.
+
+### onWhois
+
+#### Properties
+
+  - **event**: (string) "onWhois",
+  - **server**: (string) the server id,
+  - **nickname**: (string) the nickname,
+  - **username**: (string) the username,
+  - **host**: (string) the hostname,
+  - **realname**: (string) the realname.
+
+[events]: @baseurl@/api/index.html
--- a/doc/html/resources/CMakeLists.txt	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/html/resources/CMakeLists.txt	Tue Mar 01 08:52:51 2016 +0100
@@ -28,7 +28,6 @@
 	css/bootstrap.min.css
 	css/doc.css
 	css/doc-guide.css
-	css/irccd.css
 	css/tomorrow.css
 )
 
--- a/doc/html/resources/css/irccd.css	Tue Feb 23 12:59:58 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * irccd.css -- style for irccd website
- */
-
-/*
-
-.color-primary-0 { color: #2C4E68 }
-.color-primary-1 { color: #6C879B }
-.color-primary-2 { color: #45667F }
-.color-primary-3 { color: #183953 }
-.color-primary-4 { color: #072338 }
-
-*/
-
-body {
-	padding-top: 70px;
-	padding-bottom: 20px;
-}
-
-pre {
-	background-color: #ffffff;
-}
-
-.jumbotron {
-	background-color: #F5F5F5;
-}
-
-.navbar {
-	background-color: #2C4E68;
-	border-color: #183953;
-}
-
-.navbar .navbar-toggle {
-	border-color: #183953;
-}
-
-.navbar .navbar-brand {
-	color: rgba(255, 255, 255, 0.9);
-}
-
-.navbar .navbar-text {
-	color: rgba(255, 255, 255, 0.9);
-}
-
-.navbar .navbar-link {
-	color: rgba(255, 255, 255, 0.9);
-}
-
-.navbar .navbar-nav>li>a {
-	color: rgba(255, 255, 255, 0.9);
-}
-
-.navbar .navbar-collapse {
-	border-color: #183953;
-}
-
-.sidebar {
-	margin-top: 50px;
-}
--- a/doc/html/resources/template.html	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/html/resources/template.html	Tue Mar 01 08:52:51 2016 +0100
@@ -13,14 +13,7 @@
     <!-- CSS -->
     <link href="$baseurl$/css/bootstrap.min.css" rel="stylesheet">
     <link href="$baseurl$/css/tomorrow.css" rel="stylesheet">
-
-$if(web)$
-    <link href="$baseurl$/css/irccd.css" rel="stylesheet">
-$endif$
-
-$if(doc)$
     <link href="$baseurl$/css/doc.css" rel="stylesheet">
-$endif$
 
 $if(guide)$
     <link href="$baseurl$/css/doc-guide.css" rel="stylesheet">
@@ -34,51 +27,8 @@
   </head>
 
   <body>
-$if(web)$
-    <nav class="navbar navbar-fixed-top navbar-inverse">
-      <div class="container">
-        <div class="navbar-header">
-          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
-            <span class="sr-only">Toggle navigation</span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </button>
-          <a class="navbar-brand" href="$baseurl$/index.html">irccd</a>
-        </div><!-- navbar-header -->
-        <div id="navbar" class="navbar-collapse collapse">
-          <ul class="nav navbar-nav">
-            <li><a href="$baseurl$/about.html">About</a></li>
-            <li><a href="$baseurl$/documentation.html">Documentation</a></li>
-            <li><a href="$baseurl$/download.html">Download</a></li>
-            <li><a href="$baseurl$/contribute.html">Contribute</a></li>
-            <li><a href="$baseurl$/support.html">Support</a></li>
-          </ul>
-          <p id="joke" class="navbar-text navbar-right">The definitive bot</p>
-        </div><!-- !navbar -->
-      </div><!-- !container -->
-    </nav>
+  <div class="container-fluid">
 
-$if(home)$
-    <!-- Main jumbotron for a primary marketing message or call to action -->
-    <div class="jumbotron">
-     <div class="container">
-      <h1>IRC Client Daemon</h1>
-      <p>Irccd is an IRC bot written in C++14 and Javascript. It is fast, light, powerful, scalable.</p>
-      <p><a class="btn btn-primary btn-lg" href="#" role="button">Download now &raquo;</a></p>
-     </div>
-    </div>
-$endif$ <!-- ! endif home -->
-$endif$ <!-- ! endif web -->
-
-$if(doc)$
-<div class="container-fluid">
-$endif$
-$if(general)$
-<div class="container">
-$endif$
-
-$if(doc)$
   <div class="row">
     <!-- Side bar -->
     <div class="col-sm-1 col-md-2 sidebar">
@@ -129,6 +79,7 @@
 $if(guide)$
 $toc$
 $endif$ <!-- endif guide -->
+
     </div><!-- Side bar -->
 
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
@@ -209,11 +160,6 @@
 $endif$ <!-- endif guide -->
     </div><!-- !column -->
   </div><!-- !row -->
-$endif$
-
-$if(general)$
-$body$
-$endif$ <!-- endif general -->
 
   <hr>
   <footer>
@@ -227,10 +173,6 @@
     <script src="$baseurl$/js/jquery.min.js"></script>
     <script src="$baseurl$/js/bootstrap.min.js"></script>
 
-$if(web)$
-    <script src="$baseurl$/js/joke.js"></script>
-$endif$
-
     <script src="$baseurl$/js/highlight.js"></script>
     <script>hljs.initHighlightingOnLoad();</script>
     <script>jQuery("table").addClass("table");</script>
--- a/doc/man/CMakeLists.txt	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/man/CMakeLists.txt	Tue Mar 01 08:52:51 2016 +0100
@@ -20,12 +20,31 @@
 # Install manuals
 # -------------------------------------------------------------------
 
+set(
+	MONTHS
+	January
+	February
+	March
+	April
+	May
+	June
+	July
+	August
+	September
+	October
+	November
+	December
+)
+
+# Get month as name.
+math(EXPR INDEX "${IRCCD_RELEASE_DATE_MONTH} - 1")
+list(GET MONTHS ${INDEX} MONTH)
+
+set(YEAR ${IRCCD_RELEASE_DATE_YEAR})
+set(DAY ${IRCCD_RELEASE_DATE_DAY})
+
 # Update man pages date
-set(MONTH "March")
-set(DAY 09)
-set(YEAR 2015)
-
 irccd_define_man(irccd.1 man1)
 irccd_define_man(irccd.conf.5 man5)
 irccd_define_man(irccdctl.1 man1)
-irccd_define_man(irccdctl.conf.5 man5)
\ No newline at end of file
+irccd_define_man(irccdctl.conf.5 man5)
--- a/doc/man/irccd.1.in	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/man/irccd.1.in	Tue Mar 01 08:52:51 2016 +0100
@@ -32,20 +32,20 @@
 .It
 Connect to one or more servers,
 .It
-Use different identities for each servers,
+Use different identities for each server,
 .It
-Manageable by UNIX or Internet sockets (both TCP and UDP),
+Manageable with UNIX or Internet sockets,
 .It
-Highly extensible with Lua plugins,
+Highly extensible with JavaScript plugins,
 .El
 .Pp
-The application run as daemon and wait for events in both IRC servers
+The application runs as daemon and waits for events in both IRC servers
 or from the irccdctl(1) utility.
 .Pp
-For instance, when IRC events happen, it calls Lua functions from plugins to
+For instance, when IRC events happen, it calls JavaScript functions from plugins to
 execute specific actions. Example: someone join the channel, the
 .Nm irccd
-daemon will notify all plugins that a specific user joined.
+daemon will notify all plugins that a user joined.
 .Pp
 But it is also possible to use irccdctl(1) to control
 .Nm irccd .
--- a/doc/man/irccd.conf.5.in	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/man/irccd.conf.5.in	Tue Mar 01 08:52:51 2016 +0100
@@ -206,7 +206,7 @@
 .\" FILES
 .Sh FILES
 The default config file is located at
-.Em @CMAKE_INSTALL_PREFIX@/@WITH_ETCDIR@/irccd.conf
+.Em @CMAKE_INSTALL_PREFIX@/@WITH_CONFDIR@/irccd.conf
 .Pp
 The user defined file follow the XDG standard and is usually
 .Em $HOME/.config/irccd/irccd.conf .
--- a/doc/man/irccdctl.conf.5.in	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/man/irccdctl.conf.5.in	Tue Mar 01 08:52:51 2016 +0100
@@ -88,7 +88,7 @@
 .\" FILES
 .Sh FILES
 The default config file is located at
-.Em @CMAKE_INSTALL_PREFIX@/@WITH_ETCDIR@/irccdctl.conf
+.Em @CMAKE_INSTALL_PREFIX@/@WITH_CONFDIR@/irccdctl.conf
 .Pp
 The user defined file follow the XDG standard and is usually
 .Em $HOME/.config/irccd/irccdctl.conf .
--- a/doc/procs/00.new-release.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/procs/00.new-release.md	Tue Mar 01 08:52:51 2016 +0100
@@ -5,17 +5,21 @@
 
 1. Switch to the appropriate release branch.
 
-Example, if about to release 2.0.5 :
+Example, if about to release 2.0.5:
 
-$ hg update release-2.0
+    $ hg update release-2.0
 
-2. Change the version number in the cmake/IrccdVersion.cmake file.
+2. Change the version and date in the cmake/IrccdVersion.cmake file.
 
 Example:
 
-set(IRCCD_VERSION_MAJOR "3")
-set(IRCCD_VERSION_MINOR "5")
-set(IRCCD_VERSION_PATCH "8")
+    set(IRCCD_VERSION_MAJOR "2")
+    set(IRCCD_VERSION_MINOR "0")
+    set(IRCCD_VERSION_PATCH "5")
+
+    set(IRCCD_RELEASE_DATE_YEAR 2016)
+    set(IRCCD_RELEASE_DATE_MONTH 12)
+    set(IRCCD_RELEASE_DATE_DAY 31)
 
 3. Update or verify the CHANGES.md file
 
@@ -23,24 +27,28 @@
 
 You must remove the "This is a development version" notice from the file and change the version.
 
-5. For each plugin, update versions
+5. Change the version in the irccd guide.
 
-All plugins always have the same version as irccd.
+6. Create a new tag x.y.z
 
-6. Change the version in the irccd guide.
+    $ hg tag 2.0.5
 
-7. Create a new tag x.y.z
+7. Create the signature of the tag
+
+    $ hg sign
 
 8. Push the changes and merge by top-porting it
 
 Example:
 
-$ hg push
-$ hg update stable-2
-$ hg merge release-2.0
-$ hg up default
-$ hg merge release-2.0
+    $ hg update stable-2
+    $ hg merge release-2.0
+    $ hg ci -m "Merge with release-2.0"
+    $ hg up @
+    $ hg merge release-2.0
+    $ hg ci -m "Merge with stable-2"
+    $ hg push
 
 9. Create the package
 
-$ make release
\ No newline at end of file
+    $ make release
--- a/doc/procs/20.options.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/procs/20.options.md	Tue Mar 01 08:52:51 2016 +0100
@@ -1,83 +1,83 @@
-Irccd configuration file (irccd.conf)
-=====================================
-
-This file describes how to add new options in the irccd configuration file.
-
-# Current options
-
-## general
-
-  - **uid**: (string or number) the user id to use (Optional, default: none),
-  - **gid**: (string or number) the group id to use (Optional, default: none),
-  - **foreground**: (bool) set to true to not daemonize (Optional, default: false),
-  - **pidfile**: (string) path to a file where to store the irccd pid (Optional, default: none).
-
-## logs
-
-  - **verbose**: (bool) be verbose (Optional, default: false),
-  - **type**: (string) which kind of logging, console, file or syslog (Optional, default: console).
-
-The options for **file** type:
-
-  - **path-logs**: (string) path to the normal messages,
-  - **path-errors**: (string) path to the error messages.
-
-## identity
-
-  - **name**: (id) the identity unique id,
-  - **nickname**: (string) the nickname (Optional, default: irccd),
-  - **realname**: (string) the realname (Optional, default: IRC Client daemon),
-  - **username**: (string) the username name (Optional, default: irccd),
-  - **ctcp-version**: (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
-  - **ctcp-autoreply**: (bool) enable auto CTCP VERSION reply, (Optional, default: true).
-
-## server
-
-  - **name**: (id) the unique id,
-  - **host**: (string) the server address,
-  - **port**: (int) the server port (Optional, default: 6667),
-  - **identity**: (string) an identity to use (Optional, default: irccd's default),
-  - **password**: (string) an optional password (Optional, default: none),
-  - **auto-rejoin**: (bool) auto rejoin a channel after being kicked (Optional, default: false),
-  - **join-invite**: (bool) join channels upon invitation (Optional, default: false),
-  - **channels**: (list) list of channels to auto join, (Optional, default: empty),
-  - **command-char**: (string) the prefix for invoking special commands (Optional, default: !),
-  - **ssl**: (bool) enable or disable SSL (Optional, default: false),
-  - **ssl-verify**: (bool) verify the SSL certificates (Optional, default: true),
-  - **reconnect**: (bool) enable reconnection after failure (Optional, default: true),
-  - **reconnect-tries**: (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0),
-  - **reconnect-timeout**: (int) number of seconds to wait before retrying (Optional, default: 30).
-
-## plugins
-
-No options.
-
-## transport
-
-  - **type**: (string) type of listener "ip" or "unix"
-
-The options for **ip** type:
-
-  - **port**: (int) port number,
-  - **address**: (string) address to bind or "*" for any (Optional, default: *),
-  - **family**: (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4).
-
-The options for **unix** type:
-
-  - **path**: (string) the file path to the socket.
-
-## rule
-
-  - **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**.
-
-# Add a new option
-
-  1. Update this file,
-  2. Open irccd/config.cpp and load your option into the appropriate function,
-  3. Update doc/html/guide/04-irccd/01-config.md,
-  4. Update doc/examples/irccd.conf,
-  5. Update doc/man/irccd.conf.5.in.
+Irccd configuration file (irccd.conf)
+=====================================
+
+This file describes how to add new options in the irccd configuration file.
+
+# Current options
+
+## general
+
+  - **uid**: (string or number) the user id to use (Optional, default: none),
+  - **gid**: (string or number) the group id to use (Optional, default: none),
+  - **foreground**: (bool) set to true to not daemonize (Optional, default: false),
+  - **pidfile**: (string) path to a file where to store the irccd pid (Optional, default: none).
+
+## logs
+
+  - **verbose**: (bool) be verbose (Optional, default: false),
+  - **type**: (string) which kind of logging, console, file or syslog (Optional, default: console).
+
+The options for **file** type:
+
+  - **path-logs**: (string) path to the normal messages,
+  - **path-errors**: (string) path to the error messages.
+
+## identity
+
+  - **name**: (id) the identity unique id,
+  - **nickname**: (string) the nickname (Optional, default: irccd),
+  - **realname**: (string) the realname (Optional, default: IRC Client daemon),
+  - **username**: (string) the username name (Optional, default: irccd),
+  - **ctcp-version**: (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon),
+  - **ctcp-autoreply**: (bool) enable auto CTCP VERSION reply, (Optional, default: true).
+
+## server
+
+  - **name**: (id) the unique id,
+  - **host**: (string) the server address,
+  - **port**: (int) the server port (Optional, default: 6667),
+  - **identity**: (string) an identity to use (Optional, default: irccd's default),
+  - **password**: (string) an optional password (Optional, default: none),
+  - **auto-rejoin**: (bool) auto rejoin a channel after being kicked (Optional, default: false),
+  - **join-invite**: (bool) join channels upon invitation (Optional, default: false),
+  - **channels**: (list) list of channels to auto join, (Optional, default: empty),
+  - **command-char**: (string) the prefix for invoking special commands (Optional, default: !),
+  - **ssl**: (bool) enable or disable SSL (Optional, default: false),
+  - **ssl-verify**: (bool) verify the SSL certificates (Optional, default: true),
+  - **reconnect**: (bool) enable reconnection after failure (Optional, default: true),
+  - **reconnect-tries**: (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0),
+  - **reconnect-timeout**: (int) number of seconds to wait before retrying (Optional, default: 30).
+
+## plugins
+
+No options.
+
+## transport
+
+  - **type**: (string) type of listener "ip" or "unix"
+
+The options for **ip** type:
+
+  - **port**: (int) port number,
+  - **address**: (string) address to bind or "*" for any (Optional, default: *),
+  - **family**: (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4).
+
+The options for **unix** type:
+
+  - **path**: (string) the file path to the socket.
+
+## rule
+
+  - **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**.
+
+# Add a new option
+
+  1. Update this file,
+  2. Open irccd/config.cpp and load your option into the appropriate function,
+  3. Update doc/html/guide/04-irccd/01-config.md,
+  4. Update doc/examples/irccd.conf,
+  5. Update doc/man/irccd.conf.5.in.
--- a/doc/procs/30.options.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/doc/procs/30.options.md	Tue Mar 01 08:52:51 2016 +0100
@@ -1,24 +1,24 @@
-Irccdctl configuration file (irccdctl.conf)
-===========================================
-
-This file describes how to add new options in the irccdctl configuration file.
-
-# Current options
-
-## general
-
-  - **verbose**: (bool) enable verbose message (Optional, default: false).
-
-## connect
-
-  - **type**: (string) type of listener "ip" or "unix".
-
-The options for **internet** type:
-
-  - **host**: (string) host to connect,
-  - **port**: (int) port number,
-  - **family**: (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
-
-The options for **unix** type:
-
-  - **path**: (string) the file path to the socket.
+Irccdctl configuration file (irccdctl.conf)
+===========================================
+
+This file describes how to add new options in the irccdctl configuration file.
+
+# Current options
+
+## general
+
+  - **verbose**: (bool) enable verbose message (Optional, default: false).
+
+## connect
+
+  - **type**: (string) type of listener "ip" or "unix".
+
+The options for **internet** type:
+
+  - **host**: (string) host to connect,
+  - **port**: (int) port number,
+  - **family**: (string) internet family: ipv6 or ipv4 (Optional, default: ipv4).
+
+The options for **unix** type:
+
+  - **path**: (string) the file path to the socket.
--- a/irccd/irccd.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/irccd.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -49,6 +49,7 @@
 		{ "event",	"onChannelMode"		},
 		{ "server",	server->info().name	},
 		{ "origin",	origin			},
+		{ "channel",	channel			},
 		{ "mode",	mode			},
 		{ "argument",	arg			}
 	});
@@ -65,7 +66,7 @@
 	});
 }
 
-void Irccd::handleServerChannelNotice(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string notice)
+void Irccd::handleServerChannelNotice(std::weak_ptr<Server> ptr, std::string origin, std::string channel, std::string message)
 {
 	std::shared_ptr<Server> server = ptr.lock();
 
@@ -75,14 +76,14 @@
 	log::debug() << "server " << server->info().name << ": event onChannelNotice:\n";
 	log::debug() << "  origin: " << origin << "\n";
 	log::debug() << "  channel: " << channel << "\n";
-	log::debug() << "  notice: " << notice << std::endl;
+	log::debug() << "  message: " << message << std::endl;
 
 	json::Value json = json::object({
 		{ "event",	"onChannelNotice"	},
 		{ "server",	server->info().name	},
 		{ "origin",	origin			},
 		{ "channel",	channel			},
-		{ "notice",	notice			}
+		{ "message",	message			}
 	});
 
 	postServerEvent({server->info().name, origin, channel, json.toJson(0)
@@ -91,7 +92,7 @@
 			return "onChannelNotice";
 		}
 		, [=] (Plugin &plugin) {
-			plugin.onChannelNotice(std::move(server), std::move(origin), std::move(channel), std::move(notice));
+			plugin.onChannelNotice(std::move(server), std::move(origin), std::move(channel), std::move(message));
 		}
 #endif
 	});
@@ -393,7 +394,7 @@
 		{ "event",	"onNotice"		},
 		{ "server",	server->info().name	},
 		{ "origin",	origin			},
-		{ "notice",	message			}
+		{ "message",	message			}
 	});
 
 	postServerEvent({server->info().name, origin, /* channel */ "", json.toJson(0)
@@ -526,8 +527,7 @@
 		{ "nickname",	whois.nick		},
 		{ "username",	whois.user		},
 		{ "host",	whois.host		},
-		{ "realname",	whois.realname		},
-		{ "channels",	""			}
+		{ "realname",	whois.realname		}
 	});
 
 	postServerEvent({server->info().name, /* origin */ "", /* channel */ "", object.toJson(-1)
--- a/irccd/js-directory.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-directory.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -197,17 +197,17 @@
 }
 
 /*
- * Method: Directory.prototype.find(pattern, recursive)
+ * Method: Directory.find(pattern, recursive)
  * --------------------------------------------------------
  *
  * Synonym of Directory.find(path, pattern, recursive) but the path is taken
  * from the directory object.
  *
  * Arguments:
- *   - pattern, the regular expression or file name
- *   - recursive, set to true to search recursively (default: false)
+ *   - pattern, the regular expression or file name,
+ *   - recursive, set to true to search recursively (default: false).
  * Returns:
- *   - the path to the file or undefined on errors or not found
+ *   The path to the file or undefined on errors or not found
  */
 int methodFind(js::Context &ctx)
 {
@@ -215,16 +215,16 @@
 }
 
 /*
- * Method: Directory.prototype.remove(recursive)
+ * Method: Directory.remove(recursive)
  * --------------------------------------------------------
  *
  * Synonym of Directory.remove(recursive) but the path is taken from the
  * directory object.
  *
  * Arguments:
- *   - recursive, recursively or not (default: false)
+ *   - recursive, recursively or not (default: false).
  * Throws:
- *   Any exception on error
+ *   - Any exception on error.
  */
 int methodRemove(js::Context &ctx)
 {
@@ -247,8 +247,8 @@
  * Opens and read the directory at the specified path.
  *
  * Arguments:
- *   - path, the path to the directory
- *   - flags, the optional flags (default: 0)
+ *   - path, the path to the directory,
+ *   - flags, the optional flags (default: 0).
  * Throws:
  *   - Any exception on error
  */
@@ -296,11 +296,11 @@
  * Find an entry by a pattern or a regular expression.
  *
  * Arguments:
- *   - path, the base path
- *   - pattern, the regular expression or file name
- *   - recursive, set to true to search recursively (default: false)
+ *   - path, the base path,
+ *   - pattern, the regular expression or file name,
+ *   - recursive, set to true to search recursively (default: false).
  * Returns:
- *   - the path to the file or undefined on errors or not found
+ *   The path to the file or undefined on errors or not found.
  */
 int funcFind(js::Context &ctx)
 {
@@ -314,10 +314,10 @@
  * Remove the directory optionally recursively.
  *
  * Arguments:
- *   - path, the path to the directory
- *   - recursive, recursively or not (default: false)
+ *   - path, the path to the directory,
+ *   - recursive, recursively or not (default: false).
  * Throws:
- *   Any exception on error
+ *   - Any exception on error.
  */
 int funcRemove(js::Context &ctx)
 {
@@ -332,10 +332,10 @@
  * just like you have invoked mkdir -p.
  *
  * Arguments:
- *   - path, the path to the directory
- *   - mode, the mode, not available on all platforms
+ *   - path, the path to the directory,
+ *   - mode, the mode, not available on all platforms.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int funcMkdir(js::Context &ctx)
 {
--- a/irccd/js-elapsed-timer.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-elapsed-timer.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -80,7 +80,7 @@
  * Get the number of elapsed milliseconds.
  *
  * Returns:
- *   - The time elapsed
+ *   The time elapsed.
  */
 int elapsed(js::Context &ctx)
 {
--- a/irccd/js-file.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-file.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -202,13 +202,13 @@
  * -------------------------------------------------------- */
 
 /*
- * Method: File.prototype.basename()
+ * Method: File.basename()
  * --------------------------------------------------------
  *
  * Synonym of `Irccd.File.basename(path)` but with the path from the file.
  *
  * Returns:
- *   The base file name
+ *   The base name.
  */
 int methodBasename(js::Context &ctx)
 {
@@ -218,7 +218,7 @@
 }
 
 /*
- * Method: File.prototype.close()
+ * Method: File.close()
  * --------------------------------------------------------
  *
  * Force close of the file, automatically called when object is collected.
@@ -231,13 +231,13 @@
 }
 
 /*
- * Method: File.prototype.dirname()
+ * Method: File.dirname()
  * --------------------------------------------------------
  *
  * Synonym of `Irccd.File.dirname(path)` but with the path from the file.
  *
  * Returns:
- *   The base directory name
+ *   The directory name.
  */
 int methodDirname(js::Context &ctx)
 {
@@ -247,19 +247,17 @@
 }
 
 /*
- * Method: File.prototype.read(amount)
+ * Method: File.read(amount)
  * --------------------------------------------------------
  *
  * Read the specified amount of characters or the whole file.
  *
  * Arguments:
- *   - amount, the amount of characters or -1 to read all (Optional, default: -1)
- *
+ *   - amount, the amount of characters or -1 to read all (Optional, default: -1).
  * Returns:
- *   - The string
- *
+ *   The string.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodRead(js::Context &ctx)
 {
@@ -279,15 +277,15 @@
 }
 
 /*
- * Method: File.prototype.readline()
+ * Method: File.readline()
  * --------------------------------------------------------
  *
  * Read the next line available.
  *
  * Returns:
- *   - The next line or undefined if eof
+ *   The next line or undefined if eof.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodReadline(js::Context &ctx)
 {
@@ -306,13 +304,13 @@
 }
 
 /*
- * Method: File.prototype.remove()
+ * Method: File.remove()
  * --------------------------------------------------------
  *
  * Synonym of File.remove(path) but with the path from the file.
  *
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodRemove(js::Context &ctx)
 {
@@ -323,16 +321,16 @@
 }
 
 /*
- * Method: File.prototype.seek(type, amount)
+ * Method: File.seek(type, amount)
  * --------------------------------------------------------
  *
  * Sets the position in the file.
  *
  * Arguments:
- *   - type, the type of setting (File.SeekSet, File.SeekCur, File.SeekSet)
- *   - amount, the new offset
+ *   - type, the type of setting (File.SeekSet, File.SeekCur, File.SeekSet),
+ *   - amount, the new offset.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodSeek(js::Context &ctx)
 {
@@ -355,15 +353,15 @@
 #if defined(HAVE_STAT)
 
 /*
- * Method: File.prototype.stat() [optional]
+ * Method: File.stat() [optional]
  * --------------------------------------------------------
  *
  * Synonym of File.stat(path) but with the path from the file.
  *
  * Returns:
- *   - The stat information
+ *   The stat information.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodStat(js::Context &ctx)
 {
@@ -384,15 +382,15 @@
 #endif // !HAVE_STAT
 
 /*
- * Method: File.prototype.tell()
+ * Method: File.tell()
  * --------------------------------------------------------
  *
  * Get the actual position in the file.
  *
  * Returns:
- *   - The position
+ *   The position.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodTell(js::Context &ctx)
 {
@@ -411,15 +409,15 @@
 }
 
 /*
- * Method: File.prototype.write(data)
+ * Method: File.write(data)
  * --------------------------------------------------------
  *
  * Write some characters to the file.
  *
  * Arguments:
- *   - data, the character to write
+ *   - data, the character to write.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int methodWrite(js::Context &ctx)
 {
@@ -463,10 +461,10 @@
  * Open a file specified by path with the specified mode.
  *
  * Arguments:
- *   - path, the path to the file
- *   - mode, the mode, can be one of [abrwt]
+ *   - path, the path to the file,
+ *   - mode, the mode string.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int constructor(js::Context &ctx)
 {
@@ -492,9 +490,9 @@
  * Return the file basename as specified in `basename(3)` C function.
  *
  * Arguments:
- *   - path, the path to the file
+ *   - path, the path to the file.
  * Returns:
- *   - the base name
+ *   The base name.
  */
 int functionBasename(js::Context &ctx)
 {
@@ -510,9 +508,9 @@
  * Return the file directory name as specified in `dirname(3)` C function.
  *
  * Arguments:
- *   - path, the path to the file
+ *   - path, the path to the file.
  * Returns:
- *   - the directory name
+ *   The directory name.
  */
 int functionDirname(js::Context &ctx)
 {
@@ -528,11 +526,11 @@
  * Check if the file exists.
  *
  * Arguments:
- *   - path, the path to the file
+ *   - path, the path to the file.
  * Returns:
- *   - true if exists
+ *   True if exists.
  * Throws:
- *   - Any exception if we don't have access
+ *   - Any exception if we don't have access.
  */
 int functionExists(js::Context &ctx)
 {
@@ -548,9 +546,9 @@
  * Remove the file at the specified path.
  *
  * Arguments:
- *   - path, the path to the file
+ *   - path, the path to the file.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int functionRemove(js::Context &ctx)
 {
@@ -569,11 +567,11 @@
  * Get file information at the specified path.
  *
  * Arguments:
- *   - path, the path to the file
+ *   - path, the path to the file.
  * Returns:
- *   - the stats information
+ *   The stat information.
  * Throws:
- *   - Any exception on error
+ *   - Any exception on error.
  */
 int functionStat(js::Context &ctx)
 {
--- a/irccd/js-logger.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-logger.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -44,7 +44,7 @@
  * Write a verbose message.
  *
  * Arguments:
- *   - message, the message
+ *   - message, the message.
  */
 int info(js::Context &ctx)
 {
@@ -58,7 +58,7 @@
  * Write a warning message.
  *
  * Arguments:
- *   - message, the warning
+ *   - message, the warning.
  */
 int warning(js::Context &ctx)
 {
@@ -72,7 +72,7 @@
  * Write a debug message, only shown if irccd is compiled in debug.
  *
  * Arguments:
- *   - message, the message
+ *   - message, the message.
  */
 int debug(js::Context &ctx)
 {
--- a/irccd/js-plugin.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-plugin.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -63,7 +63,7 @@
  * Arguments:
  *   - name, the plugin identifier, if not specified the current plugin is selected.
  * Returns:
- *   - The plugin information or undefined if the plugin was not found.
+ *   The plugin information or undefined if the plugin was not found.
  */
 int info(js::Context &ctx)
 {
@@ -87,7 +87,7 @@
  * Get the list of plugins, the array returned contains all plugin names.
  *
  * Returns:
- *   - The list of all plugin names.
+ *   The list of all plugin names.
  */
 int list(js::Context &ctx)
 {
--- a/irccd/js-server.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-server.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -34,8 +34,8 @@
  * Change a channel mode.
  *
  * Arguments:
- *   - channel, the channel
- *   - mode, the mode
+ *   - channel, the channel,
+ *   - mode, the mode.
  */
 int cmode(js::Context &ctx)
 {
@@ -51,8 +51,8 @@
  * Send a channel notice.
  *
  * Arguments:
- *   - channel, the channel
- *   - message, the message
+ *   - channel, the channel,
+ *   - message, the message.
  */
 int cnotice(js::Context &ctx)
 {
@@ -108,8 +108,8 @@
  * Invite someone to a channel.
  *
  * Arguments:
- *   - target, the target to invite
- *   - channel, the channel
+ *   - target, the target to invite,
+ *   - channel, the channel.
  */
 int invite(js::Context &ctx)
 {
@@ -125,8 +125,8 @@
  * Join a channel with an optional password.
  *
  * Arguments:
- *   - channel, the channel to join
- *   - password, the password or undefined to not use
+ *   - channel, the channel to join,
+ *   - password, the password or undefined to not use.
  */
 int join(js::Context &ctx)
 {
@@ -142,9 +142,9 @@
  * Kick someone from a channel.
  *
  * Arguments:
- *   - target, the target to kick
- *   - channel, the channel
- *   - reason, the optional reason or undefined to not set
+ *   - target, the target to kick,
+ *   - channel, the channel,
+ *   - reason, the optional reason or undefined to not set.
  */
 int kick(js::Context &ctx)
 {
@@ -164,8 +164,8 @@
  * Send a CTCP Action.
  *
  * Arguments:
- *   - target, the target or a channel
- *   - message, the message
+ *   - target, the target or a channel,
+ *   - message, the message.
  */
 int me(js::Context &ctx)
 {
@@ -181,8 +181,8 @@
  * Send a message.
  *
  * Arguments:
- *   - target, the target or a channel
- *   - message, the message
+ *   - target, the target or a channel,
+ *   - message, the message.
  */
 int message(js::Context &ctx)
 {
@@ -198,7 +198,7 @@
  * Change your mode.
  *
  * Arguments:
- *   - mode, the new mode
+ *   - mode, the new mode.
  */
 int mode(js::Context &ctx)
 {
@@ -214,7 +214,7 @@
  * Get the list of names from a channel.
  *
  * Arguments:
- *   - channel, the channel
+ *   - channel, the channel.
  */
 int names(js::Context &ctx)
 {
@@ -230,7 +230,7 @@
  * Change the nickname.
  *
  * Arguments:
- *   - nickname, the nickname
+ *   - nickname, the nickname.
  */
 int nick(js::Context &ctx)
 {
@@ -246,8 +246,8 @@
  * Send a private notice.
  *
  * Arguments:
- *   - target, the target
- *   - message, the notice message
+ *   - target, the target,
+ *   - message, the notice message.
  */
 int notice(js::Context &ctx)
 {
@@ -263,8 +263,8 @@
  * Leave a channel.
  *
  * Arguments:
- *   - channel, the channel to leave
- *   - reason, the optional reason, keep undefined for portability
+ *   - channel, the channel to leave,
+ *   - reason, the optional reason, keep undefined for portability.
  */
 int part(js::Context &ctx)
 {
@@ -280,7 +280,7 @@
  * Send a raw message to the IRC server.
  *
  * Arguments:
- *   - raw, the raw message (without terminators)
+ *   - raw, the raw message (without terminators).
  */
 int send(js::Context &ctx)
 {
@@ -296,8 +296,8 @@
  * Change a channel topic.
  *
  * Arguments:
- *   - channel, the channel
- *   - topic, the new topic
+ *   - channel, the channel,
+ *   - topic, the new topic.
  */
 int topic(js::Context &ctx)
 {
@@ -313,7 +313,7 @@
  * Get whois information.
  *
  * Arguments:
- *   - target, the target
+ *   - target, the target.
  */
 int whois(js::Context &ctx)
 {
@@ -330,7 +330,7 @@
  * as property key.
  *
  * Returns:
- *   - the server name (unique)
+ *   The server name (unique).
  */
 int toString(js::Context &ctx)
 {
@@ -412,7 +412,7 @@
  * Register a new server to the irccd instance.
  *
  * Arguments:
- *   - s, the server to add
+ *   - s, the server to add.
  */
 int add(js::Context &ctx)
 {
@@ -433,7 +433,7 @@
  * Arguments:
  *   - name, the server name
  * Returns:
- *   - the server object or undefined if not found
+ *   The server object or undefined if not found.
  */
 int find(js::Context &ctx)
 {
@@ -456,7 +456,7 @@
  * Get the map of all loaded servers.
  *
  * Returns:
- *   - an object with string-to-servers pairs.
+ *   An object with string-to-servers pairs.
  */
 int list(js::Context &ctx)
 {
@@ -475,7 +475,7 @@
  * Remove a server from the irccd instance. You can pass the server object since it's coercible to a string.
  *
  * Arguments:
- *   - name the server name
+ *   - name the server name.
  */
 int remove(js::Context &ctx)
 {
--- a/irccd/js-system.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-system.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -44,9 +44,9 @@
  * Get an environment system variable.
  *
  * Arguments:
- *   - key, the environment variable
+ *   - key, the environment variable.
  * Returns:
- *   - The value
+ *   The value.
  */
 int env(js::Context &ctx)
 {
@@ -62,7 +62,7 @@
  * Execute a system command.
  *
  * Arguments:
- *   - cmd, the command to execute
+ *   - cmd, the command to execute.
  */
 int exec(js::Context &ctx)
 {
@@ -78,7 +78,7 @@
  * Get the operating system user's home.
  *
  * Returns:
- *   - The user home directory
+ *   The user home directory.
  */
 int home(js::Context &ctx)
 {
@@ -94,7 +94,7 @@
  * Get the operating system name.
  *
  * Returns:
- *   - The system name
+ *   The system name.
  */
 int name(js::Context &ctx)
 {
@@ -115,9 +115,9 @@
  *   - cmd, the command to execute,
  *   - mode, the mode (e.g. "r").
  * Returns:
- *   - A Irccd.File object
+ *   A Irccd.File object.
  * Throws
- *   - Irccd.SystemError on failures
+ *   - Irccd.SystemError on failures.
  */
 int popen(js::Context &ctx)
 {
@@ -153,7 +153,7 @@
  * Get the number of milliseconds since irccd was started.
  *
  * Returns:
- *   - The number of milliseconds
+ *   The number of milliseconds.
  */
 int ticks(js::Context &ctx)
 {
@@ -163,7 +163,7 @@
 }
 
 /*
- * Function: System.usleep(delay)
+ * Function: Irccd.System.usleep(delay)
  * ------------------------------------------------------------------
  *
  * Sleep the main loop for the specific delay in microseconds.
@@ -176,13 +176,13 @@
 }
 
 /*
- * Function: System.uptime()
+ * Function: Irccd.System.uptime()
  * ------------------------------------------------------------------
  *
  * Get the system uptime.
  *
  * Returns:
- *   - The system uptime
+ *   The system uptime.
  */
 int uptime(js::Context &ctx)
 {
@@ -192,13 +192,13 @@
 }
 
 /*
- * Function: System.version()
+ * Function: Irccd.System.version()
  * ------------------------------------------------------------------
  *
  * Get the operating system version.
  *
  * Returns:
- *   - The system version
+ *   The system version.
  */
 int version(js::Context &ctx)
 {
--- a/irccd/js-timer.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-timer.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -80,15 +80,15 @@
 };
 
 /*
- * Function: Timer(type, delay) [constructor]
+ * Function: Irccd.Timer(type, delay, callback) [constructor]
  * --------------------------------------------------------
  *
- * Create a new timer, the timer is not created automatically and the function
- * can be set by assigning to the onTimeout property.
+ * Create a new timer object.
  *
  * Arguments:
- *   - type, the type (Timer.Single or Timer.Repeat)
- *   - delay, the delay in milliseconds
+ *   - type, the type of timer (Irccd.Timer.Single or Irccd.Timer.Repeat),
+ *   - delay, the interval in milliseconds,
+ *   - callback, the function to call.
  */
 int constructor(js::Context &ctx)
 {
--- a/irccd/js-unicode.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-unicode.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -29,9 +29,9 @@
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is in the digit category
+ *   True if the code is in the digit category.
  */
 int isDigit(js::Context &ctx)
 {
@@ -45,9 +45,9 @@
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is in the letter category
+ *   True if the code is in the letter category.
  */
 int isLetter(js::Context &ctx)
 {
@@ -61,9 +61,9 @@
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is lower case
+ *   True if the code is lower case.
  */
 int isLower(js::Context &ctx)
 {
@@ -77,9 +77,9 @@
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is in the space category
+ *   True if the code is in the space category.
  */
 int isSpace(js::Context &ctx)
 {
@@ -89,13 +89,13 @@
 }
 
 /*
- * Function: Unicode.isTitle(code)
+ * Function: Irccd.Unicode.isTitle(code)
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is title case
+ *   True if the code is title case.
  */
 int isTitle(js::Context &ctx)
 {
@@ -109,9 +109,9 @@
  * --------------------------------------------------------
  *
  * Arguments:
- *   - code, the code point
+ *   - code, the code point.
  * Returns:
- *   - true if the code is upper case
+ *   True if the code is upper case.
  */
 int isUpper(js::Context &ctx)
 {
--- a/irccd/js-util.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/js-util.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -63,12 +63,16 @@
 namespace {
 
 /*
- * Function: format(text, parameters)
+ * Function: Irccd.Util.format(text, parameters)
  * --------------------------------------------------------
  *
  * Format a string with templates.
  *
- * TODO: document
+ * Arguments:
+ *   - input, the text to update,
+ *   - params, the parameters.
+ * Returns:
+ *   The converted text.
  */
 int format(js::Context &ctx)
 {
@@ -82,19 +86,19 @@
 }
 
 /*
- * Function: splituser(ident)
+ * Function: Irccd.Util.splituser(ident)
  * --------------------------------------------------------
  *
  * Return the nickname part from a full username.
  *
  * Arguments:
- *   - ident, the full identity
+ *   - ident, the full identity.
  * Returns:
- *   - The nickname part
+ *   The nickname.
  */
 int splituser(js::Context &ctx)
 {
-	const char *target = ctx.get<const char *>(0);
+	const char *target = ctx.require<const char *>(0);
 	char nick[32] = {0};
 
 	irc_target_get_nick(target, nick, sizeof (nick) -1);
@@ -104,19 +108,19 @@
 }
 
 /*
- * Function: splithost(ident)
+ * Function: Irccd.Util.splithost(ident)
  * --------------------------------------------------------
  *
  * Return the hostname part from a full username.
  *
  * Arguments:
- *   - ident, the full identity
+ *   - ident, the full identity.
  * Returns:
- *   - The hostname part
+ *   The hostname.
  */
 int splithost(js::Context &ctx)
 {
-	const char *target = ctx.get<const char *>(0);
+	const char *target = ctx.require<const char *>(0);
 	char host[32] = {0};
 
 	irc_target_get_host(target, host, sizeof (host) -1);
--- a/irccd/plugin.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/plugin.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * plugin.cpp -- irccd Lua plugin interface
+ * plugin.cpp -- irccd JavaScript plugin interface
  *
  * Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
  *
--- a/irccd/plugin.h	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccd/plugin.h	Tue Mar 01 08:52:51 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * plugin.h -- irccd Lua plugin interface
+ * plugin.h -- irccd JavaScript plugin interface
  *
  * Copyright (c) 2013-2016 David Demelier <markand@malikania.fr>
  *
--- a/irccdctl/command-watch.cpp	Tue Feb 23 12:59:58 2016 +0100
+++ b/irccdctl/command-watch.cpp	Tue Mar 01 08:52:51 2016 +0100
@@ -41,7 +41,7 @@
 	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 << "notice:      " << v.valueOr("notice", "").toString() << "\n";
+	std::cout << "message:     " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onConnect(const json::Value &v)
@@ -123,7 +123,7 @@
 	std::cout << "event:       onNotice\n";
 	std::cout << "server:      " << v.valueOr("server", "").toString() << "\n";
 	std::cout << "origin:      " << v.valueOr("origin", "").toString() << "\n";
-	std::cout << "notice:      " << v.valueOr("notice", "").toString() << "\n";
+	std::cout << "message:      " << v.valueOr("message", "").toString() << "\n";
 }
 
 void onPart(const json::Value &v)
--- a/plugins/CMakeLists.txt	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/CMakeLists.txt	Tue Mar 01 08:52:51 2016 +0100
@@ -23,10 +23,6 @@
 	COMMENT "Irccd plugins"
 )
 
-if (WITH_WEB)
-	set(ARGS web:1)
-endif ()
-
 foreach (plugin ${IRCCD_PLUGINS})
 	string(TOUPPER ${plugin} optname)
 
@@ -52,7 +48,7 @@
 					${resources_SOURCE_DIR}/template.html
 					docs-resources
 				ARGS -Vguide
-				VARIABLE baseurl:${baseurl} doc:1 ${ARGS}
+				VARIABLE baseurl:${baseurl}
 				FROM markdown TO html5
 				STANTALONE MAKE_DIRECTORY TOC
 			)
--- a/plugins/hangman/hangman.js	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/hangman/hangman.js	Tue Mar 01 08:52:51 2016 +0100
@@ -291,7 +291,7 @@
 		nickname: Util.splituser(origin),
 		origin: origin,
 		plugin: Plugin.info().name,
-		server: server
+		server: server.toString()
 	};
 
 	var st = game.propose(proposition, kw.nickname);
--- a/plugins/hangman/hangman.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/hangman/hangman.md	Tue Mar 01 08:52:51 2016 +0100
@@ -70,16 +70,16 @@
 
 The following keywords are supported:
 
-| Format                  | Keywords                          | Notes                           |
-|-------------------------|-----------------------------------|---------------------------------|
-| (any)                   | server, channel, nickname, origin | all formats                     |
-| **format-asked**        | letter                            | the letter proposal             |
-| **format-dead**         | word                              | the word to find                |
-| **format-found**        | word                              | the hidden word                 |
-| **format-start**        | word                              | the hidden word                 |
-| **format-win**          | word                              | the word to find                |
-| **format-wrong-word**   | word                              | the invalid word proposal       |
-| **format-wrong-letter** | letter                            | the letter proposal             |
+| Format                  | Keywords                                           | Notes                           |
+|-------------------------|----------------------------------------------------|---------------------------------|
+| (any)                   | channel, command, nickname, origin, plugin, server | all formats                     |
+| **format-asked**        | letter                                             | the letter proposal             |
+| **format-dead**         | word                                               | the word to find                |
+| **format-found**        | word                                               | the hidden word                 |
+| **format-start**        | word                                               | the hidden word                 |
+| **format-win**          | word                                               | the word to find                |
+| **format-wrong-word**   | word                                               | the invalid word proposal       |
+| **format-wrong-letter** | letter                                             | the letter proposal             |
 
 Example:
 
--- a/plugins/history/history.js	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/history/history.js	Tue Mar 01 08:52:51 2016 +0100
@@ -136,11 +136,12 @@
 {
 	var args = message.trim().split(" ");
 	var kw = {
-		"server":	server.toString(),
-		"channel":	channel,
-		"origin":	origin,
-		"nickname":	Util.splituser(origin),
-		"plugin":	command(server),
+		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) {
--- a/plugins/history/history.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/history/history.md	Tue Mar 01 08:52:51 2016 +0100
@@ -58,13 +58,13 @@
 
 The following keywords are supported:
 
-| Format                  | Keywords                          | Notes                           |
-|-------------------------|-----------------------------------|---------------------------------|
-| (any)                   | server, channel, nickname, origin |                                 |
-| **file**                | server, channel                   | does not support (any)          |
-| **format-seen**         | target, (date)                    | target is the specified nick    |
-| **format-said**         | target, message, (date)           |                                 |
-| **format-unknown**      | target                            |                                 |
+| Format                  | Keywords                                           | Notes                           |
+|-------------------------|----------------------------------------------------|---------------------------------|
+| (any)                   | channel, command, nickname, origin, plugin, server |                                 |
+| **file**                | channel, server                                    | does not support (any)          |
+| **format-seen**         | target, (date)                                     | target is the specified nick    |
+| **format-said**         | message, target, (date)                            |                                 |
+| **format-unknown**      | target                                             |                                 |
 
 Example:
 
--- a/plugins/logger/logger.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/logger/logger.md	Tue Mar 01 08:52:51 2016 +0100
@@ -55,14 +55,14 @@
 
 | Format                  | Keywords                          | Notes                           |
 |-------------------------|-----------------------------------|---------------------------------|
-| (any)                   | server, nickname, origin, source  | source is the channel or nick   |
+| (any)                   | nickname, origin, server, source  | source is the channel or nick   |
 | **format-cmode**        | arg, channel, mode,               | the mode and its arguments      |
 | **format-cnotice**      | channel, message                  | the message notice              |
 | **format-join**         | channel                           |                                 |
 | **format-kick**         | channel, reason, target           |                                 |
 | **format-me**           | channel, message                  | message is the emote action     |
 | **format-message**      | channel, message                  |                                 |
-| **format-mode**         | mode, arg                         | the mode and its arguments      |
+| **format-mode**         | arg, mode                         | the mode and its arguments      |
 | **format-notice**       | message                           | the notice message              |
 | **format-part**         | channel, reason                   |                                 |
 | **format-query**        | message                           |                                 |
--- a/plugins/plugin/plugin.js	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/plugin/plugin.js	Tue Mar 01 08:52:51 2016 +0100
@@ -50,9 +50,10 @@
 		}
 	},
 	
-	keywords: function (server, origin)
+	keywords: function (server, channel, origin)
 	{
 		return {
+			channel: channel,
 			command: server.info().commandChar + Plugin.info().name,
 			nickname: Util.splituser(origin),
 			origin: origin,
@@ -63,7 +64,7 @@
 
 	list: function (server, origin, target, query)
 	{
-		var kw = commands.keywords(server, origin);
+		var kw = commands.keywords(server, target, origin);
 		var list = Plugin.list();
 		var str;
 
@@ -77,7 +78,7 @@
 
 	info: function (server, origin, target, name)
 	{
-		var kw = commands.keywords(server, origin);
+		var kw = commands.keywords(server, target, origin);
 		var info = Plugin.info(name);
 		var str;
 
--- a/plugins/plugin/plugin.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/plugin/plugin.md	Tue Mar 01 08:52:51 2016 +0100
@@ -38,8 +38,8 @@
 
 The following keywords are supported:
 
-| Format                  | Keywords                                | Notes                                       |
-|-------------------------|-----------------------------------------|---------------------------------------------|
-| (any)                   | command, nickname, origin, server       | the command is the plugin invocation prefix |
-| **format-info**         | author, license, name, summary, version | the plugin information                      |
-| **format-not-found**    | name                                    | the plugin name                             |
+| Format                  | Keywords                                           | Notes                                       |
+|-------------------------|----------------------------------------------------|---------------------------------------------|
+| (any)                   | channel, command, nickname, origin, plugin, server |                                             |
+| **format-info**         | author, license, name, summary, version            | the plugin information                      |
+| **format-not-found**    | name                                               | the plugin name                             |
--- a/plugins/roulette/roulette.js	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/roulette/roulette.js	Tue Mar 01 08:52:51 2016 +0100
@@ -121,7 +121,7 @@
 		command: server.info().commandChar + Plugin.info().name,
 		nickname: Util.splituser(origin),
 		origin: origin,
-		server: server,
+		server: server.toString(),
 		plugin: Plugin.info().name
 	};
 
@@ -134,7 +134,7 @@
 		server.kick(Util.splituser(origin), channel, Util.format(Gun.formats["shot"], kw));
 		Gun.remove(game);
 	} else {
-		kw.count = game.index;
+		kw.count = (6 - game.index).toString();
 		server.message(channel, Util.format(Gun.formats["lucky"], kw));
 	}
 }
--- a/plugins/roulette/roulette.md	Tue Feb 23 12:59:58 2016 +0100
+++ b/plugins/roulette/roulette.md	Tue Mar 01 08:52:51 2016 +0100
@@ -42,10 +42,10 @@
 
 The following keywords are supported:
 
-| Format           | Keywords                          | Notes                             |
-|------------------|-----------------------------------|-----------------------------------|
-| (any)            | server, channel, nickname, origin | all formats                       |
-| **format-lucky** | count                             | the number of cylinder count left |
+| Format           | Keywords                                           | Notes                             |
+|------------------|----------------------------------------------------|-----------------------------------|
+| (any)            | channel, command, nickname, origin, plugin, server | all formats                       |
+| **format-lucky** | count                                              | the number of cylinder count left |
 
 Example:
 
--- a/win32/CMakeLists.txt	Tue Feb 23 12:59:58 2016 +0100
+++ b/win32/CMakeLists.txt	Tue Mar 01 08:52:51 2016 +0100
@@ -1,44 +1,44 @@
-#
-# CMakeLists.txt -- CMake build system for irccd
-#
-# Copyright (c) 2013-2015 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-#
-# Copy MinGW runtimes into the WITH_BINDIR directory and then put them in the Qt IFW installer hierarchy so that
-# they are also installed.
-#
-if (IRCCD_64BITS)
-	set(ARCH "amd64")
-	set(LIBGCC libgcc_s_seh-1.dll)
-else ()
-	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}
-)
-
-install(FILES ${FILES} DESTINATION ${WITH_BINDIR})
-
-if (IRCCD_PACKAGE)
-	file(COPY ${FILES} DESTINATION ${CMAKE_BINARY_DIR}/installer/packages/base/data/${WITH_BINDIR})
-endif ()
+#
+# CMakeLists.txt -- CMake build system for irccd
+#
+# Copyright (c) 2013-2015 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+#
+# Copy MinGW runtimes into the WITH_BINDIR directory and then put them in the Qt IFW installer hierarchy so that
+# they are also installed.
+#
+if (IRCCD_64BITS)
+	set(ARCH "amd64")
+	set(LIBGCC libgcc_s_seh-1.dll)
+else ()
+	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}
+)
+
+install(FILES ${FILES} DESTINATION ${WITH_BINDIR})
+
+if (IRCCD_PACKAGE)
+	file(COPY ${FILES} DESTINATION ${CMAKE_BINARY_DIR}/installer/packages/base/data/${WITH_BINDIR})
+endif ()