That particular method is for MW3, but using a menu to get a dvar for a client is a well known trick and works for all versions of Call of Duty. But you don't use scriptmenuresponse, you simply use getDvar in conjunction with onOpen{}.
Having said that, I really cannot see how you can use this principle to ban someone. If you attempt to write a custom dvar to a client's config file, it wont stay - it wont actually write to the file. The config file will only accept a set of dvars written by the engine. And all the values have a hard-coded range, so you can't set custom values and have it actually written to file. As such, how could you possible seek a value for a dvar which will tell you that a certain client should be banned?
The only method I can think where you might actually ban someone and not use PB is to use the file functions, and create a file for a player you want to ban. Use their GUID to create a value which is unique to that player. Then, when the player connects, you check his GUID against your stored ban files using the openFile() function, and check if the player is in the ban list. However, the player only has to get a new CD key and they will be able to play again. As such, it is not a hardware ban, which implies no amount of new CD keys will let them play on your server again.