Thread Tools Display Modes
09-01-09, 08:17 AM   #1
Coren
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 6
SendWho/WHO_LIST_UPDATE: add a cookie, ftlog...

When sending:

bIsBlocked = SendWho(sQuery, xCookie);

- bIsBlocked: true if the /who is ignored due to being less than 5s since the previous (not necessary, but would spare some hooksecurefunc("SendWho", SomeoneSentAWhoStoreTimeFunction); )
- xCookie: any random blurp (most sensible would be sender information, addon name or anything), the blurp should be a string or number to store locally, only a reference to it need be sent to the server; if that's too much work, then a server determined xCookie should be returned

When WHO_LIST_UPDATE is received, arg1 should be set to the xCookie. Then:

local arg1 = ...;
if (arg1 == MyOwnVerySpecialCookie) then
-- yay, ours! evaluate result
end

Would go a long way, not having to unregister/re-register WHO_LIST_UPDATE on the FriendsFrame to send a background SendWho, especially if multiple addons want to, and to be able to know if the response is actually the one to the query that the local code assumes.

Obviously, the FriendsFrame should itself as well send and honor a cookie.
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » SendWho/WHO_LIST_UPDATE: add a cookie, ftlog...

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off