Beispiel #1
0
 def __init__(self, factory, server):
     self.server = server
     self.factory = factory
     self.nickname = factory.nickname
     self.password = factory.password
     self.channel_password = factory.channel_password
     self.interface = ScriptInterface('IRC', server, 'admin', 'irc')
Beispiel #2
0
 def __init__(self, script):
     super().__init__()
     self.script = script
     self.loop = script.loop
     self.server = self.script.server
     config = self.script.config
     self.interface = ScriptInterface('Discord', self.server,
                                      *config.rights)
Beispiel #3
0
    def __init__(self, bot):
        self.bot = bot
        self.script = bot.config['script']
        self.server = self.script.server
        config = self.script.config
        self.chat_prefix = config.chatprefix
        self.command_prefix = config.commandprefix
        self.interface = ScriptInterface('IRC', self.server, *config.rights)
        self.command_users = set()
        self.chat_users = set()
        self.mode_dict = {}

        for symbol in self.script.chat_modes:
            self.mode_dict[symbol] = self.chat_users
        for symbol in self.script.command_modes:
            self.mode_dict[symbol] = self.command_users
Beispiel #4
0
 def on_load(self):
     if not stdout.isatty():
         return
     self.interface = ScriptInterface('Console', self.server, 'admin',
                                      'console')
     self.task = asyncio.Task(self.run())
Beispiel #5
0
 def __init__(self, server):
     self.server = server
     self.interface = ScriptInterface('Console', server, 'admin', 'console')