diff options
author | Richard Darst <rkd@zgib.net> | 2009-07-12 23:54:08 (GMT) |
---|---|---|
committer | Richard Darst <rkd@zgib.net> | 2009-07-12 23:54:08 (GMT) |
commit | 647f7a996b2e2da48bd713373b76eb0f9c19528f (patch) | |
tree | 988de8f4956319660e25ed7ad6c35d036afae918 /plugin.py | |
parent | cd5df6ca774cf61c5da50227da36aeccd901914f (diff) |
Fix oldtopic encoding issue0_1_2
- If the oldtopic had non-ascii characters in it, it would have failed to
restore it. This fixes that.
- Some other rearrangement to support this.
darcs-hash:20090712235408-82ea9-da0844509fef51838e773898f02b7ef704005e40.gz
Diffstat (limited to 'plugin.py')
-rw-r--r-- | plugin.py | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -90,19 +90,18 @@ class MeetBot(callbacks.Plugin): if M is not None: irc.error("Can't start another meeting, one is in progress.") return - M = meeting.Meeting(channel=channel, owner=nick, - oldtopic=irc.state.channels[channel].topic, - writeRawLog=True) - meeting_cache[Mkey] = M # This callback is used to send data to the channel: def _setTopic(x): irc.sendMsg(ircmsgs.topic(channel, x)) def _sendReply(x): irc.sendMsg(ircmsgs.privmsg(channel, x)) - M._setTopic = _setTopic - M._sendReply = _sendReply - # callback to get supybot registry values. - M._registryValue = self.registryValue + M = meeting.Meeting(channel=channel, owner=nick, + oldtopic=irc.state.channels[channel].topic, + writeRawLog=True, + setTopic = _setTopic, sendReply = _sendReply, + getRegistryValue = self.registryValue, + ) + meeting_cache[Mkey] = M recent_meetings.append( (channel, irc.msg.tags['receivedOn'], time.ctime())) if len(recent_meetings) > 10: |