You need to consult an attorney in your area who has experience with custody issues. Generally, a judge will decide custody and timesharing based on what is in the child's best interest. This is a situation where one should definitely get legal representation. Custody and timeshare issues can get very "ugly" very quickly.
The answer provided here does not create an attorney-client relationship. This answer is for general informational purposes only and should not be considered a substitute for retaining an attorney who can investigate and analyze all the material facts of your situation.
I would agree with Mr. Cox that there are a number of factors a judge is to consider when talking about custody and time the child spends with both parents. Having an attorney to guide the mother through all of this would be a very good idea and strongly encouraged. While none of us can give specific advice, in general it is difficult to cut a parent completely out of a child's life. Even persons who use drugs may still see their kids--it's usually in a supervised capacity, but as a parent, one has significant rights to see their children as long as it's in the child's best interest and done in a safe manner.
Sign up to receive a 3-part series of useful information and advice about child custody law.