From 25a913a82b3f7f1d57b557bbca0d2efd7daa64c7 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 1 Mar 2016 19:20:58 +0100 Subject: [PATCH] Unix: Make fortune.equal and fortune.file channel-specific. --- plugins/Unix/config.py | 2 +- plugins/Unix/plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Unix/config.py b/plugins/Unix/config.py index dde6e2e1e..b24bd2322 100644 --- a/plugins/Unix/config.py +++ b/plugins/Unix/config.py @@ -75,7 +75,7 @@ conf.registerGlobalValue(Unix.fortune, 'command', conf.registerChannelValue(Unix.fortune, 'short', registry.Boolean(True, _("""Determines whether only short fortunes will be used if possible. This sends the -s option to the fortune program."""))) -conf.registerGlobalValue(Unix.fortune, 'equal', +conf.registerChannelValue(Unix.fortune, 'equal', registry.Boolean(True, _("""Determines whether fortune will give equal weight to the different fortune databases. If false, then larger databases will be given more weight. This sends the -e option to the diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index ec64c74f9..cef3b55fb 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -207,11 +207,11 @@ class Unix(callbacks.Plugin): args = [fortuneCmd] if self.registryValue('fortune.short', channel): args.append('-s') - if self.registryValue('fortune.equal'): + if self.registryValue('fortune.equal', channel): args.append('-e') if self.registryValue('fortune.offensive', channel): args.append('-a') - args.extend(self.registryValue('fortune.files')) + args.extend(self.registryValue('fortune.files', channel)) try: with open(os.devnull) as null: inst = subprocess.Popen(args,