Unix: Make configuration variable fortune.offensive channel-specific

This commit is contained in:
nyuszika7h 2011-12-18 14:24:35 +01:00
parent 751a3ef921
commit 8af27f4f64
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ conf.registerGlobalValue(Unix.fortune, 'equal',
weight to the different fortune databases. If false, then larger
databases will be given more weight. This sends the -e option to the
fortune program.""")))
conf.registerGlobalValue(Unix.fortune, 'offensive',
conf.registerChannelValue(Unix.fortune, 'offensive',
registry.Boolean(False, _("""Determines whether fortune will retrieve
offensive fortunes along with the normal fortunes. This sends the -a
option to the fortune program.""")))

View File

@ -204,7 +204,7 @@ class Unix(callbacks.Plugin):
args.append('-s')
if self.registryValue('fortune.equal'):
args.append('-e')
if self.registryValue('fortune.offensive'):
if self.registryValue('fortune.offensive', channel):
args.append('-a')
args.extend(self.registryValue('fortune.files'))
try: