Merge lp:~mgorven/ibid/irc-quit-343790 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Michael Gorven
Status: Merged
Approved by: Michael Gorven
Approved revision: 583
Merged at revision: 581
Proposed branch: lp:~mgorven/ibid/irc-quit-343790
Merge into: lp:~ibid-core/ibid/old-trunk-pack-0.92
Diff against target: None lines
To merge this branch: bzr merge lp:~mgorven/ibid/irc-quit-343790
Reviewer Review Type Date Requested Status
Michael Gorven Approve
Stefano Rivera Approve
Jonathan Hitchcock Approve
Review via email: mp+4539@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve
lp:~mgorven/ibid/irc-quit-343790 updated
583. By Michael Gorven

Check that source is present to silence ibid-plugin.

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

Not tested, but no objections now that the source check is backed out.

review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

Fixed the possible regression with ibid-plugin.

Revision history for this message
Michael Gorven (mgorven) wrote :

 status approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/log.py'
2--- ibid/plugins/log.py 2009-03-01 14:36:38 +0000
3+++ ibid/plugins/log.py 2009-03-16 18:53:48 +0000
4@@ -20,7 +20,7 @@
5
6 def get_logfile(self, source, channel, when):
7 when = localtime(when)
8- if source.lower() in ibid.sources and ibid.sources[source.lower()].type == 'jabber':
9+ if ibid.sources[source.lower()].type == 'jabber':
10 channel = channel.split('/')[0]
11 filename = self.log % { 'source': source,
12 'channel': channel,
13
14=== modified file 'ibid/source/irc.py'
15--- ibid/source/irc.py 2009-03-01 23:04:43 +0000
16+++ ibid/source/irc.py 2009-03-16 18:52:53 +0000
17@@ -53,9 +53,10 @@
18 def _state_event(self, user, channel, action, kicker=None, message=None):
19 event = self._create_event(u'state', user, channel)
20 event.state = action
21+ if message:
22+ event.message = unicode(message, 'utf-8', 'replace')
23 if kicker:
24 event.kicker = unicode(kicker, 'utf-8', 'replace')
25- if message: event.message = unicode(message, 'utf-8', 'replace')
26 self.factory.log.debug(u"%s has been kicked from %s by %s (%s)", event.sender['id'], event.channel, event.kicker, event.message)
27 else:
28 self.factory.log.debug(u"%s has %s %s", user, action, channel)
29@@ -88,7 +89,8 @@
30 self._state_event(user, channel, u'offline')
31
32 def userQuit(self, user, channel):
33- self._state_event(user, channel, u'offline')
34+ # Channel contains the quit message
35+ self._state_event(user, '', u'offline', message=channel)
36
37 def userKicked(self, kickee, channel, kicker, message):
38 self._state_event(kickee, channel, u'kicked', kicker, message)

Subscribers

People subscribed via source and target branches