Remove spurious prints, fix importance handling for launchpad bugs
This commit is contained in:
parent
d86500d0d6
commit
ba56301f7d
|
@ -73,7 +73,6 @@ class Bantracker(callbacks.Plugin):
|
||||||
self.logs[channel] = self.logs[channel][-199:] + [s.strip()]
|
self.logs[channel] = self.logs[channel][-199:] + [s.strip()]
|
||||||
|
|
||||||
def doKickban(self, irc, channel, nick, target, kickmsg = None):
|
def doKickban(self, irc, channel, nick, target, kickmsg = None):
|
||||||
print "DoKickban: %s - %s - %s - %s" % (channel, nick, target, kickmsg)
|
|
||||||
if not self.registryValue('enabled', channel):
|
if not self.registryValue('enabled', channel):
|
||||||
return
|
return
|
||||||
n = now()
|
n = now()
|
||||||
|
@ -83,7 +82,6 @@ class Bantracker(callbacks.Plugin):
|
||||||
db_run("INSERT INTO comments (ban_id, who, comment, time) values(%s,%s,%s,%s)", (id, nick, kickmsg, n))
|
db_run("INSERT INTO comments (ban_id, who, comment, time) values(%s,%s,%s,%s)", (id, nick, kickmsg, n))
|
||||||
|
|
||||||
def doUnban(self, irc, channel, nick, mask):
|
def doUnban(self, irc, channel, nick, mask):
|
||||||
print "DoUnban: %s - %s - %s" % (channel, nick, mask)
|
|
||||||
if not self.registryValue('enabled', channel):
|
if not self.registryValue('enabled', channel):
|
||||||
return
|
return
|
||||||
data = db_run("SELECT MAX(id) FROM bans where channel=%s and mask=%s", (channel, mask), expect_result=True)
|
data = db_run("SELECT MAX(id) FROM bans where channel=%s and mask=%s", (channel, mask), expect_result=True)
|
||||||
|
@ -150,7 +148,6 @@ class Bantracker(callbacks.Plugin):
|
||||||
if 'b' in msg.args[1] or 'd' in msg.args[1]:
|
if 'b' in msg.args[1] or 'd' in msg.args[1]:
|
||||||
i = 2
|
i = 2
|
||||||
plusmin = False
|
plusmin = False
|
||||||
print msg.args
|
|
||||||
for c in msg.args[1]:
|
for c in msg.args[1]:
|
||||||
if c == '-': plusmin = False
|
if c == '-': plusmin = False
|
||||||
elif c == '+': plusmin = True
|
elif c == '+': plusmin = True
|
||||||
|
|
|
@ -169,7 +169,6 @@ class Bugtracker(callbacks.PluginRegexp):
|
||||||
sure_bug = match.group('bt').endswith('bug') or match.group('bt').endswith('bug')
|
sure_bug = match.group('bt').endswith('bug') or match.group('bt').endswith('bug')
|
||||||
# FIXME dig into supybot docs/code
|
# FIXME dig into supybot docs/code
|
||||||
#if conf.supybot.reply.whenAddressedBy.strings:
|
#if conf.supybot.reply.whenAddressedBy.strings:
|
||||||
# print type(conf.supybot.reply.whenAddressedBy.strings)
|
|
||||||
# for p in conf.supybot.reply.whenAddressedBy.strings:
|
# for p in conf.supybot.reply.whenAddressedBy.strings:
|
||||||
# if s.startswith(str(p)):
|
# if s.startswith(str(p)):
|
||||||
# return
|
# return
|
||||||
|
@ -371,17 +370,17 @@ class Malone(IBugtracker):
|
||||||
# Status sort:
|
# Status sort:
|
||||||
try:
|
try:
|
||||||
statuses = ['Rejected', 'Fix Committed', 'Fix Released', 'Confirmed', 'In Progress', 'Needs Info', 'Unconfirmed']
|
statuses = ['Rejected', 'Fix Committed', 'Fix Released', 'Confirmed', 'In Progress', 'Needs Info', 'Unconfirmed']
|
||||||
severities = ['Wishlist', 'Minor', 'Normal', 'Major', 'Critical']
|
severities = ['Untriaged', 'Wishlist', 'Minor', 'Low', 'Normal', 'Medium', 'Major', 'High', 'Critical']
|
||||||
if task1['status'] not in statuses and task2['status'] in statuses: return 1
|
if task1['status'] not in statuses and task2['status'] in statuses: return 1
|
||||||
if task1['status'] in statuses and task2['status'] not in statuses: return -1
|
if task1['status'] in statuses and task2['status'] not in statuses: return -1
|
||||||
if task1['severity'] not in severities and task2['severity'] in severities: return 1
|
if task1['importance'] not in severities and task2['importance'] in severities: return 1
|
||||||
if task1['severity'] in severities and task2['severity'] not in severities: return -1
|
if task1['importance'] in severities and task2['importance'] not in severities: return -1
|
||||||
if not (task1['status'] == task2['status']):
|
if not (task1['status'] == task2['status']):
|
||||||
if statuses.index(task1['status']) < statuses.index(task2['status']):
|
if statuses.index(task1['status']) < statuses.index(task2['status']):
|
||||||
return -1
|
return -1
|
||||||
return 1
|
return 1
|
||||||
if not (task1['severity'] == task2['severity']):
|
if not (task1['importance'] == task2['importance']):
|
||||||
if severities.index(task1['severity']) < severities.index(task2['severity']):
|
if severities.index(task1['importance']) < severities.index(task2['importance']):
|
||||||
return -1
|
return -1
|
||||||
return 1
|
return 1
|
||||||
except: # Launchpad changed again?
|
except: # Launchpad changed again?
|
||||||
|
|
|
@ -33,8 +33,6 @@ class Mess(callbacks.PluginRegexp):
|
||||||
if not count: count = 1
|
if not count: count = 1
|
||||||
if count > 5: count = 5
|
if count > 5: count = 5
|
||||||
t = u' '.join([x.__call__([u"\u2680",u"\u2681",u"\u2682",u"\u2683",u"\u2684",u"\u2685"]) for x in [random.choice]*count])
|
t = u' '.join([x.__call__([u"\u2680",u"\u2681",u"\u2682",u"\u2683",u"\u2684",u"\u2685"]) for x in [random.choice]*count])
|
||||||
print t
|
|
||||||
#print str(t)
|
|
||||||
irc.reply(t)
|
irc.reply(t)
|
||||||
dice = wrap(dice, [additional('int')])
|
dice = wrap(dice, [additional('int')])
|
||||||
|
|
||||||
|
|
|
@ -195,7 +195,6 @@ class Webcal(callbacks.Plugin):
|
||||||
return
|
return
|
||||||
#c = "#ubuntu-meeting"
|
#c = "#ubuntu-meeting"
|
||||||
url = self.registryValue('url', c)
|
url = self.registryValue('url', c)
|
||||||
print c, url
|
|
||||||
if not url:
|
if not url:
|
||||||
meeting = ''
|
meeting = ''
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue