cuthbertx Voice
Joined: 27 Feb 2011 Posts: 4
|
Posted: Mon May 02, 2011 12:08 pm Post subject: User database with search and auto remove |
|
|
Hey guys,
I've been trying to wrap my head around this or find a script that is close to what I am looking for, and am now seeking assistance. Perhaps someone knows of a script that is close to what I am needing or has one already made.
What I am looking for, is a script where a user can type:
And then it will store the nick of the person who typed the command, the nick argument and the current time in a database.
Then the user can just type:
And it will list all of the nicks stored in the database with their own nick.
The users on the list should expire after 24 hours, hence the timestamp. My guess on having this done is have the code just check what the current time is and calculate the timestamp from the database and remove the user from the log if it's +24.
The !userlog command should list all entries in the database for the user that typed the command.
So example of the output.
| Code: | Cuthbertx: !userlog Testuser
BOT: Testuser has been added to your userlog with a timestamp of 5/2/2011 9:00 AM
Cuthbertx: !userlog Testuser2
BOT: Testuser2 has been added to your userlog with a timestamp of 5/2/2011 9:05 AM
Cuthbertx: !userlog
BOT: Here are your user logs: Testuser (5/2/2011 9:00 AM) Testuser2 (5/2/2011 9:05 AM) |
Any assistance on this or guiding me into the right direction would be much appreciated. |
|