diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/scripts.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/scripts.py')
| -rw-r--r-- | modules/scripts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index 915cea62..437be4f4 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -1,6 +1,6 @@ import glob, json, os, subprocess -from src import IRCObject, Utils +from src import IRCObject, utils class Module(object): def __init__(self, bot, events, exports): @@ -12,7 +12,7 @@ class Module(object): def _load_scripts(self): for filename in glob.glob(os.path.join(self._directory, "*")): name = os.path.basename(filename) - for hashflag, value in Utils.get_hashflags(filename): + for hashflag, value in utils.get_hashflags(filename): if hashflag == "name" and value: name = value elif hashflag == "hook" and value: @@ -20,7 +20,7 @@ class Module(object): lambda x: self.call(x, filename, name)) self._hooks.append([value, hook]) - @Utils.hook("received.command.reloadscripts", permission="reloadscripts") + @utils.hook("received.command.reloadscripts", permission="reloadscripts") def reload(self, event): for event_name, hook in self._hooks: self.events.on(event_name).unhook(hook) |
