diff options
-rw-r--r-- | functions.c | 6 |
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'; |