From 72cdcb42ebbb910b38758f4656cf1aceb6bca9d5 Mon Sep 17 00:00:00 2001 From: Richard Darst Date: Wed, 25 Nov 2009 08:57:04 +0000 Subject: Add %(channel) replacement to filenames - Allows configuration of saving on a per-network basis. darcs-hash:20091125085704-82ea9-6068d1ae3eb521f19447c6e07f8dd46390ad6868.gz --- (limited to 'plugin.py') diff --git a/plugin.py b/plugin.py index 9b003b0..ace7efd 100644 --- a/plugin.py +++ b/plugin.py @@ -74,6 +74,7 @@ class MeetBot(callbacks.Plugin): nick = msg.nick channel = msg.args[0] payload = msg.args[1] + network = irc.msg.tags['receivedOn'] # The following is for debugging. It's excellent to get an # interactive interperter inside of the live bot. use @@ -85,7 +86,7 @@ class MeetBot(callbacks.Plugin): # Get our Meeting object, if one exists. Have to keep track # of different servers/channels. # (channel, network) tuple is our lookup key. - Mkey = (channel,irc.msg.tags['receivedOn']) + Mkey = (channel,network) M = meeting_cache.get(Mkey, None) # Start meeting if we are requested @@ -106,10 +107,11 @@ class MeetBot(callbacks.Plugin): setTopic = _setTopic, sendReply = _sendReply, getRegistryValue = self.registryValue, safeMode=True, channelNicks=_channelNicks, + network=network, ) meeting_cache[Mkey] = M recent_meetings.append( - (channel, irc.msg.tags['receivedOn'], time.ctime())) + (channel, network, time.ctime())) if len(recent_meetings) > 10: del recent_meetings[0] # If there is no meeting going on, then we quit -- cgit v0.9.1