18
from config import HOST, PORT, LOG_FILE
18
from config import HOST, PORT, LOG_FILE, CHANNEL
19
19
from twitedbot import IRCFactory
20
20
from twisted.internet import reactor
22
logging.basicConfig(filename = LOG_FILE)
24
# End logging configuration
25
#logging.debug('This is a debug message')
26
#logging.info('This is an info message')
27
#logging.warning('This is a warning message')
28
#logging.error('This is an error message')
29
#logging.critical('This is a critical error message')
22
logging.basicConfig(filename = LOG_FILE, level=logging.INFO)
23
logging.debug("starting!")
31
25
if __name__ == '__main__':
33
reactor.connectTCP(HOST, PORT, IRCFactory())
27
reactor.connectTCP(HOST, PORT, IRCFactory(CHANNEL))
31
# loads config and assigns variables
32
config = yaml.load(open("user_info.yaml", "r"))
33
factory = protocol.ClientCreator(reactor, Failure, flags, config)
34
factory.connectTCP(config["server"], int(config["port"]))