I'm not so sure about implementing this on my copy...
You are correct that as the code stands, an unarmed mob can disarm an armed character....but I am not convinced that that is necessarily a Bad Thing™. There are lots of stories about humans (and monsters) that have disarmed opponents barehanded - monk types spring to mind. I suppose that this one is a preference call, in regards to whether to implement it or not.
Having said that, if someone wanted to implement the change you advocate, your solution would do the trick.
Yeah that sorta came to mind when I digging through it, actually..
For PCs the check is there (in do_disarm, as opposed to disarm( ) itself), so in my view, it should be enforced for any other callers as well. If I'm going to tell my PCs "You need a weapon to disarm someone", might be odd for them if an unarmed mobile then disarms them.
However, having said that, I also made the call because I've been on a kick of making mobiles more PC-like and able to use all the defenses they can, having added shieldblock, tumble, duck, block, counter, redirect and several others. For all of those I have rules (i.e. you can't counter if you haven't blocked, block doesn't work on weapons only bare hands, etc.) so each one sorta fills a niche situation. Were I not doing that, I probably wouldn't have found this anyway, and likely would have left it.
So, long story short, I agree with you that it is a bug depending upon one's disposition. To the extent that someone like minded should not intend for it to work differently for do_disarm( ) vs any other caller of disarm( ), hopefully this post is of some value, but I fine calling it a "maybe bug" rather than outright. No argument from me.