From 9c7fab625cdd98a77dbfdd9aa0fd2409f3c2809a Mon Sep 17 00:00:00 2001 From: Matt Sowden Date: Wed, 19 Dec 2012 04:00:55 -0500 Subject: [PATCH] Adding beginning of IRC thingamajigger --- plugins/IRC.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/IRC.py diff --git a/plugins/IRC.py b/plugins/IRC.py new file mode 100644 index 0000000..617b854 --- /dev/null +++ b/plugins/IRC.py @@ -0,0 +1,18 @@ +class IRC: + + options = None + writeFile = None + + def onEnable(self, parser): + + parser.add_option("-q", "--irc-out-file", dest="filename", default="ircdump.txt", + help="file to dump messages to") + + def onDisable(self): + if (self.writeFile != None): + self.writeFile.close() + + def optionsParsed(self, parsedOptions): + self.options = parsedOptions + if (self.options.dumpPackets): + self.writeFile = open(self.options.filename, 'w')