Re: Finding the JID From a menu
"Peter Millard" <me-STcBuFROdrv2eFz/[email protected]> Tue, 14 Dec 2004 09:54:07 -0700
| Newsgroups | gmane.network.jabber.exodus.user |
|---|---|
| Message-ID | <005d01c4e1fd$9468ad00$e201020a@pmillard2k> |
Steven Millington wrote:
>> I've added a menu item to the ContactMenu. Now when someone right clicks on
>> the Menu Item I'm getting the MenuClick( ID ). How in this event can I get
>> the JID of the user that was clicked on so I can start a Chat session and
>> then get its IP.
Use the pointer to IExodusController you got in your startup event, and call:
getActiveContact()
That will return the jid of the currently selected contact. You may also need to
call getActiveContacts (plural), if the user has selected more than one contact.
To obtain the client's CURRENT IP, use IExodusController::LocalIP(). This should
return the user's IP. Note that this will only be valid after a session has
connected.
pgm.