diff --git a/Encyclopedia/plugin.py b/Encyclopedia/plugin.py index 008fd7e..7ba3309 100644 --- a/Encyclopedia/plugin.py +++ b/Encyclopedia/plugin.py @@ -303,7 +303,7 @@ class Encyclopedia(callbacks.Plugin): (msg.args[0], msg.nick, msg.args[1]))) return ret = self.factoid_edit(text, channel, msg.prefix) - elif ' is ' in text and '|' not in text and '>' not in text: + elif ' is ' in text and '|' not in text and '>' not in text.replace('',''): if not capab(msg.prefix, 'editfactoids'): if len(text[:text.find('is')]) > 15: irc.error("I am only a bot, please don't think I'm intelligent :)") diff --git a/Lart/plugin.py b/Lart/plugin.py index 59685fc..e14ee8c 100644 --- a/Lart/plugin.py +++ b/Lart/plugin.py @@ -94,6 +94,7 @@ class Lart(plugins.ChannelIdDatabasePlugin): irc.reply(text, action=True) lart = wrap(lart, ['channeldb', optional('id'), 'text']) pity = lart + slander = lart Class = Lart diff --git a/LpLogin/get_ircteam.py b/LpLogin/get_ircteam.py index 4b8ccd3..ecf7e84 100755 --- a/LpLogin/get_ircteam.py +++ b/LpLogin/get_ircteam.py @@ -17,27 +17,21 @@ if options.outfile: else: outfd = sys.stdout -people_re = re.compile(r"""(?:href=".*?~(?P[^/]*?)".*?) - #relationship.*?(href=".*?~(?P.*?)".*?)*""", - re.VERBOSE | re.I | re.DOTALL) +people_re = re.compile(r'href="/~([^/"]*)"') nickname_re = re.compile(r'(.*?).*\n.*freenode',re.I) def get_group_members(group): nicks = [] - u = urllib2.urlopen('http://launchpad.net/~%s' % urllib.quote(group)) + u = urllib2.urlopen('http://launchpad.net/~%s/+members' % urllib.quote(group)) html = u.read().lower() # Split into people and groups - p1 = html.find('team members') - p2 = html.find('relationship to other teams') - p3 = html.find('a member of') + p1 = html.find('active members') + p2 = html.find('pending members') people = people_re.findall(html[p1:p2]) - teams = people_re.findall(html[p2:p3]) for p in people: u = urllib2.urlopen('http://launchpad.net/~%s' % urllib.quote(p)) html = u.read() n = nickname_re.findall(html) nicks += n - for t in teams: - nicks += get_group_members(t) return [x.lower() for x in nicks] outfd.write("\n".join(get_group_members(lp_group)))