aboutsummaryrefslogtreecommitdiffstats
path: root/local
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2016-07-30 20:48:09 +0300
committerkongr45gpen <electrovesta@gmail.com>2016-07-30 20:48:09 +0300
commit93beeec8ceb8cb62c1da3ae5239e4299ebf3dc50 (patch)
tree2e6da93fa5b4fba10d9b0e9a72afb22602c52330 /local
parente5d698ab769bb03340d83e253721c6c3f56ade01 (diff)
downloadsupybot_github-93beeec8ceb8cb62c1da3ae5239e4299ebf3dc50.tar.gz
supybot_github-93beeec8ceb8cb62c1da3ae5239e4299ebf3dc50.tar.bz2
supybot_github-93beeec8ceb8cb62c1da3ae5239e4299ebf3dc50.zip
Add a config value to hide URLs
Diffstat (limited to 'local')
-rw-r--r--local/theme/Theme.py3
-rw-r--r--local/utility.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/local/theme/Theme.py b/local/theme/Theme.py
index ecad213..c209e49 100644
--- a/local/theme/Theme.py
+++ b/local/theme/Theme.py
@@ -8,4 +8,7 @@ class Theme(object):
pass
def enclose(self, text):
+ if text == None or text == '':
+ #TODO: Remove the space before the URL
+ return ""
return "%s%s%s" % (self.brackets[0], text, self.brackets[1])
diff --git a/local/utility.py b/local/utility.py
index a1d41bd..065be0f 100644
--- a/local/utility.py
+++ b/local/utility.py
@@ -97,6 +97,8 @@ def colorAction(action):
def getShortURL(longurl):
""" Returns a short URL generated by git.io"""
+ if configValue("hideURL") is True:
+ return None
if configValue("shortURL") is False or not getShortURL.github.match(longurl):
url = longurl
else:

© 2014-2024 Faster IT GmbH | imprint | privacy policy