From bce01e4112ece051ed1ca0d6933042507ca23ea0 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Tue, 17 Nov 2009 17:29:03 -0700 Subject: [PATCH] purge iambuttbot module -- account was banned --- .hgignore | 1 - plugins/iambuttbot.py | 29 ----------------------------- 2 files changed, 30 deletions(-) delete mode 100644 plugins/iambuttbot.py diff --git a/.hgignore b/.hgignore index f418d13..5b4e057 100644 --- a/.hgignore +++ b/.hgignore @@ -2,7 +2,6 @@ syntax: glob .*.swp *.pyc *.orig -iambuttbot_password persist config pep8.py diff --git a/plugins/iambuttbot.py b/plugins/iambuttbot.py deleted file mode 100644 index a793f8a..0000000 --- a/plugins/iambuttbot.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -iambuttbot.py: avidal 2009 -posts everything buttbot says to the iambuttbot twitter account -""" - -import urllib - -from util import hook - - -@hook.command(hook=r'(.*)', prefix=False, ignorebots=False) -def iambuttbot(bot, input): - if input.nick.lower() not in ('buttbot', 'buttsbot'): - return - - if '@' in input.inp or '#' in input.inp: - return #prevent abuse - - password = open('iambuttbot_password').readlines()[0].strip() - status = input.inp if len(input.inp) <= 140 else input.inp[:137] + "..." - data = urllib.urlencode({"status": status.encode('utf8')}) - url = 'http://iambuttbot:%s@twitter.com/statuses/update.xml' % password - response = urllib.urlopen(url, data) - -try: - open('iambuttbot_password') -except IOError: - print 'iambuttbot twitter password not found: module disabled' - del iambuttbot