mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Made replyNoBugzilla a registry variable
This commit is contained in:
parent
886e447c8c
commit
144a5bc39e
@ -100,8 +100,6 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
if yn('Do you want this bug snarfer enabled by default?') == 'y':
|
if yn('Do you want this bug snarfer enabled by default?') == 'y':
|
||||||
conf.supybot.plugins.Bugzilla.bugSnarfer.setValue(True)
|
conf.supybot.plugins.Bugzilla.bugSnarfer.setValue(True)
|
||||||
|
|
||||||
replyNoBugzilla = 'I don\'t have a bugzilla %r'
|
|
||||||
|
|
||||||
conf.registerPlugin('Bugzilla')
|
conf.registerPlugin('Bugzilla')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Bugzilla, 'bugSnarfer',
|
conf.registerChannelValue(conf.supybot.plugins.Bugzilla, 'bugSnarfer',
|
||||||
registry.Boolean(False, """Determines whether the bug snarfer will be
|
registry.Boolean(False, """Determines whether the bug snarfer will be
|
||||||
@ -109,6 +107,10 @@ conf.registerChannelValue(conf.supybot.plugins.Bugzilla, 'bugSnarfer',
|
|||||||
information reported into the channel."""))
|
information reported into the channel."""))
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Bugzilla, 'bold',
|
conf.registerChannelValue(conf.supybot.plugins.Bugzilla, 'bold',
|
||||||
registry.Boolean(True, """Determines whether results are bolded."""))
|
registry.Boolean(True, """Determines whether results are bolded."""))
|
||||||
|
conf.registerGlobalValue(conf.supybot.plugins.Bugzilla, 'replyNoBugzilla',
|
||||||
|
registry.String('I don\'t have a bugzilla %r.', """Determines the phrase
|
||||||
|
to use when notifying the user that there is no information about that
|
||||||
|
bugzilla site."""))
|
||||||
|
|
||||||
class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
||||||
"""Show a link to a bug report with a brief description"""
|
"""Show a link to a bug report with a brief description"""
|
||||||
@ -170,7 +172,8 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
self.shorthand = utils.abbrev(self.db.keys())
|
self.shorthand = utils.abbrev(self.db.keys())
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(replyNoBugzilla % name)
|
s = conf.supybot.plugins.Bugzilla.replyNoBugzilla()
|
||||||
|
irc.error(s % name)
|
||||||
|
|
||||||
def list(self, irc, msg, args):
|
def list(self, irc, msg, args):
|
||||||
"""[<abbreviation>]
|
"""[<abbreviation>]
|
||||||
@ -185,7 +188,8 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
(url, description) = self.db[name]
|
(url, description) = self.db[name]
|
||||||
irc.reply('%s: %s, %s' % (name, description, url))
|
irc.reply('%s: %s, %s' % (name, description, url))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(replyNoBugzilla % name)
|
s = conf.supybot.plugins.Bugzilla.replyNoBugzilla()
|
||||||
|
irc.error(s % name)
|
||||||
else:
|
else:
|
||||||
if self.db:
|
if self.db:
|
||||||
L = self.db.keys()
|
L = self.db.keys()
|
||||||
@ -267,7 +271,8 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
name = self.shorthand[name]
|
name = self.shorthand[name]
|
||||||
(url, description) = self.db[name]
|
(url, description) = self.db[name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(replyNoBugzilla % name)
|
s = conf.supybot.plugins.Bugzilla.replyNoBugzilla()
|
||||||
|
irc.error(s % name)
|
||||||
return
|
return
|
||||||
bugs = self.urlquery2bugslist(url, query)
|
bugs = self.urlquery2bugslist(url, query)
|
||||||
bugids = bugs.keys()
|
bugids = bugs.keys()
|
||||||
@ -287,7 +292,8 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
name = self.shorthand[name]
|
name = self.shorthand[name]
|
||||||
(url, description) = self.db[name]
|
(url, description) = self.db[name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(replyNoBugzilla % name)
|
s = conf.supybot.plugins.Bugzilla.replyNoBugzilla()
|
||||||
|
irc.error(s % name)
|
||||||
return
|
return
|
||||||
queryurl = '%s/xml.cgi?id=%s' % (url, number)
|
queryurl = '%s/xml.cgi?id=%s' % (url, number)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user