33 lines
606 B
Python
33 lines
606 B
Python
|
#!/usr/bin/env python3
|
||
|
"""
|
||
|
Initializes the bot.
|
||
|
"""
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
from twisted.internet import reactor
|
||
|
|
||
|
from bot import FulviaFactory
|
||
|
from config import Config
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
import argparse
|
||
|
|
||
|
parser = argparse.ArgumentParser(
|
||
|
description="Fulvia IRC Bot")
|
||
|
parser.add_argument(
|
||
|
"-c",
|
||
|
"--config",
|
||
|
help="Use a specific config file.")
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
if not args.config:
|
||
|
args.config = "default.cfg"
|
||
|
|
||
|
config = Config(args.config)
|
||
|
|
||
|
server = config.core.server
|
||
|
port = int(config.core.port)
|
||
|
reactor.connectTCP(server, port, FulviaFactory(config))
|
||
|
reactor.run()
|