mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Allow multiple fortune files.
This commit is contained in:
parent
7ede876aaa
commit
53c951cc04
@ -93,11 +93,11 @@ conf.registerGlobalValue(conf.supybot.plugins.Unix.fortune, 'command',
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Unix.fortune, 'short',
|
||||
registry.Boolean(True, """Determines whether only short fortunes will be
|
||||
used if possible."""))
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Unix.fortune, 'file',
|
||||
registry.String('', """Determines what specific file (if any) will be used
|
||||
with the fortune command; if none is given, the system-wide default will
|
||||
be used. Do note that this fortune file must be placed with the rest of
|
||||
your system's fortune files."""))
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Unix.fortune, 'files',
|
||||
registry.SpaceSeparatedListOfStrings([], """Determines what specific file
|
||||
(if any) will be used with the fortune command; if none is given, the
|
||||
system-wide default will be used. Do note that this fortune file must be
|
||||
placed with the rest of your system's fortune files."""))
|
||||
|
||||
conf.registerGroup(conf.supybot.plugins.Unix, 'spell')
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Unix.spell, 'command',
|
||||
@ -222,8 +222,7 @@ class Unix(callbacks.Privmsg):
|
||||
args = [fortuneCmd]
|
||||
if self.registryValue('fortune.short'):
|
||||
args.append('-s')
|
||||
if self.registryValue('fortune.file'):
|
||||
args.append(self.registryValue('fortune.file'))
|
||||
args.extend(self.registryValue('fortune.files')))
|
||||
(r, w) = popen2.popen4(args)
|
||||
try:
|
||||
lines = r.readlines()
|
||||
|
Loading…
Reference in New Issue
Block a user