Created
March 10, 2010 08:11
-
-
Save chromakode/327671 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <snip> | |
for line in f: | |
m = LOG_RE.match(line) | |
if m: | |
when = time.mktime(time.strptime(m.group("when"), "%d-%m-%Y %H:%M:%S")) | |
# Bwahahahaha. | |
_time = time.time | |
time.time = lambda: when | |
try: | |
bot.privmsg(m.group("user"), channel, m.group("msg")) | |
except Exception as e: | |
log.err() | |
finally: | |
time.time = _time | |
# </snip> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment