Merge lp:~max-rabkin/ibid/invite-705907 into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Max Rabkin
Status: Merged
Approved by: Stefano Rivera
Approved revision: 1008
Merged at revision: 1020
Proposed branch: lp:~max-rabkin/ibid/invite-705907
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 96 lines (+11/-9)
5 files modified
ibid/plugins/core.py (+3/-3)
ibid/plugins/identity.py (+1/-1)
ibid/plugins/sources.py (+2/-2)
ibid/source/irc.py (+3/-2)
ibid/source/silc.py (+2/-1)
To merge this branch: bzr merge lp:~max-rabkin/ibid/invite-705907
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Stefano Rivera Approve
Review via email: mp+47100@code.launchpad.net

Commit message

Handle invite events in Address, Ignore, Complain and Identity

To post a comment you must log in.
lp:~max-rabkin/ibid/invite-705907 updated
997. By marcog

Provide the possibility to join a channel with a key. Only supported in IRC so far.
Author: marcog
Approved by: Max Rabkin, Stefano Rivera
Fixes LP: #502294

998. By Stefano Rivera

URLErrors have reasons, but there are other HTTPErrors
Author: Stefano Rivera
Approved by: marcog, Max Rabkin
Fixes LP: #670855

999. By Stefano Rivera

Add parse_timestamp function to ibid.utils, use for parsing timestamps from Twitter.
Author: Stefano Rivera
Approved by: marcog, Max Rabkin
Fixes LP: #702815

1000. By Stefano Rivera

Add intersphinx links to Python documentation.
Author: Stefano Rivera
Approved by: marcog, Max Rabkin
Fixes LP: #

1001. By Keegan Carruthers-Smith

Use correct plurality in pending memos message
Author: Keegan Carruthers-Smith
Approved by: Max Rabkin, Stefano Rivera, marcog
Fixes LP: #634257

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

This is not enough:

DEBUG source.atrum: Invited into #ibidtest2 by tumblingweed
DEBUG core.dispatcher: Received event from atrum source
INFO core.auth: Checking sources permission for None/202 (tumblingweed!<email address hidden>): no
DEBUG core.dispatcher: {'account': None, 'responses': [{'reply': u'Just do it yourself', 'address': True, 'target': u'#ibidtest2', 'conflate': True, 'source': u'atrum'}], 'complain': u'notauthed', 'source': u'atrum', 'addressed': True, 'processed': True, 'time': datetime.datetime(2011, 1, 21, 23, 16, 9, 353412), 'identity': 202, 'type': u'invite', 'public': False, 'channel': u'#ibidtest2', 'sender': {'nick': u'tumblingweed', 'connection': u'tumblingweed!<email address hidden>', 'id': u'tumblingweed'}}
DEBUG core.dispatcher: Returning event to atrum source
DEBUG source.atrum: Sent privmsg to #ibidtest2: Just do it yourself

review: Needs Fixing
lp:~max-rabkin/ibid/invite-705907 updated
1002. By Stefano Rivera

Add function get_regexp_op to ibid.db that returns a REGEXP op that works on Postgres too.
Author: Stefano Rivera
Approved by: Jonathan Hitchcock, marcog, Max Rabkin
Fixes LP: #595423

1003. By Dominic Cleal

Allow karma plugin to pick up karma changes when addressed=False (albeit with slightly different syntax)
Author: Dominic Cleal
Approved by: Stefano Rivera, Max Rabkin
Fixes LP: #672125

1006. By Max Rabkin

Rename channel to target_channel

1007. By Max Rabkin

Use unicode in irc joined events

Revision history for this message
Max Rabkin (max-rabkin) wrote :

Rebasing did something funny to the list of revisions but the diff looks right.

Revision history for this message
Max Rabkin (max-rabkin) wrote :

I'm having issues with libsilc atm, so could somebody please test this on SILC.

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

I can't seem to invite on SILC with irssi. But otherwise LGTM

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

DEBUG core.dispatcher: {'account': 1, 'responses': [{'source': u'reaper', 'reply': u'Happy Sunday, tumbleweed', 'target': u'48e8add50000000000000000000000000407c73fe5bfcee08da571e60e', 'conflate': True, 'address': False}], 'source': u'reaper', 'addressed': True, 'processed': True, 'time': datetime.datetime(2011, 2, 20, 20, 10, 14, 756252), 'identity': 11, 'message': {'raw': u'hi', 'deaddressed': u'hi', 'clean': u'hi', 'stripped': u'hi'}, 'type': u'message', 'public': False, 'channel': u'48e8add50000000000000000000000000407c73fe5bfcee08da571e60e', 'sender': {'nick': u'tumbleweed', 'connection': u'48e8add50000000000000000000000000407c73fe5bfcee08da571e60e', 'id': u'add599b915d243a54f8cd0991be85fce71830eeb'}}
DEBUG core.dispatcher: Returning event to reaper source
DEBUG source.reaper: Sent message to 48e8add50000000000000000000000000407c73fe5bfcee08da571e60e: Happy Sunday, tumbleweed
2011-02-20 22:10:15+0200 [-] Traceback (most recent call last):
2011-02-20 22:10:15+0200 [-] File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/source/silc.py", line 176, in notify_invite
2011-02-20 22:10:15+0200 [-] event = self._create_event(u'invite', inviter, inviter)
2011-02-20 22:10:15+0200 [-] File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/source/silc.py", line 39, in _create_event
2011-02-20 22:10:15+0200 [-] event.channel = unicode(channel.channel_name, 'utf-8', 'replace')
2011-02-20 22:10:15+0200 [-] AttributeError: 'SilcUser' object has no attribute 'channel_name'

review: Needs Fixing
lp:~max-rabkin/ibid/invite-705907 updated
1008. By Max Rabkin

Users aren't channels on SILC

Revision history for this message
Stefano Rivera (stefanor) :
review: Approve
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
=== modified file 'ibid/plugins/core.py'
--- ibid/plugins/core.py 2010-06-22 22:20:18 +0000
+++ ibid/plugins/core.py 2011-02-21 11:38:10 +0000
@@ -70,7 +70,7 @@
7070
71 priority = -150071 priority = -1500
72 addressed = False72 addressed = False
73 event_types = (u'message', u'action', u'notice')73 event_types = (u'message', u'action', u'notice', u'invite')
7474
75 nicks = ListOption('ignore', 'List of nicks to ignore', [])75 nicks = ListOption('ignore', 'List of nicks to ignore', [])
7676
@@ -97,7 +97,7 @@
97 priority = 160097 priority = 1600
98 processed = True98 processed = True
99 addressed = False99 addressed = False
100 event_types = ('message', 'action', 'notice', 'state')100 event_types = (u'message', u'action', u'notice', u'state', u'invite')
101101
102 acknowledgements = ListOption('acknowledgements', 'Responses for positive acknowledgements',102 acknowledgements = ListOption('acknowledgements', 'Responses for positive acknowledgements',
103 (u'Okay', u'Sure', u'Done', u'Righto', u'Alrighty', u'Yessir'))103 (u'Okay', u'Sure', u'Done', u'Righto', u'Alrighty', u'Yessir'))
@@ -130,7 +130,7 @@
130130
131 priority = 950131 priority = 950
132 processed = True132 processed = True
133 event_types = ('message', 'action')133 event_types = (u'message', u'action', u'invite')
134134
135 complaints = DictOption('complaints', 'Complaint responses', {135 complaints = DictOption('complaints', 'Complaint responses', {
136 'nonsense': (136 'nonsense': (
137137
=== modified file 'ibid/plugins/identity.py'
--- ibid/plugins/identity.py 2010-04-26 10:19:16 +0000
+++ ibid/plugins/identity.py 2011-02-21 11:38:10 +0000
@@ -451,7 +451,7 @@
451 priority = -1600451 priority = -1600
452 addressed = False452 addressed = False
453 processed = True453 processed = True
454 event_types = (u'message', u'state', u'action', u'notice')454 event_types = (u'message', u'state', u'action', u'notice', u'invite')
455455
456 @handler456 @handler
457 def handle(self, event):457 def handle(self, event):
458458
=== modified file 'ibid/plugins/sources.py'
--- ibid/plugins/sources.py 2011-01-21 22:01:13 +0000
+++ ibid/plugins/sources.py 2011-02-21 11:38:10 +0000
@@ -90,9 +90,9 @@
90 @handler90 @handler
91 @authorise()91 @authorise()
92 def invited(self, event):92 def invited(self, event):
93 event.addresponse(u'Joining %s', event.channel,93 event.addresponse(u'Joining %s', event.target_channel,
94 target=event.sender['nick'])94 target=event.sender['nick'])
95 ibid.sources[event.source].join(event.channel)95 ibid.sources[event.source].join(event.target_channel)
9696
97class NickServ(Processor):97class NickServ(Processor):
98 event_types = (u'notice',)98 event_types = (u'notice',)
9999
=== modified file 'ibid/source/irc.py'
--- ibid/source/irc.py 2011-01-21 22:01:13 +0000
+++ ibid/source/irc.py 2011-02-21 11:38:10 +0000
@@ -173,7 +173,8 @@
173 user = unicode(user, 'utf-8', 'replace')173 user = unicode(user, 'utf-8', 'replace')
174 channel = unicode(channel, 'utf-8', 'replace')174 channel = unicode(channel, 'utf-8', 'replace')
175175
176 event = self._create_event(u'invite', user, channel)176 event = self._create_event(u'invite', user, user)
177 event.target_channel = channel
177 event.public = False178 event.public = False
178 event.addressed = True179 event.addressed = True
179 self.factory.log.debug(u'Invited into %s by %s',180 self.factory.log.debug(u'Invited into %s by %s',
@@ -218,7 +219,7 @@
218219
219 def joined(self, channel):220 def joined(self, channel):
220 event = Event(self.factory.name, u'source')221 event = Event(self.factory.name, u'source')
221 event.channel = channel222 event.channel = unicode(channel, 'utf-8', 'replace')
222 event.status = u'joined'223 event.status = u'joined'
223 ibid.dispatcher.dispatch(event)224 ibid.dispatcher.dispatch(event)
224225
225226
=== modified file 'ibid/source/silc.py'
--- ibid/source/silc.py 2010-12-24 16:20:42 +0000
+++ ibid/source/silc.py 2011-02-21 11:38:10 +0000
@@ -173,7 +173,8 @@
173 del self.users[self._to_hex(user.fingerprint)]173 del self.users[self._to_hex(user.fingerprint)]
174174
175 def notify_invite(self, channel, channel_name, inviter):175 def notify_invite(self, channel, channel_name, inviter):
176 event = self._create_event(u'invite', inviter, channel)176 event = self._create_event(u'invite', inviter, None)
177 event.target_channel = channel
177 event.public = False178 event.public = False
178 event.addressed = True179 event.addressed = True
179 self.factory.log.debug(u'Invited into %s by %s',180 self.factory.log.debug(u'Invited into %s by %s',

Subscribers

People subscribed via source and target branches