mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-08 03:59:23 +01:00
Clean up the registry calls
This commit is contained in:
parent
c3173fe4b4
commit
e9f77d6ab0
@ -209,7 +209,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
if not project:
|
if not project:
|
||||||
project = conf.supybot.plugins.Sourceforge.project()
|
project = self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
try:
|
try:
|
||||||
@ -227,7 +227,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
default project is set.
|
default project is set.
|
||||||
"""
|
"""
|
||||||
project = privmsgs.getArgs(args, required=0, optional=1)
|
project = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
project = project or conf.supybot.plugins.Sourceforge.project()
|
project = project or self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
text = webutils.getUrl(''.join([self._projectURL, project]))
|
text = webutils.getUrl(''.join([self._projectURL, project]))
|
||||||
@ -258,7 +258,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
irc.error('"%s" is not a proper bugnumber.' % project)
|
irc.error('"%s" is not a proper bugnumber.' % project)
|
||||||
return
|
return
|
||||||
bugnum = project
|
bugnum = project
|
||||||
project = conf.supybot.plugins.Sourceforge.project()
|
project = self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
try:
|
try:
|
||||||
@ -293,7 +293,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
if not project:
|
if not project:
|
||||||
project = conf.supybot.plugins.Sourceforge.project()
|
project = self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
try:
|
try:
|
||||||
@ -312,7 +312,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
default project is set.
|
default project is set.
|
||||||
"""
|
"""
|
||||||
project = privmsgs.getArgs(args, required=0, optional=1)
|
project = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
project = project or conf.supybot.plugins.Sourceforge.project()
|
project = project or self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
text = webutils.getUrl(''.join([self._projectURL, project]))
|
text = webutils.getUrl(''.join([self._projectURL, project]))
|
||||||
@ -343,7 +343,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
irc.error('"%s" is not a proper rfenumber.' % project)
|
irc.error('"%s" is not a proper rfenumber.' % project)
|
||||||
return
|
return
|
||||||
rfenum = project
|
rfenum = project
|
||||||
project = conf.supybot.plugins.Sourceforge.project()
|
project = self.registryValue('project', msg.args[0])
|
||||||
if not project:
|
if not project:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
try:
|
try:
|
||||||
@ -359,7 +359,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
def sfSnarfer(self, irc, msg, match):
|
def sfSnarfer(self, irc, msg, match):
|
||||||
r"https?://(?:www\.)?(?:sourceforge|sf)\.net/tracker/" \
|
r"https?://(?:www\.)?(?:sourceforge|sf)\.net/tracker/" \
|
||||||
r".*\?(?:&?func=detail|&?aid=\d+|&?group_id=\d+|&?atid=\d+){4}"
|
r".*\?(?:&?func=detail|&?aid=\d+|&?group_id=\d+|&?atid=\d+){4}"
|
||||||
if not conf.supybot.plugins.Sourceforge.trackerSnarfer():
|
if not self.registryValue('trackerSnarfer', msg.args[0]):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
url = match.group(0)
|
url = match.group(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user