Server Login Time&Date

03/15/2011 21:10 sk8tergurl#1
is there a way to make a console tell me the time and date some1 logged in when they login ?if so could u give me the code and tell me where to put it or change thnx:)
03/16/2011 12:50 Lateralus#2
Quote:
Originally Posted by sk8tergurl View Post
is there a way to make a console tell me the time and date some1 logged in when they login ?if so could u give me the code and tell me where to put it or change thnx:)
Initialize a timedate variable to the current time. Display it along with Console.Writeline with their character name when they log in.

That's if your source is using C#.
03/16/2011 14:35 shitboi#3
Quote:
Originally Posted by Lateralus View Post
Initialize a timedate variable to the current time. Display it along with Console.Writeline with their character name when they log in.

That's if your source is using C#.
Based on thread starter's post count, i do not believe that he is asking for algorithm. Given the level of simplicity of the problem, my perception of this request is that "I downloaded a server source and got it set up like the way code publisher has described. Now I would like to make it easier to manage, that is I need a program to record who has logged in at a given time so that me being the GM can feel a bit more useful:mofo:. Either you gimme progLam or show me EXACTLY where in my source code i need to insert YOUR codes to make MY server work the way I wanted"
03/16/2011 20:15 pro4never#4
That's... not an algorithm...

Console.WriteLine(DateTime.Now());

that's all you need to do when they logged in.


Or more likely...

Console.WriteLine(GC.MyChar.Name +" Logging in at: " + DateTime.Now.ToString());

Something more along those lines would be what I'd use but w/e

(tbh I forget if tostring is needed in this case but better safe then sorry on my part)

Note: you'd be wanting this in with your character login packet handling (1052 iirc? if not 1055, I always mix up those ids aaahah) or just search like ANSWER_OK
03/17/2011 01:09 shitboi#5
Well, the way i took lateralus' reply was that

1. get current time
2. print current time together with user/char info.

I saw them as pseudo codes more than actual code. Well, in any case, i was into the idea that the thread starter wants an implementation of a solution than just a solution itself.