1. For my addon I need to distinguish accounts: each character on an account can share data but it should only be counted once (per account).

    I currently take a hash of the first character that logs in and use that as an ID to share data.

    But one of my guild members is using multiple computers and he logged in 2 different characters on each system and now his data is counted twice since both computers have different IDs...

    I am looking for some way to get a unique ID for each account. Something like the internal ID of an account.

    I looked at the BattleNet functions but they only support getting name data for friends, not for your own account. And to add to the problem: BattleNet can be disabled, making an ID from it useless on those accounts.

    So how do I keep track of unique users in my data pool?

    Note: with privacy in mind, I do not need a real name, nor the actual internal ID nor would I 'share' them if I managed to find them, I'd hash them and use the result as identifier. But so far I haven't found any reliable way of doing this...

    I'm confused as to whether this is an addon you are running that needs to distinguish other people in your guild (for example), or an addon that just needs to have this behaviour for people who have the addon installed.

    SavedVariables are already account-readable. I know of no way to determine whether or not two characters are on the same account other than using battle.net, and that requires them to be your friend.

    Its the other way around, the addon does not try to determine if 2 remote characters are from the same account: the remote party sends its data and adds an ID to distinguish itself.

    The ID is account wide stored so each and every alt will transmit using the same ID. The local addon only determines if it already knows the remote party (if so, update) or if this is a new information source (if so, add to storage).

    But the ID used to identify the local account to remote listeners needs to come from somewhere. So I hashed the first character name that logged in (a random number would do).

    But then this situation occurs: I install WoW on my laptop and log in using a different character as I used on my main computer. The hash is now created from character 2 and as such, it differs from the ID I have on my main computer.

    When I share my data with remote parties, they will think I am a new individual and as such, the data is treated as being from a completely different account. This causes biases in the data as the same person will probably provide the same data.

    Since I calculate averages, and some of my guild mates use up to 5 computers, this means that one of them can seriously throw the balance.

    So back to original problem: how do I get a unique ID or token, unique for an account in such a way that each computer running WoW and that specific account comes up with the same token?

    The short answer is you don't. The battle.net information is restricted for obvious reasons and there are no other unique hashes available. You MIGHT be able to use GetCVar("accountName"), but that may not be available at all from within the game, only the GlueXML.

    That leaves you with no options that I can think of.

    What about using LibAlts-1.0 over on wowace.com? It has internal APIs like GetAlt() and SetAlt() Read its documentation on usage. You would have to assign one character, regardless of install(s) as a main, and set the rest as alts.

    Yeah, there's a thousand ways you can track it manually, but that doesn't really help all that much with the actual communication. Distributed databases are hard. You can use the guild notes to store the data, if all of the characters you are interested in are in your guild.