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

Login with username, password and session length
Pages: [1] 2   Go Down
Print
Topic: !recruits  (Read 7642 times)
« on: January 22, 2010, 07:39:38 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


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?

Complete, tested and tidied. Thanks Llie for the fundamentals.

Edit: Updated download:

* ll_Recruits.cs (3.56 KB - downloaded 246 times.)
« Last Edit: January 27, 2010, 12:38:45 PM by veremit »
Logged
« Reply #1 on: January 23, 2010, 05:10:22 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Thanks Mit. I looked at the results in our org bot.  It appears that FC mucks with the user data and old members disappear and reappear from org roster from time to time causing the bot to record their "re-invitation" by "System".  I propose the following change to this plugin:

Where the code used to read:

Code:
                    try
                    {
                            window.AppendHighlight( reader.GetString(0) );
[... bunch of window.Appends here]
                            window.AppendLineBreak();
                    }
                    catch { }

The new code should be:

Code:
                    try
                    {
                        if ( reader.GetString(1) != "System" )
                        {
                            window.AppendHighlight( reader.GetString(0) );
[... same bunch of window.Appends here]
                            window.AppendLineBreak();
                        }
                    }
                    catch { }
Logged
« Reply #2 on: January 23, 2010, 06:05:24 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Yes, thanks for flagging this up. There is also a method of adjusting the SQL query statement, which I think would be an equally valid, if not better solution (probably an 'AND' in the 'WHERE' statement).

I'll get onto that asap.
Logged
« Reply #3 on: January 27, 2010, 06:11:18 AM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Ok. I think the SQL would look like:

Code:
SELECT Username, AddedBy, AddedOn FROM CORE_Members WHERE AddedOn >= {0} AND AddedBy <> "System" ORDER BY AddedOn DESC

Logged
« Reply #4 on: January 27, 2010, 12:36:42 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Done. Amended link on top post.

SQL syntax is != I believe not <> Smiley
« Last Edit: January 27, 2010, 12:39:19 PM by veremit »
Logged
« Reply #5 on: January 27, 2010, 04:13:04 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Done. Amended link on top post.

SQL syntax is != I believe not <> Smiley

Well, that would have been my guess based on all my other programming experience, but Google says otherwise.  Since I don't know a thing about SQL, I went with the all-knowing-Google.  Did you test it?
Logged
« Reply #6 on: January 27, 2010, 04:21:46 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Err .. you haven't tried it on Lliesbot?! Tongue
Logged
« Reply #7 on: January 27, 2010, 08:54:52 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


I haven't logged on since before you posted the change. I'm stuck at work all day today.
Logged
« Reply #8 on: March 08, 2010, 04:47:35 AM »
Rookie

View Profile
**

Epeen: 0
Posts: 50


just a clarification about "!=" versus "<>"

both will/should work, but "!=" is the old way, and "<>" is the proper way Smiley
Logged
« Reply #9 on: April 10, 2010, 06:49:13 PM »
Rookie

View Profile
**

Epeen: 0
Posts: 55


I am running:
Plugin Information
Name: New recruit listing
Version: 101
Author: Llie
Internal Name: llrecruits
Description: Display list of recent recruits
State: Loaded
Commands:
  Recruits

Now when someone is invited into org the system puts up the suto colored info XXXXX has invited XXXXX to the organization!

BUT the info is not saved into this !recruits databse.
The only way it is put into the database is by !members add xxxxxx

Is this working correct? I thought it was to be automatic?
Retired President: RKA United -Hog-
Logged
« Reply #10 on: April 10, 2010, 10:41:42 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Will only auto-add members if you have 'Members Manager' version >101 loaded. Newest version is v104.

I think there's something wrong with your configuration somehow. Perhaps you can send over your 'users.db3' from the bot config folder, and we can check whether the correct data is being saved in the database?

If the bot correctly identifies a join message, it will post in orgchat a "Welcome to <myorgname>, <newplayer>". If you're not seeing this message, the person isn't being automatically added by this method. Check in your console/log for a "Debug{Members}" message or 'Exception' too - this may give us a clue what's going wrong.
Logged
« Reply #11 on: April 11, 2010, 12:23:31 AM »
Rookie

View Profile
**

Epeen: 0
Posts: 55


Yes 104 is running.

I will e-mail you the db file and take a look into the log ... ill do a invite to one of my toons to get it fresh in log instead of seeking one

Another thing I thought of. I am into my second bots 990 now. (1st slave bot)
It is not "in org" so it would not see the channel info... im thinking this is more logical as to what the problem is let me know then ill dig into the other options.


Rkabot1
Status: Connected
Fast Queue Count: 0
Slow Queue Count: 0
Friends: 52
« Last Edit: April 11, 2010, 12:26:02 AM by Fixhog »
Retired President: RKA United -Hog-
Logged
« Reply #12 on: April 11, 2010, 12:36:09 AM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Master bot should still see 'Org Msg' channel, and hence recruit messages. I don't -think- it needs specific rank like City Cloak messages.

I took a look at your 'core info' a few days ago .. and it would seem that its getting stuck in some threads. I attempted a reboot, but it didn't seem to cure it. Can you try shutting down the bots, and restarting? There really shouldn't be a long list of unfinished threads in your 'core info' output ... that may have something to do with it too.
There is a small possibility you will need to invite the slave bots to org .. and that could be one reason its getting 'stuck' - but I'm not aware of any issues .. fairly sure my bots were mixed up without any problems.
Logged
« Reply #13 on: April 11, 2010, 01:03:30 AM »
Rookie

View Profile
**

Epeen: 0
Posts: 55


ok, will shut them all down and restart

Update:
The restart did nothing.
The updated libraries fixed the problem
I no sooner got them in and bot rebooted one of my Generals invited a alt of an existing member and I thought hmmm leme see if bot seen that... Sure enough there it was Smiley Very cool.


I do seem to have lots of Threads showing with Wait etc etc etc EcicutionDelay or UserRequest) at the end..
Not sure if this is still an isue though?

Thanks for the work to help this get fixed Mit
« Last Edit: April 14, 2010, 10:17:59 PM by Fixhog »
Retired President: RKA United -Hog-
Logged
« Reply #14 on: May 01, 2010, 09:01:04 PM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


Yea, it was a brainwave to find that the message library was at fault!

There still shouldn't be a bunch of unfinished threads in your core info. These are bot functions that haven't completed correctly, but I am at a loss as to know how to figure out which ones and why. Hopefully when you upgrade to the next Release, they will disappear, if not, we will have to do some further detective work.
Logged
« Reply #15 on: May 02, 2010, 08:20:44 AM »
Grandmaster

View Profile
**

Epeen: 20
Posts: 3218


The large amount of threads in !core isn't always bad.
VhaBot relies on .net's ThreadPool feature, which means it keeps threads alive even when they're not used at the moment.
This saves the app from having to start a new thread when a new task arrives, instead it can just use one of the available threads.
What isn't remembered never happened.
Memory is merely a record.
You just need to rewrite that record.
Logged
« Reply #16 on: May 02, 2010, 11:52:19 AM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


That may be true, vhab, but why are a bunch of threads Suspended or Waiting for user input? Will post extra info. in Devs Corner.
Logged
« Reply #17 on: May 24, 2010, 10:46:32 PM »
Freshman

View Profile
*

Epeen: 2
Posts: 41


I'm having a similar problem like Fixhog. It seems to keep track of who is invited, but it doesn't add them until someone does a !members add <name>.

EDIT: Ahh ok, I have MembersManager V100. Where are the updated files. Also a bit off topic, but my City tracker isn't working ether. I downloaded the newer one "City Cloak Tracker 2" which is supposed to keep logs on who raids the city and when. Not sure if there is a problem with the plugin or maybe something else.
« Last Edit: May 24, 2010, 11:09:37 PM by mdk00420 »
Logged
« Reply #18 on: May 26, 2010, 01:23:30 AM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


I'm having a similar problem like Fixhog. It seems to keep track of who is invited, but it doesn't add them until someone does a !members add <name>.

EDIT: Ahh ok, I have MembersManager V100. Where are the updated files. Also a bit off topic, but my City tracker isn't working ether. I downloaded the newer one "City Cloak Tracker 2" which is supposed to keep logs on who raids the city and when. Not sure if there is a problem with the plugin or maybe something else.

I will PM you separately about the MembersManager plugin - it will be released in a different form in the near future.

You will need to unload the original City Cloak Tracker to use the Version 2 one .. otherwise it will report some 'conflict's occuring. Because the bot can only watch for Cloak change and Alien raid messages, it won't automatically detect the cloak state until it changes. This was the main reason for adding the 'logging' facility, so you could make an educated guess what state it was in last! The final thing to note, is that your bot toon must have the correct rank to 'spot' the cloak/raid messages in the appropriate chat channel; for orgs using the Department form, this is usually Squad Commander. A similar constraint applies for 'seeing' Tower Battle messages if you are using that plugin.
Logged
« Reply #19 on: May 26, 2010, 05:27:57 PM »
Rookie

View Profile
**

Epeen: 0
Posts: 50


I think the rank only applies to the "All Towers" channels and that everyone gets the city cloak messages.  Because I have a bot with a wave counter that starts every time someone lowers the cloak and does a raid, and it's only an applicant.
Logged
Pages: [1] 2   Go Up
Print
Jump to: