Exemple #1
0
    def callback_room_joined(self, room):

        self.send(
            "*****@*****.**", # tbd, find correct mess.ref 
            "I have returned... Muwahahahaha!",
            message_type="groupchat"
        )

        logging.warning('OMG logged something!!!') # room == [email protected]
        logging.warning(room)
Exemple #2
0
    def callback_room_joined(self, room):

        self.send(
            "*****@*****.**",  # tbd, find correct mess.ref 
            "I have returned... Muwahahahaha!",
            message_type="groupchat")

        logging.warning(
            'OMG logged something!!!')  # room == [email protected]
        logging.warning(room)
Exemple #3
0
    def search(self, msg, args):

        matches = []
        self.set_orm()

        results = self.dbh.query(orm.Term).filter(orm.Term.term.like("%" + args + "%")).all()

        for row in results:
            matches.append(row.term)

        if len(matches) == 1:
            return "I found one: %s" % " ".join(matches)
        elif len(matches) > 1:
            return "I found a few: %s" % ", ".join(matches)
        else:
            return "Nothing found matching %s" % args

        logging.warning("\n\n\n\n\n\n\n\n\n\n\n\n HEEEEEEEEY")
        logging.warning(args)
        return "I'm searching ok!!!!"
Exemple #4
0
    def search(self, msg, args):

        matches = []
        self.set_orm()

        results = self.dbh.query(orm.Term).filter(
            orm.Term.term.like("%" + args + "%")).all()

        for row in results:
            matches.append(row.term)

        if len(matches) == 1:
            return "I found one: %s" % " ".join(matches)
        elif len(matches) > 1:
            return "I found a few: %s" % ", ".join(matches)
        else:
            return "Nothing found matching %s" % args

        logging.warning("\n\n\n\n\n\n\n\n\n\n\n\n HEEEEEEEEY")
        logging.warning(args)
        return "I'm searching ok!!!!"
Exemple #5
0
    def callback_presence(self, presence):

        # self.send(
        #     "*****@*****.**", # tbd, find correct mess.ref 
        #     "There was a presence change.. everyone grab your wallets %s" % presence,
        #     message_type="groupchat"
        # )

        # params = presence.split(' ')
        # parsed = {}        

        # for param in params:

        #     key, value  =   param.split(':')
        #     parsed[key] =   value
        #     
        
        logging.warning('presence change!!!') 
        logging.warning(presence) 

        # print "\n\n\n\n\n\n\n\n\n\n\n PRESENCE!", presence.__dict__

        if presence.nick in ['xmetrix'] and presence.status == 'online':
           
            message     =   'xmetrix: kept looking for the chapter "Lisps"'
            self.send(
                "*****@*****.**", # tbd, find correct mess.ref 
                message,
                message_type="groupchat"
            )
            subprocess.call(['say', '-v', 'Thomas', message])

        if presence.nick in ['drmjg'] and presence.status == 'online':
            self.send(
                "*****@*****.**", # tbd, find correct mess.ref 
                "The doctor has landed!",
                message_type="groupchat"
            )
            subprocess.call(['say', 'The doctor has landed!'])

        if presence.nick in ['hugo_r'] and presence.status == 'online':
            self.send(
                "*****@*****.**", # tbd, find correct mess.ref 
                "Hugo Always Win!",
                message_type="groupchat"
            )
            subprocess.call(['say', 'Hugo Always Win!'])



        if presence.nick in ['tbh'] and presence.status == 'online':
            self.send(
                "*****@*****.**", # tbd, find correct mess.ref 
                "%s, part machine, part legend." % presence.nick,
                message_type="groupchat"
            )
            subprocess.call(['say', '-v', 'Karen', '%s, part machine, part legend.' % presence.nick])


        if presence.nick in ['davinci83', 'trump', 'michgeek', 'unicorn', 'fro5t', 'devnubby', 'dardoneli', 'the1owl', 'allisonanalytics', 'sqeezy80', 'hakim', 'rondorules', 'goodread', 'castillonis', 'zuma89', 'modzer0', 'pos', 'brandonbahret'] and presence.status == 'online':
            self.send(
                "*****@*****.**", # tbd, find correct mess.ref 
                "The %s is in the house!" % presence.nick,
                message_type="groupchat"
            )
            subprocess.call(['say', '-v', 'Trinoids', 'The %s is in the house!' % presence.nick])

 
        stats_store[presence.nick].append({str(arrow.utcnow()): str(presence.status)})

        logging.warning('stats_store is: ', stats_store)
        print stats_store



        print "\n\n\n\n\n\n\n\n\n\n\n PRESENCE!", presence
Exemple #6
0
 def orm(self, msg, args):
     # term = orm.Term(term='goodread', value='very high value', nickname='dyerrington')
     logging.warning('orm.Base:')
     logging.warning(orm.Base)
     return "orm loaded hopefully.."
Exemple #7
0
    def callback_presence(self, presence):

        # self.send(
        #     "*****@*****.**", # tbd, find correct mess.ref
        #     "There was a presence change.. everyone grab your wallets %s" % presence,
        #     message_type="groupchat"
        # )

        # params = presence.split(' ')
        # parsed = {}

        # for param in params:

        #     key, value  =   param.split(':')
        #     parsed[key] =   value
        #

        logging.warning('presence change!!!')
        logging.warning(presence)

        # print "\n\n\n\n\n\n\n\n\n\n\n PRESENCE!", presence.__dict__

        if presence.nick in ['xmetrix'] and presence.status == 'online':

            message = 'xmetrix: kept looking for the chapter "Lisps"'
            self.send(
                "*****@*****.**",  # tbd, find correct mess.ref 
                message,
                message_type="groupchat")
            subprocess.call(['say', '-v', 'Thomas', message])

        if presence.nick in ['drmjg'] and presence.status == 'online':
            self.send(
                "*****@*****.**",  # tbd, find correct mess.ref 
                "The doctor has landed!",
                message_type="groupchat")
            subprocess.call(['say', 'The doctor has landed!'])

        if presence.nick in ['hugo_r'] and presence.status == 'online':
            self.send(
                "*****@*****.**",  # tbd, find correct mess.ref 
                "Hugo Always Win!",
                message_type="groupchat")
            subprocess.call(['say', 'Hugo Always Win!'])

        if presence.nick in ['tbh'] and presence.status == 'online':
            self.send(
                "*****@*****.**",  # tbd, find correct mess.ref 
                "%s, part machine, part legend." % presence.nick,
                message_type="groupchat")
            subprocess.call([
                'say', '-v', 'Karen',
                '%s, part machine, part legend.' % presence.nick
            ])

        if presence.nick in [
                'davinci83', 'trump', 'michgeek', 'unicorn', 'fro5t',
                'devnubby', 'dardoneli', 'the1owl', 'allisonanalytics',
                'sqeezy80', 'hakim', 'rondorules', 'goodread', 'castillonis',
                'zuma89', 'modzer0', 'pos', 'brandonbahret'
        ] and presence.status == 'online':
            self.send(
                "*****@*****.**",  # tbd, find correct mess.ref 
                "The %s is in the house!" % presence.nick,
                message_type="groupchat")
            subprocess.call([
                'say', '-v', 'Trinoids',
                'The %s is in the house!' % presence.nick
            ])

        stats_store[presence.nick].append(
            {str(arrow.utcnow()): str(presence.status)})

        logging.warning('stats_store is: ', stats_store)
        print stats_store

        print "\n\n\n\n\n\n\n\n\n\n\n PRESENCE!", presence
Exemple #8
0
 def orm(self, msg, args):
     # term = orm.Term(term='goodread', value='very high value', nickname='dyerrington')
     logging.warning('orm.Base:')
     logging.warning(orm.Base)
     return "orm loaded hopefully.."