From f55160af3f25fff17d3af4dde50a606c2c78f79b Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 9 Nov 2024 23:50:46 +0000 Subject: Make NOTICE alerts about client (dis)connection and authentication events optional. New configuration options added: - alertconnect - alertauthfail - alertauthsuccess - alertunautheddisconnect - alertautheddisconnect --- config.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'config.c') 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) { -- cgit v1.2.3