collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Org Info  (Read 3263 times)

0 Members and 1 Guest are viewing this topic.

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Org Info
« 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

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Org Info
« Reply #1 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.
BeBot Founder and Fixer Kingpin

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Org Info
« Reply #2 on: May 15, 2007, 04:04:46 pm »
Code: [Select]
SELECT nickname FROM whois WHERE org_name LIKE '%nameoforg%' AND org_rank_id = 1;
 ???
Eternalist
General of The Syndicate

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Org Info
« Reply #3 on: May 15, 2007, 04:12:44 pm »
ah of course, forgot about the persistance whois cache.. thanks!

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Org Info
« Reply #4 on: May 15, 2007, 06:28:22 pm »
Here is my version, have it running some time, never got around to post it. Written for SVN version of bebot.
« Last Edit: May 15, 2007, 06:42:11 pm by Alreadythere »

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Org Info
« Reply #5 on: May 15, 2007, 08:05:14 pm »
awesome thanks!

Tony

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Org Info
« Reply #6 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.
BeBot Founder and Fixer Kingpin

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Org Info
« Reply #7 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

Command: <pre>orginfo orgname

Cheers,
Tony

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 143
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal