Merge lp:~stefanor/ibid/identity-567510 into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Stefano Rivera
Status: Merged
Approved by: Stefano Rivera
Approved revision: 929
Merged at revision: 929
Proposed branch: lp:~stefanor/ibid/identity-567510
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 45 lines (+7/-6)
1 file modified
ibid/plugins/identity.py (+7/-6)
To merge this branch: bzr merge lp:~stefanor/ibid/identity-567510
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Max Rabkin Approve
Keegan Carruthers-Smith Approve
Review via email: mp+23798@code.launchpad.net

Commit message

Change administrative user & identity linking syntax to be less problematically broad

Description of the change

This has been needed for a while

Additionally I propose it for 0.1.1

To post a comment you must log in.
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) :
review: Approve
Revision history for this message
Max Rabkin (max-rabkin) :
review: Approve
lp:~stefanor/ibid/identity-567510 updated
927. By Stefano Rivera

Increase default HTTP GET size from 500 bytes to 2kiB
https://launchpad.net/~stefanor/ibid/http-size-563928/+merge/23485
Author: Stefano Rivera
Approved by: Jonathan Hitchcock

Revision history for this message
Jonathan Hitchcock (vhata) wrote :

09:06 <Vhata> tibid: who is tibid?
09:06 <tibid> Vhata: I don't know who tibid is
09:06 <Vhata> tibid: literal tibid
09:06 <tibid> Vhata: 1: is awesome, 2: is unbalanced, 3: is not Markov's bitch, 4: is tibid:tibid:tibid:tibid STACK_OVERFLOW SEGFAULT FUUUUUUUUU, 5: <reply>$who: tibid plays with little numbers, 6: <reply>$who: a girl's name, 7: is a word stemming from the greek noun meaning vag-bearer, 8: is a delegate function, 9: is a jew, 10: is not your bitch., 11: is gay, 12: is a doppleganger, 13: is nothing but a contemptible half-mouthful of doghearted fish heads, 14: …

"who is X?" to retrieve identities is too broad too - clashes with one of the primary uses of factoids, which is one of the major uses of the bot.

review: Needs Fixing
lp:~stefanor/ibid/identity-567510 updated
929. By Stefano Rivera

Replace 'who is <username>' with 'list <username>'s identities

Revision history for this message
Stefano Rivera (stefanor) wrote :

> "who is X?" to retrieve identities is too broad too - clashes with one of the
> primary uses of factoids, which is one of the major uses of the bot.

r929

Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/identity.py'
2--- ibid/plugins/identity.py 2010-03-27 15:50:58 +0000
3+++ ibid/plugins/identity.py 2010-04-26 12:05:40 +0000
4@@ -144,7 +144,8 @@
5 chars = [x for x in string.letters + string.digits if x not in '01lOIB86G']
6
7 class Identities(Processor):
8- usage = u"""(I am|<username> is) <identity> on <source>
9+ usage = u"""I am <identity> on <source>
10+ link user <username> to <identity> on <source>
11 remove identity <identity> on <source> [from <username>]"""
12 features = ('accounts',)
13 priority = -10
14@@ -153,13 +154,13 @@
15 Processor.__init__(self, name)
16 self.tokens = {}
17
18- @match(r'^(I|.+?)\s+(?:is|am)\s+(.+)\s+on\s+(.+)$')
19+ @match(r'^(?:I\s+am|link\s+user\s+(.+?)\s+to)\s+(.+)\s+on\s+(.+)$')
20 def identity(self, event, username, identity, source):
21 admin = False
22 identity = identity.replace(' ', '')
23 reverse_attach = False
24
25- if username.upper() == 'I':
26+ if username is None:
27 if event.account:
28 account = event.session.query(Account).get(event.account)
29 else:
30@@ -352,12 +353,12 @@
31 event.identity, event.sender['connection'])
32
33 class Describe(Processor):
34- usage = u'who (am I|is <username>)'
35+ usage = u"list (my|<username>'s) identities"
36 features = ('accounts',)
37
38- @match(r'^who\s+(?:is|am)\s+(I|.+?)$')
39+ @match(r"^list\s+(my|.+?)(?:'?s)?\s+identities$")
40 def describe(self, event, username):
41- if username.upper() == 'I':
42+ if username.lower() == 'my':
43 if not event.account:
44 identity = event.session.query(Identity).get(event.identity)
45 event.addresponse(u"%(name)s on %(source)s", {

Subscribers

People subscribed via source and target branches