Made httpUrl arg wrapper add http:// if that produces a valid http url.

This commit is contained in:
Jeremy Fincher 2008-06-26 16:30:23 +00:00 committed by James Vega
parent 526e71e104
commit d08eee8f13
1 changed files with 2 additions and 0 deletions

View File

@ -498,6 +498,8 @@ def getEmail(irc, msg, args, state):
def getHttpUrl(irc, msg, args, state):
if utils.web.httpUrlRe.match(args[0]):
state.args.append(args.pop(0))
elif utils.web.httpUrlRe.match('http://' + args[0]):
state.args.append('http://' + args.pop(0))
else:
state.errorInvalid('http url', args[0])