summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2022-09-02 17:17:41 +0100
committerLuke Bratch <luke@bratch.co.uk>2022-09-02 17:17:41 +0100
commit44bcab7c9cc9edf0894ca710da34beca63517b03 (patch)
tree2f83256d0756b1c0c98231c2813eb73c07a59915
parent4375415b9228c0537d1d18b1f1ba263d286f7f3a (diff)
Improve comment/debug clarity.
-rw-r--r--functions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/functions.c b/functions.c
index 7184bfa..6d0e8a1 100644
--- a/functions.c
+++ b/functions.c
@@ -318,18 +318,18 @@ void updatenickuserhost(char *nickuserhost, char *nick) {
// Find the bang
for (size_t i = 0; i < strlen(nickuserhost); i++) {
if (nickuserhost[i] == '!') {
- debugprint(DEBUG_FULL, "Found bang at position %ld!\n", i);
+ debugprint(DEBUG_FULL, "updatenickuserhost(): found bang at position %ld!\n", i);
bangpos = i;
break;
}
}
if (bangpos == -1) {
- debugprint(DEBUG_FULL, "No bang found in existing nickuserhost, quitting!\n");
+ debugprint(DEBUG_FULL, "updatenickuserhost(): no bang found in existing nickuserhost, returning!\n");
return;
}
- // Make a new string combining the nick nick and the old nickuserhost + the offset of the bang
+ // Make a new string combining the new nick and the old nickuserhost + the offset of the bang
char newstr[MAXDATASIZE];
snprintf(newstr, MAXDATASIZE, "%s%s", nick, nickuserhost + bangpos);
newstr[strlen(nickuserhost) - bangpos + strlen(nick)] = '\0';