From 5338859e31068d83cf3c83dfc860c646c1ed42e8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 6 May 2016 13:36:01 +0100 Subject: added a function to Utils to get the "closest" setting, with channel/user settings being more important than server-wide settings. --- modules/commands.py | 2 +- modules/sed.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/commands.py b/modules/commands.py index 3c22a6d1..bf5781d7 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -128,7 +128,7 @@ class Module(object): self.bot.events.on("received").on("command").on(command).call( 1, user=user, server=server, target=target, log=log, args=args, args_split=args_split, stdout=stdout, stderr=stderr, - command=command.lower()) + command=command.lower(), is_channel=is_channel) stdout.send() target.last_stdout = stdout stderr.send() diff --git a/modules/sed.py b/modules/sed.py index 01bbdf4c..460dfd81 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -18,7 +18,7 @@ class Module(object): validate=Utils.bool_or_none) def channel_message(self, event): - if event["action"] or not event["channel"].get_setting("sed", True): + if event["action"] or not Utils.get_closest_setting(event, "sed", True): return sed_split = re.split(REGEX_SPLIT, event["message"], 3) if event["message"].startswith("s/") and len(sed_split) > 2: -- cgit v1.3.1-10-gc9f91