aboutsummaryrefslogtreecommitdiff
path: root/modules/to.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-15 13:59:09 +0000
committerGravatar jesopo2019-11-15 13:59:09 +0000
commit5d01db8514f9b06d2e478c0d86ffafe137093d5b (patch)
treedba9d73f611e804bf02b6ea7146b0a392be41939 /modules/to.py
parentdont expose has_magic/get_magic in utils/__init__.py, ref directly (diff)
signature
move all datetime-related code from utils/__init__ to utils.datetime
Diffstat (limited to 'modules/to.py')
-rw-r--r--modules/to.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/to.py b/modules/to.py
index 91c9fa72..eb0ad03a 100644
--- a/modules/to.py
+++ b/modules/to.py
@@ -8,8 +8,8 @@ class Module(ModuleManager.BaseModule):
messages = event["channel"].get_user_setting(event["user"].get_id(),
"to", [])
for nickname, message, timestamp in messages:
- timestamp_parsed = utils.iso8601_parse(timestamp)
- timestamp_human = utils.datetime_human(timestamp_parsed)
+ timestamp_parsed = utils.datetime.iso8601_parse(timestamp)
+ timestamp_human = utils.datetime.datetime_human(timestamp_parsed)
event["channel"].send_message("%s: <%s> %s (at %s UTC)" % (
event["user"].nickname, nickname, message, timestamp_human))
if messages:
@@ -35,7 +35,7 @@ class Module(ModuleManager.BaseModule):
messages.append([event["user"].nickname,
" ".join(event["args_split"][1:]),
- utils.iso8601_format_now()])
+ utils.datetime.iso8601_format_now()])
event["target"].set_user_setting(target_user.get_id(),
"to", messages)
event["stdout"].write("Message saved")