diff --git a/Bugtracker/plugin.py b/Bugtracker/plugin.py index 054a37c..45d4b21 100644 --- a/Bugtracker/plugin.py +++ b/Bugtracker/plugin.py @@ -241,7 +241,7 @@ class Bugtracker(callbacks.PluginRegexp): def bugSnarfer(self, irc, msg, match): r"""\b(?P(([a-z]+)?\s+bugs?|[a-z]+))\s+#?(?P\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): "(?Phttps?://.*?)(show_bug.cgi\?id=|bugreport.cgi\?bug=|(bugs|\+bug)/|/ticket/|tracker/.*aid=)(?P\d+)(?P&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')) diff --git a/Encyclopedia/plugin_ng.py b/Encyclopedia/plugin_ng.py index 11a9e82..8cbda4b 100644 --- a/Encyclopedia/plugin_ng.py +++ b/Encyclopedia/plugin_ng.py @@ -270,7 +270,7 @@ class Encyclopedia(callbacks.Plugin): f.name += '-%s' % newchannel f.value = ' ' + 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