Immodium is structurally similar to fentantly, a powerful, powerful opiate. But, because of its chemical structure, it does not pass the blood brain barrier like fentantly can. This makes it an excellent drug for diarrhea because there is no possible way you can get high on it, yet it still has the effects fentantly would have on diarrhea.
There is no chemical way to change immodium to make it cross the BBB, but if you could, you'd have a powerful opiate OTC.