Thread Tools Display Modes
09-29-12, 12:54 PM   #1
Animor
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 136
How to tell if someone is using remote guild chat?

Hi,

I'm trying to find a way to know if a player chatting with me is really connected to the game, or just using the remote guild chat (by using the mobile Armory application).

For some reason, I couldn't find an API that returns that info... Perhaps I missed something.
Can it be done?

Thanks in advance!
  Reply With Quote
09-29-12, 01:01 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 6,007
The only way I can think of is usings the information received from GetGuildRosterInfo

http://wowprogramming.com/docs/api/GetGuildRosterInfo
__________________


All Level 70 Characters:
Demon Warlock
Resto Druid
Disc Priest
Resto Shaman
Survival Hunter
Augment Evoker
Frost Mage
Vengence Demon Hunter
Rogue ( was subtlety )

Brewmaster Monk (TR)
Prot Paladin (TR)
Blood Death Knight ( TR)

As you can see I am missing a warrior

And .. I don't have all the allied races covered. Time Runner time when it happens again

  Reply With Quote
09-29-12, 01:23 PM   #3
Vis
A Pyroguard Emberseer
 
Vis's Avatar
Join Date: Mar 2009
Posts: 1,827
I just checked in with my Guild and while I am talking in /g on the remote app, my name has a speaker looking icon next to it. My guess is that they built it into the default chat frames. The Guildmate I was talking to is one of a few that doesn't run addons.
  Reply With Quote
09-29-12, 01:31 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,356
This is also given as the 14th argument from a chat message event.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-29-12, 11:56 PM   #5
Animor
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 136
Thank you! You've been very helpful :-)
  Reply With Quote
09-30-12, 05:21 AM   #6
Animor
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 136
Ok, I can tell if someone chatting with me is using the mobile application by using arg14.

However, I have no idea how to tell if the player I'm whispering to is using the mobile.
I have the editbox, and I can get the whisper target name by using:
Code:
editBox:GetAttribute("tellTarget")
However, I couldn't find a way to tell if that name is using the mobile.

The API GetGuildRosterInfo gets index as a parameter, not a name.

Any ideas how to get that information from a tellTarget name?
  Reply With Quote
09-30-12, 06:09 AM   #7
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,253
If I am understanding your question correctly, then do the following. However, I am not sure if the UnitName call will work on "telltarget" so someone will have to tell me please.
Lua Code:
  1. local numOnline = select(2, GetNumGuildMembers())
  2. for i = 1, numOnline do
  3.     local isMobile = select(14, GetGuildRoster(i))
  4.     if isMobile then
  5.         local memberName = GetGuildRoster(i)
  6.         print(("%s is chatting on the mobile app"):format(memberName))
  7.         local tellName = UnitName(editbox:GetAttribute("telltarget")) -- not sure if UnitName will convert this
  8.         if tellName == memberName then
  9.             -- yes, I am whispering a guild member who is using the mobile app
  10.         end
  11.     end
  12. end
  Reply With Quote
09-30-12, 07:29 AM   #8
Animor
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 136
Thank you for this suggestion!

I'm afraid that this is a bit "heavy" to call every time the user sends a whisper to someone.

Perhaps the solution should be to somehow create a list of online guild members, using your code. But this is problematic too, since I'm not sure when to update that list. For example, players on mobile might login to the game, new players are invited to guild, etc.
  Reply With Quote
09-30-12, 09:15 AM   #9
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,253
Register for GUILD_ROSTER_UPDATE and every time it fires, parse GetNumGuildMembers.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to tell if someone is using remote guild chat?


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