Central Forums Helpbot
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: !recruits - * DONE  (Read 2137 times)
« on: January 20, 2010, 08:26:33 AM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


AO sends these "someone recruited someone else" messages to org channel, which is monitored by the notify plugin (I think).  Since I'm not on all the time and new faces show up, I'd like to know who recruited whom when.  The bot monitors this activity anyways.  I would just like the bot to keep a database of say... the last months or 2 months worth or recruits.

I would like to propose a:
Code:
!recruits
command that would display the recruits name, date they joined my org (UTC/GMT would be fine -- I don't need to know the local time they joined), and who recruited them.

Is this hard?
« Last Edit: January 22, 2010, 07:31:40 PM by veremit »
Logged
« Reply #1 on: January 20, 2010, 07:16:19 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


I had thought about this before .. I just haven't really got far with the idea - even theoretically.

It boils down to a simple SQL query .. something like "Select * from Core_Members WHERE joined_date <something>" and then just rendering the result. I have a feeling that the members DB isn't exposed to the plugins interface .. and I'm not sure there might not be locking issues if one tried to access it. Perhaps one of the other more experienced DB'ers out there could proffer an opinion - but in principle I don't think it would be an issue.

You could easily extend the idea too .. and expose the listing to the WebQuery plugin if you fancied.

If you fancy taking it on, I'll try and point you in the right direction Smiley
Logged
« Reply #2 on: January 20, 2010, 08:00:47 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


I wasn't thinking of querying the members database.  I was thinking of starting a new table with:

name | join date | who invited them

Right now when a player receives an org invite, I thought the game reports it in org channel along with who recruited him/her (not sure about this last part -- I guess I'll need to do a little experimenting).  I thought the "who recruited whom" message was part of a recent patch.

I'd like the bot to watch org chat and add anyone who joins the org to this table (and delete any entries older than 1 or 2 months) and when I do a "!recruits", it dumps the entire contents of that table. And perhaps, if someone adds a recent recruit as their alt, the recruit is removed from this table.

If my memory is incorrect and the recruiter name isn't posted in org chat, then there's no point in this plugin. The string "%s invited %s to your organization." appears in the Anarchy Online\cd_image\text\text.mdb file, so I think this is how it works now... but I recently recruited someone's alt and don't remember seeing this message.  The whole point is to be able to track who the new recruits are and be able to ask the recruiter about the new recruit.

Once again, I'm asking about something that's outside of my know-how.  I'll poke at it and see if I can figure out how to do it.
Logged
« Reply #3 on: January 20, 2010, 08:13:17 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


The Vhabot members table always had an entry for 'who' recruited who to the org, and when. I've amended the later version of the Members plugin to utilise the new message FC finally added in the patch.

I really don't think its necessary to add another database when the existing one contains the data you need to extract. Personally. Re-inventing the wheel and all that .. Smiley

TABLE CORE_Members (Username VARCHAR(14) UNIQUE, UserID INTEGER UNIQUE, UserLevel VARCHAR(255), AddedBy VARCHAR(14), AddedOn INTEGER);
« Last Edit: January 20, 2010, 08:34:29 PM by veremit »
Logged
« Reply #4 on: January 20, 2010, 11:34:08 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Well, now, that's not public knowledge is it? Ok. Use the current database.  OK. Just need some SQL-fu.

Edit: ok. no... which plugin does the auto org add?  I'm having trouble finding it in vh_RosterManager.cs or is this your own "special" version of the plugin?
« Last Edit: January 21, 2010, 12:16:02 AM by Llie »
Logged
« Reply #5 on: January 21, 2010, 12:42:59 AM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Have posted update in the Devs Corner with some more bot-fu, and source files Smiley
Logged
« Reply #6 on: January 23, 2010, 06:06:53 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Posted update and download here
Logged
Pages: [1]   Go Up
Print
Jump to: