diff options
| author | 2018-08-31 10:50:37 +0100 | |
|---|---|---|
| committer | 2018-08-31 10:50:37 +0100 | |
| commit | abed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch) | |
| tree | 3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/seen.py | |
| parent | Fix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff) | |
| signature | ||
Reformat
Diffstat (limited to 'modules/seen.py')
| -rw-r--r-- | modules/seen.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/seen.py b/modules/seen.py index 750b06e4..0a2be3ec 100644 --- a/modules/seen.py +++ b/modules/seen.py @@ -1,10 +1,11 @@ import time import Utils + class Module(object): def __init__(self, bot): bot.events.on("received").on("message").on("channel" - ).hook(self.channel_message) + ).hook(self.channel_message) bot.events.on("received").on("command").on("seen").hook( self.seen, min_args=1, help="Find out when a user was last seen", @@ -16,10 +17,10 @@ class Module(object): def seen(self, event): seen_seconds = event["server"].get_user(event["args_split"][0] - ).get_setting("seen") + ).get_setting("seen") if seen_seconds: - since = Utils.to_pretty_time(time.time()-seen_seconds, - max_units=2) + since = Utils.to_pretty_time(time.time() - seen_seconds, + max_units=2) event["stdout"].write("%s was last seen %s ago" % ( event["args_split"][0], since)) else: |
