fix nonetype issues
This commit is contained in:
5
irc.py
5
irc.py
@@ -15,8 +15,11 @@ class Origin(object):
|
|||||||
source = re.compile(r'([^!]*)!?([^@]*)@?(.*)')
|
source = re.compile(r'([^!]*)!?([^@]*)@?(.*)')
|
||||||
|
|
||||||
def __init__(self, bot, source, args):
|
def __init__(self, bot, source, args):
|
||||||
|
if source:
|
||||||
source = source.decode('utf-8')
|
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()
|
self.nick, self.user, self.host = match.groups()
|
||||||
|
|
||||||
if len(args) > 1:
|
if len(args) > 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user