]> arthur.barton.de Git - ngircd.git/commitdiff
Allow more characters per line in MOTD and help text files
authorAlexander Barton <alex@barton.de>
Thu, 7 May 2020 16:10:41 +0000 (18:10 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 7 May 2020 16:10:41 +0000 (18:10 +0200)
Change the line buffer in the Read_TextFile() function from 127 to
COMMAND_LEN (=512) bytes. Lines can't even get that long, because they
have to be prefixed before being sent to the client, so this is a sane
maximum.

This allows for even more "fancy" and "wider" MOTDs :-)

Closes #271.

src/ngircd/conf.c

index a58ac26e2c301cdb108e1350d3ac7b1e9aded0c4..1c5ba624d5dd93e732b511d204dca4e8f6196244 100644 (file)
@@ -853,7 +853,7 @@ no_listenports(void)
 static bool
 Read_TextFile(const char *Filename, const char *Name, array *Destination)
 {
-       char line[127];
+       char line[COMMAND_LEN];
        FILE *fp;
        int line_no = 1;