Ok, on MakeFriends (part of TCS), there's a function that if someone attacks you, they get marked as hostile for a number of minutes.
With the /defend function, that is bad when guild members crash into the docking bay, they get attacked when they exit. Now I can leave /defend on and not worry about it shooting people we like.
I modified the MakeFriends part of TCS so that the hostile check is LAST. Had a guild member shoot my trident and it did not mark him hostile.
I know it doesn't mark hostiles for guild members because I tested that, but it should also only mark hostiles for bots/players that have no other setting in MakeFriends. So guilds we have marked as friendly should also not get marked hostile on rough dockings etc. Will test.
I moved the Timer Check to after the guild and group stuff, but before the other checks, so if you are attacked by a bot (furries etc.) they will become red on radar, and /defend will then attack them.