mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2025-01-25 00:51:26 +01:00
Adding beginning of IRC thingamajigger
This commit is contained in:
parent
6817988b3b
commit
9c7fab625c
18
plugins/IRC.py
Normal file
18
plugins/IRC.py
Normal file
@ -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')
|
Loading…
Reference in New Issue
Block a user