Skip to content

Commit

Permalink
Update regex per suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapptz committed Apr 3, 2015
1 parent 2abf4a3 commit b563b3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion irc.py
Expand Up @@ -8,7 +8,7 @@
class Message(object):
def __init__(self, msg):
# :rapptz!rapptz@user/rapptz/x-00071589 PRIVMSG #SmashBrosTourney :okay sign in seems to be working
regex = r'\:(?P<source>(?P<nick>[^!]+)![~]{0,1}(?P<user>[^@]+)@)?(?P<host>[^\s]+)\s(?P<command>[^\s]+)\s?(?P<parameters>[^:]+){0,1}\:?(?P<text>[^\r^\n]+)?'
regex = r':(?P<source>(?P<nick>[^!]+)!~?(?P<user>[^@]+)@)?(?P<host>[^\s]+)\s(?P<command>[^\s]+)\s?(?P<parameters>[^:]+)?:?(?P<text>[^\r^\n]+)?'
match = re.match(regex, msg)
self.valid_command = False
self.is_message = False
Expand Down

0 comments on commit b563b3a

Please sign in to comment.