YCC module: First URL on a channel can now be reduce
This commit is contained in:
parent
05f061bccb
commit
e16101c838
@ -48,9 +48,8 @@ def parselisten(msg):
|
|||||||
global LAST_URLS
|
global LAST_URLS
|
||||||
if re.match(".*(https?://|www\.)[^ ]+.*", msg.content) is not None:
|
if re.match(".*(https?://|www\.)[^ ]+.*", msg.content) is not None:
|
||||||
res = re.match(".*(((ht|f)tps?://|www\.)[^ ]+).*", msg.content)
|
res = re.match(".*(((ht|f)tps?://|www\.)[^ ]+).*", msg.content)
|
||||||
if msg.channel in LAST_URLS:
|
if msg.channel not in LAST_URLS:
|
||||||
|
LAST_URLS[msg.channel] = list()
|
||||||
LAST_URLS[msg.channel].append(res.group(1))
|
LAST_URLS[msg.channel].append(res.group(1))
|
||||||
else:
|
|
||||||
LAST_URLS[msg.channel] = list(res.group(1))
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user