aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-17 11:31:29 +0100
committerGravatar jesopo2018-09-17 11:31:29 +0100
commitbb5ff8ee0d380ebd96fe640a6b286a4c6b536667 (patch)
treef85181b19d9bc945cd896e78a367d338e1f7f113 /modules
parentIgnore .key/.crt in .gitignore (diff)
signature
Fix highlight checking in commands.py
Diffstat (limited to 'modules')
-rw-r--r--modules/commands.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands.py b/modules/commands.py
index 9b1b1aad..b96cdab1 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -93,9 +93,9 @@ class Module(object):
).get_hooks()[0]
def is_highlight(self, server, s):
- return s.lower() == server.nickname_lower or (s.lower().startswith(
- server.nickname_lower) and len(s) == len(server.nickname_lower
- )+1 and s[-1] in [":", ","])
+ if s[-1] in [":", ","]:
+ s = s[:-1]
+ return server.is_own_nickname(s)
def message(self, event, command, args_index=1):
if self.has_command(command):