mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 13:01:06 -05: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',
|
conf.registerChannelValue(Unix.fortune, 'short',
|
||||||
registry.Boolean(True, _("""Determines whether only short fortunes will be
|
registry.Boolean(True, _("""Determines whether only short fortunes will be
|
||||||
used if possible. This sends the -s option to the fortune program.""")))
|
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
|
registry.Boolean(True, _("""Determines whether fortune will give equal
|
||||||
weight to the different fortune databases. If false, then larger
|
weight to the different fortune databases. If false, then larger
|
||||||
databases will be given more weight. This sends the -e option to the
|
databases will be given more weight. This sends the -e option to the
|
||||||
|
@ -207,11 +207,11 @@ class Unix(callbacks.Plugin):
|
|||||||
args = [fortuneCmd]
|
args = [fortuneCmd]
|
||||||
if self.registryValue('fortune.short', channel):
|
if self.registryValue('fortune.short', channel):
|
||||||
args.append('-s')
|
args.append('-s')
|
||||||
if self.registryValue('fortune.equal'):
|
if self.registryValue('fortune.equal', channel):
|
||||||
args.append('-e')
|
args.append('-e')
|
||||||
if self.registryValue('fortune.offensive', channel):
|
if self.registryValue('fortune.offensive', channel):
|
||||||
args.append('-a')
|
args.append('-a')
|
||||||
args.extend(self.registryValue('fortune.files'))
|
args.extend(self.registryValue('fortune.files', channel))
|
||||||
try:
|
try:
|
||||||
with open(os.devnull) as null:
|
with open(os.devnull) as null:
|
||||||
inst = subprocess.Popen(args,
|
inst = subprocess.Popen(args,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user