Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# <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
You can’t perform that action at this time.