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

Title: Org Info
Post 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
Title: Re: Org Info
Post by: Khalem on May 15, 2007, 03:50:13 pm
Technically there is.

From the character XML you can get the following:
Code: [Select]
<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:
Code: [Select]
http://www.anarchyonline.com/org/stats/d/<1/2/3>/name/<org id>

Parse that and you have the president.
Title: Re: Org Info
Post by: Malosar on May 15, 2007, 04:04:46 pm
Code: [Select]
SELECT nickname FROM whois WHERE org_name LIKE '%nameoforg%' AND org_rank_id = 1;
 ???
Title: Re: Org Info
Post by: tonyuh on May 15, 2007, 04:12:44 pm
ah of course, forgot about the persistance whois cache.. thanks!
Title: Re: Org Info
Post by: Alreadythere on May 15, 2007, 06:28:22 pm
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.
Title: Re: Org Info
Post by: tonyuh on May 15, 2007, 08:05:14 pm
awesome thanks!

Tony
Title: Re: Org Info
Post by: Khalem on May 16, 2007, 06:15:11 pm
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.
Title: Re: Org Info
Post by: tonyuh on May 29, 2007, 05:02:01 pm
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
SimplePortal 2.3.7 © 2008-2025, SimplePortal