]> arthur.barton.de Git - ngircd-alex.git/commit - man/ngircd.conf.5.tmpl
Various fixes and enhancements for the "Autojoin" patch
authorAlexander Barton <alex@barton.de>
Sun, 17 Sep 2023 17:38:53 +0000 (19:38 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 17 Sep 2023 17:56:07 +0000 (19:56 +0200)
commit30ba325ddedb573cfef70e318db1d294c9703b5d
treec39d8c148aa056d81f8fa6c3feb725143ddfd586
parentcfd7d4288ebf55e6b65f33900a9ffac63a6ac6e2
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;
                   ^ ~~~~~~~~~~~~~~~
doc/sample-ngircd.conf.tmpl
man/ngircd.conf.5.tmpl
src/ngircd/conf.c
src/ngircd/login.c