Most plant-based psychoactive substances are, no? Caffeine and nicotine are insecticides as well. In our brain, the effects are more interesting
The same goes for mescaline, cocaine, psilocybin, ibogaine. Also the smelly components found in onion and garlic, for example. The ergot alkaloids from which LSD was first synthesised are from a fungus, a pest that grows on some grasses, so I'm not sure if it's the same.