示例#1
0
    def handle(self, *args, **options):
        if len(args) != 2:
            raise CommandError('Either room name or topic not specified.')

        room, message = args

        b = Bot()
        room = b.find_room_by_name(room)
        room.speak(message)

        print 'scoutmaster: I just said "%s" in the "%s"' % (message, room.name)
示例#2
0
    def handle(self, *args, **options):
        if len(args) != 2:
            raise CommandError('Either room name or topic not specified.')

        room, topic = args

        b = Bot()
        room = b.find_room_by_name(room)
        room.update('', topic)

        print 'scoutmaster: The topic of "%s" room is now "%s"' % (room.name, topic)
示例#3
0
    def handle(self, *args, **options):
        if len(args) != 2:
            raise CommandError('Either room name or topic not specified.')

        room, topic = args

        b = Bot()
        room = b.find_room_by_name(room)
        room.update('', topic)

        print 'scoutmaster: The topic of "%s" room is now "%s"' % (room.name,
                                                                   topic)
示例#4
0
 def handle(self, *args, **options):
     b = Bot()
     b.join_rooms()
     b.listen()