summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-07-03 11:04:33 +0200
committerLars-Dominik Braun <lars@6xq.net>2019-07-03 11:04:33 +0200
commit123b370aa19e65864f1986e9f62cdeb511fa4fbd (patch)
tree494b1144be29199bbb1688f72eef349bee984a99 /crocoite
parentbdcfa688dc3c4ad71afaeeef66c5470d57daffeb (diff)
downloadcrocoite-123b370aa19e65864f1986e9f62cdeb511fa4fbd.tar.gz
crocoite-123b370aa19e65864f1986e9f62cdeb511fa4fbd.tar.bz2
crocoite-123b370aa19e65864f1986e9f62cdeb511fa4fbd.zip
irc: Do not respond when not addressed directly
This fixes annoying messages when using the bot’s nick as the first word of a message, i.e. “chromebot can do that”.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/irc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/crocoite/irc.py b/crocoite/irc.py
index d0b5bb9..0803398 100644
--- a/crocoite/irc.py
+++ b/crocoite/irc.py
@@ -366,7 +366,7 @@ class ArgparseBot (bottom.Client):
async def onMessage (self, nick, target, message, **kwargs):
""" Message received """
- if target in self.channels and message.startswith (self.nick):
+ if target in self.channels and message.startswith (self.nick + ':'):
user = self.users[target].get (nick, User (nick))
reply = ReplyContext (client=self, target=target, user=user)