qaisjp / go-discord-irc

The Discord and IRC bridge with puppets! An IRC user is created for each Discord user, messages from IRC seamlessly appear on Discord, and Discord mentions are automagically converted to and from IRC.
MIT License
113 stars 32 forks source link

Better Puppet Detection #69

Closed llmII closed 3 years ago

llmII commented 3 years ago

Detect puppets by our creating them vs by nick suffixing. Not fool-proof at the moment as when/if an ircd forces a nick change before the listener sees it as the old nick it'll be a hanging nick and could double-ups or loops.

Assuming someone is already using nick suffixes this should work just like it did before but would likely fix #43 and fix #44.

Will look into improving it to handle the above noted error condition "soon".

qaisjp commented 3 years ago

This looks good. I'll try this out locally later today and then approve + merge.

qaisjp commented 3 years ago

thank you very much!

I look forward to see what you come up with for that edge case. The bridge does try pretty hard to prevent those clashes in the first place, but it can still happen if a real human is connected using a puppet's name.