I'm creating this topic to discuss getting census+ to work with wholib.

Essentially, any addon that wants to run background /whos will work fine on its own - as long as its the only such addon a user is running. When there are more than one - the addons often interact very badly and in difficult to fix ways.

Example: Consider that you have 3 addons that each run a who request at the exact same time. The server sends back one response. Which /who was it to?

WhoLib is supposed to make life easy for addon developers, and it actually does - if you support it in your addon.

If you don't support wholib, well then wholib is just like any other addon which want to run who requests in the background - you will have conflicts.

There are 2 main strategies:

1) Use wholib as part of your addon
2) Use wholib if it is there and your original code if not.

I have modded the current census+ to support wholib if it is there, and work normally if not. I haven't done much testing, I'm hoping that folks will pitch in and help. I posted here almost a year ago about this - but we were all busy getting ready for 3.0 i guess, and noone followed up.

Will this version also prevent the popping up from the who window every second, when census is active.
It is pretty worse atm, probly cause of another addon that was updated lately.
Before, it stopped popping up by clicking the friendstab and close the social window.
That doesn't work anymore. Actually nothing works.
Well one thing does. Dragging the social window almost out of your screen so its not in the way anymore

So if this version can change this annoying behavior I will we very glad, and a lot of others with me I think.

If the WhoLib covers this, I would imagine it would be safe to remove this section entirely. I'm at work right now and can't test it, but I'll do so when I get home and see if this fixes the duplicates. Otherwise, I've been using the WhoLib version akhtar worked up for some time now without any other issue.

If the goal is to produce a version of CP that optionally uses WhoLib, only if it is present, then removing the section of code wouldn't be the way to go. Instead, if you are right and WhoLib negates the need to resend, then the block should be enclosed in an if() to only execute when WhoLib isn't being used. Without looking more closely at the code, it's possible that some of that may still need to execute (or alternate code might be needed if WhoLib never comes back for a query).

If the goal is to produce a version of CP that optionally uses WhoLib, only if it is present, then removing the section of code wouldn't be the way to go. Instead, if you are right and WhoLib negates the need to resend, then the block should be enclosed in an if() to only execute when WhoLib isn't being used. Without looking more closely at the code, it's possible that some of that may still need to execute (or alternate code might be needed if WhoLib never comes back for a query).

Yes, very true. And after playing around with it, with wholib enabled, that section of code still needs

Code:

g_WaitingForWhoUpdate = false;

in order to function properly. So, add a check for wholib and process the original code or just turn turn off the waiting flag.

With the above code replacing the original code, there were no duplicates.