From 5213276d6f698b17ebb23a72023a271dd3fe8543 Mon Sep 17 00:00:00 2001 From: Alex Vidal Date: Mon, 16 Mar 2009 13:42:00 -0500 Subject: [PATCH] Moved buttbot password to another file, fixed syntax error --- plugins/iambuttbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/iambuttbot.py b/plugins/iambuttbot.py index 4e03c2d..812d148 100644 --- a/plugins/iambuttbot.py +++ b/plugins/iambuttbot.py @@ -7,9 +7,10 @@ import urllib import hook @hook.command(hook=r'(.*)') -def iambuttbot(bot, input) +def iambuttbot(bot, input): if input.nick.lower() != 'buttbot': return + buttbot_pass = open('iambuttbot_passwd').readlines()[0].strip() status = input.inp if len(input.inp) <= 140 else input.inp[:137] + "..." data = urllib.urlencode({"status": status}) - response = urllib.urlopen("http://iambuttbot:goonsay@twitter.com/statuses/update.xml", data) + response = urllib.urlopen("http://iambuttbot:%s@twitter.com/statuses/update.xml" % (buttbot_pass,), data)