Some of the TBAMUD admin may not know me, but i was involved in the DOOM/Rasputin code and many other snippets which are in TBAMUD.
I have found a bug in AUTOKEY. It was pointed out to me that autokey opens the door but when you close it, it locks the door with or without the key.
I have confirmed that the issue is that we never remove the LOCKED bit when the door is opened. That is because we only send in the subcmd "SCMD_OPEN" which opens the door but we never send it into SCMD_UNLOCK.
The fix is simple. Just add the following:
send_to_char(ch, "It is locked, but you have the key.\r\n");
do_doorcmd(ch, obj, door, SCMD_UNLOCK);
do_doorcmd(ch, obj, door, subcmd);
I have confirmed that this does fix the issue with closing a door with no key with AUTOKEY enabled. It took two days for me to figure it out, because turning off autokey would remove the issue. So I focused on Autokey itself.
stat the room before opening a door using "autokey" than stat it afterwards. You will see the LOCKED bit still on there but the CLOSED bit is removed.