summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
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);