From cc8478c50c3d04ea3180c9aadeff698218d46200 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 26 Jan 2019 15:58:57 +0000 Subject: [PATCH] Only search messages from other users in `find_from` (src/IRCBuffer.py) --- src/IRCBuffer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCBuffer.py b/src/IRCBuffer.py index dee68e3a..1415fd48 100644 --- a/src/IRCBuffer.py +++ b/src/IRCBuffer.py @@ -62,7 +62,8 @@ class Buffer(object): def find_from(self, nickname: str) -> typing.Optional[BufferLine]: nickname_lower = self.server.irc_lower(nickname) for line in self.lines: - if self.server.irc_lower(line.sender) == nickname_lower: + if (not line.from_self + and self.server.irc_lower(line.sender) == nickname_lower): return line return None