Skip to content
This repository
Browse code

Fix a bug where nicks with upper case letters would not count as targ…

…ets.
  • Loading branch information...
commit b6001c4fb0853b4353c5cc4aeec42258ee2c77e6 1 parent 847a94e
Mike Cooper mythmon authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 hamper/commander.py
4 hamper/commander.py
@@ -36,9 +36,9 @@ def privmsg(self, user, channel, msg):
36 36
37 37 directed = msg.startswith(self.nickname)
38 38 # This monster of a regex extracts msg and target from a message, where
39   - # the target may not be there.
  39 + # the target may not be there, and the target is a valid irc name.
40 40 target, msg = re.match(
41   - r'^(?:([a-z_\-\[\]\\^{}|`][a-z0-9_\-\[\]\\^{}|`]*)[:,] )? *(.*)$',
  41 + r'^(?:([A-Za-z_\-\[\]\\^{}|`][A-Za-z0-9_\-\[\]\\^{}|`]*)[:,] )? *(.*)$',
42 42 msg).groups()
43 43
44 44 if user:

0 comments on commit b6001c4

Please sign in to comment.
Something went wrong with that request. Please try again.