def __init__(self, config, crons): self.config = config src.lib.command_headers.initalizeCommands(config) self.irc = irc_.irc(config) self.crons = crons # start threads for channels that have cron messages to run cron.initialize(self.irc, self.crons.get("cron", {}))
def __init__(self, config): self.config = config src.lib.command_headers.initalizeCommands(config) self.irc = irc_.irc(config) # start threads for channels that have cron messages to run cron.initialize(self.irc, self.config.get("cron", {}))
def __init__(self, config): self.db = Database() self.db.initiate() self.config = config self.crons = crons src.lib.command_headers.initalizeCommands(config) self.irc = irc_.irc(config) # start threads for channels that have cron messages to run cron.initialize_crons(self.irc, self.crons.crons.get("crons", {})) cron.initialize_channel_id_check(self.config) globals.irc = self.irc
def __init__(self, config): self.config = config self.irc = irc_.irc(config) self.socket = self.irc.get_irc_socket_object() self.ranks = dict() for channel in self.config.get('channels', []): cid = self.config['channelid'].get(channel) quiet = self.config['quiet'].get(channel, True) self.ranks[channel] = rk.Rank(self.config, self.irc, channel, cid, quiet)
def __init__(self, config): self.config = config self.irc = irc_.irc(config) self.socket = self.irc.get_irc_socket_object()
def __init__(self, config): self.irc = irc.irc(config) self.logger = logging.getLogger() self.team_assignments = {}
def __init__(self, config): self.config = config src.lib.command_headers.initalizeCommands(config) self.irc = irc_.irc(config) cron.initialize(self.irc, self.config.get("cron", {}))
def __init__(self, config, credentials): self.config = config self.irc = irc_.irc(config, credentials) self.socket = self.irc.get_irc_socket_object()
def __init__(self, config): self.config = config # use config.py as this instance's config self.irc = irc_.irc(config) # use irc.py for socket connections incoming_data.initialize(self.irc, self.config.get('channels', {}))
stream_source = "https://twitch.tv/" + channel except: print("Usage: " + sys.argv[0] + " <twitch channel>") exit(1) subfile_location = "pikupiku.ass" host = "irc.twitch.tv" port = 6667 ################## Change this ######################### nick = "" # twitch nick (lower case?) oauth = "" # Copy/Paste from https://twitchapps.com/tmi/ ######################################################## if not nick or not oauth: print("You need to set nick/oauth in piku.py") exit(1) channel = "#" + channel sub = subtitle(subfile_location) mpv_cmd = [ 'mpv', '--no-terminal', '-fs', '--sub-file=' + subfile_location, '--script=./lib/mpv-sub-reload.lua', stream_source ] with open(os.devnull, 'w') as f: subprocess.Popen(mpv_cmd, stdout=f, stderr=subprocess.STDOUT) server = irc(host, port, nick, oauth, channel, sub) server.connect()
def __init__(self, config): self.config = config self.irc = irc_.irc(config) self.socket = self.irc.get_irc_socket_object() self.users = defaultdict(set)