# HG changeset patch # User David Demelier # Date 1635322546 -7200 # Node ID c7c3bc8042230c281570c2852746f5fdaa74774a # Parent 2cde6684b5368f4fb33ae44a46d6d4df7b9cf2e5 examples: install irccd.conf.sample diff -r 2cde6684b536 -r c7c3bc804223 examples/CMakeLists.txt --- a/examples/CMakeLists.txt Wed Oct 27 10:11:43 2021 +0200 +++ b/examples/CMakeLists.txt Wed Oct 27 10:15:46 2021 +0200 @@ -19,11 +19,17 @@ project(examples) set( - FILES + CONFIGS + ${examples_SOURCE_DIR}/irccd.conf.sample +) + +set( + PLUGINS ${examples_SOURCE_DIR}/sample-plugin.c ${examples_SOURCE_DIR}/sample-plugin.js ) -add_custom_target(doc SOURCES ${FILES}) -install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}) -source_group("" FILES ${FILES}) +add_custom_target(doc SOURCES ${CONFIGS} ${PLUGINS}) +install(FILES ${CONFIGS} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) +install(FILES ${PLUGINS} DESTINATION ${CMAKE_INSTALL_DOCDIR}) +source_group("" FILES ${CONFIGS} ${PLUGINS}) diff -r 2cde6684b536 -r c7c3bc804223 examples/irccd.conf.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/irccd.conf.sample Wed Oct 27 10:15:46 2021 +0200 @@ -0,0 +1,142 @@ +# +# This is an example of irccd.conf file. +# +# Comments start with a '#' like this header and until ends at the end of line. +# +# See the irccd.conf(5) manual page for details of the file syntax and +# available options. +# + +# +# logs +# ---------------------------------------------------------------------- +# +# You can configure verbosity and adapter which can be console to log to +# stdout/stderr, syslog for system logging or a unique file. +# +# Default is non-verbose on console + +logs to console + +# +# Verbose on syslog: +# logs verbose to syslog +# +# Explicitly quiet to a file: +# logs quiet to file "/var/log/irccd/messages" +# + +# +# transport +# ---------------------------------------------------------------------- +# +# Enable irccd control through a UNIX domain socket via TCP. This is required +# for the irccdctl utility. +# +# You must use a quoted string because the parser does not understand a string +# starting with a '/' yet. +# + +transport to "/tmp/irccd.sock" + +# +# You can use user/group with both names instead of numeric literals. +# transport to "/tmp/irccd.sock" with uid "www" gid "www" +# transport to "/tmp/irccd.sock" with uid 1000 gid "users" +# + +# +# server +# ---------------------------------------------------------------------- +# +# Connect to an IRC server. Create a block for every server you want irccd to +# connect to. +# +# The options `hostname', `port' and `ident' are required. +# +# It is recommended to put quotes around the server identifiers to avoid +# colliding with syntax keywords. +# +# server "example" { +# hostname "example.org"; # Quotes are preferred. +# port 6667; # Don't use quotes, it's a number. +# ident "frc" "frc" "frc"; # Nickname, Username and Real name. There are no +# # comma because it's not a list. +# ssl; # Set to enable SSL. +# channels "#test", "#staff"; # List of channels to join. +# options AUTO-REJOIN; # Enable auto-rejoin after a kick. +# prefix "!"; # Prefix for invoking plugins. +# ctcp { +# version "my version"; # Custom CTCP VERSION reply. +# source "my SCM location"; # Custom CTCP SOURCE reply. +# } +# } +# + +# +# rule +# ---------------------------------------------------------------------- +# +# Create rules to filter plugins and their usage depending on criteria. They are +# evaluated in order they are defined. An empty block match every event. +# +# This rule drop *everything*. +# rule drop +# +# This rule `reallows' plugins hangman on channel #games and #test from the +# server example. +# +# rule accept { +# servers "example"; +# plugins "hangman"; +# channels "#test", "#games"; +# } +# + +# +# hooks +# ---------------------------------------------------------------------- +# +# Hooks are independant approach to capturing events. They are invoked as-is +# from irccd upon a new event. They can be written in any language as long as +# they are executable. They can't be filtered through rules. +# +# hook "notify" to "/usr/local/bin/myscript.sh" +# + +# +# plugins +# ---------------------------------------------------------------------- +# +# Load Javascript and native C plugins. The block options is optional, if not +# present the plugin is searched through a standard set of directories. +# +# It is recommended to put quotes around the plugin identifiers to avoid +# colliding with syntax keywords. +# +# This will load the plugin `ask' from default path and default options. +# plugin "ask" +# +# This will load the plugin `hangman' and set custom configuration options and +# templates. +# plugin "hangman" { +# config { +# "collaborative" "false"; +# } +# templates { +# "win" "Congrats #{nickname}, you found #{word}"; +# } +# } +# +# This will load a plugin `custom' with a custom location and override its +# paths. +# plugin "custom" { +# location "/opt/custom.js"; +# +# paths { +# "data" "/opt/custom/data"; +# "cache" "/opt/custom/cache"; +# "config" "/opt/custom"; +# } +# } +# diff -r 2cde6684b536 -r c7c3bc804223 irccd/irccd.conf --- a/irccd/irccd.conf Wed Oct 27 10:11:43 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -# -# This is an example of irccd.conf file. -# -# Comments start with a '#' like this header and until ends at the end of line. -# -# See the irccd.conf(5) manual page for details of the file syntax and -# available options. -# - -# -# logs -# ---------------------------------------------------------------------- -# -# You can configure verbosity and adapter which can be console to log to -# stdout/stderr, syslog for system logging or a unique file. -# -# Default is non-verbose on console - -logs to console - -# -# Verbose on syslog: -# logs verbose to syslog -# -# Explicitly quiet to a file: -# logs quiet to file "/var/log/irccd/messages" -# - -# -# transport -# ---------------------------------------------------------------------- -# -# Enable irccd control through a UNIX domain socket via TCP. This is required -# for the irccdctl utility. -# -# You must use a quoted string because the parser does not understand a string -# starting with a '/' yet. -# - -transport to "/tmp/irccd.sock" - -# -# You can use user/group with both names instead of numeric literals. -# transport to "/tmp/irccd.sock" with uid "www" gid "www" -# transport to "/tmp/irccd.sock" with uid 1000 gid "users" -# - -# -# server -# ---------------------------------------------------------------------- -# -# Connect to an IRC server. Create a block for every server you want irccd to -# connect to. -# -# The options `hostname', `port' and `ident' are required. -# -# It is recommended to put quotes around the server identifiers to avoid -# colliding with syntax keywords. -# -# server "example" { -# hostname "example.org"; # Quotes are preferred. -# port 6667; # Don't use quotes, it's a number. -# ident "frc" "frc" "frc"; # Nickname, Username and Real name. There are no -# # comma because it's not a list. -# ssl; # Set to enable SSL. -# channels "#test", "#staff"; # List of channels to join. -# options AUTO-REJOIN; # Enable auto-rejoin after a kick. -# prefix "!"; # Prefix for invoking plugins. -# ctcp { -# version "my version"; # Custom CTCP VERSION reply. -# source "my SCM location"; # Custom CTCP SOURCE reply. -# } -# } -# - -# -# rule -# ---------------------------------------------------------------------- -# -# Create rules to filter plugins and their usage depending on criteria. They are -# evaluated in order they are defined. An empty block match every event. -# -# This rule drop *everything*. -# rule drop -# -# This rule `reallows' plugins hangman on channel #games and #test from the -# server example. -# -# rule accept { -# servers "example"; -# plugins "hangman"; -# channels "#test", "#games"; -# } -# - -# -# hooks -# ---------------------------------------------------------------------- -# -# Hooks are independant approach to capturing events. They are invoked as-is -# from irccd upon a new event. They can be written in any language as long as -# they are executable. They can't be filtered through rules. -# -# hook "notify" to "/usr/local/bin/myscript.sh" -# - -# -# plugins -# ---------------------------------------------------------------------- -# -# Load Javascript and native C plugins. The block options is optional, if not -# present the plugin is searched through a standard set of directories. -# -# It is recommended to put quotes around the plugin identifiers to avoid -# colliding with syntax keywords. -# -# This will load the plugin `ask' from default path and default options. -# plugin "ask" -# -# This will load the plugin `hangman' and set custom configuration options and -# templates. -# plugin "hangman" { -# config { -# "collaborative" "false"; -# } -# templates { -# "win" "Congrats #{nickname}, you found #{word}"; -# } -# } -# -# This will load a plugin `custom' with a custom location and override its -# paths. -# plugin "custom" { -# location "/opt/custom.js"; -# -# paths { -# "data" "/opt/custom/data"; -# "cache" "/opt/custom/cache"; -# "config" "/opt/custom"; -# } -# } -#