diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2019-07-03 11:04:33 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-07-03 11:04:33 +0200 |
commit | 123b370aa19e65864f1986e9f62cdeb511fa4fbd (patch) | |
tree | 494b1144be29199bbb1688f72eef349bee984a99 | |
parent | bdcfa688dc3c4ad71afaeeef66c5470d57daffeb (diff) | |
download | crocoite-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”.
-rw-r--r-- | crocoite/irc.py | 2 |
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) |