Separate config files for Singleplayer and Multiplayer

If you’re for instance go into Multiplayer server, where sv_cheats is set to 0 and you go to SP and try to give yourself all weapons by pressing P, which does nothing.
It could be solved by separating configuration files for singleplayer server and multiplayer client so nothing is carried over from MP to single player as it’ll load separate file.
Will be this possible?

you could use batch files which copy the right .cfg file in place before running the game.
also I think it is possible to read .cfg files with a console command (which I unfortunately forgot), so you would have to type something like “cfg singleplayer.cfg” in the console before loading a singleplayer game.

In Source engine there’s “exec” command, which can load config files. btw The separation would be possible by checking whenever the player is in SP or in MP client/server mode so it’ll load that automatically. SP has default 1 player maximum, while MP goes from 2 to max 64 slots(and even more, I don’t know exact maximum limt of slots). When game engine detects loopback address on server IP and 1 slot on server then it’ll load singleplayer.cfg, when it detects different server IP or more slots in it, then Multiplayer.cfg would be loaded instead.

Or a lua script [lua] if SinglePlayer() then RunConsoleCommand(“exec”, “lab”) end [/lua]

Note that tiny piece of code will need to be executed when map is being loaded or client is connecting to server. How can you acomplish this?