summaryrefslogtreecommitdiffstats
path: root/ircbot
diff options
context:
space:
mode:
Diffstat (limited to 'ircbot')
-rwxr-xr-xircbot/contoller.py4
-rwxr-xr-xircbot/rssbot.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/ircbot/contoller.py b/ircbot/contoller.py
index 8db32b8e..1d9347c3 100755
--- a/ircbot/contoller.py
+++ b/ircbot/contoller.py
@@ -61,7 +61,7 @@ class NewsBot(irc.bot.SingleServerIRCBot):
class commands():
def add(args):
- bot = rssbot.RssBot(args[2], args[1])
+ bot = rssbot.RssBot(args[2], args[1], url_shortener=url_shortener)
bots[args[1]] = bot
bot.start()
return "bot " + args[1] + " added"
@@ -118,7 +118,7 @@ class commands():
feedfile = 'new_feeds'
-url_shortener = 'http://localhost:1337'
+url_shortener = 'http://wall'
init_channels = ['#news']
if 'FEEDFILE' in os.environ:
diff --git a/ircbot/rssbot.py b/ircbot/rssbot.py
index 531e50c5..225e6f13 100755
--- a/ircbot/rssbot.py
+++ b/ircbot/rssbot.py
@@ -58,7 +58,7 @@ class RssBot(irc.bot.SingleServerIRCBot):
# self.send(entry.title + " " + entry.link + " com: " + entry.comments)
#except AttributeError:
shorturl = subprocess.check_output(["curl", "-sS", "-F", "uri=" + entry.link, self.url_shortener]).decode()
- self.send(entry.title + " " + shorturl)
+ self.send(entry.title + " " + shorturl.strip('\n').strip('\r') + '#' + entry.link.partition('://')[2].partition('/')[0])
self.oldnews.append(entry.link)
self.lastnew = datetime.now()
sleep(self.to)