From a8a321423d0a5425d35324342c4b1ee3246a10fa Mon Sep 17 00:00:00 2001 From: copperwater Date: Thu, 13 Sep 2018 14:27:06 -0400 Subject: [PATCH] Suppress "Unknown command" messages in the dumplog. Backported from TNNT. Only affects dumplog pline history, not any other form of pline history. The impetus for this is to avoid dumplogs full of "Unknown command foo." messages which don't provide any value for people reading the file. In many cases, these messages crowd out the actual message history, making it hard to reconstruct what happened. --- src/pline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pline.c b/src/pline.c index a12aae3c5..f4b553a01 100644 --- a/src/pline.c +++ b/src/pline.c @@ -29,6 +29,8 @@ const char *line; unsigned indx = g.saved_pline_index; /* next slot to use */ char *oldest = g.saved_plines[indx]; /* current content of that slot */ + if (!strncmp(line, "Unknown command", 15)) + return; if (oldest && strlen(oldest) >= strlen(line)) { /* this buffer will gradually shrink until the 'else' is needed; there's no pressing need to track allocation size instead */