Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
authorRichard Darst <rkd@zgib.net>2009-05-07 22:51:33 (GMT)
committer Richard Darst <rkd@zgib.net>2009-05-07 22:51:33 (GMT)
commit10fcdd5753b6b3f8753055eb29e8eb7f89a866af (patch)
tree4ebd662c1d7ce8a474c40f6ea68c8ec67d479d7b /plugin.py
parentda3c2aa46b85c6731d6af495641499569773a227 (diff)
add listmeetings and savemeetings commands
- they both do exactly what it sounds like. Limited to bot owner for now. darcs-hash:20090507225133-82ea9-bd070c90914e452658c4788edc6cfdeed059901a.gz
Diffstat (limited to 'plugin.py')
-rw-r--r--plugin.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin.py b/plugin.py
index 255f0b1..4563cac 100644
--- a/plugin.py
+++ b/plugin.py
@@ -98,6 +98,25 @@ class MeatBot(callbacks.Plugin):
#M.save() # now do_endmeeting in M calls the save functions
del self.Meetings[Mkey]
+ def listmeetings(self, irc, msg, args):
+ """List all currently-active meetings."""
+ reply = ""
+ reply = ", ".join(str(x) for x in sorted(self.Meetings.keys()) )
+ if reply.strip() == '':
+ irc.reply("No currently active meetings.")
+ else:
+ irc.reply(reply)
+ listmeetings = wrap(listmeetings, ['private', 'owner'])
+
+ def savemeetings(self, irc, msg, args):
+ """Save all currently active meetings."""
+ numSaved = 0
+ for M in self.Meetings:
+ M.save()
+ irc.reply("Saved %d meetings."%numSaved)
+ savemeetings = wrap(savemeetings, ['owner'])
+
+
Class = MeatBot