diff options
Diffstat (limited to 'functions.c')
-rw-r--r-- | functions.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/functions.c b/functions.c index bbbd9dd..0a03ca9 100644 --- a/functions.c +++ b/functions.c @@ -811,7 +811,7 @@ int doreplay(int sourcefd, int replayseconds, struct client *clients, struct set // Replay those lines! for (int i = 0; i < numlines; i++) { - if (!readreplayline(replayseconds, i, outgoingmsg, settings->basedir, settings->replaydates)) { + if (!readreplayline(replayseconds, i, outgoingmsg, settings, ircdstate)) { debugprint(DEBUG_CRIT, "Error requesting replay line.\n"); return 0; } @@ -860,6 +860,17 @@ int doreplay(int sourcefd, int replayseconds, struct client *clients, struct set } } + // Separate special check for if a NICK change is from us but it isn't our current nick + if (strncmp(tokens[1], "NICK", strlen("NICK")) == 0) { + extractnickfromprefix(tokens[0]); + + if (strncmp(tokens[0], ircdstate->ircnick, strlen(tokens[0])) == 0) { + debugprint(DEBUG_FULL, "Not sending '%s' replay line '%s'.\n", tokens[1], outgoingmsg); + free(strcopyPtr); + continue; + } + } + free(strcopyPtr); debugprint(DEBUG_FULL, "Sending replay line: '%s'.\n", outgoingmsg); |