diff doc/man/irccdctl.conf.5.in @ 372:6a7850696b86

Irccdctl: rework a bit how aliases are defined to allow better arguments parsing
author David Demelier <markand@malikania.fr>
date Thu, 08 Dec 2016 13:15:37 +0100
parents 2a6ac6daceee
children c6fbb6e0e06d
line wrap: on
line diff
--- a/doc/man/irccdctl.conf.5.in	Wed Dec 07 12:33:32 2016 +0100
+++ b/doc/man/irccdctl.conf.5.in	Thu Dec 08 13:15:37 2016 +0100
@@ -85,6 +85,38 @@
 .It path
 (string) the file path to the socket.
 .El
+.\" ALIAS
+.Ss alias
+The alias section can be used to define custom user commands.
+.Pp
+To define an alias, just add a new section named
+.Nm alias.name
+where name is your desired alias name.
+.Pp
+Then, add any option you like to execute commands you want. The option name is
+ignored and serves as auto-documentation only.
+.Pp
+Example:
+.Bd -literal
+[alias.present]
+say-hello = ( "server-message", "localhost", "#staff", "hello world!" )
+warning = ( "server-me", "localhost", "#staff", "is a bot")
+.Ed
+.Pp
+.Nm Placeholders
+.Pp
+Sometimes, you want to pass parameters to your alias. The placeholder syntax
+allows you to define where your command line arguments will be replaced before
+being sent to irccd.
+.Pp
+The syntax uses `%n` where **n** is an integer starting from 0.
+.Pp
+Example:
+.Bd -literal
+[alias.present]
+say-hello = ( "server-message", "%0", "%1", "hello world!" )
+warning = ( "server-me", "%0", "%1", "is a bot")
+.Ed
 .\" FILES
 .Sh FILES
 The default config file is located at