aboutsummaryrefslogtreecommitdiff
path: root/IRCBuffer.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-11 08:52:12 +0100
committerGravatar jesopo2018-09-11 08:52:12 +0100
commit6c8399fa0fdcc42516cf72c0cfe78791b2ae93c7 (patch)
treea4c1809e92fd80086a2fce51e0a0dce91b81f70c /IRCBuffer.py
parentPass around an IRCPrefix object instead of "nickname!username@hostname", fix a (diff)
signature
Respect RFC1459 casemapping rules
Diffstat (limited to 'IRCBuffer.py')
-rw-r--r--IRCBuffer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/IRCBuffer.py b/IRCBuffer.py
index 6e689d30..619f9061 100644
--- a/IRCBuffer.py
+++ b/IRCBuffer.py
@@ -1,4 +1,5 @@
import re
+import Utils
class BufferLine(object):
def __init__(self, sender, message, action, from_self):
@@ -28,7 +29,7 @@ class Buffer(object):
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
+ for_user = Utils.irc_lower(for_user) 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:
@@ -36,7 +37,7 @@ class Buffer(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:
+ if for_user and not Utils.irc_lower(line.sender) == for_user:
continue
return line
def skip_next(self):