To the original wish, no. Bad idea. That is a form of limiting that has no place in guilds as they are. You would be stomping the ability for one guild to try to recruit quickly out of another, for one thing. You would also be furthure limiting the actual use of guilds. I really see no point in limiting guild jumpers through code.
However, guilds themselves should have more information on a prospective character. Call it a background check. Guild leaders (or anyone the guild leader gives the right to do so) could do an ingame search of what public (non-secret) guilds that character has been in, in what order, and for how long. This would not be OOC info, as the city would very likely keep track of these statistics. It could even be that you would have to ask an NPC for the background check.
You tell NPC: Tell me about Zan.
NPC: Let me look that up for you. Ah yes, here he is. Zan first registered in <guild> on <this date>. He quit <this date>. Zan then joined <guild> on <this date>, which he quit on <this date>. Zan joined <guild> on <this date>, and is still a member.
This way, you give the guilds the power to decide who they invite based on more info. If they pick a guild jumper, or a spy from another guild, then it is their own fault.
NOTE: Secret guilds are exempt from disclosures. If you were in a secret guild, then quit, and the guild was never made public in the time you were in it, it would not show up in your background.