If you make a .txt file called "startup" in "mods" directory, any commands from it will be automatically executed as soon as you boot into a local game (same as if you did /loadtext startup).
In online session, only the person loading the mod needs to have it - any required files will be transmitted over the network.