Compare commits
No commits in common. "6368a60f595b7d6c2cc0664b81c9f6681f4d6d01" and "a7fb575a5561e6d49f091c41d5395b37c213cc1b" have entirely different histories.
6368a60f59
...
a7fb575a55
2
bot.py
2
bot.py
|
@ -446,8 +446,6 @@ class Fulvia(irc.IRCClient):
|
||||||
line = "-!- {oldname} is now known as {newname}"
|
line = "-!- {oldname} is now known as {newname}"
|
||||||
|
|
||||||
for channel_name, channel in self.channels.items():
|
for channel_name, channel in self.channels.items():
|
||||||
if oldname not in channel.users.keys():
|
|
||||||
continue
|
|
||||||
self.log(channel_name, line)
|
self.log(channel_name, line)
|
||||||
|
|
||||||
user = channel.users.pop(oldname)
|
user = channel.users.pop(oldname)
|
||||||
|
|
|
@ -7,7 +7,6 @@ import datetime
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from module import commands
|
from module import commands
|
||||||
import tools.time
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
@ -70,12 +69,3 @@ def idleTimeWulf(result, bot):
|
||||||
t = datetime.datetime.fromtimestamp(int(signon))
|
t = datetime.datetime.fromtimestamp(int(signon))
|
||||||
delta = datetime.datetime.now() - t
|
delta = datetime.datetime.now() - t
|
||||||
bot.msg("Adalwulf" + "_"*delta.days)
|
bot.msg("Adalwulf" + "_"*delta.days)
|
||||||
|
|
||||||
|
|
||||||
@commands('unix')
|
|
||||||
def unixtolocal(bot, trigger):
|
|
||||||
"""Converts the given timestamp from unix time to local time."""
|
|
||||||
unix = int(trigger.group(2))
|
|
||||||
dt = datetime.datetime.utcfromtimestamp(unix)
|
|
||||||
dt = dt.replace(tzinfo=datetime.timezone.utc)
|
|
||||||
bot.msg(dt.astimezone(tz=None).strftime('%Y-%m-%d %H:%M:%S'))
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user