diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/in.py | |
| parent | Add a way to not add a user automatically in IRCServer.get_user (diff) | |
| signature | ||
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'modules/in.py')
| -rw-r--r-- | modules/in.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/in.py b/modules/in.py index f237bee6..3a5ec19a 100644 --- a/modules/in.py +++ b/modules/in.py @@ -1,17 +1,17 @@ import time -from src import ModuleManager, Utils +from src import ModuleManager, utils -SECONDS_MAX = Utils.SECONDS_WEEKS*8 +SECONDS_MAX = utils.SECONDS_WEEKS*8 SECONDS_MAX_DESCRIPTION = "8 weeks" class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.in", min_args=2) + @utils.hook("received.command.in", min_args=2) def in_command(self, event): """ :help: Set a reminder :usage: <time> <message> """ - seconds = Utils.from_pretty_time(event["args_split"][0]) + seconds = utils.from_pretty_time(event["args_split"][0]) message = " ".join(event["args_split"][1:]) if seconds: if seconds <= SECONDS_MAX: @@ -29,7 +29,7 @@ class Module(ModuleManager.BaseModule): event["stderr"].write( "Please provided a valid time above 0 seconds") - @Utils.hook("timer.in") + @utils.hook("timer.in") def timer_due(self, event): for server in self.bot.servers.values(): if event["server_id"] == server.id: |
