Exemplo n.º 1
0
def main():
    mpd_music = TenyksMpdMusic()
    run_client(mpd_music)
Exemplo n.º 2
0
from tenyksclient.client import Client, run_client


class TenyksBrain(Client):

    direct_only = True

    def handle(self, data, match, command):
        if data['payload'].lower() == 'why do you hate me?':
            self.send(
                '{nick_from}: Because you have not made me a better person.'.
                format(nick_from=data['nick_from']),
                data=data)


if __name__ == '__main__':
    brain = TenyksBrain()
    run_client(brain)
Exemplo n.º 3
0
def main():
    run_client(TenyksHi)
Exemplo n.º 4
0
def main():
    run_client(TenyksScripts)
Exemplo n.º 5
0
def main():
    search = TenyksSearch()
    run_client(search)
Exemplo n.º 6
0
def main():
    run_client(TenyksLogger)
Exemplo n.º 7
0
def main():
    run_client(TenyksLinkScraper)
Exemplo n.º 8
0
def main():
    run_client(TenyksLeetPoints)
Exemplo n.º 9
0
def main():
    run_client(TenyksWeather)
Exemplo n.º 10
0
def main():
    run_client(TenyksLinkScraper)
Exemplo n.º 11
0
from tenyksclient.client import Client, run_client


class TenyksBrain(Client):

    direct_only = True

    def handle(self, data, match, command):
        if data['payload'].lower() == 'why do you hate me?':
            self.send(
                '{nick_from}: Because you have not made me a better person.'.format(
                    nick_from=data['nick_from']), data=data)


if __name__ == '__main__':
    brain = TenyksBrain()
    run_client(brain)
Exemplo n.º 12
0
def main():
    run_client(TenyksScripts)
Exemplo n.º 13
0
def main():
    run_client(TenyksWeather)
Exemplo n.º 14
0
def main():
    search = TenyksSearch()
    run_client(search)
Exemplo n.º 15
0
        super(TenyksOutOfContext, self).__init__()
        self.messages = {}
        self.choices = [
            'I burnt my tongue.',
            'So that\'s where babies come from...',
            'I\'m sleepy',
            'If a farting wiener dog ever falls into a deep puddle we are all f****d.',
        ]

    def handle(self, data, match, filter_name):
        if data['irc_channel'].startswith('#'):
            try:
                count = self.messages[data['connection_name']][data['irc_channel']]
                self.messages[data['connection_name']][data['irc_channel']] = count + 1
            except:
                count = 0
                self.messages[data['connection_name']] = {
                    data['irc_channel']: count}
            self.logger.debug('{conn}:{channel} message count: {count}'.format(
                conn=data['connection_name'], channel=data['irc_channel'],
                count=self.messages[data['connection_name']][data['irc_channel']]))
            self.last_nick = data['nick_from']
            if count + 1 >= 10:
                self.send(random.choice(self.choices), data)
                self.messages[data['connection_name']][data['irc_channel']] = 0


if __name__ == '__main__':
    out_of_context = TenyksOutOfContext()
    run_client(out_of_context)
Exemplo n.º 16
0
def main():
    run_client(TenyksFeeds)
Exemplo n.º 17
0
def main():
    run_client(TenyksLeetPoints)