Skip to content

Commit

Permalink
Dont print @ messages. Print all updates in last period, not just the…
Browse files Browse the repository at this point in the history
… first. in ircbot. Also 0.3.1

git-svn-id: http://svn.mike.verdone.ca/pyprojects/twitter/trunk@172 d723f978-dc38-0410-87ed-da353333cdcc
  • Loading branch information
mverdone committed May 14, 2008
1 parent 6da3627 commit 7f6c5ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os

version = '0.3'
version = '0.3.1'

setup(name='twitter',
version=version,
Expand Down
18 changes: 11 additions & 7 deletions twitter/ircbot.py
Expand Up @@ -27,9 +27,7 @@
"""

# TODO add delimiter if first word isn't "is" or "was"

BOT_VERSION = "TwitterBot 0.2.1 (mike.verdone.ca/twitter)"
BOT_VERSION = "TwitterBot 0.3.1 (mike.verdone.ca/twitter)"

IRC_BOLD = chr(0x02)
IRC_ITALIC = chr(0x16)
Expand Down Expand Up @@ -130,10 +128,16 @@ def check_statuses(self):
text = (htmlentitydecode(
update['text'].replace('\n', ' '))
.encode('utf-8', 'replace'))
self.privmsg_channel(
"=^_^= %s%s%s %s" %(
IRC_BOLD, update['user']['screen_name'],
IRC_BOLD, text))

# Skip updates beginning with @
# TODO This would be better if we only ignored messages
# to people who are not on our following list.
if not text.startswith("@"):
self.privmsg_channel(
"=^_^= %s%s%s %s" %(
IRC_BOLD, update['user']['screen_name'],
IRC_BOLD, text))

nextLastUpdate = crt
else:
break
Expand Down

0 comments on commit 7f6c5ae

Please sign in to comment.