示例#1
0
 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", {}))
示例#2
0
    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", {}))
示例#3
0
 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
示例#4
0
    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)
示例#5
0
 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
示例#6
0
	def __init__(self, config):
		self.config = config
		self.irc = irc_.irc(config)
		self.socket = self.irc.get_irc_socket_object()
示例#7
0
 def __init__(self, config):
     self.irc = irc.irc(config)
     self.logger = logging.getLogger()
     self.team_assignments = {}
示例#8
0
 def __init__(self, config):
     self.config = config
     self.irc = irc_.irc(config)
     self.socket = self.irc.get_irc_socket_object()
示例#9
0
 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", {}))
示例#10
0
文件: bot.py 项目: alexbip15/MarcoBot
 def __init__(self, config, credentials):
     self.config = config
     self.irc = irc_.irc(config, credentials)
     self.socket = self.irc.get_irc_socket_object()
示例#11
0
 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', {}))
示例#12
0
文件: piku.py 项目: yottu/pikupiku
    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()
示例#13
0
 def __init__(self, config):
     self.config = config
     self.irc = irc_.irc(config)
     self.socket = self.irc.get_irc_socket_object()
     self.users = defaultdict(set)