Changeset 11
- Timestamp:
- 06/20/06 14:21:22 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/amazonbot/amazonbot.py
r10 r11 106 106 107 107 def on_pubmsg(self, c, e): 108 if time.time() > self._prev_time + config.get('bot', 'freq', 'int'): 108 _current_time = time.time() 109 if _current_time < self._prev_time + config.get('bot', 'freq', 'int'): 109 110 if __debug__: 110 111 prev = time.strftime('%y/%m/%d %H:%M:%S', time.localtime(self._prev_time)) … … 112 113 return False 113 114 115 self._prev_time = _current_time 114 116 msg = unicoding(e.arguments()[0]) 115 117 … … 130 132 try: 131 133 message = ununicoding(': '.join([content, title, url])) 132 except UnicodeError: 134 except UnicodeError, e: 135 # ãªããããŸã« unicode ãªããžã§ã¯ãã iso-2022-jp ã§ãšã³ã³ãŒãã§ããªã 136 if __debug__: 137 print >> sys.stderr, 'DEBUG> %s' % str(e) 133 138 return False 134 # ãªããããŸã« unicode ãªããžã§ã¯ãã iso-2022-jp ã§ãšã³ã³ãŒãã§ããªã135 139 136 140 c.privmsg(channel, message)
Note: See TracChangeset
for help on using the changeset viewer.