/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
1.01
bot/vgbot.py
26 строк
793 B
Rob Nelson
Better bot error-handling, buffer overflow prevention in nudge client.
13 янв 2014, 10:34
13 янв 2014, 10:34
ada3be6
Код
Авторство
О чём код?
''' Created on Dec 12, 2013 @author: Rob ''' import vgstation.common.config as config import vgstation.common.plugin as plugins import vgstation.bot as irc import logging, time def main(): logging.basicConfig(format='%(asctime)s [%(levelname)-8s]: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.INFO) config.ReadFromDisk() for server in config.config['servers']: while True: try: bot = irc.Bot(server,config.config['servers'][server]) bot.plugins = plugins.Load(bot) bot.start() except Exception as e: logging.critical(str(e)) logging.info('Waiting 10 seconds before reconnecting...') time.sleep(10) if __name__ == '__main__': main()