fix nonetype issues

master
mutantmonkey 2011-09-22 14:29:29 -04:00
parent 50fe275870
commit baf5403066
1 changed files with 5 additions and 2 deletions

5
irc.py
View File

@ -15,8 +15,11 @@ class Origin(object):
source = re.compile(r'([^!]*)!?([^@]*)@?(.*)')
def __init__(self, bot, source, args):
if source:
source = source.decode('utf-8')
match = Origin.source.match(source or '')
else:
source = ""
match = Origin.source.match(source)
self.nick, self.user, self.host = match.groups()
if len(args) > 1: