mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
utils.str.format: Replace %u with '' instead of '<>' if URL is empty.
This commit is contained in:
parent
3a5c4c3ddd
commit
8d7b06efd1
@ -511,7 +511,11 @@ def format(s, *args, **kwargs):
|
|||||||
return timeElapsed(args.pop())
|
return timeElapsed(args.pop())
|
||||||
elif char == 'u':
|
elif char == 'u':
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
return conf.supybot.reply.format.url() % args.pop()
|
url = args.pop()
|
||||||
|
if url:
|
||||||
|
return conf.supybot.reply.format.url() % url
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
elif char == 'v':
|
elif char == 'v':
|
||||||
args.pop()
|
args.pop()
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
Reference in New Issue
Block a user