Just keep fixing
This commit is contained in:
parent
74af0c989f
commit
80ecfbfa19
|
@ -241,7 +241,7 @@ class Bugtracker(callbacks.PluginRegexp):
|
|||
|
||||
def bugSnarfer(self, irc, msg, match):
|
||||
r"""\b(?P<bt>(([a-z]+)?\s+bugs?|[a-z]+))\s+#?(?P<bug>\d+(?!\d*\.\d+)((,|\s*(and|en|et|und|ir))\s*#?\d+(?!\d*\.\d+))*)"""
|
||||
if not self.registryValue('bugSnarfer', msg.args[0]):
|
||||
if msg.args[0][0] == '#' and not self.registryValue('bugSnarfer', msg.args[0]):
|
||||
return
|
||||
# Don't double on commands
|
||||
s = str(msg).split(':')[2]
|
||||
|
@ -309,7 +309,7 @@ class Bugtracker(callbacks.PluginRegexp):
|
|||
#&group_id=\d+&at_id=\d+
|
||||
def turlSnarfer(self, irc, msg, match):
|
||||
"(?P<tracker>https?://.*?)(show_bug.cgi\?id=|bugreport.cgi\?bug=|(bugs|\+bug)/|/ticket/|tracker/.*aid=)(?P<bug>\d+)(?P<sfurl>&group_id=\d+&at_id=\d+)?"
|
||||
if not self.registryValue('bugSnarfer', msg.args[0]):
|
||||
if msg.args[0][0] == '#' and not self.registryValue('bugSnarfer', msg.args[0]):
|
||||
return
|
||||
try:
|
||||
tracker = self.get_tracker(match.group(0),match.group('sfurl'))
|
||||
|
|
|
@ -270,7 +270,7 @@ class Encyclopedia(callbacks.Plugin):
|
|||
f.name += '-%s' % newchannel
|
||||
f.value = '<alias> ' + aliases.channel_primary.name
|
||||
else:
|
||||
irc.error("Unresolvable alias:")
|
||||
irc.error("Unresolvable alias: %s" % alias)
|
||||
return
|
||||
# Finally, save
|
||||
cur.execute("UPDATE facts SET value = %s WHERE name = %s", (f.value, f.name))
|
||||
|
@ -284,11 +284,15 @@ class Encyclopedia(callbacks.Plugin):
|
|||
if '>' in text:
|
||||
_target = text[text.rfind('>')+1:].strip()
|
||||
text = text[:text.rfind('>')].strip()
|
||||
if text.startswith('tell ') and ' about ' in text:
|
||||
_target = text[5:].strip().split(None,1)[0]
|
||||
if text.startswith('tell '):
|
||||
text = ' ' + text
|
||||
if ' tell ' in text and ' about ' in text:
|
||||
_target = text[text.find(' tell ')+6:].strip().split(None,1)[0]
|
||||
text = text[text.find(' about ')+7:].strip()
|
||||
if _target:
|
||||
# Validate
|
||||
if _target == 'me':
|
||||
target = msg.nick
|
||||
for chan in irc.state.channels:
|
||||
if _target in irc.state.channels[chan].users and msg.nick in irc.state.channels[chan].users:
|
||||
target = _target
|
||||
|
|
Loading…
Reference in New Issue