about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2023-09-17 19:38:53 +0200
committerAlexander Barton <alex@barton.de>2023-09-17 19:56:07 +0200
commit30ba325ddedb573cfef70e318db1d294c9703b5d (patch)
treec39d8c148aa056d81f8fa6c3feb725143ddfd586 /doc
parentcfd7d4288ebf55e6b65f33900a9ffac63a6ac6e2 (diff)
downloadngircd-30ba325ddedb573cfef70e318db1d294c9703b5d.tar.gz
ngircd-30ba325ddedb573cfef70e318db1d294c9703b5d.zip
Various fixes and enhancements for the "Autojoin" patch
- Bring sample-ngircd.conf and ngircd.conf.5 description in line.
- Fix configuration parsing, it always showed the 'Unknown variable
  "Autojoin"' error message, even when everything was perfectly fine.
- And fix a build error (at least on macOS with Apple Clang 14):
    login.c:234:3: error: call to undeclared function 'IRC_JOIN'; ISO
    C99 and later do not support implicit function declarations
    [-Wimplicit-function-declaration]
       IRC_JOIN(Client, &Req);
       ^
  The #include for the "irc.channel.h" header was missing!
- Remove a unused variable that caused a compiler warning:
    login.c:222:12: warning: unused variable 'n' [-Wunused-variable]
       size_t i, n, channel_count = array_length(&Conf_Channels, sizeof(*conf_chan));
                 ^
- Add a explicit cast to fix a compiler warning:
    login.c:235:15: warning: assigning to 'char *' from 'const char[51]'
    discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
       Req.argv[0] = conf_chan->name;
                   ^ ~~~~~~~~~~~~~~~
Diffstat (limited to 'doc')
-rw-r--r--doc/sample-ngircd.conf.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index 2dbc3b99..cea23a2b 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -391,12 +391,14 @@
 	;Modes = +tnk mykey +l 5
 	;Modes = +b nick!~user@bad.host.example.com
 
+	# Should ngIRCd automatically join ("autojoin") all users to this
+	# channel on connect? Note: The users must have permissions to access
+	# the channel, otherwise joining them will fail!
+	;Autojoin = yes
+
 	# Key file, syntax for each line: "<user>:<nick>:<key>".
 	# Default: none.
 	;KeyFile = :ETCDIR:/#chan.key
-	
-	# Autojoin - set to yes to force all users to join this channel on connect
-	;Autojoin = yes
 
 [Channel]
 	# More [Channel] sections, if you like ...