From c0de766f762766448ca86de73619a05c4b973617 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 9 Aug 2012 02:57:59 -0400 Subject: [PATCH] Be smarter about figuring out when someone is talking to us. --- earwigbot/irc/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/irc/data.py b/earwigbot/irc/data.py index 3bff616..d42ed92 100644 --- a/earwigbot/irc/data.py +++ b/earwigbot/irc/data.py @@ -84,7 +84,7 @@ class Data(object): self._is_command = True self._trigger = self.command[0] self._command = self.command[1:] # Strip the "!" or "." - elif self.command.startswith(self.my_nick): + elif re.match(r"{0}\W*?$".format(self.my_nick), self.command, re.U): # e.g. "EarwigBot, command arg1 arg2" self._is_command = True self._trigger = self.my_nick