Along with what Slickone has said about using tokens, instead of .ini files, you can also change:
if ($did == 7) { writeini BChannels.ini Channels $calc($ini(BChannels.ini,Channels,0) + 1) $?="Enter Channel To Add" }
to
if ($did == 7) { set %BChannels $addtok(%BChannels,$?="Enter a channel to add.",44) }
I see that this is the complete snippet that you had a question about how to use .ini files, in the mIRC Forum. You could've used variables instead. :-P