summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2024-11-09 23:50:46 +0000
committerLuke Bratch <luke@bratch.co.uk>2024-11-09 23:50:46 +0000
commitf55160af3f25fff17d3af4dde50a606c2c78f79b (patch)
treebc0eb6a581a33d3b81d5b1cf1becf40418c8e9ed /config.c
parent59addf47eca6a0be54e3b07c4ed2b156a8431376 (diff)
Make NOTICE alerts about client (dis)connection and authentication events optional.
New configuration options added: - alertconnect - alertauthfail - alertauthsuccess - alertunautheddisconnect - alertautheddisconnect
Diffstat (limited to 'config.c')
-rw-r--r--config.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/config.c b/config.c
index d7ad856..b2868b1 100644
--- a/config.c
+++ b/config.c
@@ -419,7 +419,22 @@ int createconfigfile(char *filename) {
"debug = \"2\"\n"
"\n"
"# Number of debug logs to keep\n"
- "debugkeep = \"5\"\n";
+ "debugkeep = \"5\"\n"
+ "\n"
+ "# Send NOTICE to all other clients upon new client connections (\"1\" for yes or \"0\" for no)\n"
+ "alertconnect = \"1\"\n"
+ "\n"
+ "# Send NOTICE to all other clients upon clients failing to authenticate (\"1\" for yes or \"0\" for no)\n"
+ "alertauthfail = \"1\"\n"
+ "\n"
+ "# Send NOTICE to all other clients upon clients succesfully authenticating (\"1\" for yes or \"0\" for no)\n"
+ "alertauthsuccess = \"1\"\n"
+ "\n"
+ "# Send NOTICE to all other clients upon unauthenticated client disconnections (\"1\" for yes or \"0\" for no)\n"
+ "alertunautheddisconnect = \"1\"\n"
+ "\n"
+ "# Send NOTICE to all other clients upon authenticated client disconnections (\"1\" for yes or \"0\" for no)\n"
+ "alertautheddisconnect = \"1\"\n";
// Write complete string to file
if ((fprintf(fp, "%s", string)) < 0) {