mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Unix: Make fortune.equal and fortune.file channel-specific.
This commit is contained in:
parent
bf02f79847
commit
25a913a82b
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user