Пример #1
0
 def __init__(self, root, parent, *args, **kwargs):
     self.root = root
     self.parent = parent
     pluginSupport.__init__(self, root, parent)
     resource.Resource.__init__(self, *args, **kwargs)
     self.logger = logging.getLogger("webServer")
     self.startPlugins()
Пример #2
0
 def __init__(self, root, parent):
     self.root = root
     self.parent = parent
     self.logger = logging.getLogger("server")
     self.logger.info("Starting new server")
     pluginSupport.__init__(self, root, parent)
     self.startPlugins()
     self.logger.debug("All Plugins started")
Пример #3
0
 def __init__(self, root, parent):
     self.root = root
     self.parent = parent
     self.logger = logging.getLogger("server")
     self.logger.info("Starting new server")
     pluginSupport.__init__(self, root, parent)
     self.startPlugins()
     self.logger.debug("All Plugins started")
Пример #4
0
    def __init__(self, root, parent):
        pluginSupport.__init__(self, root, parent)

        self.name = "nickname"
        self.user = "******"
        self.loggedon = False
        self.logger = logging.getLogger("server")
        self.classes = []
        self.config = root.getServiceNamed('config')

        self.startPlugins()
Пример #5
0
    def __init__(self, root, parent):
        pluginSupport.__init__(self, root, parent)

        self.name="nickname"
        self.user="******"
        self.loggedon=False
        self.logger=logging.getLogger("server")
        self.classes=[]
        self.config=root.getServiceNamed('config')

        self.startPlugins()
Пример #6
0
    def __init__(self, root, parent):
        self.root = root
        self.parent = parent
        self.config = root.getServiceNamed('config')
        self.network = self.parent.network
        self.ircClient = self.parent.parent
        self.factory = parent
        self.logger = logging.getLogger(self.network)
        pluginSupport.__init__(self, root, parent)
        if self.config.getBool('answerToCTCPVersion', True, 'main', self.network):
            self.versionName = "OTFBot"
            self.versionNum = root.version.short()
            self.versionEnv = ''
        #nt_fp
        floodProtect.__init__(self)
        #
        self.channels = []
        self.realname = self.config.get("realname", "A Bot", "main", self.network)
        self.password = self.config.get('password', None, 'main', self.network)
        self.nickname = self.config.get("nickname", "OtfBot", 'main', self.network)
        self.username = self.config.get("username", "friendlyBot", "main", self.network)
        self.nickname = unicode(self.nickname).encode("iso-8859-1")
        self.username = unicode(self.username).encode("iso-8859-1")
        self.proxy_ip_port = self.config.get("proxy_ip_port", "", "main", self.network)
        self.hostmask=""
        self.channels = self.config.getChannels(self.network) or []
        self.lineRate = 1.0 / float(self.config.get("linesPerSecond", "2", "main", self.network))

        self.user_list={} #nick!user@host -> IRCUser
        # my usermmodess
        self.mymodes = {}
        # modes for channels
        self.channelmodes = {}
        self.serversupports = {}
        self.translations = {}

        self.syncing_channels=[] #list of channels, which still wait for ENDOFWHO
        self.callback_queue=[] #list of callbacks waiting for ENDOFWHO, structure: [([channels], (function, args, kwargs))]
        self.sync_lock=Lock()

        self.logger.info("Starting new Botinstance")
        self.startPlugins()
        self.register_my_commands()
        self.startTimeoutDetection()
Пример #7
0
    def __init__(self, root, parent):
        """
            initialize protocol

            @param root: reference to the application object
            @param parent: reference to the parent object
        """
        self.root = root
        self.parent = parent
        self.logger = parent.logger
        self.myjid = parent.myjid
        pluginSupport.__init__(self, root, parent)

        #ircClient compatiblity
        self.nickname = self.myjid
        self.network = "xmpp"
        self.translations = {}

        self.startPlugins()
Пример #8
0
    def __init__(self, root, parent):
        """
            initialize protocol

            @param root: reference to the application object
            @param parent: reference to the parent object
        """
        self.root=root
        self.parent=parent
        self.logger=parent.logger
        self.myjid=parent.myjid
        pluginSupport.__init__(self, root, parent)

        #ircClient compatiblity
        self.nickname=self.myjid
        self.network="xmpp"
        self.translations={}

        self.startPlugins()
Пример #9
0
    def __init__(self, root, parent):
        self.root = root
        self.parent = parent
        self.config = root.getServiceNamed('config')
        self.network = self.parent.network
        self.ircClient = self.parent.parent
        self.factory = parent
        self.logger = logging.getLogger(self.network)
        pluginSupport.__init__(self, root, parent)
        if self.config.getBool('answerToCTCPVersion', True, 'main', self.network):
            self.versionName = "OTFBot"
            self.versionNum = root.version.short()
            self.versionEnv = ''

        self.channels = []
        self.realname = self.config.get("realname", "A Bot", "main", self.network)
        self.password = self.config.get('password', None, 'main', self.network)
        self.nickname = self.config.get("nickname", "OtfBot", 'main', self.network)
        self.hostmask=""
        self.channels = self.config.getChannels(self.network) or []
        self.lineRate = 1.0 / float(self.config.get("linesPerSecond", "2", "main", self.network))

        self.user_list={} #nick!user@host -> IRCUser
        # my usermmodess
        self.mymodes = {}
        # modes for channels
        self.channelmodes = {}
        self.serversupports = {}
        self.translations = {}

        self.syncing_channels=[] #list of channels, which still wait for ENDOFWHO
        self.callback_queue=[] #list of callbacks waiting for ENDOFWHO, structure: [([channels], (function, args, kwargs))]
        self.sync_lock=Lock()

        self.logger.info("Starting new Botinstance")
        self.startPlugins()
        self.register_my_commands()
        self.startTimeoutDetection()
Пример #10
0
    def __init__(self, root, parent):
        pluginSupport.__init__(self, root, parent)
        self.config = root.getServiceNamed('config')
        self.network = self.parent.network
        self.ircClient = self.parent.parent
        self.logger = logging.getLogger(self.network)
        if self.config.getBool('answerToCTCPVersion', True, 'main', self.network):
            self.versionName = "OTFBot"
            self.versionNum = root.version.short()
            self.versionEnv = ''

        self.channels = []
        self.realname = self.config.get("realname", "A Bot", "main", self.network)
        self.password = self.config.get('password', None, 'main', self.network)
        self.nickname = self.config.get("nickname", "OtfBot", 'main', self.network)
        self.nickname = unicode(self.nickname).encode("iso-8859-1")
        self.hostmask=""
        tmp = self.config.getChannels(self.network)
        if tmp:
            self.channels = tmp

        lps = self.config.get("linesPerSecond", "2", "main", self.network)
        self.lineRate = 1.0 / float(lps)

        self.user_list={} #nick!user@host -> IRCUser
        # my usermmodess
        self.mymodes = {}
        # modes for channels
        self.channelmodes = {}
        self.serversupports = {}


        self.logger.info("Starting new Botinstance")
        self.startPlugins()
        self.register_my_commands()
        self.startTimeoutDetection()
Пример #11
0
 def __init__(self, root, parent):
     self.root=root
     self.parent=parent
     pluginSupport.__init__(self, root, self.parent)
     self.logger=logging.getLogger("webServer")
     self.startPlugins()