aboutsummaryrefslogtreecommitdiff
path: root/IRCLog.py
diff options
context:
space:
mode:
Diffstat (limited to 'IRCLog.py')
-rw-r--r--IRCLog.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/IRCLog.py b/IRCLog.py
index abc3d715..834939e2 100644
--- a/IRCLog.py
+++ b/IRCLog.py
@@ -27,6 +27,8 @@ class Log(object):
return line
def find(self, pattern, **kwargs):
from_self = kwargs.get("from_self", True)
+ for_user = kwargs.get("for_user", "")
+ for_user = for_user.lower() if for_user else None
not_pattern = kwargs.get("not_pattern", None)
for line in self.lines:
if line.from_self and not from_self:
@@ -34,6 +36,8 @@ class Log(object):
elif re.search(pattern, line.message):
if not_pattern and re.search(not_pattern, line.message):
continue
+ if for_user and not line.sender.lower() == for_user:
+ continue
return line
def skip_next(self):
self._skip_next = True