- text = (
- update['text']
- .replace('\n', ' ')
- .replace(""", "\"")
- .replace('&', '&'))
- self.privmsg_channel(
- "=^_^= %s%s%s %s" %(
- IRC_BOLD, update['user']['screen_name'],
- IRC_BOLD, text))
- self.lastUpdate = crt
+ text = (htmlentitydecode(
+ update['text'].replace('\n', ' '))
+ .encode('utf-8', 'replace'))
+
+ # 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_channels(
+ u"=^_^= %s%s%s %s" %(
+ IRC_BOLD, update['user']['screen_name'],
+ IRC_BOLD, text.decode('utf-8')))
+
+ nextLastUpdate = crt