2012-12-19 10:00:55 +01:00
|
|
|
class IRC:
|
|
|
|
options = None
|
|
|
|
writeFile = None
|
|
|
|
|
2012-12-31 03:20:06 +01:00
|
|
|
def onEnable(self, parser, pluginloader):
|
2012-12-19 10:05:00 +01:00
|
|
|
parser.add_option("-q", "--irc-out-file", dest="ircDump", default="ircdump.txt",
|
2012-12-25 21:38:02 +01:00
|
|
|
help="file to dump messages to")
|
2012-12-19 10:00:55 +01:00
|
|
|
|
|
|
|
def onDisable(self):
|
|
|
|
if (self.writeFile != None):
|
|
|
|
self.writeFile.close()
|
|
|
|
|
|
|
|
def optionsParsed(self, parsedOptions):
|
|
|
|
self.options = parsedOptions
|
2012-12-19 10:05:00 +01:00
|
|
|
if (self.options.ircDump):
|
2012-12-19 10:00:55 +01:00
|
|
|
self.writeFile = open(self.options.filename, 'w')
|