def __init__(self, django=False):
        """
        Loads and starts the IRC bot for the entire application.
        """
        self.django = django
        self.bot = None
        if settings.BOT_CLASS:
            module_name, class_name = settings.BOT_CLASS.rsplit(".", 1)
            __import__(module_name)
            bot_class = getattr(sys.modules[module_name], class_name)
            self.bot = bot_class(settings.IRC_HOST, settings.IRC_PORT,
                                 settings.IRC_CHANNEL, settings.BOT_NICKNAME,
                                 settings.BOT_PASSWORD)
            spawn(self.bot.start)
            spawn(self.bot_watcher)
        self.logger = getLogger("irc.webhooks")
        self.logger.setLevel(settings.LOG_LEVEL)
        self.logger.addHandler(StreamHandler())
def __init__ ( self , django = False ) : self . django = django self . bot = None if settings . BOT_CLASS : module_name , class_name = settings . BOT_CLASS . rsplit ( "." , 1 ) __import__ ( module_name ) bot_class = getattr ( sys . modules [ module_name ] , class_name ) self . bot = bot_class ( settings . IRC_HOST , settings . IRC_PORT , settings . IRC_CHANNEL , settings . BOT_NICKNAME , settings . BOT_PASSWORD ) spawn ( self . bot . start ) spawn ( self . bot_watcher ) self . logger = getLogger ( "irc.webhooks" ) self . logger . setLevel ( settings . LOG_LEVEL ) self . logger . addHandler ( StreamHandler ( ) )
Loads and starts the IRC bot for the entire application.