Removed opt/swhack.py, and modified the Makefile for git.

This commit is contained in:
Sean B. Palmer
2010-01-18 22:28:36 +00:00
parent 22aed08fae
commit f5ef55769e
2 changed files with 2 additions and 35 deletions

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env python
"""
swhack.py - Phenny Swhack Module
Copyright 2008, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
http://inamidst.com/phenny/
"""
import urllib
def swhack(phenny, input):
if not input.sender in ('#swhack', '#inamidst'):
return
query = input.group(2)
pattern = urllib.quote(query, safe='./')
u = urllib.urlopen('http://swhack.com/scripts/tail/' + pattern)
i = None
for i, line in enumerate(u.readlines()):
line = line.rstrip('\r\n')
if i == 0:
phenny.reply(line)
else: phenny.say('[off] ' + line)
if i is None:
phenny.reply('Sorry, no results found.')
u.close()
# swhack.commands = ['swhack']
if __name__ == '__main__':
print __doc__.strip()