Mercurial > irccd
changeset 423:28dcfce7cd8c stable-2
MFD for #624, #623, #618
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 03 Feb 2017 19:02:53 +0100 |
parents | f65d04ae46ac (current diff) 186864e9f131 (diff) |
children | cbea51723652 |
files | doc/html/api/event/index.md doc/html/api/module/index.md doc/html/build/index.md doc/html/dev/index.md doc/html/irccd/index.md doc/html/irccdctl/index.md doc/html/misc/index.md |
diffstat | 33 files changed, 85 insertions(+), 165 deletions(-) [+] |
line wrap: on
line diff
--- a/cmake/function/IrccdBuildHtml.cmake Wed Feb 01 11:53:09 2017 +0100 +++ b/cmake/function/IrccdBuildHtml.cmake Fri Feb 03 19:02:53 2017 +0100 @@ -110,13 +110,19 @@ # Create a list of parents for the breadcrumb widget. string(REPLACE "/" ";" parentlist "${dirname}") set(parents " -\n") - set(parents "${parents} name: \"index\"\n") + set(parents "${parents} active: true\n") + set(parents "${parents} name: \"Home\"\n") set(parents "${parents} path: \"${baseurl}index.html\"\n") set(path "${baseurl}") foreach (p ${parentlist}) set(path "${path}${p}/") set(parents "${parents} -\n") + + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dirname}/${path}index.md) + set(parents "${parents} active: true\n") + endif () + set(parents "${parents} name: \"${p}\"\n") set(parents "${parents} path: \"${path}index.html\"\n") endforeach ()
--- a/doc/html/CMakeLists.txt Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/CMakeLists.txt Fri Feb 03 19:02:53 2017 +0100 @@ -21,7 +21,6 @@ set( HTML_SOURCES ${html_SOURCE_DIR}/index.md - ${html_SOURCE_DIR}/api/module/index.md ${html_SOURCE_DIR}/api/module/Irccd.Directory/index.md ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.remove.md ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.mkdir.md @@ -113,7 +112,6 @@ ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.format.md ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.splituser.md ${html_SOURCE_DIR}/api/index.md - ${html_SOURCE_DIR}/api/event/index.md ${html_SOURCE_DIR}/api/event/onWhois.md ${html_SOURCE_DIR}/api/event/onMessage.md ${html_SOURCE_DIR}/api/event/onPart.md @@ -137,17 +135,13 @@ ${html_SOURCE_DIR}/api/event/onQuery.md ${html_SOURCE_DIR}/build/build-from-sources.md ${html_SOURCE_DIR}/build/build-options.md - ${html_SOURCE_DIR}/build/index.md - ${html_SOURCE_DIR}/dev/index.md ${html_SOURCE_DIR}/dev/plugin-javascript-introduction.md ${html_SOURCE_DIR}/dev/socket-commands.md ${html_SOURCE_DIR}/dev/socket-protocol.md ${html_SOURCE_DIR}/irccd/configuring.md - ${html_SOURCE_DIR}/irccd/index.md ${html_SOURCE_DIR}/irccd/paths.md ${html_SOURCE_DIR}/irccd/usage.md ${html_SOURCE_DIR}/irccdctl/configuring.md - ${html_SOURCE_DIR}/irccdctl/index.md ${html_SOURCE_DIR}/irccdctl/usage.md ${html_SOURCE_DIR}/irccdctl/command/index.md ${html_SOURCE_DIR}/irccdctl/command/help.md @@ -176,7 +170,6 @@ ${html_SOURCE_DIR}/irccdctl/command/watch.md ${html_SOURCE_DIR}/misc/common-patterns-and-formatting.md ${html_SOURCE_DIR}/misc/configuration-syntax.md - ${html_SOURCE_DIR}/misc/index.md ) set(
--- a/doc/html/api/event/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ ---- -js: true ---- - -# Supported events - - - [onChannelMode](onChannelMode.html) - - [onChannelNotice](onChannelNotice.html) - - [onCommand](onCommand.html) - - [onConnect](onConnect.html) - - [onInvite](onInvite.html) - - [onJoin](onJoin.html) - - [onLoad](onLoad.html) - - [onMe](onMe.html) - - [onMessage](onMessage.html) - - [onMode](onMode.html) - - [onNames](onNames.html) - - [onNick](onNick.html) - - [onNotice](onNotice.html) - - [onPart](onPart.html) - - [onQuery](onQuery.html) - - [onQueryCommand](onQueryCommand.html) - - [onReload](onReload.html) - - [onTopic](onTopic.html) - - [onUnload](onUnload.html) - - [onWhois](onWhois.html)
--- a/doc/html/api/event/onQueryCommand.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/event/onQueryCommand.md Fri Feb 03 19:02:53 2017 +0100 @@ -9,4 +9,4 @@ - "**message**: the real message, without the ! part." --- -Synonym of [onCommand](@baseurl@/api/event/onCommand.html) but for queries. +Synonym of [onCommand](@baseurl@api/event/onCommand.html) but for queries.
--- a/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.find.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,7 +1,7 @@ --- method: find js: true -summary: "Synonym of [Irccd.Directory.find](@baseurl@/api/module/Irccd.Directory/function/find.html) but the path is taken from the directory object." +summary: "Synonym of [Irccd.Directory.find](@baseurl@api/module/Irccd.Directory/function/find.html) but the path is taken from the directory object." synopsis: "Directory.prototype.find(pattern, recursive)" arguments: - "**pattern**: the regular expression or file name,"
--- a/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.Directory/Irccd.Directory.prototype.remove.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,7 +1,7 @@ --- method: remove js: true -summary: "Synonym of [Irccd.Directory.remove](@baseurl@/api/module/Irccd.Directory/function/remove.html) but the path is taken from the directory object." +summary: "Synonym of [Irccd.Directory.remove](@baseurl@api/module/Irccd.Directory/function/remove.html) but the path is taken from the directory object." synopsis: "Directory.prototype.remove(recursive)" arguments: - "**recursive**: recursively or not (Optional, default: false)."
--- a/doc/html/api/module/Irccd.File/Irccd.File.exists.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.exists.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,5 +6,5 @@ arguments: - "**path**: the path to the file." returns: "True if exists." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.basename.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.basename.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,7 +1,7 @@ --- method: basename js: true -summary: "Synonym of [Irccd.File.basename](@baseurl@/api/module/Irccd.File/function/basename.html) but with the path from the file." +summary: "Synonym of [Irccd.File.basename](@baseurl@api/module/Irccd.File/function/basename.html) but with the path from the file." synopsis: "File.prototype.basename()" returns: "The base name." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.constructor.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.constructor.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,7 +6,7 @@ arguments: - "**path**: the path to the file," - "**mode**: the mode string." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." --- ## Mode
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.dirname.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.dirname.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,7 +1,7 @@ --- method: dirname js: true -summary: "Synonym of [Irccd.File.dirname](@baseurl@/api/module/Irccd.File/function/dirname.html) but with the path from the file." +summary: "Synonym of [Irccd.File.dirname](@baseurl@api/module/Irccd.File/function/dirname.html) but with the path from the file." synopsis: "File.prototype.dirname()" returns: "The directory name." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.lines.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.lines.md Fri Feb 03 19:02:53 2017 +0100 @@ -4,5 +4,5 @@ summary: "Read all lines and return an array." synopsis: "File.prototype.lines()" returns: "An array with all lines." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.read.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.read.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,5 +6,5 @@ arguments: - "**amount**: the amount of characters or -1 to read all (Optional, default: -1)." returns: "The string." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.readline.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.readline.md Fri Feb 03 19:02:53 2017 +0100 @@ -4,7 +4,7 @@ summary: "Read the next line available." synopsis: "File.prototype.readline()" returns: "The next line or undefined if eof." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." --- ## Remarks
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.remove.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.remove.md Fri Feb 03 19:02:53 2017 +0100 @@ -3,5 +3,5 @@ js: true summary: "Synonym of File.remove(path) but with the path from the file." synopsis: "File.prototype.remove()" -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.seek.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.seek.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,5 +6,5 @@ arguments: - "**type**: the type of setting (`Irccd.File.SeekSet`, `Irccd.File.SeekCur`, `Irccd.File.SeekSet`)," - "**amount**: the new offset." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.stat.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.stat.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,10 +1,10 @@ --- method: stat js: true -summary: "Synonym of [Irccd.File.stat](@baseurl@/api/module/Irccd.File/function/stat.html) but with the path from the file." +summary: "Synonym of [Irccd.File.stat](@baseurl@api/module/Irccd.File/function/stat.html) but with the path from the file." synopsis: "File.prototype.stat()" returns: "The stat information." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." --- ## Remarks
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.tell.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.tell.md Fri Feb 03 19:02:53 2017 +0100 @@ -4,5 +4,5 @@ summary: "Get the actual position in the file." synopsis: "pos = File.prototype.tell()" returns: "The position." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.prototype.write.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.prototype.write.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,5 +6,5 @@ arguments: - "**data**: the character to write." returns: "The number of bytes written." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.remove.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.remove.md Fri Feb 03 19:02:53 2017 +0100 @@ -5,5 +5,5 @@ synopsis: "Irccd.File.remove(path)" arguments: - "**path**: the path to the file." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." ---
--- a/doc/html/api/module/Irccd.File/Irccd.File.stat.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.File/Irccd.File.stat.md Fri Feb 03 19:02:53 2017 +0100 @@ -23,7 +23,7 @@ arguments: - "**path**: the path to the file." returns: "The stat information." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." --- ## Remarks
--- a/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.whois.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.Server/Irccd.Server.prototype.whois.md Fri Feb 03 19:02:53 2017 +0100 @@ -1,7 +1,7 @@ --- method: whois js: true -summary: "Get whois information from a user. The function will generate [onWhois](@baseurl@/api/event/onWhois.html) event." +summary: "Get whois information from a user. The function will generate [onWhois](@baseurl@api/event/onWhois.html) event." synopsis: "Server.prototype.whois(target)" arguments: - "**target**: the target."
--- a/doc/html/api/module/Irccd.System/Irccd.System.popen.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/api/module/Irccd.System/Irccd.System.popen.md Fri Feb 03 19:02:53 2017 +0100 @@ -6,8 +6,8 @@ arguments: - "**cmd**: the command to execute," - "**mode**: the mode (e.g. `r`)." -returns: "An [Irccd.File](@baseurl@/api/module/Irccd.File/index.html) object." -throws: "An [Irccd.SystemError](@baseurl@/api/module/Irccd/index.html#types) on failures." +returns: "An [Irccd.File](@baseurl@api/module/Irccd.File/index.html) object." +throws: "An [Irccd.SystemError](@baseurl@api/module/Irccd/index.html#types) on failures." --- ## Remarks
--- a/doc/html/api/module/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ---- -js: true ---- - -# Javascript modules - - - [Irccd](Irccd/index.html) - - [Irccd.Directory](Irccd.Directory/index.html) - - [Irccd.ElapsedTimer](Irccd.ElapsedTimer/index.html) - - [Irccd.File](Irccd.File/index.html) - - [Irccd.Logger](Irccd.Logger/index.html) - - [Irccd.Plugin](Irccd.Plugin/index.html) - - [Irccd.Server](Irccd.Server/index.html) - - [Irccd.System](Irccd.System/index.html) - - [Irccd.Timer](Irccd.Timer/index.html) - - [Irccd.Unicode](Irccd.Unicode/index.html) - - [Irccd.Util](Irccd.Util/index.html)
--- a/doc/html/build/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -title: "Building" -header: "Building" -guide: yes ---- - -- [Build from sources](build/build-from-sources.html) -- [Build options](build/build-options.html)
--- a/doc/html/dev/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ ---- -title: "Development" -header: "Development" -guide: yes ---- - - - [Javascript plugin introduction](plugin-javascript-introduction.html) - - [Network protocol](socket-protocol.html) - - [Network commands](socket-commands.html)
--- a/doc/html/dev/plugin-javascript-introduction.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/dev/plugin-javascript-introduction.md Fri Feb 03 19:02:53 2017 +0100 @@ -169,6 +169,6 @@ plugin foo: error condition ```` -[onMessage]: @baseurl@/api/event/onMessage.html -[server-api]: @baseurl@/api/module/Irccd.Server/index.html -[server-message]: @baseurl@/api/module/Irccd.Server/Irccd.Server.prototype.message.html +[onMessage]: @baseurl@api/event/onMessage.html +[server-api]: @baseurl@api/module/Irccd.Server/index.html +[server-message]: @baseurl@api/module/Irccd.Server/Irccd.Server.prototype.message.html
--- a/doc/html/irccd/configuring.md Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/irccd/configuring.md Fri Feb 03 19:02:53 2017 +0100 @@ -322,7 +322,7 @@ myplugin = /path/to/myplugin.js # Use absolute path ```` -[cfgdir]: @baseurl@/irccd/paths.html -[cp]: @baseurl@/misc/common-patterns-and-formatting.html -[irccdctl]: @baseurl@/irccdctl/index.html -[sockets]: @baseurl@/dev/socket-commands.html +[cfgdir]: @baseurl@irccd/paths.html +[cp]: @baseurl@misc/common-patterns-and-formatting.html +[irccdctl]: @baseurl@irccdctl/index.html +[sockets]: @baseurl@dev/socket-commands.html
--- a/doc/html/irccd/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -title: "Irccd" -header: "Irccd" -guide: yes ---- - - - [Paths](paths.html) - - [Configure irccd](configuring.html)
--- a/doc/html/irccdctl/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ ---- -title: "Irccdctl" -header: "Irccdctl" -guide: yes ---- - -# General documentation - - - [Configure irccdctl](configuring.html) - - [Irccdctl command line usage](usage.html) - -# List of support commands - - - [help](command/help.html) - - [plugin-config](command/plugin-config.html) - - [plugin-info](command/plugin-info.html) - - [plugin-list](command/plugin-list.html) - - [plugin-load](command/plugin-load.html) - - [plugin-reload](command/plugin-reload.html) - - [plugin-unload](command/plugin-unload.html) - - [server-cmode](command/server-cmode.html) - - [server-cnotice](command/server-cnotice.html) - - [server-connect](command/server-connect.html) - - [server-disconnect](command/server-disconnect.html) - - [server-invite](command/server-invite.html) - - [server-join](command/server-join.html) - - [server-kick](command/server-kick.html) - - [server-list](command/server-list.html) - - [server-me](command/server-me.html) - - [server-message](command/server-message.html) - - [server-mode](command/server-mode.html) - - [server-nick](command/server-nick.html) - - [server-notice](command/server-notice.html) - - [server-part](command/server-part.html) - - [server-reconnect](command/server-reconnect.html) - - [server-topic](command/server-topic.html) - - [watch](command/watch.html)
--- a/doc/html/misc/index.md Wed Feb 01 11:53:09 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ ---- -title: "Miscellaneous" -header: "Miscellaneous" -guide: yes ---- - - - [Common patterns and formatting](common-patterns-and-formatting.html) - - [Configuration file syntax](configuration-syntax.html)
--- a/doc/html/resources/template.html Wed Feb 01 11:53:09 2017 +0100 +++ b/doc/html/resources/template.html Fri Feb 03 19:02:53 2017 +0100 @@ -11,12 +11,12 @@ <title>$title$</title> <!-- CSS --> - <link href="$baseurl$/css/bootstrap.min.css" rel="stylesheet"> - <link href="$baseurl$/css/tomorrow.css" rel="stylesheet"> - <link href="$baseurl$/css/doc.css" rel="stylesheet"> + <link href="$baseurl$css/bootstrap.min.css" rel="stylesheet"> + <link href="$baseurl$css/tomorrow.css" rel="stylesheet"> + <link href="$baseurl$css/doc.css" rel="stylesheet"> $if(guide)$ - <link href="$baseurl$/css/doc-guide.css" rel="stylesheet"> + <link href="$baseurl$css/doc-guide.css" rel="stylesheet"> $endif$ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> @@ -34,7 +34,6 @@ <div class="col-sm-1 col-md-2 sidebar"> <!-- Side bar for JavaScript --> $if(js)$ - <a href="$baseurl$api/index.html"><h3>Home</h3></a> <h3>Events</h3> <ul class="nav nav-sidebar sidebar-list"> <li><a href="$baseurl$api/event/onChannelMode.html">onChannelMode</a></li> @@ -87,7 +86,11 @@ <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <ol class="breadcrumb"> $for(parents)$ + $if(parents.active)$ <li><a href="$parents.path$">$parents.name$</a></li> + $else$ + <li>$parents.name$</li> + $endif$ $endfor$ <li class="active">$basename$</li> </ol><!-- !breadcrumb --> @@ -179,10 +182,10 @@ <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="$baseurl$/js/jquery.min.js"></script> - <script src="$baseurl$/js/bootstrap.min.js"></script> + <script src="$baseurl$js/jquery.min.js"></script> + <script src="$baseurl$js/bootstrap.min.js"></script> - <script src="$baseurl$/js/highlight.min.js"></script> + <script src="$baseurl$js/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script>jQuery("table").addClass("table");</script> <script>jQuery("#toc").addClass("nav");</script>
--- a/plugins/plugin/plugin.js Wed Feb 01 11:53:09 2017 +0100 +++ b/plugins/plugin/plugin.js Fri Feb 03 19:02:53 2017 +0100 @@ -35,6 +35,11 @@ "too-long": "#{nickname}, plugin list too long, ask in query for more details." } +Plugin.config = { + "max-list-lines": 3, + "max-list-columns": 80 +} + var commands = { loadFormats: function () { @@ -75,15 +80,36 @@ list: function (server, origin, target, query) { var kw = commands.keywords(server, target, origin); - var list = Plugin.list(); - var str; + var plugins = Plugin.list(); + var lines = [ "" ]; + var maxl = parseInt(Plugin.config["max-list-lines"]); + var maxc = parseInt(Plugin.config["max-list-columns"]); + + if (isNaN(maxc)) { + maxc = 80; + } + if (isNaN(maxl)) { + maxl = 3; + } + + for (var p = 0; p < plugins.length; ++p) { + var l = lines.length - 1; - if (!query && list.length >= 16) - str = Util.format(Plugin.format["too-long"], kw); - else - str = list.join(" "); + if (plugins[p].length + 1 + lines[l].length > maxc) { + lines.push(""); + l++; + } + + lines[l] += plugins[p] + " "; + } - server.message(target, str); + if (!query && maxl > 0 && lines.length > maxl) { + server.message(target, Util.format(Plugin.format["too-long"], kw)); + } else { + for (var i = 0; i < lines.length; ++i) { + server.message(target, lines[i]); + } + } }, info: function (server, origin, target, name)
--- a/plugins/plugin/plugin.md Wed Feb 01 11:53:09 2017 +0100 +++ b/plugins/plugin/plugin.md Fri Feb 03 19:02:53 2017 +0100 @@ -20,7 +20,7 @@ The plugin **plugin** only reacts to the special command. It understands `info` and `list` sub commands. - The sub command `info` shows information about a plugin, - - The sub command `list` shows loaded plugins. + - The sub command `list` shows loaded plugins (see configuration for limits). Both commands work in a channel or as private message with irccd. @@ -28,6 +28,11 @@ The following options are available under the `[plugin.plugin]` section: + - **max-list-lines**: (int) max number of lines allowed for the `list` sub + command (Optional, default: 3), + - **max-list-columns**: (int) max number of columns allowed per lines + (Optional, default: 80). + **Deprecated in irccd 2.1.0:** - **format-usage**: Use `[format.plugin] usage` instead,