BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Module Requests => Topic started by: tonyuh on May 15, 2007, 01:36:00 pm
-
Is there a way to create a module to look up org info, similar to whois but for organization. It would be handy when you need find the org prez or something.
Cheers,
Tony
-
Technically there is.
From the character XML you can get the following:
<organization_membership>
<organization_id>567297</organization_id>
<organization_name>Ancarim Iron Legion</organization_name>
<rank>Advisor</rank>
<rank_id>1</rank_id>
</organization_membership>
That gives you the org id, from there, lookup:
http://www.anarchyonline.com/org/stats/d/<1/2/3>/name/<org id>
Parse that and you have the president.
-
SELECT nickname FROM whois WHERE org_name LIKE '%nameoforg%' AND org_rank_id = 1;
???
-
ah of course, forgot about the persistance whois cache.. thanks!
-
Here (http://bebot.link/index.php/topic,777.0.html) is my version, have it running some time, never got around to post it. Written for SVN version of bebot.
-
awesome thanks!
Tony
-
But that only works if you happen to have the org president of the org in question in the whois cache, which will not always be the case. Unless you cache all the lookups which is very wasteful use of FC services imho.
-
Here is my module, with online/offline status integrated. Yes its very slow due to buddy status queuing as JJ stated before (may be not in this thread).
Requires: Alreadythere's Persistent Whois Cache (http://bebot.link/index.php/topic,223)
Command: <pre>orginfo orgname
Cheers,
Tony