R(M)HD simulations with the CO5BOLD code