Пример #1
0
def main():
    runningpath = os.path.dirname(__file__)
    logg = LoggHandler.setup_logger('py-rcon', r'{}/logs/py-rcon.log'.format(runningpath))
    #logg = logging.getLogger('py-rcon')

    logg.info('py-rcon is starting up!')

    t = BF4Handler('battlefield', 'server', '188.126.64.7', 47210, 'password', plugins=[])
    t.start()
Пример #2
0
def main():
    runningpath = os.path.dirname(__file__)
    logg = LoggHandler.setup_logger('py-rcon',
                                    r'{}/logs/py-rcon.log'.format(runningpath))
    #logg = logging.getLogger('py-rcon')

    logg.info('py-rcon is starting up!')

    t = BF4Handler('battlefield',
                   'server',
                   '188.126.64.7',
                   47210,
                   'password',
                   plugins=[])
    t.start()
Пример #3
0
    def __init__(self, stype, name, ip, port, password, plugins, communicator, **kwargs):
        threading.Thread.__init__(self, **kwargs)

        self.serverType = stype
        self.serverName = name
        self.serverIp = ip
        self.serverPort = port
        self.serverPassword = password
        self.serverPlugins = plugins
        self.serverLoadedPlugins = list()

        #handle communication with server
        self.communicator = communicator
        self.socket = None

        #self.logName = 'bf4-{}'.format(name)
        self.log = LoggHandler.setup_logger(self.logName, '{}/logs/servers/{}.log'.format(os.getcwd(), self.logName))
        self.log.info('Setup is ready for [{}:{}] - {}'.format(ip, port, name))
Пример #4
0
    def __init__(self, stype, name, ip, port, password, plugins, communicator,
                 **kwargs):
        threading.Thread.__init__(self, **kwargs)

        self.serverType = stype
        self.serverName = name
        self.serverIp = ip
        self.serverPort = port
        self.serverPassword = password
        self.serverPlugins = plugins
        self.serverLoadedPlugins = list()

        #handle communication with server
        self.communicator = communicator
        self.socket = None

        #self.logName = 'bf4-{}'.format(name)
        self.log = LoggHandler.setup_logger(
            self.logName,
            '{}/logs/servers/{}.log'.format(os.getcwd(), self.logName))
        self.log.info('Setup is ready for [{}:{}] - {}'.format(ip, port, name))