Beispiel #1
0
def main():
    run_client(TenyksWebListener)
Beispiel #2
0
def main():
    run_client(GentooService)
Beispiel #3
0
def main():
    run_client(TenyksHi)
Beispiel #4
0
def main():
    mpd_music = TenyksMpdMusic()
    run_client(mpd_music)
Beispiel #5
0
def main():
    run_client(GentooService)
Beispiel #6
0
def main():
    run_client(HelloWorld)
Beispiel #7
0
def main():
    run_client(TenyksFeeds)
Beispiel #8
0
def main():
    run_client(HelloWorld)
Beispiel #9
0
def main():
    run_client(TenyksWebListener)
Beispiel #10
0
def main():
    run_client(TenyksFun)
Beispiel #11
0
def main():
    run_client(TenyksFeeds)
Beispiel #12
0
from tenyks.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)
Beispiel #13
0
def main():
    search = TenyksSearch()
    run_client(search)
Beispiel #14
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)
Beispiel #15
0
def main():
    search = TenyksSearch()
    run_client(search)
Beispiel #16
0
def main():
    run_client(TenyksLinkScraper)
Beispiel #17
0
def main():
    run_client(TenyksHi)
Beispiel #18
0
def main():
    mpd_music = TenyksMpdMusic()
    run_client(mpd_music)
Beispiel #19
0
def main():
    run_client(TenyksLinkScraper)
Beispiel #20
0
def main():
    run_client(TraumaeTranslate)