summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-12-22 16:01:16 +0000
committerLuke Bratch <luke@bratch.co.uk>2019-12-22 16:01:16 +0000
commit85dd88a180043e991c19a4c93a6ce5c7fe0a6e88 (patch)
tree2866cf5772eb3e0e2da4be0a86fc5a07b499b174 /functions.h
parent2385f7b944bb22acd85e6c089e509880a45a2cb1 (diff)
Make full debug output optional for extractnickfromprefix() and stripprefix() to avoid huge debug logs when using replaymode = "lastspoke" combined with DEBUG_FULL.
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/functions.h b/functions.h
index 420e03f..7a3e398 100644
--- a/functions.h
+++ b/functions.h
@@ -69,14 +69,22 @@ int getstdin(char *prompt, char *buff, size_t sz);
void appendcrlf(char *string);
// Remove leading colon ':' which is the starting character of a prefix in an IRC message
-// If no leading colon present, string is left unchanged
-void stripprefix(char *string);
+// If no leading colon present, string is left unchanged.
+// "debug" is used to determine whether stripprefix() should produce all debug output,
+// used as debug output with stripprefix() can be particularly noisy.
+void stripprefix(char *string, int debug);
// Extract final parameter from IRC message, removing the leading colon ':'
void extractfinalparameter(char *string);
// Extract the IRC nick from a prefix
-void extractnickfromprefix(char *string);
+// e.g. given this string:
+// ":foo!bar@baz"
+// We want to end up with:
+// "foo"
+// "debug" is used to determine whether extractnickfromprefix() should produce all debug output,
+// used as debug output with extractnickfromprefix() can be particularly noisy.
+void extractnickfromprefix(char *string, int debug);
// Update an existing nickuserhost string with a new nick
void updatenickuserhost(char *nickuserhost, char *nick);