From 5d6a8c8939382c4c6fb9f3205a865606a28c9b42 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Fri, 15 Jan 2016 21:03:42 +0100 Subject: send clickable link in jabber message --- login.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'login.py') diff --git a/login.py b/login.py index 584398c..019cbf7 100755 --- a/login.py +++ b/login.py @@ -5,6 +5,7 @@ import sys import time import struct import hashlib +from urllib.parse import quote as urlencode # To speed up start time load some modules only as needed @@ -65,6 +66,8 @@ def token_message(username, secret, validsec): time.strftime("%c %Z(%z)", time.gmtime(time_next_end))) message += "\nRequested by: {} for: {} on: {}".format( os.getenv("IP"), ascii(os.getenv("URI")), os.getenv("HTTP_HOST")) + message += "\nhttps://{}:{}@{}{}".format(urlencode(username), + token, os.getenv("HTTP_HOST"), urlencode(os.getenv("URI"))) return message -- cgit v1.2.1