Birds are particularly prone to respiratory issues so smoking around your bird is a big no no even things like incense and scented candles aren't good.
He should be fine but as he's a new bird you should probably get a check up from the vet just to give him the once over anyway, it shouldn't cost much, i don't know where you live but here in the UK if you ask to make an appointment with the veterinary nurse instead of the vet then it can often be a free consultation (depending on vet).
I would recommend giving him a good bath, and plenty of healthy greens to give his system a boost, i'd wager if his previous owner did not mind smoking around their bird they might not have cared enough to have him on the best diet.
you should have a look through the forum archive on things like diet and macaw species in general, it's a great place to find some really well thought out information. good luck to you and your new feathered friend =)