Permalink
Browse files

added NOOP_USERS

  • Loading branch information...
1 parent d20eaf4 commit 96e626348e02fe72089f9f166524d6c4629be024 @brosner committed Sep 11, 2010
Showing with 13 additions and 12 deletions.
  1. +13 −12 djangobot/__init__.py
View
@@ -158,18 +158,19 @@ def resolve_command(self, cmd):
def parse_as_normal(self):
self.log()
activity_set.add(self.user)
- if self.message.lower().startswith(
- self.channel.nickname.lower() + ":"):
- self.channel.msg("%s: i am a bot. brosner is my creator. " \
- "http://code.djangoproject.com/wiki/DjangoBot" % \
- self.user.nickname)
- # find any referenced tickets in this message
- # this requires the syntax #1000 to trigger.
- tickets = re.findall(r"(?:^|[\s(])#(\d+)\b", self.message)
- self.cmd_ticket(*tickets, **dict(in_channel=True))
- # find changesets. requires r1000 syntax.
- changesets = re.findall(r"\br(\d+)\b", self.message)
- self.cmd_changeset(*changesets, **dict(in_channel=True))
+ if self.user.nickname not in settings.NOOP_USERS:
+ if self.message.lower().startswith(
+ self.channel.nickname.lower() + ":"):
+ self.channel.msg("%s: i am a bot. brosner is my creator. " \
+ "http://code.djangoproject.com/wiki/DjangoBot" % \
+ self.user.nickname)
+ # find any referenced tickets in this message
+ # this requires the syntax #1000 to trigger.
+ tickets = re.findall(r"(?:^|[\s(])#(\d+)\b", self.message)
+ self.cmd_ticket(*tickets, **dict(in_channel=True))
+ # find changesets. requires r1000 syntax.
+ changesets = re.findall(r"\br(\d+)\b", self.message)
+ self.cmd_changeset(*changesets, **dict(in_channel=True))
def check_url(self, url):
try:

0 comments on commit 96e6263

Please sign in to comment.