예제 #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
파일: bot.py 프로젝트: MAkzent/Betminion1.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
파일: bot.py 프로젝트: MAkzent/Betminion1.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
파일: bot.py 프로젝트: deadrime/twitch-bot
 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)