Cloaks

Differences between revisions 13 and 14
Revision 13 as of 2011-04-28 04:34:15
Size: 4420
Editor: cpc2-smal7-0-0-cust80
Comment: edit contact info fir bots
Revision 14 as of 2011-06-13 20:18:41
Size: 4958
Editor: cpc2-smal7-0-0-cust80
Comment: Migrate maintenance script to launchpadlib
Deletions are marked like this. Additions are marked like this.
Line 58: Line 58:
{{{
import urllib2
from xml.dom import minidom
{{{#!python
#!/usr/bin/python
# -*- Encoding: UTF-8 -*-
from launchpadlib.launchpad import Launchpad
Line 62: Line 63:
def get_team(team):
    string = urllib2.urlopen('http://launchpad.net/~%s/+rdf' % team).read()
    tree = minidom.parseString(string)
    members = tree.getElementsByTagName('foaf:Person')
    members = [(x.getElementsByTagName('foaf:name'), x.getElementsByTagName('foaf:mbox_sha1sum')) for x in members ]
    members = [(x[0][0].firstChild.toxml(), x[1][0].firstChild.toxml()) for x in members if len(x[1])]
_get_team_members_done = [] # Cache of already fetched Launchpad teams
def get_team_members(lp, team):
    '''Get all members of a team and all sub-teams.
    Returns a set of Person names
    '''

    if team in _get_team_members_done: # Don't fetch team members multiple times
        return set()

    _get_team_members_done.append(team)
    team = lp.people[team]
    members = set()

    for member in team.members:
        if not member.is_team:
            members.add(member.name)
        else: # Recurs into sub-teams
            members.update(get_team_members(lp, member.name))
Line 70: Line 84:
cloaks = get_team('ubuntu-irc-cloaks')
members = get_team('ubuntumembers')
print "\n".join(x[0] for x in cloaks if x not in members)

lp = Launchpad.login_anonymously('Ubuntu IRC Cloaks Updater Script',
    service_root='production', version='1.0')

cloaks = get_team_members(lp, u'ubuntu-irc-cloaks')
_get_team_members_done = [] # Clear the cache of retrieved teams
members = get_team_members(lp, u'ubuntumembers')

# The members printed are those who are no longer members of ~ubuntumembers
print u'\n'.join(_ for _ in cloaks if _ not in members)

There are 4 different Ubuntu cloaks possible on freenode:

  • "ubuntu/member/nickname"

  • "ubuntu/member/other.cloak.nickname"

  • "other/cloak/ubuntu.member.nickname"

  • "ubuntu/bot/nickname"

Member cloaks

All Ubuntu members can request an Ubuntu cloak by asking a member of the IRC Council for one. Please do not go to freenode staff first as they require approval from a group contact for group cloaks.

Before you request a cloak please make sure your Launchpad profile contains your IRC nicknames. Then just join #ubuntu-irc and ask, giving a link to your Launchpad profile and make sure you have set up your account as per these steps.

If you want the second or third form of cloak, where you already have a project cloak and want to add the "ubuntu.member.nickname" or "other.cloak.nickname" to it; you will need to ask a contact from both groups to approve the cloak change.

All cloaked people will be added to the ubuntu-irc-cloaks Launchpad team.

Please remember that by wearing an Ubuntu member cloak, you represent the Ubuntu community everywhere on freenode, not just in Ubuntu channels. Therefore when cloaked, you are expected to follow the Code of Conduct, network policies, and any rules local to the channels you visit.

Bot cloaks

The ubuntu/bot cloak is only available for bots approved by the IRC council. More information about the bots may be found at UbuntuBots. The following bots currently have a cloak:

Bots can be cloaked if the following conditions are met

  • The bot performs a useful function in Ubuntu teamchannels or LoCo channels of official LoCoTeams

  • There is no other bot performing this function in those channels
  • The bot is allowed by the channel admins of the channels it is in
  • The bot owner is trusted by the IRC council and/or the channel admins of the channels it is in
  • The bot will not join other channels unless the channel owner agrees
  • Preferably, the code for the bot is free software so we can inspect it

Cloaking your bot by linking it to your cloaked nickname is not allowed and will result in your cloak being revoked. If your bot does not meet these requirements, you can always ask freenode staff for an unaffiliated bot cloak.

Canonical Cloaks

For Canonical Employees wishing to obtain an @canonical cloak, please read the internal canonical wiki and/or ping joey. If a canonical employee is an Ubuntu member and would prefer an Ubuntu cloak, then they need to follow the instructions as described above.

Maintenance

Verifying that all members of that team are still Ubuntu members can be done with this python snippet:

   1 #!/usr/bin/python
   2 # -*- Encoding: UTF-8 -*-
   3 from launchpadlib.launchpad import Launchpad
   4 
   5 _get_team_members_done = [] # Cache of already fetched Launchpad teams
   6 def get_team_members(lp, team):
   7     '''Get all members of a team and all sub-teams.
   8     Returns a set of Person names
   9     '''
  10 
  11     if team in _get_team_members_done: # Don't fetch team members multiple times
  12         return set()
  13 
  14     _get_team_members_done.append(team)
  15     team = lp.people[team]
  16     members = set()
  17 
  18     for member in team.members:
  19         if not member.is_team:
  20             members.add(member.name)
  21         else: # Recurs into sub-teams
  22             members.update(get_team_members(lp, member.name))
  23 
  24     return members
  25 
  26 
  27 lp = Launchpad.login_anonymously('Ubuntu IRC Cloaks Updater Script',
  28     service_root='production', version='1.0')
  29 
  30 cloaks = get_team_members(lp, u'ubuntu-irc-cloaks')
  31 _get_team_members_done = [] # Clear the cache of retrieved teams
  32 members = get_team_members(lp, u'ubuntumembers')
  33 
  34 # The members printed are those who are no longer members of ~ubuntumembers
  35 print u'\n'.join(_ for _ in cloaks if _ not in members)


CategoryIRC

IRC/Cloaks (last edited 2022-08-17 13:08:46 by kewisch)