Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meeting.py14
-rw-r--r--plugin.py15
2 files changed, 19 insertions, 10 deletions
diff --git a/meeting.py b/meeting.py
index 2ec7349..88f7705 100644
--- a/meeting.py
+++ b/meeting.py
@@ -366,12 +366,22 @@ class Meeting(MeetingCommands, object):
_lurk = False
_restrictlogs = False
def __init__(self, channel, owner, oldtopic=None,
- filename=None, writeRawLog=False):
+ filename=None, writeRawLog=False,
+ setTopic=None, sendReply=None, getRegistryValue=None):
self.config = Config(self)
+ if getRegistryValue is not None:
+ self._registryValue = getRegistryValue
+ if sendReply is not None:
+ self._sendReply = sendReply
+ if setTopic is not None:
+ self._setTopic = setTopic
self.owner = owner
self.channel = channel
self.currenttopic = ""
- self.oldtopic = oldtopic
+ if oldtopic:
+ self.oldtopic = self.config.dec(oldtopic)
+ else:
+ self.oldtopic = None
self.lines = [ ]
self.minutes = [ ]
self.attendees = { }
diff --git a/plugin.py b/plugin.py
index 4080e6d..a17e28a 100644
--- a/plugin.py
+++ b/plugin.py
@@ -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: