This logic seemed tortured and error-prone.  How about:

```
if (mapArgs.count("-debugnet"))
    LogPrintf("WARNING deprecated argument -debugnet ignored, use -debug=net");

fDebug = !mapMultiArgs["-debug"].empty();
```

Maybe add a special case for -debug=0 / -nodebug, as long as we're OK with the user being able to do something like -debug=net -nodebug -debug=addrman and have the -nodebug always override:
```
// Special-case: if -debug=0 set, turn off debugging:
if (mapMultiArgs["-debug"].find("0")) fDebug = false;
```

I'd get rid of -debugnet from the help message, and write the help string as:
```
-debug=&lt;category&gt; : output debugging information for &lt;category&gt;. Output all possible debugging information if category is not set.
```