Central Forums Code Wiki Characters Tools 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  (Read 1770 times)
« on: January 22, 2010, 18:39:38 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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 71 times.)
« Last Edit: January 27, 2010, 11:38:45 by veremit »
Logged
« Reply #1 on: January 23, 2010, 16:10:22 »
Apprentice

View Profile
***

Epeen: 2
Posts: 115


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, 17:05:24 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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, 05:11:18 »
Apprentice

View Profile
***

Epeen: 2
Posts: 115


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, 11:36:42 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


Done. Amended link on top post.

SQL syntax is != I believe not <> Smiley
« Last Edit: January 27, 2010, 11:39:19 by veremit »
Logged
« Reply #5 on: January 27, 2010, 15:13:04 »
Apprentice

View Profile
***

Epeen: 2
Posts: 115


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, 15:21:46 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


Err .. you haven't tried it on Lliesbot?! Tongue
Logged
« Reply #7 on: January 27, 2010, 19:54:52 »
Apprentice

View Profile
***

Epeen: 2
Posts: 115


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, 03:47:35 »
Freshman

View Profile
*

Epeen: -3
Posts: 25


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, 17:49:13 »
Freshman

View Profile
*

Epeen: 0
Posts: 47


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?
Logged
« Reply #10 on: April 10, 2010, 21:41:42 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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 10, 2010, 23:23:31 »
Freshman

View Profile
*

Epeen: 0
Posts: 47


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 10, 2010, 23:26:02 by Fixhog »
Logged
« Reply #12 on: April 10, 2010, 23:36:09 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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, 00:03:30 »
Freshman

View Profile
*

Epeen: 0
Posts: 47


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, 21:17:59 by Fixhog »
Logged
« Reply #14 on: May 01, 2010, 20:01:04 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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, 07:20:44 »
Administrator
Grandmaster

View Profile
*****

Epeen: 23
Posts: 3071


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, 10:52:19 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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, 21:46:32 »
Noob

View Profile


Epeen: 0
Posts: 23


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, 22:09:37 by mdk00420 »
Logged
« Reply #18 on: May 26, 2010, 00:23:30 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


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, 16:27:57 »
Freshman

View Profile
*

Epeen: -3
Posts: 25


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
« Reply #20 on: June 01, 2010, 09:25:34 »
Apprentice

View Profile
***

Epeen: 3
Posts: 118


not possible to upload the upgraded MembersManager somewhere? could use it also Smiley
220/30 adventurer
Lilianda 220 doctor
Logged
« Reply #21 on: July 18, 2010, 20:59:13 »
Noob

View Profile


Epeen: 0
Posts: 23


Oh nah, the City Cloak Tracker 2 works, but sometimes... idk it must load wrong or something. I dont use the original with it, otherwise i couldnt even load it. The bot has general. It just seems like sometimes it doesnt pay attention to the city messages. But as of now its working.

EDIT: Ok as for the !recruits, i got the updated members manager. It still doesn't seem to work. Do i have to have it set on auto membership? I don't ever put it on auto membership because anyone that PMs our bot, will make it add them, then they can do anything they can invite themselves and other things. It's not really a big problem but i like to keep the bot secure.
« Last Edit: July 18, 2010, 21:44:39 by mdk00420 »
Logged
« Reply #22 on: July 27, 2010, 23:54:58 »
Administrator
Novice

View Profile
*****

Epeen: 4
Posts: 324


Locking thread as it has wandered considerably from the original post.

Feel free to open a new topic if necessary.
Logged
Pages: [1]   Go Up
Print
Jump to: