mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Oops... Missed a case where the plugin's author is the only listed contributor
Minor changes to more accurately adhere to Supybot coding standards
This commit is contained in:
parent
9b0ffcfdb5
commit
1f0a21c86a
21
src/Misc.py
21
src/Misc.py
@ -693,12 +693,15 @@ class Misc(callbacks.Privmsg):
|
||||
contribs.remove(module.__author__)
|
||||
except ValueError:
|
||||
pass
|
||||
contrib = "%s %s contributed to it." % \
|
||||
(buildContributorsString(contribs),
|
||||
utils.has(len(contribs)))
|
||||
hasContribs = True
|
||||
if contribs:
|
||||
contrib = '%s %s contributed to it.' % \
|
||||
(buildContributorsString(contribs),
|
||||
utils.has(len(contribs)))
|
||||
hasContribs = True
|
||||
elif hasAuthor:
|
||||
contrib = 'has no additional contributors listed'
|
||||
if hasContribs and not hasAuthor:
|
||||
conjunction = "but"
|
||||
conjunction = 'but'
|
||||
return '%s %s %s %s' % (head, author, conjunction, contrib)
|
||||
def buildPersonString(module):
|
||||
"""
|
||||
@ -728,15 +731,15 @@ class Misc(callbacks.Privmsg):
|
||||
if splitContribs[0]:
|
||||
results.append('the %s' % utils.commaAndify(splitContribs[0]))
|
||||
if results and isAuthor:
|
||||
return "%s wrote the %s plugin and also contributed %s" % \
|
||||
return '%s wrote the %s plugin and also contributed %s' % \
|
||||
(fullName, plugin, utils.commaAndify(results))
|
||||
elif results and not isAuthor:
|
||||
return "%s contributed %s to the %s plugin" % \
|
||||
return '%s contributed %s to the %s plugin' % \
|
||||
(fullName, utils.commaAndify(results), plugin)
|
||||
elif isAuthor and not results:
|
||||
return "%s wrote the %s plugin" % (fullName, plugin)
|
||||
return '%s wrote the %s plugin' % (fullName, plugin)
|
||||
else:
|
||||
return "%s has no listed contributions for the %s plugin %s" %\
|
||||
return '%s has no listed contributions for the %s plugin %s' %\
|
||||
(fullName, plugin)
|
||||
# First we need to check and see if the requested plugin is loaded
|
||||
cb = irc.getCallback(plugin)
|
||||
|
Loading…
Reference in New Issue
Block a user