diff options
author | Luke Bratch <luke@bratch.co.uk> | 2021-01-19 00:12:11 +0000 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2021-01-19 00:12:11 +0000 |
commit | 4b282dd670c7263232d19412f9735d670a1b1b76 (patch) | |
tree | ad6ab244be87e432940731c60ffa0bf3babf96ff /replay.c | |
parent | a16d9bdecb572bb266a84ec90767d613ce8ce255 (diff) |
Fix various issues where strncmp was only comparing a substring.
This fixes issues such as when JOINing a channel whose name is a substring of another channel, things like PARTing don't work properly.
Diffstat (limited to 'replay.c')
-rw-r--r-- | replay.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -356,7 +356,7 @@ int lastspokesecondsago(char *nick, char *basedir) { // Was it said by our 'nick'? Disable extractnickfromprefix() debugging // as it gets very noisy when we call it from here. extractnickfromprefix(tokens[1], 0); - if (strncmp(tokens[1], nick, strlen(nick))) { + if ((strlen(tokens[1]) == strlen(nick)) && (strncmp(tokens[1], nick, strlen(nick)))) { // Not our 'nick', continue continue; } |