Is it possible to use the gateway for retrieving the status of a given user in AIM or any other of the supported public networks? I’‘d like to do this generally and not necessarily as a logged in user. I’‘ve used Smack quite a bit so I’‘m familiar with dropping into the APIs. It seems like it should be possible but I’'m not familiar with the details of how the gateway works.
Unfortunately, the answer is more or less no. For the bulk of these networks, you have to have permission to find out the status of another user. I’'ll try to go over all of them as best I can individually:
IRC: Assuming you connect to IRC in the first place, there’‘s no restriction on whose status you can look up. The IRC command ISON will tell you if a user is logged in and there’'s no such thing as access to this information in the land of IRC. However note that you have to be connected to the server in the first place.
ICQ: This one “depends”. There’‘s something called web presence in ICQ’‘s breed of the OSCAR protocol that permits you to do things like have an icon on your website to show whether you are logged in or not. Many folk turn this off however because, for some reason, it can be used to spam the hell out of folk. =/ I do not really understand the logistics of why having web presence automatically means that you will be spammed. Without web presence, you have to be logged in and the other person has to either have open permissions or have authed you to have access to their presence. By the same token, I don’‘t know exactly what occurs to allow folk to see your current logged in status when you search for them in ICQ’'s ‘‘add contact’’ stuff.
AIM: Just recently it looks like they added a similar web presence thing. However, I don’‘t know anything about it but I can’‘t help but think it’‘ll have the same issues as ICQ. AIM doesn’‘t do as much as ICQ in the permissions list area. Typically you add a buddy and you are done, no auth required. I don’‘t think you can just ask for a buddy’‘s presence though. If there is I’'ve never found it. =/
Yahoo: Not sure here aside from I’'ve never seen anything that lets you query a presence without being logged in. Yahoo is the protocol I know the least about of all of these.
MSN: MSN has a complex set of access controls that boil down to, unless the person has specifically given you access to see them, you aren’'t going to know their presence.
Long story short, you typically can’‘t do a lot on these networks until you are logged in as a specific account and you have added the other person as a ‘‘buddy’’ and they’‘ve accepted. Now, you can probably create an account on each service, register a jabber id with each service with said accounts,and have something in your code to add buddies first. It’‘s not ideal though and doesn’'t sound like what you were after.
On the other hand, if the gateway plugin already knows about the contacts in question, it could probably relay what it knows. In other words, lets say you have already have AIM user ninja and cat registered through the plugin and they are both logged in right now. The plugin could relay that knowledge on through some interface. Likewise, if ninja has kite, hat, and crazycat in his AIM buddy list, the plugin could relay the knowledge of those buddies back as well. I still don’'t think that is what you were after though.